Register to post in forums, or Log in to your existing account
 

This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.     Home » Forums » TeSSH Discussion
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Thu Jul 31, 2008 10:35 pm   

[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 :)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Jul 31, 2008 10:54 pm   
 
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:
Code:
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.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Thu Jul 31, 2008 11:13 pm   
 
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!)
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jul 31, 2008 11:14 pm   
 
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
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Jul 31, 2008 11:23 pm   
 
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.
Reply with quote
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Home » Forums » TeSSH Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net