-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating Zip & new MSBuild-helper with
-notamd64
option 3F/vsSoluti…
…onBuildEvent#38 also fixes `-unpack` & `-msbuild` commands for gnt.bat when using double quotes
- Loading branch information
Showing
10 changed files
with
115 additions
and
27 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
@echo off | ||
|
||
msbuild minified/.compressor /p:core="../gnt.core" /p:output="gnt.core" /nologo /v:m /m:4 %* | ||
set msbuild=msbuild.bat | ||
|
||
call %msbuild% minified/.compressor /p:core="../gnt.core" /p:output="gnt.core" /nologo /v:m /m:4 %* || goto err | ||
|
||
goto exit | ||
|
||
:err | ||
|
||
echo. Build failed. 1>&2 | ||
|
||
:exit |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,63 @@ | ||
@echo off | ||
setlocal enableDelayedExpansion | ||
|
||
:: The MSBuild-helper. Part of GetNuTool | ||
:: https://github.com/3F/GetNuTool | ||
|
||
:: arguments: | ||
:: | ||
:: msbuild -notamd64 <args> - to select x86 instance instead of x64 if it's possible. | ||
:: msbuild <args> - to select any available instance. | ||
:: | ||
|
||
set args=%* | ||
set notamd64=0 | ||
|
||
set a=%args:~0,30% | ||
set a=%a:"=% | ||
|
||
if "%a:~0,9%"=="-notamd64" ( | ||
call :popa %1 | ||
shift | ||
set notamd64=1 | ||
) | ||
|
||
for %%v in (14.0, 12.0, 15.0, 4.0, 3.5, 2.0) do ( | ||
for /F "usebackq tokens=2* skip=2" %%a in ( | ||
`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%%v" /v MSBuildToolsPath 2^> nul` | ||
) do if exist %%b ( | ||
set msbuild="%%b\msbuild.exe" | ||
|
||
if NOT "%notamd64%" == "1" ( | ||
set msbuild=%%b\msbuild.exe | ||
goto found | ||
) | ||
|
||
:: 7z & amd64\msbuild - https://github.com/3F/vsSolutionBuildEvent/issues/38 | ||
set _amd=..\msbuild.exe | ||
if exist "%%b/!_amd!" ( | ||
set msbuild=%%b\!_amd! | ||
) else ( | ||
set msbuild=%%b\msbuild.exe | ||
) | ||
goto found | ||
) | ||
) | ||
|
||
echo MSBuild Tools was not found. Please use it manually like: ` "full_path_to_msbuild.exe" arguments ` 1>&2 | ||
|
||
echo MSBuild was not found, try: ` "full_path_to_msbuild.exe" arguments ` 1>&2 | ||
goto exit | ||
|
||
|
||
:found | ||
|
||
set msbuild="%msbuild%" | ||
|
||
echo MSBuild Tools: %msbuild% | ||
|
||
%msbuild% %* | ||
%msbuild% %args% | ||
|
||
:popa | ||
call set args=%%args:%1^=%% | ||
exit /B 0 | ||
|
||
:exit | ||
:exit | ||
exit /B 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
@echo off | ||
|
||
compress & msbuild embedded/.packer /p:core="../minified/gnt.core" /p:output="gnt.bat" /nologo /v:m /m:4 %* | ||
set msbuild=msbuild.bat | ||
|
||
call compress || goto err | ||
call %msbuild% embedded/.packer /p:core="../minified/gnt.core" /p:output="gnt.bat" /nologo /v:m /m:4 %* || goto err | ||
|
||
|
||
goto exit | ||
|
||
:err | ||
|
||
echo. Build failed. 1>&2 | ||
|
||
:exit |