Merge pull request #362 from redtide/ci-innosetup

Updated InnoSetup configuration file and added related build script
This commit is contained in:
redtide 2021-08-09 22:30:32 +02:00 committed by GitHub
commit 6955f87aaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 72 additions and 13 deletions

View File

@ -4,7 +4,7 @@
#define MyAppURL "https://lite-xl.github.io" #define MyAppURL "https://lite-xl.github.io"
#define MyAppExeName "lite-xl.exe" #define MyAppExeName "lite-xl.exe"
#define BuildDir "@PROJECT_BUILD_DIR@" #define BuildDir "@PROJECT_BUILD_DIR@"
#define SourceDir "." #define SourceDir "@PROJECT_SOURCE_DIR@"
; Use /dArch option to create a setup for a different architecture, e.g.: ; Use /dArch option to create a setup for a different architecture, e.g.:
; iscc /dArch=x86 innosetup.iss ; iscc /dArch=x86 innosetup.iss
@ -34,7 +34,7 @@ ArchitecturesInstallIn64BitMode={#Arch}
AllowNoIcons=yes AllowNoIcons=yes
Compression=lzma Compression=lzma
SolidCompression=yes SolidCompression=yes
DefaultDirName={autopf}\{#MyAppName} DefaultDirName={autopf}/{#MyAppName}
DefaultGroupName={#MyAppPublisher} DefaultGroupName={#MyAppPublisher}
UninstallFilesDir={app} UninstallFilesDir={app}
@ -52,10 +52,10 @@ OutputBaseFilename=LiteXL-{#MyAppVersion}-{#Arch}-setup
;DisableDirPage=yes ;DisableDirPage=yes
;DisableProgramGroupPage=yes ;DisableProgramGroupPage=yes
LicenseFile={#SourceDir}\LICENSE LicenseFile={#SourceDir}/LICENSE
SetupIconFile={#SourceDir}\icon.ico SetupIconFile={#SourceDir}/resources/icons/icon.ico
WizardImageFile="wizard-modern-image.bmp" WizardImageFile="{#SourceDir}/scripts/innosetup/wizard-modern-image.bmp"
WizardSmallImageFile="litexl-55px.bmp" WizardSmallImageFile="{#SourceDir}/scripts/innosetup/litexl-55px.bmp"
[Languages] [Languages]
Name: "english"; MessagesFile: "compiler:Default.isl" Name: "english"; MessagesFile: "compiler:Default.isl"
@ -66,18 +66,22 @@ Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescrip
Name: "portablemode"; Description: "Portable Mode"; Flags: unchecked Name: "portablemode"; Description: "Portable Mode"; Flags: unchecked
[Files] [Files]
Source: "{#BuildDir}\lite-xl.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "{#BuildDir}/src/lite-xl.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildDir}\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs ; MSYS2 produces no external dlls on 32 bit builds when using lhelper
#if Arch=="x64"
Source: "{#BuildDir}/mingwLibs{#Arch}/*"; DestDir: "{app}"; Flags: ignoreversion
#endif
Source: "{#SourceDir}/data/*"; DestDir: "{app}/data"; Flags: ignoreversion recursesubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons] [Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: not IsTaskSelected('portablemode') Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: not WizardIsTaskSelected('portablemode')
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; Check: not IsTaskSelected('portablemode') Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; Check: not WizardIsTaskSelected('portablemode')
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon; Check: not IsTaskSelected('portablemode') Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon; Check: not WizardIsTaskSelected('portablemode')
[Run] [Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent Filename: "{app}/{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Setup] [Setup]
Uninstallable=not IsTaskSelected('portablemode') Uninstallable=not WizardIsTaskSelected('portablemode')

View File

@ -0,0 +1,55 @@
#!/bin/bash
set -ex
if [ ! -e "src/api/api.h" ]; then
echo "Please run this script from the root directory of Lite XL."
exit 1
fi
show_help(){
echo
echo "Usage: $0 <OPTIONS>"
echo
echo "Available options:"
echo
echo "-b --builddir DIRNAME Sets the name of the build directory (not path)."
echo " Default: 'build'."
echo
}
BUILD_DIR=build
for i in "$@"; do
case $i in
-h|--belp)
show_help
exit 0
;;
-b|--BUILD_DIR)
BUILD_DIR="$2"
shift
shift
;;
*)
# unknown option
;;
esac
done
if [[ -n $1 ]]; then
show_help
exit 1
fi
# TODO: Required MinGW dlls are built only (?) when using lhelper on 64 bit
if [[ $MSYSTEM == "MINGW64" ]]; then
ARCH=x64;
mingwLibsDir=$BUILD_DIR/mingwLibs$ARCH
mkdir -p "$mingwLibsDir"
ldd "$BUILD_DIR/src/lite-xl.exe" | grep mingw | awk '{print $3}' | xargs -I '{}' cp -v '{}' $mingwLibsDir
else
ARCH=Win32
fi
/c/Program\ Files\ \(x86\)/Inno\ Setup\ 6/ISCC.exe -dARCH=$ARCH $BUILD_DIR/innosetup.iss
mv $BUILD_DIR/LiteXL*.exe $(pwd)