Skip to content

Commit 545341a

Browse files
committed
Setup automated Windows installer build
- Upgrade vcxproj - Retrieve dlls from build directories - Use define for version number in Inno Setup
1 parent ad9fe9b commit 545341a

File tree

3 files changed

+102
-25
lines changed

3 files changed

+102
-25
lines changed

.github/workflows/ci.yml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Celestia
2+
3+
on:
4+
push:
5+
branches: [ 1.6.x ]
6+
paths: [ src/**, .github/workflows/ci.yml, celestia.sln, celestia.vcxproj, celestia.iss ]
7+
pull_request:
8+
branches: [ 1.6.x ]
9+
paths: [ src/**, .github/workflows/ci.yml, celestia.sln, celestia.vcxproj, celestia.iss ]
10+
11+
jobs:
12+
build-windows:
13+
name: "Build and package Windows"
14+
runs-on: windows-latest
15+
strategy:
16+
fail-fast: false
17+
18+
steps:
19+
- name: 'Setup NuGet Credentials'
20+
shell: bash
21+
run: >
22+
$(c:/vcpkg/vcpkg fetch nuget | tail -n 1)
23+
sources add
24+
-source "https://nuget.pkg.github.com/CelestiaProject/index.json"
25+
-storepasswordincleartext
26+
-name "GitHub"
27+
-username "CelestiaProject"
28+
-password "${{ secrets.GITHUB_TOKEN }}"
29+
30+
- name: 'Add MSBuild to path'
31+
uses: microsoft/setup-msbuild@v1.1
32+
33+
- name: 'Setup vcpkg integration'
34+
shell: pwsh
35+
run: |
36+
vcpkg integrate install
37+
38+
- name: 'Install dependencies (x86)'
39+
shell: pwsh
40+
run: |
41+
vcpkg --triplet=x86-windows install --recurse libpng libjpeg-turbo gettext luajit cspice
42+
43+
- name: 'Install dependencies (x64)'
44+
shell: pwsh
45+
run: |
46+
vcpkg --triplet=x64-windows install --recurse libpng libjpeg-turbo gettext[tools] luajit cspice
47+
echo "$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows/tools/gettext/bin" >> $env:GITHUB_PATH
48+
49+
- name: 'Checkout source code'
50+
uses: actions/checkout@v3
51+
52+
- name: 'Build Win32'
53+
shell: pwsh
54+
run: |
55+
$VcpkgIncludeDir32 = "$env:VCPKG_INSTALLATION_ROOT/installed/x86-windows/include"
56+
msbuild celestia.sln /p:Configuration=Release /p:Platform=Win32 "/p:IncludePath=`"$VcpkgIncludeDir32/cspice;$VcpkgIncludeDir32/luajit`""
57+
perl po/translate_resources.pl Win32
58+
59+
- name: 'Build x64'
60+
shell: pwsh
61+
run: |
62+
$VcpkgIncludeDir64 = "$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows/include"
63+
msbuild celestia.sln /p:Configuration=Release /p:Platform=x64 "/p:IncludePath=`"$VcpkgIncludeDir64/cspice;$VcpkgIncludeDir64/luajit`""
64+
perl po/translate_resources.pl x64
65+
66+
- name: 'Create installer'
67+
shell: pwsh
68+
run: ISCC celestia.iss
69+
70+
- name: 'Upload artifacts'
71+
uses: actions/upload-artifact@v3
72+
if: success()
73+
with:
74+
name: celestia-1.6
75+
path: |
76+
${{github.workspace}}/Output/**.exe

celestia.iss

+21-20
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33

44
; This script was tested with Inno Setup Compiler version 5.1.5
55

6+
#define CelestiaVersion "1.6.3"
7+
68
[Setup]
79
AppName=Celestia
8-
AppVersion=1.6.3
9-
VersionInfoVersion=1.6.3
10+
AppVersion={#CelestiaVersion}
11+
VersionInfoVersion={#CelestiaVersion}
1012
AppPublisher=Celestia Development Team
1113
AppPublisherURL=https://celestia.space/
1214
AppSupportURL=https://celestia.space/
1315
AppUpdatesURL=https://celestia.space/
1416
AppCopyright=Copyright (C) 2001-2023 Celestia Development Team
17+
OutputBaseFilename=celestia-{#CelestiaVersion}
1518
DefaultDirName={code:DefDirRoot}\Celestia
1619
DefaultGroupName=Celestia
1720
LicenseFile=COPYING
@@ -67,24 +70,22 @@ Name: "{app}\help"
6770
Name: "{app}\help\CelestiaGuide"
6871

6972
[Files]
70-
Source: "x64\Release\celestia.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
71-
Source: "win32\Release\celestia.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
72-
Source: "c:\tools\vcpkg\installed\x64-windows\bin\cspice.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
73-
Source: "c:\tools\vcpkg\installed\x86-windows\bin\cspice.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
74-
Source: "c:\tools\vcpkg\installed\x64-windows\bin\jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
75-
Source: "c:\tools\vcpkg\installed\x86-windows\bin\jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
76-
Source: "c:\tools\vcpkg\installed\x64-windows\bin\libintl.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
77-
Source: "c:\tools\vcpkg\installed\x86-windows\bin\libintl.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
78-
Source: "c:\tools\vcpkg\installed\x64-windows\bin\libiconv.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
79-
Source: "c:\tools\vcpkg\installed\x86-windows\bin\libiconv.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
80-
Source: "c:\tools\vcpkg\installed\x64-windows\bin\libcharset.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
81-
Source: "c:\tools\vcpkg\installed\x86-windows\bin\libcharset.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
82-
Source: "c:\tools\vcpkg\installed\x64-windows\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
83-
Source: "c:\tools\vcpkg\installed\x86-windows\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
84-
Source: "c:\tools\vcpkg\installed\x64-windows\bin\lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
85-
Source: "c:\tools\vcpkg\installed\x86-windows\bin\lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
86-
Source: "c:\tools\vcpkg\installed\x64-windows\bin\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
87-
Source: "c:\tools\vcpkg\installed\x86-windows\bin\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
73+
Source: "x64\Release\celestia.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
74+
Source: "Win32\Release\celestia.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
75+
Source: "x64\Release\cspice.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
76+
Source: "Win32\Release\cspice.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
77+
Source: "x64\Release\jpeg8.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
78+
Source: "Win32\Release\jpeg8.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
79+
Source: "x64\Release\intl-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
80+
Source: "Win32\Release\intl-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
81+
Source: "x64\Release\iconv-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
82+
Source: "Win32\Release\iconv-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
83+
Source: "x64\Release\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
84+
Source: "Win32\Release\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
85+
Source: "x64\Release\lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
86+
Source: "Win32\Release\lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
87+
Source: "x64\Release\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
88+
Source: "Win32\Release\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
8889
Source: "start.cel"; DestDir: "{app}"; Flags: ignoreversion
8990
Source: "celestia.cfg"; DestDir: "{app}"; Flags: ignoreversion
9091
Source: "demo.cel"; DestDir: "{app}"; Flags: ignoreversion

celestia.vcxproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@
2020
</ItemGroup>
2121
<PropertyGroup Label="Globals">
2222
<ProjectGuid>{DDDE8EA8-F55A-491B-A102-11C9C01B4B58}</ProjectGuid>
23-
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
23+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2424
</PropertyGroup>
2525
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2626
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
2727
<ConfigurationType>Application</ConfigurationType>
28-
<PlatformToolset>v141</PlatformToolset>
28+
<PlatformToolset>v143</PlatformToolset>
2929
</PropertyGroup>
3030
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
3131
<ConfigurationType>Application</ConfigurationType>
32-
<PlatformToolset>v141</PlatformToolset>
32+
<PlatformToolset>v143</PlatformToolset>
3333
</PropertyGroup>
3434
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
3535
<ConfigurationType>Application</ConfigurationType>
36-
<PlatformToolset>v141</PlatformToolset>
36+
<PlatformToolset>v143</PlatformToolset>
3737
</PropertyGroup>
3838
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
3939
<ConfigurationType>Application</ConfigurationType>
40-
<PlatformToolset>v141</PlatformToolset>
40+
<PlatformToolset>v143</PlatformToolset>
4141
</PropertyGroup>
4242
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
4343
<ImportGroup Label="ExtensionSettings">

0 commit comments

Comments
 (0)