[2.35] Installer + ini file

4 replies [Last post]
Taz
Joined: Sep 28 2000
Posts: 5
[2.35] Installer + ini file
I can't imagine that you change these things by hand so it's a tad weird to see RELEASE NOTES for TeSSH v2.34 ============================= at the top of the 2.35 installer agreement. --- The ini file is still called cmud.ini not tessh.ini.
Taz :)
Zugg
Zugg's picture
Joined: Jan 1 1999
Posts: 178
Actually, the readme.txt file displayed by the installer *is* edited by hand still, so yes, I just forgot that TeSSH uses a different file than CMUD and forgot to update it. Sometime I need to research how to easy edit this file from the BAT file that I use for building CMUD/TeSSH/etc. I'd rather not install any unix "tools" but I might need to since I know there are lots of ways to do this from a *nix shell. Or maybe I need to convert my BAT files into a more modern Windows Script file. I just haven't had the time to learn much about how this is done these days. Right now, my BAT build file looks something like this:
MSBUILD tessh.dproj /p:configuration=final
ArmCLine Tessh.arm /P
C:\NSIS\makensis.exe C:\NSIS\tessh.nsi
The MSBUILD line runs the Delphi compiler and builds a particular configuration. The Version info gets stored in the resource part of the EXE file. The ArmCLine is the Armadillo copy protection that wraps the EXE file. The makensis is the NSIS installer that creates the SETUP.EXE file for installing. It actually runs a program that extracts the version info from the EXE file and writes it to a text file. Then NSIS reads the text file and sets up various variables in the installer to use the version info. So editing the README.TXT file in the installer would be the ideal place to do it, but I'm not sure the NSIS system can perform any fancy file editing.
Seb
Joined: Aug 14 2004
Posts: 18
Well I know you prefer not to install *nix tools, but I feel it is still worth plugging: UnixUtils: Native Win32 ports of some GNU utilities - very nice package including grep, wget (I probably use this the most), sed (this might be what you want here); very easy to install: just unzip and add it to your PATH (optional, but makes it a lot more user-friendly). Then you should be able to call sed or whatever you use from your batch file. Alternatively, you might be able to do something with the Windows PowerShell, which replaces batch files, but I've never used it. Or combine the power of both! Powershell for scripting, and UnixUtils for what that does best. (UnixUtils also includes a shell (zsh), but you may not want to switch shells!)
Vijilante
Joined: Nov 17 2001
Posts: 5
Just make a console version of subregex to load the file and make appropiate changes. I would suggest something along the lines of subregex SourceFile PatternSubFile. Then you are adding just one line to your batch file for each other file that needs to be updated. If I have a chance on the next subregex/PCRE build I will see what I can come up with.
The only good questions are the ones we have never answered before. Search the Forums
Zugg
Zugg's picture
Joined: Jan 1 1999
Posts: 178
Well, like I mentioned, the current BAT file doesn't actually have any knowledge of the version number. So yes, I'd probably need to write my own program that grabs the version info out of the resource and then uses it to perform the file editing. Just one of those many items for my to-do list. Another avenue that I haven't explored yet is MSBUILD itself. MSBUILD is a new addition in Delphi 2007, and there are several options for adding additional build steps to the process. Since MSBUILD is used by all Visual Studio developers, there might be some easy ways to perform the file editing as a step in the MSBUILD process itself. But that's another entire area of research to be done. But it's possible that MSBUILD already has the version info in some variable somewhere and could call an external application to do the editing. Seems like this kind of stuff would be pretty common in any automatted build scripts, so someone must have solved this problem somewhere already.