Last active
May 7, 2021 23:41
-
-
Save drdnar/8c6c23dc8af43c36a0c2cdbc223138d6 to your computer and use it in GitHub Desktop.
CE SDK portable batch file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem Check if we're running Windows 10 or newer. | |
rem Early versions of Windows 10 didn't support ANSI, but since MS is very aggressive | |
rem about forcing updates, they're probably not likely to appear. | |
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i | |
echo. | |
if %VERSION% gtr 9 echo [7m | |
echo ================================================================================ | |
echo TI-84 PLUS CE DEVELOPER'S TOOLKIT, PORTABLE | |
echo ================================================================================ | |
if %VERSION% gtr 9 echo [0m | |
echo. | |
rem Set up paths | |
set CEDEV=%~dp0 | |
set PATH=%~dp0bin;%PATH% | |
rem set PREFIX=%~dp0 | |
if NOT "%CEDEV%"=="%CEDEV: =%" goto spaces | |
rem If a directory was dragged onto this batch file, then run make on the directory. | |
if "%~1" == "" goto noargs | |
cd %1 | |
make | |
echo. | |
if %VERSION% gtr 9 echo [7m | |
echo ================================================================================ | |
echo MAKE COMPLETED, CHECK FOR ANY ERRORS ABOVE | |
echo ================================================================================ | |
if %VERSION% gtr 9 echo [0m | |
echo. | |
pause | |
exit | |
:spaces | |
if %VERSION% gtr 9 echo [101m[30m | |
echo ================================================================================ | |
echo ERROR: There are spaces in your path! | |
echo makefiles are incompatible with spaces in folder names. | |
echo ================================================================================ | |
if %VERSION% gtr 9 echo [0m | |
echo. | |
pause | |
exit | |
rem Otherwise, just open a command prompt for the user. | |
:noargs | |
echo No drag-and-drop target found, dropping into command line. | |
echo. | |
cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment