Skip to content
Snippets Groups Projects
compile_debug+sanityCheck.bat 631 B
Newer Older
  • Learn to ignore specific revisions
  • Arkerthan's avatar
    Arkerthan committed
    @echo off
    :: Free Cities Basic Compiler - Windows
    
    :: Set working directory
    pushd %~dp0
    
    :: See if we can find a git installation
    
    svornost's avatar
    svornost committed
    set GITFOUND=no
    
    Arkerthan's avatar
    Arkerthan committed
    for %%k in (HKCU HKLM) do (
    	for %%w in (\ \Wow6432Node\) do (
    		for /f "skip=2 delims=: tokens=1*" %%a in ('reg query "%%k\SOFTWARE%%wMicrosoft\Windows\CurrentVersion\Uninstall\Git_is1" /v InstallLocation 2^> nul') do (
    			for /f "tokens=3" %%z in ("%%a") do (
    				set GIT=%%z:%%b
    				set GITFOUND=yes
    				goto FOUND
    			)
    		)
    	)
    )
    :FOUND
    if %GITFOUND% == yes (
    	set "PATH=%GIT%bin;%PATH%"
    
    Arkerthan's avatar
    Arkerthan committed
    	bash --login -c "./sanityCheck.sh"
    
    Arkerthan's avatar
    Arkerthan committed
    )
    
    :: Compile the game
    call "%~dp0compile.bat"
    
    popd
    PAUSE