Fix package batch file and bump version number

Also, adding the keystore to the repo so that it is actually saved somewhere
This commit is contained in:
Gordon Pedersen 2023-08-01 15:26:58 +10:00
parent 3886790925
commit de90447904
5 changed files with 27 additions and 21 deletions

@ -1 +1 @@
Subproject commit ecb66b31ace3b0ea0692f7042ab13a0ce2ad2eb2
Subproject commit 7a5a15f0f24536e57f7577ddbb45f9b3a3fc23ea

BIN
cube-tube.keystore Normal file

Binary file not shown.

View file

@ -208,15 +208,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Cube Tube"
"ProductCode" = "8:{0DF427A0-5821-48F0-9CA5-B34F1123F839}"
"PackageCode" = "8:{27B06BB4-4B81-4D50-A8E0-10378563DE9D}"
"ProductCode" = "8:{FAD41339-47C6-4BE0-9CE0-901208A5F92D}"
"PackageCode" = "8:{485042AA-0822-4605-9240-4B88CAAE3CCE}"
"UpgradeCode" = "8:{CD4947B5-EF08-4530-A370-44E0B5F6F762}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:0.1.1"
"ProductVersion" = "8:0.2.0"
"Manufacturer" = "8:death.au"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"

View file

@ -1,57 +1,61 @@
@echo off
chcp 65001 >NUL
cd /d %~dp0
set CurrDirName=🕹cube-tube
set gamedir=🕹cube-tube
for /F %%a IN ('powershell -command "$([guid]::NewGuid().ToString().toUpper())"') DO (set newProductCode=%%a)
for /F %%a IN ('powershell -command "$([guid]::NewGuid().ToString().toUpper())"') DO (set newPackageCode=%%a)
@setlocal ENABLEEXTENSIONS
@set version=0
@for /F "tokens=*" %%A in (./metadata/game_metadata.txt) do @call :CheckForVersion "%%A"
@for /F "tokens=*" %%A in (%gamedir%/metadata/game_metadata.txt) do @call :CheckForVersion "%%A"
cd .dragonruby
robocopy ../marketing-assets/AppIcon.appiconset ./dragonruby-ios.app/Assets.xcassets/AppIcon.appiconset /e
robocopy ../marketing-assets/AppIcon.appiconset ./dragonruby-ios-simulator.app/Assets.xcassets/AppIcon.appiconset /e
robocopy ../%gamedir% ./%gameid% /e
@echo on
dragonruby-publish --only-package ../%CurrDirName%
dragonruby-publish --only-package %gameid%
@echo off
rd /s /q %gameid%
cd builds
if exist ./%CurrDirName%-windows-amd64.exe (
if exist ../../%CurrDirName%/installer/installer.vdproj (
if exist ./%gameid%-windows-amd64.exe (
if exist ../../installer/installer.vdproj (
echo "Building windows installer..."
for /F "tokens=* USEBACKQ" %%t IN (`findstr /c:"%version%" ..\..\%CurrDirName%\installer\installer.vdproj`) do (SET OldVersion=%%t)
for /F "tokens=* USEBACKQ" %%t IN (`findstr /c:"%version%" ..\..\installer\installer.vdproj`) do (SET OldVersion=%%t)
if defined OldVersion (
echo "version already the same"
) else (
echo "need to update version & product/package codes (%version%, %newProductCode%, %newPackageCode%)"
powershell -Command "(Get-Content ../../%CurrDirName%/installer/installer.vdproj) | Foreach-Object { $_ -replace '""""ProductCode"""" = """"8:\{.*\}""""$', '""""ProductCode"""" = """"8:{%newProductCode%}""""' -replace '""""PackageCode"""" = """"8:\{.*\}""""$', '""""PackageCode"""" = """"8:{%newPackageCode%}""""' -replace '""""ProductVersion"""" = """"8:.+""""$', '""""ProductVersion"""" = """"8:%version%""' } | Out-File -encoding UTF8 ../../%CurrDirName%/installer/installer.vdproj"
powershell -Command "(Get-Content ../../installer/installer.vdproj) | Foreach-Object { $_ -replace '""""ProductCode"""" = """"8:\{.*\}""""$', '""""ProductCode"""" = """"8:{%newProductCode%}""""' -replace '""""PackageCode"""" = """"8:\{.*\}""""$', '""""PackageCode"""" = """"8:{%newPackageCode%}""""' -replace '""""ProductVersion"""" = """"8:.+""""$', '""""ProductVersion"""" = """"8:%version%""' } | Out-File -encoding UTF8 ../../installer/installer.vdproj"
)
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" ..\..\%CurrDirName%\installer\installer.sln /build Release
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" ..\..\installer\installer.sln /build Release
) else (
ECHO "no installer project?"
ECHO ../../%CurrDirName%/installer/installer.vdproj
ECHO ../../installer/installer.vdproj
)
) else (
ECHO "no exe?"
ECHO ./%CurrDirName%-windows-amd64.exe
ECHO ./%gameid%-windows-amd64.exe
)
if not exist ./%CurrDirName%.keystore (
if not exist ../../%gameid%.keystore (
echo "no keystore, generating keys"
keytool -genkey -v -keystore %CurrDirName%.keystore -alias %CurrDirName% -keyalg RSA -keysize 2048 -validity 10000
keytool -genkey -v -keystore ../../%gameid%.keystore -alias %gameid% -keyalg RSA -keysize 2048 -validity 10000
)
if exist ./%CurrDirName%-android.apk (
if exist ./%gameid%-android.apk (
echo "Signing apk..."
call "C:\Program Files (x86)\Android\android-sdk\build-tools\32.0.0\apksigner.bat" sign -ks %CurrDirName%.keystore %CurrDirName%-android.apk
call "C:\Program Files (x86)\Android\android-sdk\build-tools\32.0.0\apksigner.bat" sign -ks ../../%gameid%.keystore %gameid%-android.apk
echo "Signing aab..."
call jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore %CurrDirName%.keystore %CurrDirName%-googleplay.aab %CurrDirName%
call jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore ../../%gameid%.keystore %gameid%-googleplay.aab %gameid%
) else (
ECHO "no apk?"
ECHO ./%CurrDirName%-android.apk
ECHO ./%gameid%-android.apk
)
ECHO "All done!"
@ -63,4 +67,6 @@ PAUSE
@set _line=%~1
@set _linePrefeix=%_line:~0,8%
@if "%_linePrefeix%" equ "version=" (@set version="%_line:~8%")
@set _linePrefeix=%_line:~0,7%
@if "%_linePrefeix%" equ "gameid=" (@set gameid="%_line:~7%")
@exit /b 0

View file

@ -2,7 +2,7 @@ devid=deathau
devtitle=death.au
gameid=cube-tube
gametitle=Cube Tube
version=0.1.0
version=0.2.0
icon=metadata/icon.png
# === Flags available at all licensing tiers ===