mirror of https://github.com/zxdos/zxuno.git
sdk: renamed `setvars.sh` and `setvars.bat` into `setenv.sh` and `setenv.bat`
* common.mk, setenv.sh, setenv.bat: renamed `ZXUNOSDK` variable to more general `ZXSDK` as there're no special cases to use specific one for ZX-Uno project
This commit is contained in:
parent
1a67b2d087
commit
a33a61fca9
|
@ -1,4 +1,4 @@
|
||||||
@call ..\sdk\setvars.bat
|
@call ..\sdk\setenv.bat
|
||||||
sjasmplus firmware.asm
|
sjasmplus firmware.asm
|
||||||
zx7b firmware_strings.rom firmware.rom.zx7b
|
zx7b firmware_strings.rom firmware.rom.zx7b
|
||||||
sjasmplus bootloader.asm
|
sjasmplus bootloader.asm
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@call ..\sdk\setvars.bat
|
@call ..\sdk\setenv.bat
|
||||||
set output=\Google Drive\Proyecto ZX-Uno\cores_%2\
|
set output=\Google Drive\Proyecto ZX-Uno\cores_%2\
|
||||||
echo define version %1 > version.asm
|
echo define version %1 > version.asm
|
||||||
call make.bat
|
call make.bat
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@call ..\sdk\setvars.bat
|
@call ..\sdk\setenv.bat
|
||||||
echo define version 1 > version.asm
|
echo define version 1 > version.asm
|
||||||
sjasmplus firmware.asm
|
sjasmplus firmware.asm
|
||||||
fcut firmware_strings.rom 7e00 -7e00 strings.bin
|
fcut firmware_strings.rom 7e00 -7e00 strings.bin
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@call ..\..\sdk\setvars.bat
|
@call ..\..\sdk\setenv.bat
|
||||||
FuenteABin
|
FuenteABin
|
||||||
Png2Rcs fondo.png fondo.rcs -a fondo.atr
|
Png2Rcs fondo.png fondo.rcs -a fondo.atr
|
||||||
sjasmplus scroll.asm
|
sjasmplus scroll.asm
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@call ..\..\..\sdk\setvars.bat
|
@call ..\..\..\sdk\setenv.bat
|
||||||
rem 51F0-A4FF ep 6e3f
|
rem 51F0-A4FF ep 6e3f
|
||||||
rem b900-bf7f
|
rem b900-bf7f
|
||||||
fcut Manic.sna 52F0 4a30 Manic.bin
|
fcut Manic.sna 52F0 4a30 Manic.bin
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@call ..\..\..\sdk\setvars.bat
|
@call ..\..\..\sdk\setenv.bat
|
||||||
genMenu
|
genMenu
|
||||||
rcs screen.scr screen.rcs
|
rcs screen.scr screen.rcs
|
||||||
fcut screen.rcs 0 1800 screen.cut
|
fcut screen.rcs 0 1800 screen.cut
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@call ..\..\..\sdk\setvars.bat
|
@call ..\..\..\sdk\setenv.bat
|
||||||
genMenu 1
|
genMenu 1
|
||||||
rcs screen.scr screen.rcs
|
rcs screen.scr screen.rcs
|
||||||
fcut screen.rcs 0 1000 screen.cut
|
fcut screen.rcs 0 1000 screen.cut
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@call ..\..\..\sdk\setvars.bat
|
@call ..\..\..\sdk\setenv.bat
|
||||||
genMenu 0
|
genMenu 0
|
||||||
rcs screen.scr screen.rcs
|
rcs screen.scr screen.rcs
|
||||||
fcut screen.rcs 0 1000 screen.cut
|
fcut screen.rcs 0 1000 screen.cut
|
||||||
|
|
|
@ -5,7 +5,7 @@ rem SPDX-FileNotice: Based on code by Antonio Villena <_@antoniovillena.es>
|
||||||
rem
|
rem
|
||||||
rem SPDX-License-Identifier: GPL-3.0-or-later
|
rem SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
call ..\sdk\setvars.bat
|
call ..\sdk\setenv.bat
|
||||||
|
|
||||||
set /a i=2
|
set /a i=2
|
||||||
for /f "eol=# tokens=1,2,3 delims=;" %%a in (cores.txt) do call :AddCore %%a %%b %%c
|
for /f "eol=# tokens=1,2,3 delims=;" %%a in (cores.txt) do call :AddCore %%a %%b %%c
|
||||||
|
|
|
@ -5,7 +5,7 @@ rem SPDX-FileNotice: Based on code by Antonio Villena <_@antoniovillena.es>
|
||||||
rem
|
rem
|
||||||
rem SPDX-License-Identifier: GPL-3.0-or-later
|
rem SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
call ..\sdk\setvars.bat
|
call ..\sdk\setenv.bat
|
||||||
|
|
||||||
set /a i=0
|
set /a i=0
|
||||||
for /f "eol=# tokens=1,2,3 delims=;" %%a in (roms.txt) do call :AddROM %%a %%b %%c
|
for /f "eol=# tokens=1,2,3 delims=;" %%a in (roms.txt) do call :AddROM %%a %%b %%c
|
||||||
|
|
|
@ -135,23 +135,23 @@ include ../sdk/common.mk
|
||||||
|
|
||||||
Remember to specify correct relative path to it.
|
Remember to specify correct relative path to it.
|
||||||
|
|
||||||
This will set `ZXUNOSDK` environment variable (on first inclusion only) and update your `PATH` environment variable to point to SDK's tools.
|
This will set `ZXSDK` environment variable (on first inclusion only) and update your `PATH` environment variable to point to SDK's tools.
|
||||||
These changes are actual for current invocation of `make` utility and all child processes.
|
These changes are actual for current invocation of `make` utility and all child processes.
|
||||||
|
|
||||||
### 2.4.2. In Bash scripts
|
### 2.4.2. In Bash scripts
|
||||||
|
|
||||||
Bash scripts are supposed to be invoked from Makefiles where the correct environment is already prepared by `make` utility so nothing must be done for such scripts.
|
Bash scripts are supposed to be invoked from Makefiles where the correct environment is already prepared by `make` utility so nothing must be done for such scripts.
|
||||||
|
|
||||||
In other cases you must source `setvars.sh` file in a Bash script like this:
|
In other cases you must source `setenv.sh` file in a Bash script like this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
source ../sdk/setvars.sh
|
source ../sdk/setenv.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
. ../sdk/setvars.sh
|
. ../sdk/setenv.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Remember to specify correct relative path to it.
|
Remember to specify correct relative path to it.
|
||||||
|
@ -247,15 +247,15 @@ You should manually download precompiled binaries of SJAsmPlus and Z88DK from In
|
||||||
|
|
||||||
## 4.2. In batch scripts
|
## 4.2. In batch scripts
|
||||||
|
|
||||||
To use these tools in a batch script just call `setvars.bat` file at the beginning of one like this:
|
To use these tools in a batch script just call `setenv.bat` file at the beginning of one like this:
|
||||||
|
|
||||||
```batch
|
```batch
|
||||||
call ..\sdk\setvars.bat
|
call ..\sdk\setenv.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
Remember to specify correct relative path to it.
|
Remember to specify correct relative path to it.
|
||||||
|
|
||||||
This will set `ZXUNOSDK` environment variable (on first call only) and update your `PATH` environment variable to point to SDK's tools.
|
This will set `ZXSDK` environment variable (on first call only) and update your `PATH` environment variable to point to SDK's tools.
|
||||||
These changes are actual for current invocation of command shell and all child processes.
|
These changes are actual for current invocation of command shell and all child processes.
|
||||||
|
|
||||||
# References
|
# References
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
# * GNU on Linux, FreeBSD etc.
|
# * GNU on Linux, FreeBSD etc.
|
||||||
# * GNU on Windows NT (using MinGW/MSYS/Cygwin/WSL)
|
# * GNU on Windows NT (using MinGW/MSYS/Cygwin/WSL)
|
||||||
|
|
||||||
ifndef ZXUNOSDK
|
ifndef ZXSDK
|
||||||
|
|
||||||
ZXUNOSDK := $(patsubst %/,%,$(abspath $(dir $(lastword $(MAKEFILE_LIST)))))
|
ZXSDK := $(patsubst %/,%,$(abspath $(dir $(lastword $(MAKEFILE_LIST)))))
|
||||||
Z88DK := $(ZXUNOSDK)/src/z88dk
|
Z88DK := $(ZXSDK)/src/z88dk
|
||||||
ZCCCFG := $(Z88DK)/lib/config
|
ZCCCFG := $(Z88DK)/lib/config
|
||||||
PATH := $(ZXUNOSDK)/bin:$(Z88DK)/bin:$(PATH)
|
PATH := $(ZXSDK)/bin:$(Z88DK)/bin:$(PATH)
|
||||||
|
|
||||||
# Fix paths under Cygwin for z88dk on Windows
|
# Fix paths under Cygwin for z88dk on Windows
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
|
@ -22,7 +22,7 @@ ZCCCFG := $(shell cygpath -m $(ZCCCFG))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export ZXUNOSDK
|
export ZXSDK
|
||||||
export ZCCCFG
|
export ZCCCFG
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ rem SPDX-FileCopyrightText: 2021 Ivan Tatarinov <ivan-tat@ya.ru>
|
||||||
rem
|
rem
|
||||||
rem SPDX-License-Identifier: GPL-3.0-or-later
|
rem SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
if not x%ZXUNOSDK% == x exit /b
|
if not x%ZXSDK% == x exit /b
|
||||||
set ZXUNOSDK=%~dp0
|
set ZXSDK=%~dp0
|
||||||
set ZXUNOSDK=%ZXUNOSDK:~0,-1%
|
set ZXSDK=%ZXSDK:~0,-1%
|
||||||
set Z88DK=%ZXUNOSDK%\src\z88dk
|
set Z88DK=%ZXSDK%\src\z88dk
|
||||||
set ZCCCFG=%Z88DK%\lib\config
|
set ZCCCFG=%Z88DK%\lib\config
|
||||||
set PATH=%ZXUNOSDK%\bin;%Z88DK%\bin;%PATH%
|
set PATH=%ZXSDK%\bin;%Z88DK%\bin;%PATH%
|
|
@ -3,15 +3,15 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
if [[ "x$ZXUNOSDK" == x ]]; then
|
if [[ "x$ZXSDK" == x ]]; then
|
||||||
ZXUNOSDK=$(dirname $(realpath "$BASH_SOURCE"))
|
ZXSDK=$(dirname $(realpath "$BASH_SOURCE"))
|
||||||
Z88DK=$ZXUNOSDK/src/z88dk
|
Z88DK=$ZXSDK/src/z88dk
|
||||||
ZCCCFG=$Z88DK/lib/config
|
ZCCCFG=$Z88DK/lib/config
|
||||||
PATH=$ZXUNOSDK/bin:$Z88DK/bin:$PATH
|
PATH=$ZXSDK/bin:$Z88DK/bin:$PATH
|
||||||
# Fix paths under Cygwin for z88dk on Windows
|
# Fix paths under Cygwin for z88dk on Windows
|
||||||
if [[ x$OS == xWindows_NT && x$OSTYPE == xcygwin ]]; then
|
if [[ x$OS == xWindows_NT && x$OSTYPE == xcygwin ]]; then
|
||||||
ZCCCFG=`cygpath -m $ZCCCFG`
|
ZCCCFG=`cygpath -m $ZCCCFG`
|
||||||
fi
|
fi
|
||||||
export ZXUNOSDK
|
export ZXSDK
|
||||||
export ZCCCFG
|
export ZCCCFG
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue