bld.bat 1.6 KB
Newer Older
Daniel Brown's avatar
Daniel Brown committed
1 2 3 4 5 6 7 8 9 10
@ECHO ON
SET LookForFile="%SRC_DIR%\kat.exe"

chdir /d %SRC_DIR%

IF "%ARCH%"=="64" (
    c:\msys64\mingw64 /bin/bash ./finesse.sh --build-win64
)

IF "%ARCH%"=="32" (
Daniel Brown's avatar
update  
Daniel Brown committed
11
    c:\msys32\mingw32 /bin/bash ./finesse.sh --build-win32
Daniel Brown's avatar
Daniel Brown committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25
)

@ECHO OFF
:CheckForFile
IF EXIST %LookForFile% GOTO FoundIt

TIMEOUT /T 2 >nul

GOTO CheckForFile

:FoundIt
ECHO Found: %LookForFile%
@ECHO ON

Daniel Brown's avatar
Daniel Brown committed
26 27
TIMEOUT /T 2 >nul 

Daniel Brown's avatar
Daniel Brown committed
28 29 30 31 32 33 34 35
xcopy %SRC_DIR%\kat.exe "%PREFIX%\Library\bin\"
xcopy %SRC_DIR%\kat.ini "%PREFIX%\Library\bin\"

mkdir %PREFIX%\etc\conda\activate.d
mkdir %PREFIX%\etc\conda\deactivate.d

type NUL > %PREFIX%\etc\conda\activate.d\finesse_vars.bat
type NUL > %PREFIX%\etc\conda\deactivate.d\finesse_vars.bat
36 37
type NUL > %PREFIX%\etc\conda\activate.d\finesse_vars.ps1
type NUL > %PREFIX%\etc\conda\deactivate.d\finesse_vars.ps1
Daniel Brown's avatar
Daniel Brown committed
38 39 40 41 42

echo @ECHO OFF >> %PREFIX%\etc\conda\activate.d\finesse_vars.bat
echo SET KATINI=%%CONDA_PREFIX%%\Library\bin\kat.ini >> %PREFIX%\etc\conda\activate.d\finesse_vars.bat
echo SET FINESSE_DIR=%%CONDA_PREFIX%%\Library\bin >> %PREFIX%\etc\conda\activate.d\finesse_vars.bat

43 44 45
echo $env:KATINI="$env:CONDA_PREFIX\Library\bin\kat.ini" >> %PREFIX%\etc\conda\activate.d\finesse_vars.ps1
echo $env:FINESSE_DIR="$env:CONDA_PREFIX\Library\bin"" >> %PREFIX%\etc\conda\activate.d\finesse_vars.ps1

Daniel Brown's avatar
Daniel Brown committed
46 47
echo @ECHO OFF >> %PREFIX%\etc\conda\deactivate.d\finesse_vars.bat
echo SET KATINI= >> %PREFIX%\etc\conda\deactivate.d\finesse_vars.bat
48 49 50
echo SET FINESSE_DIR= >> %PREFIX%\etc\conda\deactivate.d\finesse_vars.bat
echo $env:KATINI= >> %PREFIX%\etc\conda\deactivate.d\finesse_vars.ps1
echo $env:FINESSE_DIR= >> %PREFIX%\etc\conda\deactivate.d\finesse_vars.ps1