Working on update to f256dev. Windows mostly finished.

This commit is contained in:
Scott Duensing 2024-05-13 19:55:51 -05:00
parent c5f8467dbf
commit a717e5d66a
9 changed files with 189 additions and 153 deletions

4
.gitignore vendored
View file

@ -45,9 +45,7 @@ generated/
overlay overlay
overlayhelper overlayhelper
f256lib.h f256lib.h
/distro/llvm-mos /distro/f256dev.7z
/distro/llvm-mos-f256.7z
/distro/llvm-mos-f256.tar.xz
# These aren't for public use or aren't ready. # These aren't for public use or aren't ready.
build-foenix-ide.sh build-foenix-ide.sh

View file

@ -67,31 +67,38 @@ pushd distro
fi fi
mkdir -p .builddir mkdir -p .builddir
pushd .builddir pushd .builddir
mkdir -p llvm-mos/mos-platform/f256 mkdir -p f256dev/llvm-mos/mos-platform/f256
mkdir -p llvm-mos/bin mkdir -p f256dev/llvm-mos/bin
cp -Rf ${INSTALL}/mos-platform/f256/* llvm-mos/mos-platform/f256/. pushd f256dev
cp -f ${INSTALL}/bin/mos-f256.cfg llvm-mos/bin/.
cp -Rf ${ROOT}/tools . cp -Rf ${INSTALL}/mos-platform/f256/* llvm-mos/mos-platform/f256/.
cp -Rf ${ROOT}/examples . cp -f ${INSTALL}/bin/mos-f256.cfg llvm-mos/bin/.
cp -Rf ${ROOT}/f256lib .
cp -Rf ${ROOT}/include .
cp -f ${ROOT}/f256lib.h .
cp -f ${ROOT}/pgz-thunk.py .
cp -f ../README . cp -Rf ${ROOT}/tools .
cp -f ../f256build.bat . cp -Rf ${ROOT}/examples .
cp -f ../f256run.bat . cp -Rf ${ROOT}/f256lib .
cp -f ../f256build.sh . cp -Rf ${ROOT}/include .
cp -f ../f256run.sh . cp -f ${ROOT}/f256lib.h .
cp -f ${ROOT}/pgz-thunk.py .
buildOverlayTool linux x86_64 $(pwd)/overlay.linux cp -f ../../README .
buildOverlayTool macos aarch64 $(pwd)/overlay.macos cp -f ../../f256build.bat .
buildOverlayTool windows x86_64 $(pwd)/overlay.windows cp -f ../../f256run.bat .
cp -f ../../f256build.sh .
cp -f ../../f256run.sh .
tar cJf ../llvm-mos-f256.tar.xz . buildOverlayTool linux x86_64 $(pwd)/overlay.linux
7z a ../llvm-mos-f256.7z . buildOverlayTool macos aarch64 $(pwd)/overlay.macos
buildOverlayTool windows x86_64 $(pwd)/overlay.windows
popd
if [[ -f ../f256dev.7z ]]; then
rm ../f256dev.7z
fi
7z a ../f256dev.7z .
popd popd
popd popd

View file

@ -76,7 +76,10 @@ USAGE
===== =====
As shown above, f256build is used to build projects using the default linker As shown above, f256build is used to build projects using the default linker
settings. If you do not have linker settings in your project already, the settings.
***FIX*** If you do not have linker settings in your project already, the
defaults will be added (in a file named f256.ld in your project directory). defaults will be added (in a file named f256.ld in your project directory).
Unless you need to use embedded binary data in your project, the defaults are Unless you need to use embedded binary data in your project, the defaults are
all you need. Embedded data examples are included. See SPRITES and TILEMAP in all you need. Embedded data examples are included. See SPRITES and TILEMAP in
@ -110,3 +113,15 @@ wiki: http://wiki.f256foenix.com/
As a last resort, you can email me, Scott Duensing, at scott@kangaroopunch.com As a last resort, you can email me, Scott Duensing, at scott@kangaroopunch.com
and I'll probably ask you to join the Discord. :-) and I'll probably ask you to join the Discord. :-)
HISTORY
=======
* xx-MAY-2024 - Everything now installs into a single folder for safe updating.
Linker scripts not added to projects by default any longer.
* 09-MAY-2024 - Updated MacOS and Linux installation script to also search for
'pip3' as well as 'pip'.
* 01-MAY-2024 - Initial release for Linux, MacOS, and Windows.

View file

@ -3,25 +3,25 @@ goto top
# #
# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com # Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights # in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is # copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: # furnished to do so, subject to the following conditions:
# #
# The above copyright notice and this permission notice shall be included in # The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software. # all copies or substantial portions of the Software.
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
# #
@ -31,8 +31,8 @@ goto top
set REMOTE1=https://github.com/llvm-mos/llvm-mos-sdk/releases/latest/download/llvm-mos-windows.7z set REMOTE1=https://github.com/llvm-mos/llvm-mos-sdk/releases/latest/download/llvm-mos-windows.7z
set LOCAL1=llvm-mos-windows.7z set LOCAL1=llvm-mos-windows.7z
set REMOTE2=https://kangaroopunch.com/files/serve/shared/llvm-mos-f256.7z set REMOTE2=https://kangaroopunch.com/files/serve/shared/f256dev.7z
set LOCAL2=llvm-mos-f256.7z set LOCAL2=f256dev.7z
set REMOTE3=https://aka.ms/vs/16/release/vc_redist.x64.exe set REMOTE3=https://aka.ms/vs/16/release/vc_redist.x64.exe
set LOCAL3=vc_redist.x64.exe set LOCAL3=vc_redist.x64.exe
@ -41,10 +41,7 @@ set REMOTE4=https://github.com/pweingar/FoenixMgr/archive/refs/heads/master.zip
set LOCAL4=master.zip set LOCAL4=master.zip
if exist llvm-mos\ ( if exist f256dev\ rd /s /q f256dev
echo You already have an llvm-mos directory. Exiting.
exit /B
)
if exist "%ProgramFiles%\7-Zip\7z.exe" ( if exist "%ProgramFiles%\7-Zip\7z.exe" (
set UNPACK="%ProgramFiles%\7-Zip\7z.exe" set UNPACK="%ProgramFiles%\7-Zip\7z.exe"
@ -89,36 +86,47 @@ if errorlevel 1 (
%LOCAL3% /install /passive %LOCAL3% /install /passive
%UNPACK% x -y %LOCAL1% md f256dev
pushd f256dev
%UNPACK% x -y ..\%LOCAL1%
%UNPACK% x -y ..\%LOCAL4%
popd
%UNPACK% x -y %LOCAL2% %UNPACK% x -y %LOCAL2%
%UNPACK% x -y %LOCAL4%
del %LOCAL1% del %LOCAL1%
del %LOCAL2% del %LOCAL2%
del %LOCAL3% del %LOCAL3%
del %LOCAL4% del %LOCAL4%
del overlay.linux pushd f256dev
del overlay.macos del overlay.linux
ren overlay.windows overlay.exe del overlay.macos
ren overlay.windows overlay.exe
if exist *.sh del *.sh > NUL if exist *.sh del *.sh > NUL
ren FoenixMgr-master FoenixMgr ren FoenixMgr-master FoenixMgr
pushd FoenixMgr pushd FoenixMgr
pip.exe install -r requirements.txt pip.exe install -r requirements.txt
popd
echo @"%%~dp0mos-clang++.exe" --config mos-f256.cfg %%* > llvm-mos\bin\mos-f256-clang++.bat
echo @"%%~dp0mos-clang-cpp.exe" --config mos-f256.cfg %%* > llvm-mos\bin\mos-f256-clang-cpp.bat
echo @"%%~dp0mos-clang.exe" --config mos-f256.cfg %%* > llvm-mos\bin\mos-f256-clang.bat
popd popd
echo [DEFAULT] > foenixmgr.ini echo @"%~dp0f256dev\f256build.bat" "%%~dp0" %%* > f256build.bat
echo port=COM3 >> foenixmgr.ini echo @"%~dp0f256dev\f256run.bat" "%%~dp0" %%* > f256run.bat
echo labels=sample.lbl >> foenixmgr.ini
echo flash_address=380000 >> foenixmgr.ini
echo chunk_size=1024 >> foenixmgr.ini
echo cpu=65c02 >> foenixmgr.ini
echo @"%%~dp0mos-clang++.exe" --config mos-f256.cfg %%* > llvm-mos\bin\mos-f256-clang++.bat if not exist foenixmgr.ini (
echo @"%%~dp0mos-clang-cpp.exe" --config mos-f256.cfg %%* > llvm-mos\bin\mos-f256-clang-cpp.bat echo [DEFAULT] > foenixmgr.ini
echo @"%%~dp0mos-clang.exe" --config mos-f256.cfg %%* > llvm-mos\bin\mos-f256-clang.bat echo port=COM3 >> foenixmgr.ini
echo labels=sample.lbl >> foenixmgr.ini
echo flash_address=380000 >> foenixmgr.ini
echo chunk_size=1024 >> foenixmgr.ini
echo cpu=65c02 >> foenixmgr.ini
)
echo. echo.
echo ----------------------------------------------------------------------------- echo -----------------------------------------------------------------------------

View file

@ -1,25 +1,25 @@
#!/bin/bash #!/bin/bash
# #
# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com # Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights # in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is # copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: # furnished to do so, subject to the following conditions:
# #
# The above copyright notice and this permission notice shall be included in # The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software. # all copies or substantial portions of the Software.
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
# #
# #

View file

@ -3,46 +3,50 @@ goto top
# #
# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com # Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights # in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is # copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: # furnished to do so, subject to the following conditions:
# #
# The above copyright notice and this permission notice shall be included in # The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software. # all copies or substantial portions of the Software.
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
# #
:top :top
set ROOT=%cd% setlocal EnableDelayedExpansion
if "%~1%" neq "" goto checkSrc set ROOT=%~dp0
if "%ROOT:~-1%" == "\" set "ROOT=%ROOT:~0,-1%"
if "%~2" neq "" goto checkSrc
echo. echo.
echo No project folder provided. echo No project folder provided.
exit /b exit /b
:checkSrc :checkSrc
if exist "%1%\src\*.c" goto foundSrc if exist "%~2\src\*.c" goto foundSrc
echo. echo.
echo No src folder containing C files found. echo No src folder containing C files found.
exit /b exit /b
:foundSrc :foundSrc
set PROJECT=%ROOT%\%1% set PROJECT=%~1%~2
set SOURCE=%PROJECT%\src set SOURCE=%PROJECT%\src
set BUILD=%PROJECT%\.builddir set BUILD=%PROJECT%\.builddir
if "%PROJECT:~-1%" == "\" set "PROJECT=%PROJECT:~0,-1%" if "%PROJECT:~-1%" == "\" set "PROJECT=%PROJECT:~0,-1%"
for %%f in ("%PROJECT%") do set "NAME=%%~nxf" for %%f in ("%PROJECT%") do set "NAME=%%~nxf"
pushd "%PROJECT%" pushd "%PROJECT%"
@ -50,10 +54,11 @@ pushd "%PROJECT%"
mkdir .builddir mkdir .builddir
cd .builddir cd .builddir
"%ROOT%\overlay.exe" 5 "%BUILD%" "%SOURCE%" "%ROOT%\overlay.exe" 5 "%BUILD%" "%SOURCE%"
if not exist "%PROJECT%\f256.ld" copy /y "%ROOT%\llvm-mos\mos-platform\f256\lib\link.ld" "%PROJECT%\f256.ld" > NUL if exist "%PROJECT%\f256.ld" copy /y "%PROJECT%\f256.ld" f256.ld > NUL
if not exist f256.ld copy /y "%ROOT%\llvm-mos\mos-platform\f256\lib\link.ld" f256.ld > NUL
set OLDPATH=%PATH% set OLDPATH=%PATH%
set PATH=%~dp0llvm-mos\bin;%PATH% set PATH=%~dp0llvm-mos\bin;%PATH%
call mos-f256-clang.bat -T ..\f256.ld -Wl,-Map=%NAME%.map -o %NAME% -I"%ROOT%" -Os -Wall -lm *.c call mos-f256-clang.bat -v *.c -o %NAME% -I"%ROOT%" -Tf256.ld -Wl,-Map=%NAME%.map -Os -Wall -lm
if errorlevel 1 goto failed if errorlevel 1 goto failed
ren %NAME% %NAME%.pgz ren %NAME% %NAME%.pgz
llvm-nm.exe %NAME%.elf > %NAME%.sym llvm-nm.exe %NAME%.elf > %NAME%.sym

View file

@ -1,25 +1,25 @@
#!/bin/bash #!/bin/bash
# #
# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com # Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights # in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is # copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: # furnished to do so, subject to the following conditions:
# #
# The above copyright notice and this permission notice shall be included in # The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software. # all copies or substantial portions of the Software.
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
# #
# #

View file

@ -3,38 +3,41 @@ goto top
# #
# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com # Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights # in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is # copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: # furnished to do so, subject to the following conditions:
# #
# The above copyright notice and this permission notice shall be included in # The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software. # all copies or substantial portions of the Software.
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
# #
:top :top
set ROOT=%cd% setlocal EnableDelayedExpansion
if "%~1%" neq "" goto checkPgz set ROOT=%~dp0
if "%ROOT:~-1%" == "\" set "ROOT=%ROOT:~0,-1%"
if "%~2%" neq "" goto checkPgz
echo. echo.
echo No project folder provided. echo No project folder provided.
exit /b exit /b
:checkPgz :checkPgz
set PROJECT=%ROOT%\%1% set PROJECT=%~1%~2
if "%PROJECT:~-1%" == "\" set "PROJECT=%PROJECT:~0,-1%" if "%PROJECT:~-1%" == "\" set "PROJECT=%PROJECT:~0,-1%"
for %%f in ("%PROJECT%") do set "NAME=%%~nxf" for %%f in ("%PROJECT%") do set "NAME=%%~nxf"
if exist "%PROJECT%\%NAME%.pgz" goto foundPgz if exist "%PROJECT%\%NAME%.pgz" goto foundPgz

View file

@ -1,25 +1,25 @@
#!/bin/bash #!/bin/bash
# #
# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com # Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights # in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is # copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: # furnished to do so, subject to the following conditions:
# #
# The above copyright notice and this permission notice shall be included in # The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software. # all copies or substantial portions of the Software.
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
# #
# #