diff --git a/🕹️cube-tube/installer/.vs/installer/v17/.suo b/installer/.vs/installer/v17/.suo similarity index 100% rename from 🕹️cube-tube/installer/.vs/installer/v17/.suo rename to installer/.vs/installer/v17/.suo diff --git a/🕹️cube-tube/installer/installer copy.vdproj b/installer/installer copy.vdproj similarity index 100% rename from 🕹️cube-tube/installer/installer copy.vdproj rename to installer/installer copy.vdproj diff --git a/🕹️cube-tube/installer/installer.sln b/installer/installer.sln similarity index 100% rename from 🕹️cube-tube/installer/installer.sln rename to installer/installer.sln diff --git a/🕹️cube-tube/installer/installer.vdproj b/installer/installer.vdproj similarity index 100% rename from 🕹️cube-tube/installer/installer.vdproj rename to installer/installer.vdproj diff --git a/package b/package new file mode 100644 index 0000000..c12d845 --- /dev/null +++ b/package @@ -0,0 +1,3 @@ +#!/bin/sh +cd ./.dragonruby +exec ./dragonruby-publish --only-package ../🕹️cube-tube \ No newline at end of file diff --git a/🕹️cube-tube/package.bat b/package.bat similarity index 67% rename from 🕹️cube-tube/package.bat rename to package.bat index eb5b465..6f35ada 100644 --- a/🕹️cube-tube/package.bat +++ b/package.bat @@ -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?" diff --git a/run b/run new file mode 100755 index 0000000..80a4cce --- /dev/null +++ b/run @@ -0,0 +1,3 @@ +#!/bin/sh +cd .dragonruby +exec ./dragonruby ../🕹️cube-tube \ No newline at end of file diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..eadc756 --- /dev/null +++ b/run.bat @@ -0,0 +1,6 @@ +@echo off + +cd .dragonruby +@echo on +dragonruby ../🕹️cube-tube +EXIT /B \ No newline at end of file diff --git a/.rubocop.yml b/🕹️cube-tube/.rubocop.yml similarity index 100% rename from .rubocop.yml rename to 🕹️cube-tube/.rubocop.yml diff --git a/.vscode/launch.json b/🕹️cube-tube/.vscode/launch.json similarity index 63% rename from .vscode/launch.json rename to 🕹️cube-tube/.vscode/launch.json index ab4414e..1fa4f2b 100644 --- a/.vscode/launch.json +++ b/🕹️cube-tube/.vscode/launch.json @@ -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}", + }, } ] } \ No newline at end of file diff --git a/🕹️cube-tube/package b/🕹️cube-tube/package deleted file mode 100644 index 389228d..0000000 --- a/🕹️cube-tube/package +++ /dev/null @@ -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} \ No newline at end of file diff --git a/🕹️cube-tube/run b/🕹️cube-tube/run deleted file mode 100755 index bde993f..0000000 --- a/🕹️cube-tube/run +++ /dev/null @@ -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} \ No newline at end of file diff --git a/🕹️cube-tube/run.bat b/🕹️cube-tube/run.bat deleted file mode 100644 index bfa317a..0000000 --- a/🕹️cube-tube/run.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off -cd /d %~dp0 - -for %%I in (.) do set CurrDirName=%%~nxI - -cd .. -@echo on -dragonruby %CurrDirName% -EXIT /B \ No newline at end of file diff --git a/🕹️cube-tube/run_tests b/🕹️cube-tube/run_tests deleted file mode 100755 index d7a05a6..0000000 --- a/🕹️cube-tube/run_tests +++ /dev/null @@ -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