move the build and run scripts outside the game dir
This commit is contained in:
parent
2ee9098cae
commit
aee8651566
14 changed files with 24 additions and 44 deletions
3
package
Normal file
3
package
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
cd ./.dragonruby
|
||||
exec ./dragonruby-publish --only-package ../🕹️cube-tube
|
|
@ -1,7 +1,7 @@
|
|||
@echo off
|
||||
cd /d %~dp0
|
||||
|
||||
for %%I in (.) do set CurrDirName=%%~nxI
|
||||
set CurrDirName=🕹️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)
|
||||
|
||||
|
@ -10,26 +10,26 @@ for /F %%a IN ('powershell -command "$([guid]::NewGuid().ToString().toUpper())"'
|
|||
@set version=0
|
||||
@for /F "tokens=*" %%A in (./metadata/game_metadata.txt) do @call :CheckForVersion "%%A"
|
||||
|
||||
cd ..
|
||||
cd .dragonruby
|
||||
@echo on
|
||||
dragonruby-publish --only-package %CurrDirName%
|
||||
dragonruby-publish --only-package ../%CurrDirName%
|
||||
@echo off
|
||||
cd builds
|
||||
|
||||
if exist ./%CurrDirName%-windows-amd64.exe (
|
||||
if exist ../%CurrDirName%/installer/installer.vdproj (
|
||||
if exist ../../%CurrDirName%/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%" ..\..\%CurrDirName%\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 ../../%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"
|
||||
)
|
||||
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" ..\..\%CurrDirName%\installer\installer.sln /build Release
|
||||
) else (
|
||||
ECHO "no installer project?"
|
||||
ECHO ../%CurrDirName%/installer/installer.vdproj
|
||||
ECHO ../../%CurrDirName%/installer/installer.vdproj
|
||||
)
|
||||
) else (
|
||||
ECHO "no exe?"
|
3
run
Executable file
3
run
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
cd .dragonruby
|
||||
exec ./dragonruby ../🕹️cube-tube
|
6
run.bat
Normal file
6
run.bat
Normal file
|
@ -0,0 +1,6 @@
|
|||
@echo off
|
||||
|
||||
cd .dragonruby
|
||||
@echo on
|
||||
dragonruby ../🕹️cube-tube
|
||||
EXIT /B
|
|
@ -8,7 +8,10 @@
|
|||
"name": "Run Game",
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"command": "${workspaceRoot}/../dragonruby.exe ${workspaceRoot}",
|
||||
"command": "${workspaceRoot}/../.dragonruby/dragonruby ${workspaceRoot}",
|
||||
"windows": {
|
||||
"command": "${workspaceRoot}/../.dragonruby/dragonruby.exe ${workspaceRoot}",
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
cd "`dirname "$0"`"
|
||||
|
||||
result=${PWD##*/} # to assign to a variable
|
||||
result=${result:-/} # to correct for the case where PWD=/
|
||||
|
||||
cd ..
|
||||
exec ./dragonruby-publish --only-package ${result}
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
cd "`dirname "$0"`"
|
||||
|
||||
result=${PWD##*/} # to assign to a variable
|
||||
result=${result:-/} # to correct for the case where PWD=/
|
||||
|
||||
cd ..
|
||||
exec ./dragonruby ${result}
|
|
@ -1,9 +0,0 @@
|
|||
@echo off
|
||||
cd /d %~dp0
|
||||
|
||||
for %%I in (.) do set CurrDirName=%%~nxI
|
||||
|
||||
cd ..
|
||||
@echo on
|
||||
dragonruby %CurrDirName%
|
||||
EXIT /B
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
set -e
|
||||
rm -f test-failures.txt
|
||||
if ! ../dragonruby . --eval app/tests.rb --no-tick --exit-on-fail; then
|
||||
echo "🙀 tests failed!"
|
||||
cat test-failures.txt
|
||||
exit 1
|
||||
else
|
||||
echo "🪩 tests passed!"
|
||||
fi
|
Loading…
Reference in a new issue