diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..c810bd6bf7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,103 @@ +name: Celestia + +on: + push: + branches: [ 1.6.x ] + paths: [ src/**, .github/workflows/ci.yml, celestia.sln, celestia.vcxproj, celestia.iss ] + pull_request: + branches: [ 1.6.x ] + paths: [ src/**, .github/workflows/ci.yml, celestia.sln, celestia.vcxproj, celestia.iss ] + +env: + VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' + +jobs: + build-windows: + name: "Build and package Windows" + runs-on: windows-latest + strategy: + fail-fast: false + + steps: + - name: Update vcpkg + shell: pwsh + run: | + $vcpkgCommit = '69efe9cc2df0015f0bb2d37d55acde4a75c9a25b' + pushd $env:VCPKG_INSTALLATION_ROOT + git fetch --depth=1 origin $vcpkgCommit + git reset --hard $vcpkgCommit + ./bootstrap-vcpkg.bat + popd + + - name: Setup Nuget Credentials + shell: pwsh + run: | + $nugetCmd = vcpkg fetch nuget | Select-Object -Last 1 + $nugetSource = 'https://nuget.pkg.github.com/CelestiaProject/index.json' + & "$nugetCmd" sources add ` + -Source "$nugetSource" ` + -StorePasswordInClearText ` + -Name "GitHub" ` + -Username 'CelestiaProject' ` + -Password '${{secrets.GITHUB_TOKEN}}' + & "$nugetCmd" setapikey '${{secrets.GITHUB_TOKEN}}' ` + -Source "$nugetSource" + + - name: Setup vcpkg integration + shell: pwsh + run: | + vcpkg integrate install + + - name: Install dependencies (x64) + shell: pwsh + run: | + vcpkg --triplet=x64-windows install --recurse libpng libjpeg-turbo gettext[tools] luajit cspice + echo "$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows/tools/gettext/bin" >> $env:GITHUB_PATH + + - name: Install dependencies (x86) + shell: pwsh + run: | + vcpkg --triplet=x86-windows install --recurse libpng libjpeg-turbo gettext luajit cspice + + - name: Checkout source code + uses: actions/checkout@v3 + + - name: Build Win32 + shell: pwsh + run: | + $installationPath = vswhere.exe -prerelease -latest -property installationPath + if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { + & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -no_logo -arch=x86 -host_arch=amd64 && set" | ForEach-Object { + $name, $value = $_ -split '=', 2 + Set-Content env:\"$name" $value + } + } + $VcpkgIncludeDir32 = "$env:VCPKG_INSTALLATION_ROOT/installed/x86-windows/include" + msbuild celestia.sln /p:Configuration=Release /p:Platform=Win32 "/p:IncludePath=`"$VcpkgIncludeDir32/cspice;$VcpkgIncludeDir32/luajit`"" + perl po/translate_resources.pl Win32 + + - name: Build x64 + shell: pwsh + run: | + $installationPath = vswhere.exe -prerelease -latest -property installationPath + if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { + & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -no_logo -arch=amd64 -host_arch=amd64 && set" | ForEach-Object { + $name, $value = $_ -split '=', 2 + Set-Content env:\"$name" $value + } + } + $VcpkgIncludeDir64 = "$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows/include" + msbuild celestia.sln /p:Configuration=Release /p:Platform=x64 "/p:IncludePath=`"$VcpkgIncludeDir64/cspice;$VcpkgIncludeDir64/luajit`"" + perl po/translate_resources.pl x64 + + - name: Create installer + shell: pwsh + run: ISCC celestia.iss + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + if: success() + with: + name: celestia-windows-installer + path: | + ${{github.workspace}}/Output/**.exe diff --git a/celestia.iss b/celestia.iss index 6619f60f78..080272c7c4 100644 --- a/celestia.iss +++ b/celestia.iss @@ -3,15 +3,18 @@ ; This script was tested with Inno Setup Compiler version 5.1.5 +#define CelestiaVersion "1.6.3" + [Setup] AppName=Celestia -AppVersion=1.6.3 -VersionInfoVersion=1.6.3 +AppVersion={#CelestiaVersion} +VersionInfoVersion={#CelestiaVersion} AppPublisher=Celestia Development Team AppPublisherURL=https://celestia.space/ AppSupportURL=https://celestia.space/ AppUpdatesURL=https://celestia.space/ AppCopyright=Copyright (C) 2001-2023 Celestia Development Team +OutputBaseFilename=celestia-{#CelestiaVersion} DefaultDirName={code:DefDirRoot}\Celestia DefaultGroupName=Celestia LicenseFile=COPYING @@ -67,24 +70,22 @@ Name: "{app}\help" Name: "{app}\help\CelestiaGuide" [Files] -Source: "x64\Release\celestia.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode -Source: "win32\Release\celestia.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x64-windows\bin\cspice.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x86-windows\bin\cspice.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x64-windows\bin\jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x86-windows\bin\jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x64-windows\bin\libintl.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x86-windows\bin\libintl.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x64-windows\bin\libiconv.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x86-windows\bin\libiconv.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x64-windows\bin\libcharset.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x86-windows\bin\libcharset.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x64-windows\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x86-windows\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x64-windows\bin\lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x86-windows\bin\lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x64-windows\bin\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode -Source: "c:\tools\vcpkg\installed\x86-windows\bin\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "x64\Release\celestia.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "Win32\Release\celestia.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "x64\Release\cspice.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "Win32\Release\cspice.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "x64\Release\jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "Win32\Release\jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "x64\Release\intl-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "Win32\Release\intl-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "x64\Release\iconv-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "Win32\Release\iconv-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "x64\Release\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "Win32\Release\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "x64\Release\lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "Win32\Release\lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "x64\Release\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "Win32\Release\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode Source: "start.cel"; DestDir: "{app}"; Flags: ignoreversion Source: "celestia.cfg"; DestDir: "{app}"; Flags: ignoreversion Source: "demo.cel"; DestDir: "{app}"; Flags: ignoreversion @@ -187,8 +188,6 @@ Source: "locale\nb\LC_MESSAGES\celestia.mo"; DestDir: "{app Source: "locale\nb\LC_MESSAGES\celestia_constellations.mo"; DestDir: "{app}/locale/nb/LC_MESSAGES"; Flags: ignoreversion Source: "locale\nl\LC_MESSAGES\celestia.mo"; DestDir: "{app}/locale/nl/LC_MESSAGES"; Flags: ignoreversion Source: "locale\nl\LC_MESSAGES\celestia_constellations.mo"; DestDir: "{app}/locale/nl/LC_MESSAGES"; Flags: ignoreversion -Source: "locale\no\LC_MESSAGES\celestia.mo"; DestDir: "{app}/locale/no/LC_MESSAGES"; Flags: ignoreversion -Source: "locale\no\LC_MESSAGES\celestia_constellations.mo"; DestDir: "{app}/locale/no/LC_MESSAGES"; Flags: ignoreversion Source: "locale\pl\LC_MESSAGES\celestia.mo"; DestDir: "{app}/locale/pl/LC_MESSAGES"; Flags: ignoreversion Source: "locale\pl\LC_MESSAGES\celestia_constellations.mo"; DestDir: "{app}/locale/pl/LC_MESSAGES"; Flags: ignoreversion Source: "locale\pt\LC_MESSAGES\celestia.mo"; DestDir: "{app}/locale/pt/LC_MESSAGES"; Flags: ignoreversion diff --git a/celestia.vcxproj b/celestia.vcxproj index 2b4a40ef9d..4059f83d4e 100755 --- a/celestia.vcxproj +++ b/celestia.vcxproj @@ -20,24 +20,24 @@ {DDDE8EA8-F55A-491B-A102-11C9C01B4B58} - 10.0.17763.0 + 10.0 Application - v141 + v143 Application - v141 + v143 Application - v141 + v143 Application - v141 + v143