Menu

#11 ISTool editor add chars where they shouldnt be

open
nobody
None
5
2014-08-19
2008-07-25
Anonymous
No

From uwe.schuster@woodward.com

This is for version 5.2.1

In our innosetup scripts we are embedding "empy-statements". These are some kind of macros in python syntax that are expanded from the empy preprocessor which is invoked from a python script. This way we can push some variable informations like build number, path of files etc. from our automatic build system (SCons, based on python) into the setup script before running the innosetup compiler.

If i try to use ISTool to open and edit such kind of script, the editor by itself inserts some weird characters in the lines that belongs to the empy processor.

Example of such a script (lines between @{
and }@ are processed by empy):

-----
[Setup]
@{
import os.path
dict=env.Dictionary()
ProgramName =dict ["IS_PROGRAM_NAME"]
}@

[Files]
@{
srcFiles = dict[ "IS_SOURCEFILES" ]
for srcFile in srcFiles:
component = srcFiles[ srcFile ] [0]
parameter = srcFiles[ srcFile ] [1]
print 'Source: %s; DestDir: {app}; DestName: %s; Components: %s; %s' \ % ( srcFile, os.path.split( srcFile )[1], component, parameter )
}@
-----

If loaded with ISTool it is showed as this (note the additional ':', '=' ';' signs in some lines):

---
[Setup]
@{=
import os.path=
dict=env.Dictionary()
ProgramName =dict ["IS_PROGRAM_NAME"]
}@=

[Files]
@{:
srcFiles = dict[ "IS_SOURCEFILES" ]:
for srcFile in srcFiles:
; component = srcFiles[ srcFile ] [0]:
; parameter = srcFiles[ srcFile ] [1]:
; print 'Source: %s; DestDir: {app}; DestName: %s; Components: %s; %s': ; \ ; % ( srcFile, os.path.split( srcFile )[1], component, parameter ):
}@:
---

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.