- # Now invoke INNO compiler on the new ISS file
- # First, make a DOS filename or Inno Setup will get confused.
-
- unix2dosname2 $SETUPSCRIPTNAME
- DOSFILENAME=$RETVALUE
-
- # Note: the double slash is Mingw32/MSYS convention for
- # denoting a switch, that must not be converted into
- # a path (otherwise /c = c:/)
-
- cd `dirname $SETUPSCRIPTNAME`
- BASESCRIPTNAME=`basename $SETUPSCRIPTNAME`
- echo Invoking Inno Setup compiler on $BASESCRIPTNAME
-
- "$SETUPCOMPILER" //cc $BASESCRIPTNAME
+ sh $SCRIPTDIR/msw/makeinno.sh $SETUPIMAGEDIR $INNOTOP $INNOBOTTOM $SETUPSCRIPTNAME
+
+ if [ ! -f $SETUPSCRIPTNAME ]; then
+ echo "*** Error - something went wrong with the script file generation."
+ exit 1
+ fi
+
+ # Now replace %VERSION% with the real application version, and other
+ # variables
+ echo Replacing variables in the setup script
+ doreplace $SETUPSCRIPTNAME "s/%VERSION%/$VERSION/g"
+ doreplace $SETUPSCRIPTNAME "s/%COPYRIGHTHOLDER%/$AUTHOR/g"
+ doreplace $SETUPSCRIPTNAME "s/%VENDOR%/$VENDOR/g"
+
+ unix2dosname $READMEFILE
+ doreplace $SETUPSCRIPTNAME "s;%READMEFILE%;$RETVALUE;g"
+
+ unix2dosname $READMEAFTERFILE
+ doreplace $SETUPSCRIPTNAME "s;%READMEAFTERFILE%;$RETVALUE;g"
+
+ unix2dosname $LICENSEFILE
+ doreplace $SETUPSCRIPTNAME "s;%LICENSEFILE%;$RETVALUE;g"
+
+ doreplace $SETUPSCRIPTNAME "s/%APPNAME%/$APPNAME/g"
+ doreplace $SETUPSCRIPTNAME "s/%APPTITLE%/$APPTITLE/g"
+
+ unix2dosname $SETUPIMAGEDIR
+ doreplace $SETUPSCRIPTNAME "s;%SOURCEDIR%;$RETVALUE;g"
+
+ unix2dosname $DESTDIR
+ doreplace $SETUPSCRIPTNAME "s;%OUTPUTDIR%;$RETVALUE;g"
+
+ doreplace $SETUPSCRIPTNAME "s/%APPEXTENSION%/$APPEXTENSION/g"
+
+ # FIXME: how do we get the first name in the list?
+ if [ "$MANUALFILES" != "" ]; then
+ HELPFILE=`basename $MANUALFILES`
+ unix2dosname $HELPFILE
+ doreplace $SETUPSCRIPTNAME "s;%HELPFILE%;$RETVALUE;g"
+ fi
+
+ rm -f $DESTDIR/setup*.* $DESTDIR/wxMSW-$VERSION-Setup.exe
+
+ # Inno Setup complains if this step is not done
+ unix2dos --unix2dos $SETUPSCRIPTNAME
+
+ # Now invoke INNO compiler on the new ISS file
+ # First, make a DOS filename or Inno Setup will get confused.
+
+ unix2dosname2 $SETUPSCRIPTNAME
+ DOSFILENAME=$RETVALUE
+
+ # Note: the double slash is Mingw32/MSYS convention for
+ # denoting a switch, that must not be converted into
+ # a path (otherwise /c = c:/)
+
+ cd `dirname $SETUPSCRIPTNAME`
+ BASESCRIPTNAME=`basename $SETUPSCRIPTNAME`
+ echo Invoking Inno Setup compiler on $BASESCRIPTNAME
+
+ "$SETUPCOMPILER" //cc $BASESCRIPTNAME
+
+ if [ ! -f $DESTDIR/setup.exe ]; then
+ echo "*** Error - the setup.exe was not generated."
+ exit
+ fi
+
+ cd $DESTDIR
+ mv setup.exe wxMSW-$VERSION-Setup.exe