This message was edited by MrRadicalEd at 2005-2-12 14:32:55
I'm currently writing an installer script with Inno Setup that can use Pascal scripts for more functionality, but isn't required to actually make a decent installer. Anyway I had run in to a problem that requires a Pascal script, and while I am highly interested in learning Pascal I am actually focused on getting this installer completed to get this side project out the door.
In my installer script file I have a line like this:
Source: C:\MFCMproject\Game Directories\counter-strike\cstrike\MFCM\mfcm.cfg; DestDir: {reg:HKCU\SOFTWARE\Valve\Steam,ModInstallPath}\counter-strike\cstrike\MFCM
The source file's destination directory is read from an existing registry entry. The problem is that the path read from the registry key is too long and an extra directory needs to be removed at the end.
the entry ModInstallPath is "c:\program files\valve\steam\steamapps\email@address.net\half-life"
and needs to look like:
"c:\program files\valve\steam\steamapps\email@address.net"
The way Pascal code is inserted in to the installer script is by placing Open Bracket"["Code"]"Close Bracket in the script and using the constant {code:...} where you need to use the function
so instead of {reg:HKxx...} it would be {code:function...} The function being the script needed.
Help with this matter would be very greatly appreciated and would installer help would be included in the credits