Tera Term Development
- Development Environment, Libraries
- Compiler, Tools
- Libraries
- Build
- Build environment
- How to build
- Checkout source code
- Build libaries
- Build Tera Term
- Build TTSSH
- Build TTProxy
- Build TTXKanjiMenu
- Build TTXSamples
- Build TeraTerm Menu
- Build CygTerm
- Build HTML help file
- Note for development
- Add entry to TERATERM.INI
- Naming rule to add menu ID
- What to do when new macro command is added?
- Icon
- Edit language files
- How to release Tera Term installation package
- From start release until create RC
- From create RC until release
- Release
- 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:
- Visual Studio Community 2019 (latest)
Note: The executable program which was compiled by this version does not work on Windows XP, 2000, NT 4.0, 95, 98 and Me.
- Visual Studio Community 2022 (latest)
Note: The executable program which was compiled by this version does not work on Windows Vista, XP, 2000, NT 4.0, 95, 98 and Me.
Following tools are needed to build Tera Term:
- Perl
Any of the following:
For build.
- For compile OpenSSL./li>
- Converts character-code and return-code of documents.
- For get the revision number.
- Subversion
Any of the following:
For checkout source code.
The command line version of the same version that was used for checkout source code. For get the revision number.
- Patch
For apply patches to OpenSSL source code.
- HTML Help Compiler
For build HTML help file.
- Inno Setup
- Inno Setup 5.6.1 ANSI (http://www.jrsoftware.org/isinfo.php)
- ISTool 5.3.0.1 (https://sourceforge.net/projects/istool/)
For build installer.
Libraries
Build
Build environment
- Install Visual Studio 2005
- Visual Studio 2005
- Service Pack 1 (VS80sp1-KB926601-X86-ENU.exe)
- Microsoft Visual Studio 2005 Service Pack 1 MFC Security Update (VS80sp1-KB2538218-v2-X86-INTL.exe)
- When Windows Vista or higher, Visual Studio 2005 Service Pack 1 Update for Windows Vista (VS80sp1-KB932232-X86-ENU.exe)
- Install Windows SDK 7.0
- Install Cygwin
About required packages, refer to this page.
- Install Perl
- Install Subversion
"svnversion" command is used, that is found in "libs\svn\bin\svnversion.exe", "svnversion in PATH."
If "svnversion" is not present in PATH, put "svnversion.exe" to "libs\svn\bin" directory.
- Install Patch
"patch" command is used, that is found in "libs\openssl_patch\patch.exe", "svnversion in PATH."
If "patch" is not present in PATH, put "svnversion.exe" to "libs\openssl_patch" directory.
https://gitforwindows.org/ (https://github.com/git-for-windows/git/releases/latest). Next ©çÅ êÎANext, extract the file and copy the patch.exe, msys-gcc_s-1.dll, msys-2.0.dll of usr\bin directory.
- Install HTML Help Compiler
Installing Visual Studio (2017 or later) with "C++ MFC" option, HTML Help Compiler (hhc.exe) is installed.
- Install Inno Setup
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. *
- Oniguruma
- Extract oniguruma source into libs/oniguruma directory.
- Run libs\buildoniguruma6.bat. *
- SFMT
- Extract SFMT source into libs/SFMT directory.
- Run libs\buildSFMT.bat. *
- Modify version information in libs/SFMT/SFMT_version_for_teraterm.h if necessary.
- OpenSSL
- Extract openssl source into libs/openssl directory.
Note: When the libs/openssl/Makefile.bak file exists on the OpenSSL 1.0.0e or later, delete the file only once.
- Run buildopenssl11.bat. *
- Zlib
- Extract zlib source into libs/zlib directory.
- Run buildzlib.bat. *
- PuTTY
- Extract PuTTY source into libs/putty directory.
- The reference C implementation of Argon2
- Extract argon2 source into libs/argon2 directory.
Build Tera Term
- Open teraterm\ttermpro.sln with Visual Studio.
The linefeed code of .sln file must be "CR+LF".
- Build Tera Term solution.
- 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.
- Open ttssh2\ttssh.sln with Visual Studio.
- Build TTSSH solution.
- 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.
- Open TTProxy\TTProxy.sln with Visual Studio.
- Build TTProxy solution.
- TTProxy DLL module will be generated in TTProxy\Debug / TTProxy\Release directory if the building is successful.
ttpcmn.dll (ttpcmn.lib) must be built beforehand by teraterm\ttermpro.sln.
- Open TTXKanjiMenu\ttxkanjimenu.sln with Visual Studio.
- Build TTXKanjiMenu solution.
- 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.
- Open TTXSamples\TTXSamples.sln with Visual Studio.
- Build TTXSamples solution.
- DLL modules will be generated in TTXSamples\Debug / TTXSamples\Release directory if the building is successful.
- Open ttpmenu\ttpmenu.sln with Visual Studio.
- Build ttpmenu solution.
- ttpmenu.exe will be generated in ttpmenu\Debug / ttpmenu\Release directory if the building is successful.
Build CygTerm+
- Launch Cygwin shell and go to cygterm directory.
# cd cygterm
- Compile CygTerm+.
# make
- cygterm.exe and cyglaunch.exe will be generated.
Build HTML help file
- 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?
- Coding
- get a new number of command internal ID.
... teraterm/ttmacro/ttmparse.h
- add a if statement to below function.
... CheckReservedWord@teraterm/ttmacro/ttmparse.c
- add a caller doing the macro command.
... ExecCmnd@teraterm/ttmacro/ttl.c
- make a function code for the macro command.
- Help topic
- make the command help file.
... doc/LANG/html/macro/command/hogefunc.html
- add to command index page.
... doc/LANG/html/macro/command/index.html
- add the file to help topic.
... doc/LANG/teraterm.hhc
- get a new number of context ID in help page.
The value is internal ID + 92000.
... teraterm/common/helpid.h
- make the alias between context ID and calling file.
Open the .hhp file by using Text Editor, added a html line in [ALIAS] tag.
... doc/LANG/teraterm.hhp
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 32px | 4bit 16px | 32bit 256px | 32bit 48px | 32bit 32px | 32bit 16px |
teraterm\common\teraterm.ico | TTERM (Default) | BMP | BMP | BMP | BMP | BMP | BMP |
teraterm\common\teraterm_classic.ico | TTERM_CLASSIC | BMP | BMP | - | - | - | - |
teraterm\common\teraterm_3d.ico | TTERM_3D | BMP | BMP | BMP | BMP | BMP | BMP |
VT (VT Window)
icon file | icon name | 4bit 32px | 4bit 16px | 32bit 256px | 32bit 48px | 32bit 32px | 32bit 16px |
teraterm\common\vt.ico | VT (Default) | BMP | BMP | BMP | BMP | BMP | BMP |
teraterm\common\vt_classic.ico | VT_CLASSIC | BMP | BMP | - | - | - | - |
teraterm\common\vt_3d.ico | VT_3D | BMP | BMP | BMP | BMP | BMP | BMP |
TEK (TEK Windows)
icon file | icon name | 4bit 32px | 4bit 16px | 32bit 256px | 32bit 48px | 32bit 32px | 32bit 16px |
teraterm\common\tek.ico | TEK | BMP | BMP | - | - | - | - |
M (Macro)
icon file | icon name | 4bit 32px | 4bit 16px | 32bit 256px | 32bit 48px | 32bit 32px | 32bit 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 name | 4bit 32px | 4bit 16px | 32bit 256px | 32bit 48px | 32bit 32px | 32bit 16px |
teraterm\keycode\keycode.ico | - | BMP | BMP | - | BMP | - | - |
TTSSH
icon file | icon name | 4bit 32px | 4bit 16px | 32bit 256px | 32bit 48px | 32bit 32px | 32bit 16px |
teraterm\ttpmacro\ttsecure.ico | flat (Default) | BMP | BMP | BMP | BMP | BMP | BMP |
teraterm\ttpmacro\ttsecure_classic.ico | classic | 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 32px | 4bit 16px | 32bit 256px | 32bit 48px | 32bit 32px | 32bit 16px |
ttpmenu\teraterm.ico | - | BMP | BMP | - | BMP | BMP | BMP |
Cygterm+
icon file | icon name | 4bit 32px | 4bit 16px | 32bit 256px | 32bit 48px | 32bit 32px | 32bit 16px |
cygwin\cygterm\cygterm.ico | CYGTERM | 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) |
| #ffffff | 255,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
- Confirm ticket and branches.
- Confirm in project team.
- Organize / decide whether to include bug fix / feature in this release or defer.
- Merge branches
- Verify trunk / 4-stable and working branches.
- Close tickets.
- Confirm tools, libraries, import sources.
From create RC until release
- Confirm documents.
- 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.
- teraterm\common\tt-version.h
- ttssh2\ttxssh\ttxssh-version.h
- ttpmenu\ttpmenu.rc // only modifying
- TTProxy\TTProxy.rc // only modifying
- TTXKanjiMenu\ttxkanjimenu.rc // only modifying
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.
- Increment the year of last publication of copyright notice if it is first release in this year.
- teraterm\keycode\keycode-version.rc // VERSIONINFO
- teraterm\teraterm\tt-version.rc // VERSIONINFO
- teraterm\ttpcmn\ttpcmn-version.rc // VERSIONINFO
- teraterm\ttpdlg\ttpdlg.rc // dialog
- teraterm\ttpfile\ttpfile-version.rc // VERSIONINFO
- teraterm\ttpmacro\ttm-version.rc // VERSIONINFO
- teraterm\ttpset\ttpset-version.rc // VERSIONINFO
- teraterm\ttptek\ttptek-version.rc // VERSIONINFO
- ttssh2\ttxssh\ttxssh.rc // dialog
- ttssh2\ttxssh\ttxssh-version.rc // VERSIONINFO
- ttpmenu\ttpmenu.rc // dialog, VERSIONINFO
- TTProxy\TTProxy.rc // dialog, VERSIONINFO(en), VERSIONINFO(ja)
- TTXKanjiMenu\ttxkanjimenu.rc // VERSIONINFO
- installer\teraterm.iss
- installer\release\license.txt // Tera Term, TTSSH, Cygterm+, TTProxy, TeraTerm Menu, TTX KanjiMenu
- doc\en\html\index.html
- doc\en\html\about\copyright.html // Tera Term, TTSSH, Cygterm+, TTProxy, TeraTerm Menu, TTX KanjiMenu
- doc\en\html\macro\index.html
- doc\ja\html\index.html
- doc\ja\html\about\copyright.html // Tera Term, TTSSH, Cygterm+, TTProxy, TeraTerm Menu, TTX KanjiMenu
- doc\ja\html\macro\index.html
- Replace 64bit Cygwin binary
- Create installer.
- Version up AppVer and add "RC" in teraterm.iss.
- #define AppVer "4.105"
+ #define AppVer "4.106-RC1"
- Comment out snapshot in teraterm.iss.
- #define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', '');
+ ;#define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', '');
- Change calling batch file to enable rebuild and create archive.
[_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
- Commit this state.
- Open teraterm\installer\teraterm.iss with ISTool, and create installer by "Project"-"Compile Setup."
- Compress portable version with zip.
- Test run installer, run and connect in all supported OS.
- Add to OSDN Release
- Add new release (e.g. "4.106 RC") to "Tera Term RC" Package.
- Add installer and portable zip file to new release.
- Announce RC release.
- Get feedbacks.
If changed source code, redo "Confirm documents" and "Test run and connect in all supported OS."
Release
- Confirm documents. (same as above)
- Modify release date.
- Create installer.
- Commit this state.
- 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
- Re-checkout from svn tag.
All source code is same as development branch. Only SVN revision is different.
- Create installer.
- Open teraterm\installer\teraterm.iss with ISTool, and create installer by "Project"-"Compile Setup."
- Compress portable version with zip.
- Update OSDN project site.
- add new release (e.g. "4.106") to "Tera Term" Package.
- Add installer and portable zip file to new release.
- Submit news.
- Update OSDN project home page (https://ttssh2.osdn.jp).
How to update project home page (in Japanese).
- Announce release.
- 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
- 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.