From 58765c2e981c186041216a4fca7328adeba11620 Mon Sep 17 00:00:00 2001 From: Jaby Date: Tue, 7 Jan 2025 23:17:07 +0100 Subject: [PATCH] Update scripts and template for VS Code --- examples/PoolBox/PoolBox.code-workspace | 2 +- podman/scripts/install_pop-fe.sh | 2 +- podman/scripts/install_rust.sh | 2 +- podman/scripts/make_gcc.sh | 2 +- podman/scripts/run_pop_fe.sh | 2 +- readme.md | 7 +------ .../#{ProjectName}.code-workspace | 21 +++---------------- template/install.bat | 6 ------ template/install.sh | 6 ++++++ 9 files changed, 15 insertions(+), 35 deletions(-) delete mode 100644 template/install.bat create mode 100755 template/install.sh diff --git a/examples/PoolBox/PoolBox.code-workspace b/examples/PoolBox/PoolBox.code-workspace index 1b3adddd..9fe05839 100644 --- a/examples/PoolBox/PoolBox.code-workspace +++ b/examples/PoolBox/PoolBox.code-workspace @@ -20,7 +20,7 @@ { "label": "read memory map", "type": "shell", - "command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/PAL/PSX-${input:build profile}/PoolBox.elf", + "command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/PoolBox.elf", "problemMatcher": [], } ], diff --git a/podman/scripts/install_pop-fe.sh b/podman/scripts/install_pop-fe.sh index 4e6555b6..8925858f 100755 --- a/podman/scripts/install_pop-fe.sh +++ b/podman/scripts/install_pop-fe.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Made possible by Cody the white tiger echo "<<< Install pop-fe >>>" diff --git a/podman/scripts/install_rust.sh b/podman/scripts/install_rust.sh index 977fad28..1ad8759e 100755 --- a/podman/scripts/install_rust.sh +++ b/podman/scripts/install_rust.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash echo "<<< Install Rust prerequisites >>>" apt install -y curl diff --git a/podman/scripts/make_gcc.sh b/podman/scripts/make_gcc.sh index fc29bbb9..9e2a219c 100755 --- a/podman/scripts/make_gcc.sh +++ b/podman/scripts/make_gcc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash echo "<<< Install GCC prerequisites >>>" apt install -y make texinfo g++ gcc git libgmp3-dev libmpfr-dev libmpc-dev flex install-info info bison diff --git a/podman/scripts/run_pop_fe.sh b/podman/scripts/run_pop_fe.sh index 5f5c7be1..06a4497d 100755 --- a/podman/scripts/run_pop_fe.sh +++ b/podman/scripts/run_pop_fe.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Made possible by Cody the white tiger cd /usr/jaby_engine/bin/extern/pop-fe diff --git a/readme.md b/readme.md index 70273fd0..d4f9c1dc 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,6 @@ - [JabyEngine](#jabyengine-1) - [PoolBox](#poolbox) - [Special thanks](#special-thanks) -- [TODO before commit](#todo-before-commit) # JabyEngine ## About @@ -88,8 +87,4 @@ These projects shall eventually turn into useful extensions for the engine. So f * Cody the white tiger * Nicolas Noble * Pyravia -* Sickle - -# TODO before commit -* Remove `wslpath` -* Verify template creation \ No newline at end of file +* Sickle \ No newline at end of file diff --git a/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace b/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace index 4e1124dc..b733125f 100644 --- a/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace +++ b/template/JabyEngine-PSX_Game/#{ProjectName}.code-workspace @@ -11,32 +11,17 @@ { "label": "build", "type": "shell", - "windows": { // v re-export for WSL v re-export for WSL - "command": "wsl make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config} PSX_LICENSE_PATH=$(wslpath ${env:PSX_LICENSE_PATH}) JABY_ENGINE_DIR=$(wslpath ${env:JABY_ENGINE_PATH})", - }, - "linux": { - "command": "make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}", - }, + "command": "${env:JABY_ENGINE_PATH}/scripts/podman_jaby_engine.sh ${workspaceFolder}:. make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}", "group": { "kind": "build", "isDefault": true }, - "options": { - "env": { - "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" - } - } }, { "label": "read memory map", "type": "shell", - "command": "psxreadmap.exe ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/#{ProjectName}.elf", + "command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/#{ProjectName}.elf", "problemMatcher": [], - "options": { - "env": { - "PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}" - } - } } ], "inputs": [ @@ -73,7 +58,7 @@ "type": "command", "command": "shellCommand.execute", "args": { - "command": "echo ^|^ && dir /b /a:d", + "command": "echo \"|\" && ls -d */", "cwd": "${env:JABY_ENGINE_PATH}/config", "fieldSeparator": "|" } diff --git a/template/install.bat b/template/install.bat deleted file mode 100644 index 2a89868b..00000000 --- a/template/install.bat +++ /dev/null @@ -1,6 +0,0 @@ -echo off -set dst_name=JabyEngine-PSX_Game -set dst="%APPDATA%\Code\User\ProjectTemplates\%dst_name%" - -mkdir %dst% -xcopy /s %dst_name% %dst% \ No newline at end of file diff --git a/template/install.sh b/template/install.sh new file mode 100755 index 00000000..869216ac --- /dev/null +++ b/template/install.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +dst_name=JabyEngine-PSX_Game +dst="$HOME/.config/Code/User/ProjectTemplates" + +mkdir -p $dst +cp -r "$dst_name" "$dst" \ No newline at end of file