Browse Source

CI: Generate windows installers

Signed-off-by: falkTX <falktx@falktx.com>
pull/602/merge
falkTX 1 month ago
parent
commit
ea6933571b
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 157 additions and 9 deletions
  1. +36
    -0
      .github/workflows/build.yml
  2. +14
    -9
      .gitignore
  3. +49
    -0
      windows/inno/win32-mini.iss
  4. +58
    -0
      windows/inno/win64-mini.iss

+ 36
- 0
.github/workflows/build.yml View File

@@ -170,6 +170,24 @@ jobs:
llvm-dlltool -m i386 -D libjacknet.dll -d libjacknet.def -l libjacknet.lib
llvm-dlltool -m i386 -D libjackserver.dll -d libjackserver.def -l libjackserver.lib
popd
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- name: Generate Windows installer
shell: bash
run: |
# Setup wine
export WINEPREFIX=$(pwd)/innosetup
wineboot -u
# Download and install innosetup
curl -L https://jrsoftware.org/download.php/is.exe?site=2 -o is.exe
wine is.exe /allusers /dir=C:\\InnoSeup /nocancel /norestart /verysilent
# create installer
ln -sf $(pwd)/destdir windows/inno/win32
pushd windows/inno
echo "#define VERSION \"${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}\"" > version.iss
wine ${WINEPREFIX}/drive_c/InnoSeup/ISCC.exe win32-mini.iss
popd

# linux with win64 cross-compilation
win64:
@@ -233,3 +251,21 @@ jobs:
llvm-dlltool -m i386:x86-64 -D libjacknet64.dll -d libjacknet64.def -l libjacknet64.lib
llvm-dlltool -m i386:x86-64 -D libjackserver64.dll -d libjackserver64.def -l libjackserver64.lib
popd
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- name: Generate Windows installer
shell: bash
run: |
# Setup wine
export WINEPREFIX=$(pwd)/innosetup
wineboot -u
# Download and install innosetup
curl -L https://jrsoftware.org/download.php/is.exe?site=2 -o is.exe
wine64 is.exe /allusers /dir=C:\\InnoSeup /nocancel /norestart /verysilent
# create installer
ln -sf $(pwd)/destdir windows/inno/win64
pushd windows/inno
echo "#define VERSION \"${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}\"" > version.iss
wine64 ${WINEPREFIX}/drive_c/InnoSeup/ISCC.exe win64-mini.iss
popd

+ 14
- 9
.gitignore View File

@@ -1,5 +1,3 @@
build/
man/*.1
.lock*
.stamp_*
.DS_Store
@@ -7,15 +5,22 @@ __pycache__
*.dll
*.pyc
*.pkg
android/.server/
android/.client/
codeBlocks
/android/.server/
/android/.client/
/build/
/man/*.1

# common release files
/destdir/

# macos release files
macos/package.xml
macos/package-welcome.txt
/macos/package.xml
/macos/package-welcome.txt

# windows release files
windows/inno/version.iss
windows/inno/win32
windows/inno/win64
/innosetup/
/is.exe
/windows/inno/version.iss
/windows/inno/win32
/windows/inno/win64

+ 49
- 0
windows/inno/win32-mini.iss View File

@@ -0,0 +1,49 @@
#include "version.iss"

[Setup]
AppName=JACK2
AppPublisher=jackaudio.org
AppPublisherURL=https://github.com/jackaudio/jack2/
AppSupportURL=https://github.com/jackaudio/jack2/issues/
AppUpdatesURL=https://github.com/jackaudio/jack2-releases/releases/
AppVersion={#VERSION}
DefaultDirName={commonpf32}\JACK2
DisableDirPage=yes
DisableWelcomePage=no
LicenseFile=..\..\COPYING
OutputBaseFilename=jack2-win32-{#VERSION}
OutputDir=.
UsePreviousAppDir=no

[Types]
Name: "full"; Description: "Full installation";
Name: "custom"; Description: "Custom installation"; Flags: iscustom;

[Components]
Name: jackserver; Description: "JACK Server and tools"; Types: full custom; Flags: fixed;
Name: dev; Description: "Developer resources"; Types: full;

[Files]
; icon
Source: "jack.ico"; DestDir: "{app}"; Components: jackserver; Flags: ignoreversion;
; jackd and server libs
Source: "win32\bin\jackd.exe"; DestDir: "{app}"; Components: jackserver; Flags: ignoreversion;
Source: "win32\lib\libjacknet.dll"; DestDir: "{app}"; Components: jackserver; Flags: ignoreversion;
Source: "win32\lib\libjackserver.dll"; DestDir: "{app}"; Components: jackserver; Flags: ignoreversion;
; drivers
Source: "win32\lib\jack\*.dll"; DestDir: "{app}\jack"; Components: jackserver; Flags: ignoreversion;
; tools
Source: "win32\bin\jack_*.exe"; DestDir: "{app}\tools"; Components: jackserver; Flags: ignoreversion;
; jack client lib (NOTE goes into windir)
Source: "win32\lib\libjack.dll"; DestDir: "{win}"; Components: jackserver; Flags: ignoreversion;
; dev
Source: "win32\include\jack\*.h"; DestDir: "{app}\include\jack"; Components: dev; Flags: ignoreversion;
Source: "win32\lib\*.a"; DestDir: "{app}\lib"; Components: dev; Flags: ignoreversion;
Source: "win32\lib\*.def"; DestDir: "{app}\lib"; Components: dev; Flags: ignoreversion;
Source: "win32\lib\*.lib"; DestDir: "{app}\lib"; Components: dev; Flags: ignoreversion;
Source: "win32\lib\jack\*.a"; DestDir: "{app}\lib\jack"; Components: dev; Flags: ignoreversion;

[Registry]
Root: HKLM; Subkey: "Software\JACK"; Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue; ValueType: string; ValueName: "ServerExecutable"; ValueData: "{app}\jackd.exe"
Root: HKLM; Subkey: "Software\JACK"; Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
Root: HKLM; Subkey: "Software\JACK"; Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue; ValueType: string; ValueName: "Version"; ValueData: "{#VERSION}"

+ 58
- 0
windows/inno/win64-mini.iss View File

@@ -0,0 +1,58 @@
#include "version.iss"

[Setup]
ArchitecturesInstallIn64BitMode=x64
AppName=JACK2
AppPublisher=jackaudio.org
AppPublisherURL=https://github.com/jackaudio/jack2/
AppSupportURL=https://github.com/jackaudio/jack2/issues/
AppUpdatesURL=https://github.com/jackaudio/jack2-releases/releases/
AppVersion={#VERSION}
DefaultDirName={commonpf64}\JACK2
DisableDirPage=yes
DisableWelcomePage=no
LicenseFile=..\..\COPYING
OutputBaseFilename=jack2-win64-{#VERSION}
OutputDir=.
UsePreviousAppDir=no

[Types]
Name: "full"; Description: "Full installation";
Name: "custom"; Description: "Custom installation"; Flags: iscustom;

[Components]
Name: jackserver; Description: "JACK Server and tools"; Types: full custom; Flags: fixed;
Name: dev; Description: "Developer resources"; Types: full;

[Files]
; icon
Source: "jack.ico"; DestDir: "{app}"; Components: jackserver; Flags: ignoreversion;
; jackd and server libs
Source: "win64\bin\jackd.exe"; DestDir: "{app}"; Components: jackserver; Flags: ignoreversion;
Source: "win64\lib\libjacknet64.dll"; DestDir: "{app}"; Components: jackserver; Flags: ignoreversion;
Source: "win64\lib\libjackserver64.dll"; DestDir: "{app}"; Components: jackserver; Flags: ignoreversion;
; drivers
Source: "win64\lib\jack\*.dll"; DestDir: "{app}\jack"; Components: jackserver; Flags: ignoreversion;
; tools
Source: "win64\bin\jack_*.exe"; DestDir: "{app}\tools"; Components: jackserver; Flags: ignoreversion;
; jack client lib (NOTE goes into windir)
Source: "win64\lib\libjack64.dll"; DestDir: "{win}"; Components: jackserver; Flags: ignoreversion;
Source: "win64\lib32\libjack.dll"; DestDir: "{win}"; Components: jackserver; Flags: ignoreversion;
; dev
Source: "win64\include\jack\*.h"; DestDir: "{app}\include\jack"; Components: dev; Flags: ignoreversion;
Source: "win64\lib\*.a"; DestDir: "{app}\lib"; Components: dev; Flags: ignoreversion;
Source: "win64\lib\*.def"; DestDir: "{app}\lib"; Components: dev; Flags: ignoreversion;
Source: "win64\lib\*.lib"; DestDir: "{app}\lib"; Components: dev; Flags: ignoreversion;
Source: "win64\lib32\*.a"; DestDir: "{app}\lib32"; Components: dev; Flags: ignoreversion;
Source: "win64\lib32\*.def"; DestDir: "{app}\lib32"; Components: dev; Flags: ignoreversion;
Source: "win64\lib32\*.lib"; DestDir: "{app}\lib32"; Components: dev; Flags: ignoreversion;
Source: "win64\lib\jack\*.a"; DestDir: "{app}\lib\jack"; Components: dev; Flags: ignoreversion;

[Registry]
Root: HKLM; Subkey: "Software\JACK"; Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue; ValueType: string; ValueName: "ServerExecutable"; ValueData: "{app}\jackd.exe"
Root: HKLM; Subkey: "Software\JACK"; Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
Root: HKLM; Subkey: "Software\JACK"; Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue; ValueType: string; ValueName: "Version"; ValueData: "{#VERSION}"
; 32bit compat keys
Root: HKLM; Subkey: "Software\WOW6432Node\JACK"; Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue; ValueType: string; ValueName: "ServerExecutable"; ValueData: "{app}\jackd.exe"
Root: HKLM; Subkey: "Software\WOW6432Node\JACK"; Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
Root: HKLM; Subkey: "Software\WOW6432Node\JACK"; Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue; ValueType: string; ValueName: "Version"; ValueData: "{#VERSION}"

Loading…
Cancel
Save