Skip to content

Instantly share code, notes, and snippets.

@mingwandroid
Created February 19, 2016 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mingwandroid/d3d7e9c2614016b72d09 to your computer and use it in GitHub Desktop.
Save mingwandroid/d3d7e9c2614016b72d09 to your computer and use it in GitHub Desktop.
@echo off
REM We can do better later.
if exist C:\msys64 (
set MSYS2=C:\msys64
) else (
set MSYS2=C:\msys32
)
if "%MSYS2%" == "" exit 1
REM The native tools always come before the msys2 tools.
set "PATH=%MSYS2%\mingw%ARCH%\bin;%MSYS2%\usr\bin;%PATH%"
set "MSYSTEM=MINGW%ARCH%"
FOR /F "delims=" %%i IN ('%MSYS2%\usr\bin\gcc.exe -dumpmachine') DO set "BUILDU=%%i"
FOR /F "delims=" %%i IN ('%MSYS2%\usr\bin\cygpath.exe -u %PREFIX%') DO set "PREFIXU=%%i"
if "%ARCH%" == "64" (
set ARCHU=x86_64
) else (
set ARCHU=i686
)
set "PKG_CONFIG_PATH=%PREFIXU%/lib/pkgconfig:%PREFIXU%/share/pkgconfig"
set "ACLOCAL_PATH=%PREFIXU%/share/aclocal:/usr/share/aclocal"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment