-
-
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.
Implemented
-unpack
& -msbuild
arguments for Executable version
- Loading branch information
Showing
5 changed files
with
44 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@echo off | ||
|
||
msbuild minified/.compressor /p:core="../gnt.core" /p:output="gnt.core" /nologo /v:m /m:4 | ||
msbuild minified/.compressor /p:core="../gnt.core" /p:output="gnt.core" /nologo /v:m /m:4 %* |
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,27 +1,49 @@ | ||
@echo off | ||
:: GetNuTool - Executable version | ||
:: Copyright (c) 2015-2016 Denis Kuzmin [ [email protected] ] | ||
:: https://github.com/3F/GetNuTool | ||
|
||
set gntcore=gnt.core | ||
set $tpl.corevar$=%temp%/%gntcore% | ||
set $tpl.corevar$="%temp%\%random%%random%%gntcore%" | ||
|
||
set args=%* | ||
if "%args:~0,7%"=="-unpack" goto unpack | ||
if "%args:~0,8%"=="-msbuild" goto ufound | ||
|
||
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="%%bmsbuild.exe" | ||
set msbuild="%%b\msbuild.exe" | ||
goto found | ||
) | ||
) | ||
echo MSBuild was not found, try: gnt -msbuild "fullpath" args 1>&2 | ||
goto exit | ||
|
||
echo MSBuild was not found. Please use it manually like: ` "full_path_to_msbuild.exe" %gntcore% arguments ` 1>&2 | ||
|
||
goto exit | ||
:ufound | ||
call :popa %1 | ||
shift | ||
set msbuild=%1 | ||
call :popa %1 | ||
|
||
:found | ||
call :core | ||
%msbuild% %$tpl.corevar$% /nologo /p:wpath="%~dp0/" /v:m %args% | ||
del /Q/F %$tpl.corevar$% | ||
goto exit | ||
|
||
<nul set /P ="">%$tpl.corevar$% | ||
$gnt.core.logic$ | ||
|
||
:popa | ||
call set args=%%args:%1^=%% | ||
exit /B 0 | ||
|
||
%msbuild% %$tpl.corevar$% %* /nologo /verbosity:m /p:wpath="%~dp0/" | ||
:unpack | ||
set $tpl.corevar$=%~dp0\%gntcore% | ||
echo Generate minified version in %$tpl.corevar$% ... | ||
|
||
:core | ||
<nul set /P ="">%$tpl.corevar$% | ||
$gnt.core.logic$ | ||
|
||
: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@echo off | ||
|
||
compress & msbuild embedded/.packer /p:core="../minified/gnt.core" /p:output="gnt.bat" /nologo /v:m /m:4 | ||
compress & msbuild embedded/.packer /p:core="../minified/gnt.core" /p:output="gnt.bat" /nologo /v:m /m:4 %* |