Tera Term Development
- Development Environment
- Libraries
- Notice for SVN committer
- Add entry to TERATERM.INI
- Naming rule to add menu ID
- What to do when new macro command is added?
- How to build Libraries
- How to build Tera Term
- How to build TeraTerm Menu
- How to build TTXKanjiMenu
- How to build TTProxy
- How to build TTSSH
- How to build CygTerm
- How to build TTXSamples
- How to build HTML help file
- How to release Tera Term installation package
Development Environment
- OS
- Windows XP Professional
- Windows 8 Pro
- Windows 8.1 Pro
- Windows 10 Pro
- Compiler used for release in Tera Term Project
- Visual Studio 2005 SP1 Standard Edition (or higher edition)
- Supported Compiler
- Installer
- Others
- Cygwin the latest version (because CygTerm+ supports Vista or later from v4.105)
- ActivePerl 5.10 or later version, Strawberry Perl 5.30.1.1 or later version
converts character-code and return-code of documents for building OpenSSL.
Libraries
Notice for SVN committer
SVN repository for committer is the following:
svn+ssh://svn.osdn.net/svnroot/ttssh2/trunk
Should not edit checkout file in copying directory.
The other modification code may be deleted in SVN server when you commit checkout file. Also, fix it carefully when the conflicting occurs.
Should not have opened checkout file.
SVN commit procedure may be failure while checkout file will have been opened.
Edit language files
Use the text editor supporting multi languages(vim, EmEditor, Notepad++, etc) to edit the language files(installer\release\lang\*.lng).
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 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
How to build Libraries
- PuTTY (used by TTSSH)
- Extract PuTTY source into libs/putty directory.
- Oniguruma (used by Tera Term Macro)
- Extract oniguruma source into libs/oniguruma directory.
- Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
- Move 'libs' directory on the command prompt. And run buildoniguruma6.bat.
- OpenSSL (used by TTSSH)
- Extract openssl source into libs/openssl directory.
- When the libs/openssl/Makefile.bak file exists on the OpenSSL 1.0.0e or later, delete the file only once
- Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
- Move 'libs' directory on the command prompt. And run buildopenssl11.bat.
- Zlib (used by TTSSH)
- Extract zlib source into libs/zlib directory.
- Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
- Move 'libs' directory on the command prompt. And run buildzlib.bat.
- SFMT (used by Tera Term Macro)
- Extract SFMT source into libs/SFMT directory.
- Launch 'Visual Studio 2005 Command Prompt' batch file from start menu.
- Move 'libs' directory on the command prompt. And run buildSFMT.bat.
- Modify version information in libs/SFMT/SFMT_version_for_teraterm.h if necessary.
- cJSON (used by TTXCheckUpdate plugin)
- Extract cJSON source into libs/cJSON directory.
- The reference C implementation of Argon2 (used by TTSSH)
- Extract argon2 source into libs/argon2 directory.
How to build Tera Term
To build Tera Term source code is shown in the following step:
And you should use Visual Studio 2005 Standard Edition later version to build Tera Term because Tera Term program links MFC library (Visual Studio 2005 Express Edition can't be used).
- Checkout Tera Term source code from OSDN(https://osdn.net/projects/ttssh2/).
- Open teraterm\visualc\ttermpro.sln with Visual Studio.
The linefeed code of .sln file must be "CR+LF".
- Build Tera Term solution.
- Tera Term execution program will be generated in teraterm\visualc\bin directory if the building is successful.
- Checkout TeraTerm Menu source code from OSDN(https://osdn.net/projects/ttssh2/).
- Open ttpmenu\ttpmenu.sln with Visual Studio.
- Build ttpmenu solution.
- ttpmenu.exe will be generated in Release directory if the building is successful.
- Checkout TTXKanjiMenu source code from OSDN(https://osdn.net/projects/ttssh2/).
- Open TTXKanjiMenu\ttxkanjimenu.sln with Visual Studio.
- Build ttpmenu solution.
- ttxkanjimenu.dll will be generated in TTXKanjiMenu directory if the building is successful.
How to build TTProxy
To build TTProxy source code is shown in the following step:
And you need Visual Studio 2005(VC++8.0) to build.
- Checkout TTProxy source code from OSDN(https://osdn.net/projects/ttssh2/).
- Open TTProxy\TTProxy.sln with Visual Studio.
- Build TTProxy solution.
- TTProxy DLL module will be generated in TTProxy directory if the building is successful.
How to build TTSSH
To build TTSSH source code is shown in the following step:
And you need Visual Studio 2005(VC++8.0) and ActivePerl to build.
VS2005 Express Edition is able to build TTSSH. TTSSH links to ttpcmn.lib and it must be created beforehand. VS2005 Express Edition cannot build Tera Term, but it can create ttpcmn.lib
On VS2008 Express Edition, following error occurs:
.\ttxssh.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'.
To avoid this error, edit ttxssh.rc file. Delete the line of "afxres.h", and add 2 lines.
- #include "afxres.h"
+ #include
+ #define IDC_STATIC -1
- Checkout TTSSH source code from OSDN(https://osdn.net/projects/ttssh2/).
- Open ttssh2\ttssh.sln with Visual Studio.
- Build TTSSH solution.
- TTSSH DLL will be generated in ttssh2\ttxssh directory if the building is successful.
How to build CygTerm
To build CygTerm source code is shown in the following step:
- Install Cygwin(https://www.cygwin.com/) to your PC.
- Launch Cygwin shell and go to cygterm directory.
# cd cygterm
- Compile Cygterm.
# make
How to build TTXSamples
To build TTXSamples source code is shown in the following step:
And you need Visual Studio 2005(VC++8.0) to build. VS2005 Express Edition is able to build TTXSamples.
- Checkout TTXSamples source code from OSDN(https://osdn.net/projects/ttssh2/).
- Open TTXSamples\TTXSamples.sln with Visual Studio.
- Build TTXSamples solution.
- TTXSamples DLL module will be generated in TTXSamples directory if the building is successful.
How to build HTML help file
To build HTML help file is shown in the following step:
- Install HTML Help Compiler
Installing Visual Studio (2017 or later) with "C++ MFC" option, HTML Help Compiler (hhc.exe) is installed.
- Run doc\makechm.bat
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
- Onttpmenu\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\ttpmacro\ttm-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.
[PreCompile]
Name: makechm.bat
- Name: build.bat
- ;Name: build.bat; Parameters: rebuild
+ ;Name: build.bat
+ Name: build.bat; Parameters: rebuild
[PostCompile]
- ;Name: makearchive.bat; Parameters: release
+ Name: makearchive.bat; Parameters: release
- Commit this state.
- Open teraterm\installer\teraterm.iss with Inno Script Studio, and create installer by "Project"-"Compile."
- 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 Inno Script Studio, and create installer by "Project"-"Compile."
- 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', '', '');
[PreCompile]
Name: makechm.bat
- ;Name: build.bat
- Name: build.bat; Parameters: rebuild
+ Name: build.bat
+ ;Name: build.bat; Parameters: rebuild
[PostCompile]
- 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.