diff --git a/.dragonruby b/.dragonruby index ecb66b3..7a5a15f 160000 --- a/.dragonruby +++ b/.dragonruby @@ -1 +1 @@ -Subproject commit ecb66b31ace3b0ea0692f7042ab13a0ce2ad2eb2 +Subproject commit 7a5a15f0f24536e57f7577ddbb45f9b3a3fc23ea diff --git a/cube-tube.keystore b/cube-tube.keystore new file mode 100644 index 0000000..0968c93 Binary files /dev/null and b/cube-tube.keystore differ diff --git a/installer/installer.vdproj b/installer/installer.vdproj index 80aa3b2..a5bf564 100644 --- a/installer/installer.vdproj +++ b/installer/installer.vdproj @@ -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:" diff --git a/package.bat b/package.bat index d8f7a3b..3377d7f 100644 --- a/package.bat +++ b/package.bat @@ -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 \ No newline at end of file diff --git a/🕹️cube-tube/metadata/game_metadata.txt b/🕹️cube-tube/metadata/game_metadata.txt index ea98c87..3dcf8cd 100644 --- a/🕹️cube-tube/metadata/game_metadata.txt +++ b/🕹️cube-tube/metadata/game_metadata.txt @@ -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 ===