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
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
installer=`basename $result`
fi
rename windows-installer windows-$arch-installer $installer
echo "Building portable zip archive ... "
zip=`echo $installer | sed 's/installer.exe//'`$arch.zip
zip=`basename $installer '-installer.exe'`.zip
if [ -d TuxPaint ]; then
rm -rf TuxPaint
fi
cp -a bdist TuxPaint
cp -a libdocs TuxPaint/docs/
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.
;
; 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 PublisherURL "{code:MyPublisherURL}"
@ -36,15 +44,20 @@ AppVersion={#AppVersion}
DefaultDirName={pf}\{#AppDirName}
DefaultGroupName={#AppGroupName}
OutputDir=.\
OutputBaseFilename={#AppPrefix}-{#AppVersion}-windows-installer
OutputBaseFilename={#AppPrefix}-{#AppVersion}-windows-{#BuildTarget}-installer
InfoBeforeFile={#BdistDir}\{#AppLicense}
SetupIconFile={#BdistDir}\data\images\tuxpaint-installer.ico
WizardStyle=modern
Compression=lzma2
SolidCompression=yes
PrivilegesRequired=admin
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x86 x64
#if BuildTarget =="x86_64"
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
#else
ArchitecturesAllowed=x86 x64
#endif
[Languages]
Name: "afr"; MessagesFile: "compiler:Languages\Afrikaans.isl"
@ -246,14 +259,17 @@ Procedure ForceUninstallPreviousX86Install();
var
ResultCode: Integer;
begin
if FileExists('C:\Program Files (x86)\TuxPaint\unins000.exe') then
if Is64BitInstallMode then
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
Exec('C:\Program Files (x86)\TuxPaint\unins000.exe', '/SILENT', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
end
else begin
Abort;
if MsgBox('Old version will be uninstalled automatically.', mbInformation, MB_OKCANCEL) = IDOK then
begin
Exec('C:\Program Files (x86)\TuxPaint\unins000.exe', '/SILENT', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
end
else begin
Abort;
end;
end;
end;
end;