add templates
This commit is contained in:
parent
f4c81a1a98
commit
41b48d1ff2
|
@ -1,2 +1,2 @@
|
||||||
@echo off
|
@echo off
|
||||||
call %VID_HOME%\tools\7z.bat %*
|
call "%VID_HOME%\tools\7z.bat" %*
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
@echo off
|
@echo off
|
||||||
call %VID_HOME%\tools\cmakew.bat %*
|
call "%VID_HOME%\tools\cmakew.bat" %*
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
for /D %%A in (. %1) do set open=%%~dpnA
|
for /D %%A in (. %1) do set open=%%~dpnA
|
||||||
echo %open%
|
start "" "%VID_HOME%\tools\lite\lite.exe" %open%
|
||||||
start "" %VID_HOME%\tools\lite\lite.exe %open%
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
@echo off
|
@echo off
|
||||||
call %VID_HOME%\tools\6.0g-mingw64.bat g++ %*
|
call "%VID_HOME%\tools\6.0g-mingw64.bat" g++ %*
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
@echo off
|
@echo off
|
||||||
call %VID_HOME%\tools\6.0g-mingw64.bat gcc %*
|
call "%VID_HOME%\tools\6.0g-mingw64.bat" gcc %*
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
@echo off
|
@echo off
|
||||||
call %VID_HOME%\tools\6.0g-mingw64.bat mingw32-make %*
|
call "%VID_HOME%\tools\6.0g-mingw64.bat" mingw32-make %*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@echo off
|
@echo off
|
||||||
set fn=%VID_HOME%\templates\%1.7z
|
set fn="%VID_HOME%\templates\%1.7z"
|
||||||
if exist %fn% (
|
if exist %fn% (
|
||||||
call %VID_HOME%\tools\7z.bat x -o. -y %fn%
|
call "%VID_HOME%\tools\7z.bat" x -o. -y %fn%
|
||||||
) else (
|
) else (
|
||||||
echo Template %1 not found
|
echo Template %1 not found
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@echo off
|
@echo off
|
||||||
set VID_HOME=%~dp0
|
set VID_HOME=%~dp0
|
||||||
set PATH=%~dp0\bin;%PATH%
|
set PATH=%~dp0\bin;%PATH%
|
||||||
cmd /k
|
cmd /k
|
130
tools/7z.bat
130
tools/7z.bat
|
@ -1,66 +1,66 @@
|
||||||
@echo off
|
@echo off
|
||||||
setlocal ENABLEEXTENSIONS
|
setlocal ENABLEEXTENSIONS
|
||||||
setlocal enableDelayedExpansion
|
setlocal enableDelayedExpansion
|
||||||
|
|
||||||
@rem set local scope for the variables with windows NT shell
|
@rem set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@rem get script directory name
|
@rem get script directory name
|
||||||
set DIRNAME=%~dp0\..\.cache
|
set DIRNAME=%~dp0\..\.cache
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
|
||||||
@rem strip trailing backslash from DIRNAME path to make it easier to work with
|
@rem strip trailing backslash from DIRNAME path to make it easier to work with
|
||||||
IF %DIRNAME:~-1%==\ SET DIRNAME=%DIRNAME:~0,-1%
|
IF %DIRNAME:~-1%==\ SET DIRNAME=%DIRNAME:~0,-1%
|
||||||
|
|
||||||
@rem get OS bitness
|
@rem get OS bitness
|
||||||
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS_BITNESS=32BIT || set OS_BITNESS=64BIT
|
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS_BITNESS=32BIT || set OS_BITNESS=64BIT
|
||||||
|
|
||||||
set UNZIP_EXE=%DIRNAME%\7zip\7z.exe
|
set UNZIP_EXE=%DIRNAME%\7zip\7z.exe
|
||||||
|
|
||||||
@rem require 7zip to unzip the cmake dist because windows sucks
|
@rem require 7zip to unzip the cmake dist because windows sucks
|
||||||
if not exist %UNZIP_EXE% (
|
if not exist %UNZIP_EXE% (
|
||||||
echo Downloading 7zip...
|
echo Downloading 7zip...
|
||||||
|
|
||||||
if %OS_BITNESS%==64BIT (
|
if %OS_BITNESS%==64BIT (
|
||||||
call :downloadFile https://www.7-zip.org/a/7z1801-x64.exe %TEMP%\7zInstall.exe
|
call :downloadFile https://www.7-zip.org/a/7z1801-x64.exe %TEMP%\7zInstall.exe
|
||||||
) else (
|
) else (
|
||||||
call :downloadFile https://www.7-zip.org/a/7z1801.exe %TEMP%\7zInstall.exe
|
call :downloadFile https://www.7-zip.org/a/7z1801.exe %TEMP%\7zInstall.exe
|
||||||
)
|
)
|
||||||
|
|
||||||
echo Installing 7zip
|
echo Installing 7zip
|
||||||
|
|
||||||
@rem don't forget the trailing backslash here because 7zip is too stupid to deal with paths and just removes the last char
|
@rem don't forget the trailing backslash here because 7zip is too stupid to deal with paths and just removes the last char
|
||||||
%TEMP%\7zInstall.exe /S /D=%DIRNAME%\7zip\
|
%TEMP%\7zInstall.exe /S /D=%DIRNAME%\7zip\
|
||||||
del %TEMP%\7zInstall.exe
|
del %TEMP%\7zInstall.exe
|
||||||
)
|
)
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||||
|
|
||||||
:win9xME_args
|
:win9xME_args
|
||||||
@rem Slurp the command line arguments.
|
@rem Slurp the command line arguments.
|
||||||
set CMD_LINE_ARGS=
|
set CMD_LINE_ARGS=
|
||||||
set _SKIP=2
|
set _SKIP=2
|
||||||
|
|
||||||
:win9xME_args_slurp
|
:win9xME_args_slurp
|
||||||
if "x%~1" == "x" goto runCmake
|
if "x%~1" == "x" goto runCmake
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
set CMD_LINE_ARGS=%*
|
||||||
goto runCmake
|
goto runCmake
|
||||||
|
|
||||||
:4NT_args
|
:4NT_args
|
||||||
@rem Get arguments from the 4NT Shell from JP Software
|
@rem Get arguments from the 4NT Shell from JP Software
|
||||||
set CMD_LINE_ARGS=%$
|
set CMD_LINE_ARGS=%$
|
||||||
|
|
||||||
:runCmake
|
:runCmake
|
||||||
|
|
||||||
%UNZIP_EXE% %CMD_LINE_ARGS%
|
%UNZIP_EXE% %CMD_LINE_ARGS%
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
|
|
||||||
@rem args: fileUrl, filePath
|
@rem args: fileUrl, filePath
|
||||||
:downloadFile
|
:downloadFile
|
||||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('%~1', '%~2')"
|
powershell -Command "(New-Object Net.WebClient).DownloadFile('%~1', '%~2')"
|
||||||
EXIT /B 0
|
EXIT /B 0
|
||||||
|
|
||||||
:end
|
:end
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
Loading…
Reference in New Issue