A quick hack to build Inno setups using iscc (the Inno Setup preprocessor):

   1 import SCons.Builder;
   2 import os;
   3 
   4 def runInno(source,target,env,for_signature):
   5     INNO_DEFINES=" ".join(['/D'+define for define in env['ISCCDEFINES']]);
   6     (TARGETDIR,TARGETFILE) = os.path.split(str(target[0]));
   7     return '%(ISCC)s %(SOURCE)s %(DEFINES)s /O "%(TARGETDIR)s" /F"%(TARGETFILE)s" %(ISCCOPTIONS)s ' % \
   8         {
   9             'ISCC':env['ISCC'],
  10             'ISCCOPTIONS':env['ISCCOPTIONS'],
  11             'DEFINES':INNO_DEFINES,
  12             'SOURCE':str(source[0]),
  13             'TARGETDIR':TARGETDIR,
  14             'TARGETFILE':TARGETFILE
  15         }
  16 
  17 def generate(env,**kw):
  18     env['ISCC']='iscc';
  19     env['ISCCOPTIONS']='/q';
  20     env['ISCCDEFINES']=[];
  21     env['BUILDERS']['InnoInstaller'] = SCons.Builder.Builder( generator=runInno,
  22                                                                                         src_suffix='.iss');
  23 
  24 def exists(env):
  25     return env.WhereIs("iscc");

In the SConstruct file:

   1 installer=env.InnoInstaller(target='setup_x64',source='setup_x64.iss',ISCCDEFINES=['APP_NAME="Your App Name"','APP_VERSION="10.4"']);
   2 env.Depends(installer,ALL_THE_DEPENDENCIES); # need to do this manually since there is no dep scanner yet

InnoSetupBuilder (last edited 2008-03-12 02:47:10 by localhost)