build/windows: Don't pollute source when creating installer

Until now, the installer script had a very invasive behavior of copying
things from _build. Let's stop this since it is extremely annoying.
This commit is contained in:
Bruno 2024-08-05 18:52:48 -03:00
parent deea10ed82
commit 1656a807d6
4 changed files with 15 additions and 26 deletions

View File

@ -5,6 +5,7 @@ param ($GIMP_VERSION,
$REVISION,
$GIMP_APP_VERSION,
$GIMP_API_VERSION,
$BUILD_DIR = '..\..\..\_build',
$GIMP_BASE = '..\..\..\',
$GIMP32 = 'gimp-x86',
$GIMP64 = 'gimp-x64',
@ -133,23 +134,10 @@ fix_msg $INNOPATH\Languages
fix_msg $INNOPATH\Languages\Unofficial
$gen_path = '_build\build\windows\installer'
if (Test-Path -Path $gen_path)
{
# Copy generated language files into the source directory
Copy-Item $gen_path\lang\*isl build\windows\installer\lang\
Copy-Item $gen_path\*list build\windows\installer\
# Copy generated images into the source directory
Copy-Item $gen_path\*ico build\windows\installer\
Copy-Item $gen_path\*bmp build\windows\installer\
}
# Construct now the installer
Set-Location build/windows/installer
Set-Alias -Name 'iscc' -Value "${INNOPATH}\iscc.exe"
iscc -DGIMP_VERSION="$GIMP_VERSION" -DREVISION="$REVISION" -DGIMP_APP_VERSION="$GIMP_APP_VERSION" -DGIMP_API_VERSION="$GIMP_API_VERSION" -DGIMP_DIR="$GIMP_BASE" -DDIR32="$GIMP32" -DDIR64="$GIMP64" -DDIRA64="$GIMPA64" -DDEPS_DIR="$GIMP_BASE" -DDDIR32="$GIMP32" -DDDIR64="$GIMP64" -DDDIRA64="$GIMPA64" -DDEBUG_SYMBOLS -DLUA -DPYTHON base_gimp3264.iss
iscc -DGIMP_VERSION="$GIMP_VERSION" -DREVISION="$REVISION" -DGIMP_APP_VERSION="$GIMP_APP_VERSION" -DGIMP_API_VERSION="$GIMP_API_VERSION" -DBUILD_DIR="$BUILD_DIR" -DGIMP_DIR="$GIMP_BASE" -DDIR32="$GIMP32" -DDIR64="$GIMP64" -DDIRA64="$GIMPA64" -DDEPS_DIR="$GIMP_BASE" -DDDIR32="$GIMP32" -DDDIR64="$GIMP64" -DDDIRA64="$GIMPA64" -DDEBUG_SYMBOLS -DLUA -DPYTHON base_gimp3264.iss
# Test if the installer was created and return success/failure.
if (Test-Path -Path "_Output/gimp-${GIMP_VERSION}-setup.exe" -PathType Leaf)

View File

@ -110,6 +110,7 @@
[Setup]
MissingMessagesWarning=no
NotRecognizedMessagesWarning=no
#define ASSETS_DIR BUILD_DIR + "\build\windows\installer"
;INSTALLER AND APP INFO
AppName=GIMP
@ -168,13 +169,13 @@ AlwaysShowDirOnReadyPage=yes
WizardStyle=modern
WizardSizePercent=100
WizardResizable=no
WizardSmallImageFile=gimp.scale-100.bmp,gimp.scale-125.bmp,gimp.scale-150.bmp,gimp.scale-175.bmp,gimp.scale-200.bmp,gimp.scale-225.bmp,gimp.scale-250.bmp
WizardImageFile=install-end.scale-100.bmp,install-end.scale-125.bmp,install-end.scale-150.bmp,install-end.scale-175.bmp,install-end.scale-200.bmp,install-end.scale-225.bmp,install-end.scale-250.bmp
WizardSmallImageFile={#ASSETS_DIR}\gimp.scale-100.bmp,{#ASSETS_DIR}\gimp.scale-125.bmp,{#ASSETS_DIR}\gimp.scale-150.bmp,{#ASSETS_DIR}\gimp.scale-175.bmp,{#ASSETS_DIR}\gimp.scale-200.bmp,{#ASSETS_DIR}\gimp.scale-225.bmp,{#ASSETS_DIR}\gimp.scale-250.bmp
WizardImageFile={#ASSETS_DIR}\install-end.scale-100.bmp,{#ASSETS_DIR}\install-end.scale-125.bmp,{#ASSETS_DIR}\install-end.scale-150.bmp,{#ASSETS_DIR}\install-end.scale-175.bmp,{#ASSETS_DIR}\install-end.scale-200.bmp,{#ASSETS_DIR}\install-end.scale-225.bmp,{#ASSETS_DIR}\install-end.scale-250.bmp
WizardImageStretch=yes
;INSTALLER .EXE FILE
SetupIconFile=setup.ico
SetupIconFile={#ASSETS_DIR}\setup.ico
ArchitecturesInstallIn64BitMode=x64 arm64
MinVersion=10.0
@ -229,8 +230,8 @@ WelcomeFontName=Segoe UI
WelcomeFontSize=12
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl,lang\en.setup.isl"
#include "base_po-msg.list"
Name: "en"; MessagesFile: "compiler:Default.isl,{#ASSETS_DIR}\lang\en.setup.isl"
#include ASSETS_DIR + "\base_po-msg.list"
[Types]
@ -275,7 +276,7 @@ Name: pyARM64; Description: "{cm:ComponentsPython}"; Types: full custom; Check:
;Locales
Name: loc; Description: "{cm:ComponentsTranslations}"; Types: full custom
#include "base_po-cmp.list"
#include ASSETS_DIR + "\base_po-cmp.list"
;MyPaint Brushes
Name: mypaint; Description: "{cm:ComponentsMyPaint}"; Types: full custom
@ -297,9 +298,9 @@ Filename: "{app}\bin\gimp-{#GIMP_APP_VERSION}.exe"; Description: "{cm:LaunchGimp
[Files]
;setup files
Source: "install-end.scale-100.bmp"; Flags: dontcopy
Source: "installsplash.bmp"; Flags: dontcopy
Source: "installsplash_small.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\install-end.scale-100.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\installsplash.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\installsplash_small.bmp"; Flags: dontcopy
#ifndef NOFILES
#define COMMON_FLAGS="recursesubdirs restartreplace uninsrestartdelete ignoreversion"
@ -331,7 +332,7 @@ Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_API_VERSION}\interpreters\pygimp.interp";
Source: "{#GIMP_DIR32}\*.py"; DestDir: "{app}"; Components: (py32 or py64 or pyARM64); Flags: {#COMMON_FLAGS}
#endif
Source: "{#GIMP_DIR32}\share\locale\*"; DestDir: "{app}\share\locale"; Components: loc; Flags: dontcopy {#COMMON_FLAGS}
#include "base_po-files.list"
#include ASSETS_DIR + "\base_po-files.list"
Source: "{#DEPS_DIR32}\share\mypaint-data\*"; DestDir: "{app}\share\mypaint-data"; Components: mypaint; Flags: {#COMMON_FLAGS}
;files arch specific

View File

@ -174,7 +174,7 @@ standard, and is used to generate lists to our .iss script
name="ქართული ენა" />
<iso_639_entry
dl_code="kab"
inno_code="Default.isl,lang\\kab.isl"
inno_code="Default.isl,{#ASSETS_DIR}\\lang\\kab.isl"
name="Taqbaylit" />
<iso_639_entry
dl_code="kk"

View File

@ -55,7 +55,7 @@ if [ "$1" = 'msg' ]; then
## Create list of lang [Languages]
if [ "$1" = 'msg' ]; then
for PO in "${PO_INNO_ARRAY[@]}"; do
MSG_LINE='Name: "PO"; MessagesFile: "compiler:INNO_CODE,lang\PO.setup.isl"'
MSG_LINE='Name: "PO"; MessagesFile: "compiler:INNO_CODE,{#ASSETS_DIR}\lang\PO.setup.isl"'
# Change po
MSG_LINE=$(sed "s/PO/$PO/g" <<< $MSG_LINE)
# Change isl