Tera Term Development

  1. Development Environment, Libraries
    1. Compiler, Tools
    2. Libraries
  2. Build
    1. Build environment
    2. How to build
      1. Checkout source code
      2. Build libaries
      3. Build Tera Term
      4. Build TTSSH
      5. Build TTProxy
      6. Build TTXKanjiMenu
      7. Build TTXSamples
      8. Build TeraTerm Menu
      9. Build CygTerm
      10. Build HTML help file
  3. Note for development
    1. Add entry to TERATERM.INI
    2. Naming rule to add menu ID
    3. What to do when new macro command is added?
    4. Icon
    5. Edit language files
  4. How to release Tera Term installation package
    1. From start release until create RC
    2. From create RC until release
    3. Release
    4. About code freeze

Development Environment

Compiler, Tools

Compiler and tools used for release in Tera Term Project:

Tera Term is able to build by following compilers:

Following tools are needed to build Tera Term:

Libraries

Build

Build environment

How to build

Checkout source code

Checkout source code from OSDN (http://svn.osdn.net/svnroot/ttssh2/branches/4-stable/).
Project member have to use svn+ssh://<username>@svn.osdn.net/svnroot/ttssh2/branches/4-stable/ or https://svn.osdn.net/svnroot/ttssh2/branches/4-stable/.

Build libraries

Launch 'Visual Studio 2005 Command Prompt' batch file from start menu, or set appropriate directory to PATH.
You can run libs\buildall.bat to build all libraries instead of run each batch files. *

Build Tera Term

  1. Open teraterm\ttermpro.sln with Visual Studio.
    The linefeed code of .sln file must be "CR+LF".
  2. Build Tera Term solution.
  3. Tera Term execution program files will be generated in teraterm\Debug / teraterm\Release directory if the building is successful.

Build TTSSH

ttpcmn.dll (ttpcmn.lib) must be built beforehand by teraterm\ttermpro.sln.
  1. Open ttssh2\ttssh.sln with Visual Studio.
  2. Build TTSSH solution.
  3. TTSSH DLL module will be generated in ttssh2\ttxssh\Debug / ttssh2\ttxssh\Release directory if the building is successful.

Build TTProxy

ttpcmn.dll (ttpcmn.lib) must be built beforehand by teraterm\ttermpro.sln.
  1. Open TTProxy\TTProxy.sln with Visual Studio.
  2. Build TTProxy solution.
  3. TTProxy DLL module will be generated in TTProxy\Debug / TTProxy\Release directory if the building is successful.

Build TTXKanjiMenu

ttpcmn.dll (ttpcmn.lib) must be built beforehand by teraterm\ttermpro.sln.
  1. Open TTXKanjiMenu\ttxkanjimenu.sln with Visual Studio.
  2. Build TTXKanjiMenu solution.
  3. Ttxkanjimenu DLL module will be generated in TTXKanjiMenu\Debug / TTXKanjiMenu\Release directory if the building is successful.

Build TTXSamples

ttpcmn.dll (ttpcmn.lib) must be built beforehand by teraterm\ttermpro.sln.
  1. Open TTXSamples\TTXSamples.sln with Visual Studio.
  2. Build TTXSamples solution.
  3. DLL modules will be generated in TTXSamples\Debug / TTXSamples\Release directory if the building is successful.

Build TeraTerm Menu

  1. Open ttpmenu\ttpmenu.sln with Visual Studio.
  2. Build ttpmenu solution.
  3. ttpmenu.exe will be generated in ttpmenu\Debug / ttpmenu\Release directory if the building is successful.

Build CygTerm+

  1. Launch Cygwin shell and go to cygterm directory.
    # cd cygterm
    
  2. Compile CygTerm+.
    # make
    
  3. cygterm.exe and cyglaunch.exe will be generated.

Build HTML help file

  1. Run doc\makechm.bat.

Note for development

Add entry to TERATERM.INI

Entry name
Unfortunately, the confusing entries such as EnableFoo... and DisableBar... are included.
It recommends that the new name like as Baz....

The first digit is 5.
The second digit is:
  Tera Term VT window          0
  Tera Term TEK window         1
  TTSSH                        2
  TTProxy                      3
  TTXKanjiMenu                 4
The third digit is:
  [File] menu                  1
  [Edit] menu                  2
  [Setup] menu                 3
  [Control] menu               4
  [Window] menu                8
  [Help] menu                  9

Example: adding a TTSSH menu under File menu

#define ID_SSHSCPMENU       52110

What to do when new macro command is added?

Icon

Icon file includes 4bit 32px and 16px images, 32bit 256px, 48px, 32px and 16px images.
Each icon files include following kind images.
Visual Studio 2005 does not support an icon that is include PNG image.

T (Tera Term)
icon file icon name 4bit 32px4bit 16px32bit 256px32bit 48px32bit 32px32bit 16px
teraterm\common\teraterm.ico TTERM (Default)BMP BMP BMP BMP BMP BMP
teraterm\common\teraterm_classic.icoTTERM_CLASSIC BMP BMP - - - -
teraterm\common\teraterm_3d.ico TTERM_3D BMP BMP BMP BMP BMP BMP
VT (VT Window)
icon file icon name 4bit 32px4bit 16px32bit 256px32bit 48px32bit 32px32bit 16px
teraterm\common\vt.ico VT (Default)BMP BMP BMP BMP BMP BMP
teraterm\common\vt_classic.icoVT_CLASSIC BMP BMP - - - -
teraterm\common\vt_3d.ico VT_3D BMP BMP BMP BMP BMP BMP
TEK (TEK Windows)
icon file icon name4bit 32px4bit 16px32bit 256px32bit 48px32bit 32px32bit 16px
teraterm\common\tek.icoTEK BMP BMP - - - -
M (Macro)
icon file icon name4bit 32px4bit 16px32bit 256px32bit 48px32bit 32px32bit 16px
teraterm\ttpmacro\ttmacro.ico - BMP BMP BMP BMP BMP BMP
teraterm\ttpmacro\ttmacro_3d.ico - BMP BMP BMP BMP BMP BMP
keycode
icon file icon name4bit 32px4bit 16px32bit 256px32bit 48px32bit 32px32bit 16px
teraterm\keycode\keycode.ico- BMP BMP - BMP - -
TTSSH
icon file icon name 4bit 32px4bit 16px32bit 256px32bit 48px32bit 32px32bit 16px
teraterm\ttpmacro\ttsecure.ico flat (Default) BMP BMP BMP BMP BMP BMP
teraterm\ttpmacro\ttsecure_classic.icoclassic BMP BMP - - - -
teraterm\ttpmacro\ttsecure_yellow.ico yellow BMP BMP BMP BMP BMP BMP
teraterm\ttpmacro\ttsecure_green.ico green BMP BMP BMP BMP BMP BMP
TeraTerm Menu
icon file icon name 4bit 32px4bit 16px32bit 256px32bit 48px32bit 32px32bit 16px
ttpmenu\teraterm.ico- BMP BMP - BMP BMP BMP
Cygterm+
icon file icon name 4bit 32px4bit 16px32bit 256px32bit 48px32bit 32px32bit 16px
cygwin\cygterm\cygterm.icoCYGTERM BMP BMP - BMP BMP BMP

The store order of image files in icon file is "bit depth ASC", "pixel size DESC."
Otherwise, when a program load an icon image without specifying pixel size for get maximum size image, API returns first image.

Icon file include 4-bit images.
Windows NT 4.0 supports only 4-bit icon. And notification area icon on Windows 2000 supports only 4-bit icon.
4-bit color palette is followings:

  #000000(0,0,0)
  #800000(128,0,0)
  #ff0000(255,0,0)
  #ff00ff(255,0,255)
  #008080(0,128,128)
  #008000(0,128,0)
  #00ff00(0,255,0)
  #00ffff(0,255,255)
  #000080(0,0,128)
  #800080(128,0,128)
  #0000ff(0,0,255)
  #c0c0c0(192,192,192)
  #808080(128,128,128)
  #808000(128,128,0)
  #ffff00(255,255,0)
  #ffffff255,255,255

Source file of each icon images are followings:

source file bit T VT Macro SSH Cygwin
teraterm\common\flat_icon_16.psd 4bit v v v v v
32bit v v v v v
teraterm\common\flat_icon_32.psd 4bit v v v v v
32bit v v v v v
teraterm\common\flat_icon_48.psd 32bit v v v v v
teraterm\common\flat_icon_256.psd 32bit v v v v -
source file bit Keycode
teraterm\common\keycode_48.psd 4bit v

Edit language files

Use the text editor supporting multi languages(vim, EmEditor, Notepad++, etc) to edit the language files(installer\release\lang\*.lng).

How to release Tera Term installation package

To release Tera Term installation package is shown in the following step:

From start release until create RC

  1. Confirm ticket and branches.
  2. Confirm tools, libraries, import sources.

From create RC until release

  1. Confirm documents.
  2. Increment the version while RC release process.

    The binary is released for test in this timing. Prevent that old and new binary have same version number.

    By way of exception, CygTerm+ always upgrades not regarding Tera Term release process when the patch is committed.
    The release date is the day committed by a developer.
    Because user can get gcc compiler for free.

  3. Increment the year of last publication of copyright notice if it is first release in this year.
  4. Replace 64bit Cygwin binary

  5. Create installer.
  6. Test run installer, run and connect in all supported OS.
  7. Add to OSDN Release
  8. Announce RC release.
  9. Get feedbacks.

    If changed source code, redo "Confirm documents" and "Test run and connect in all supported OS."

Release

  1. Confirm documents. (same as above)
  2. Modify release date.
  3. Create installer.
  4. Commit this state.
  5. Create SVN tag.
    The naming rule is `teraterm-version' (e.g. teraterm-4_106).
    svn copy -m "Release 4.106" \
        svn+ssh://svn.osdn.net/svnroot/ttssh2/branches/4-stable \
        svn+ssh://svn.osdn.net/svnroot/ttssh2/tags/teraterm-4_106
        
  6. Re-checkout from svn tag.

    All source code is same as development branch. Only SVN revision is different.

  7. Create installer.
  8. Update OSDN project site.
  9. Update OSDN project home page (https://ttssh2.osdn.jp).

    How to update project home page (in Japanese).

  10. Announce release.
  11. Revert teraterm.iss in development branch.
    - ;#define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', '');
    + #define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', '');
    
      [_ISToolPreCompile]
      Name: makechm.bat
    - ;Name: build.bat
    - Name: build.bat; Parameters: rebuild
    + Name: build.bat
    + ;Name: build.bat; Parameters: rebuild
      
      [_ISToolPostCompile]
    - Name: makearchive.bat; Parameters: release
    + ;Name: makearchive.bat; Parameters: release
        
  12. Update Chocolatey.

About code freeze

After code freeze, only critical bug fix is able to committed.
Code freeze start with RC commit in development branch, and end with revert teraterm.iss commit in development branch.