Further tweek for windows installer's behavior.

* 64-bit installer to do installation only in 64-bit architecture.
* 32-bit installer to install files in 'Program Files (x86)' on 64-bit architecture.
* Require to uninstall old x86 mode installation only for 64-bit installer on 64-bit architecture.
* compile.sh builds installer and portable zip archive for the environment the shell is running on.
* Added tuxpaint-i686.iss and tuxpaint-x86_64.iss which just define 'BuildTarget' and include tuxpaint.iss.
This commit is contained in:
dolphin6k 2021-10-22 17:24:19 +09:00
parent 764a8327db
commit 174e500889
4 changed files with 32 additions and 13 deletions

View file

@ -11,18 +11,17 @@ else
fi fi
echo "Building installer ... " echo "Building installer ... "
result=`/C/Program\ Files\ \(x86\)/Inno\ Setup\ 6/ISCC tuxpaint.iss | grep installer.exe` result=`/C/Program\ Files\ \(x86\)/Inno\ Setup\ 6/ISCC tuxpaint-${arch}.iss | grep installer.exe`
if [ "x$result" != "x" ]; then if [ "x$result" != "x" ]; then
installer=`basename $result` installer=`basename $result`
fi fi
rename windows-installer windows-$arch-installer $installer
echo "Building portable zip archive ... " echo "Building portable zip archive ... "
zip=`echo $installer | sed 's/installer.exe//'`$arch.zip zip=`basename $installer '-installer.exe'`.zip
if [ -d TuxPaint ]; then if [ -d TuxPaint ]; then
rm -rf TuxPaint rm -rf TuxPaint
fi fi
cp -a bdist TuxPaint cp -a bdist TuxPaint
cp -a libdocs TuxPaint/docs/ cp -a libdocs TuxPaint/docs/
zip -qr -9 $zip TuxPaint zip -qr -9 $zip TuxPaint
cd .. rm -rf TuxPaint

2
win32/tuxpaint-i686.iss Normal file
View file

@ -0,0 +1,2 @@
#define BuildTarget "i686"
#include "tuxpaint.iss"

View file

@ -0,0 +1,2 @@
#define BuildTarget "x86_64"
#include "tuxpaint.iss"

View file

@ -5,6 +5,14 @@
; The version string is extracted from the executable. ; The version string is extracted from the executable.
; ;
; Should we change this to Tux4Kids? -bjk 2011.06.15 ; Should we change this to Tux4Kids? -bjk 2011.06.15
; Fixme: /D option for iscc.exe seems to work only on windows command prompt.
; You should manually edit the following lines to specify the build target
#ifndef BuildTarget
;#define BuildTarget "i686"
#define BuildTarget "x86_64"
#endif
#define PublisherName "New Breed Software" #define PublisherName "New Breed Software"
#define PublisherURL "{code:MyPublisherURL}" #define PublisherURL "{code:MyPublisherURL}"
@ -36,15 +44,20 @@ AppVersion={#AppVersion}
DefaultDirName={pf}\{#AppDirName} DefaultDirName={pf}\{#AppDirName}
DefaultGroupName={#AppGroupName} DefaultGroupName={#AppGroupName}
OutputDir=.\ OutputDir=.\
OutputBaseFilename={#AppPrefix}-{#AppVersion}-windows-installer OutputBaseFilename={#AppPrefix}-{#AppVersion}-windows-{#BuildTarget}-installer
InfoBeforeFile={#BdistDir}\{#AppLicense} InfoBeforeFile={#BdistDir}\{#AppLicense}
SetupIconFile={#BdistDir}\data\images\tuxpaint-installer.ico SetupIconFile={#BdistDir}\data\images\tuxpaint-installer.ico
WizardStyle=modern WizardStyle=modern
Compression=lzma2 Compression=lzma2
SolidCompression=yes SolidCompression=yes
PrivilegesRequired=admin PrivilegesRequired=admin
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x86 x64 #if BuildTarget =="x86_64"
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
#else
ArchitecturesAllowed=x86 x64
#endif
[Languages] [Languages]
Name: "afr"; MessagesFile: "compiler:Languages\Afrikaans.isl" Name: "afr"; MessagesFile: "compiler:Languages\Afrikaans.isl"
@ -246,14 +259,17 @@ Procedure ForceUninstallPreviousX86Install();
var var
ResultCode: Integer; ResultCode: Integer;
begin begin
if FileExists('C:\Program Files (x86)\TuxPaint\unins000.exe') then if Is64BitInstallMode then
begin begin
if MsgBox('Old version will be uninstalled automatically.', mbInformation, MB_OKCANCEL) = IDOK then if FileExists('C:\Program Files (x86)\TuxPaint\unins000.exe') then
begin begin
Exec('C:\Program Files (x86)\TuxPaint\unins000.exe', '/SILENT', '', SW_SHOW, ewWaitUntilTerminated, ResultCode); if MsgBox('Old version will be uninstalled automatically.', mbInformation, MB_OKCANCEL) = IDOK then
end begin
else begin Exec('C:\Program Files (x86)\TuxPaint\unins000.exe', '/SILENT', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
Abort; end
else begin
Abort;
end;
end; end;
end; end;
end; end;