Skip to content

Instantly share code, notes, and snippets.

@FrostByteGER
Created May 5, 2022 17:21
Show Gist options
  • Save FrostByteGER/2ee92bc374d6736e356b71e7a2b00bb7 to your computer and use it in GitHub Desktop.
Save FrostByteGER/2ee92bc374d6736e356b71e7a2b00bb7 to your computer and use it in GitHub Desktop.
Conan and Premake Windows bootstrapper
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
ECHO Bootstrapping...
where /q conan
IF !ERRORLEVEL! NEQ 0 (
ECHO No conan installation found, checking for python installation to install conan via pip...
where /q python -v
IF !ERRORLEVEL! NEQ 0 (
ECHO No python installation found, please install python 3.5 with pip or later. Alternatively install Conan C++ package manager standalone
GOTO :ERROR
) ELSE (
ECHO Found a python installation, checking for pip
where /q pip
IF !ERRORLEVEL! NEQ 0 (
ECHO No pip found in your python installation found, please install pip for your python installation
GOTO :ERROR
) ELSE (
ECHO Python installation has a pip, trying to install conan with it...
REM this will fail on python2 and <=python3 installations
pip install conan
IF !ERRORLEVEL! NEQ 0 (
GOTO :ERROR
)
)
)
) ELSE (
ECHO Found a conan installation, proceeding with bootstrap...
)
IF NOT EXIST "./bootstrap-Tools" (
MKDIR "./bootstrap-Tools"
)
ECHO Pulling premake...
cd "./bootstrap-Tools"
curl -L -o "premake.zip" https://github.com/premake/premake-core/releases/download/v5.0.0-beta1/premake-5.0.0-beta1-windows.zip
tar -xf "premake.zip"
del "premake.zip"
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment