Skip to content

Commit

Permalink
Fixed build for 64bit platform. + now msbuild-helper is obsolete and …
Browse files Browse the repository at this point in the history
…was replaced by hMSBuild project.

https://github.com/3F/hMSBuild
  • Loading branch information
3F committed Apr 7, 2017
1 parent a88936e commit 8fd631d
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 100 deletions.
20 changes: 16 additions & 4 deletions .vssbe
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,25 @@
" }, ",
" \"$(odir)versions/02. wrapper/\", true)]",
"",
"#[IO copy.file({ \"README.md\", \"changelog.txt\" }, \"$(odir)doc/\", true)]",
" ",
"#[IO copy.file({",
"#[IO copy.file(\"README.md\", \"$(odir)doc/Readme.md\", true)]",
"",
"#[IO write(\"$(odir)msbuild.bat\"):@echo off",
"echo.",
"echo The MSBuild-helper from GetNuTool is obsolete and was replaced by hMSBuild project.",
"echo Please look here: https://github.com/3F/hMSBuild",
"echo.",
"pause",
"]",
"",
"#[IO copy.file(\"changelog.txt\", \"$(odir)doc/\", true)]",
"",
"##[IO copy.file({",
" \"msbuild.bat\",",
" \"LICENSE\"",
" },",
" \"$(odir)\", true)]"
" \"$(odir)\", true)]",
"",
"#[IO copy.file(\"LICENSE\", \"$(odir)License.txt\", true)]"
]
}
},
Expand Down
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [GetNuTool](https://github.com/3F/GetNuTool)

The lightweight non-binary NuGet Client as a portable & embeddable tool for work with NuGet packages via basic MSBuild
The lightweight NuGet Client as a portable & embeddable tool for work with NuGet packages via basic MSBuild
(it does not require any additional extensions).

[![Build status](https://ci.appveyor.com/api/projects/status/rv65lbks5frc4k52/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/getnutool/branch/master) [![release-src](https://img.shields.io/github/release/3F/GetNuTool.svg)](https://github.com/3F/GetNuTool/releases/latest) [![License](https://img.shields.io/badge/License-MIT-74A5C2.svg)](https://github.com/3F/GetNuTool/blob/master/LICENSE)
Expand All @@ -19,9 +19,13 @@ gnt /p:ngpackages="LunaRoad/1.4.1" # To get `LunaRoad` package v1.4
msbuild gnt.core /p:ngconfig="packages.config" # Use `packages.config`
```

**Download:** [/releases](https://github.com/3F/GetNuTool/releases) ( [latest](https://github.com/3F/GetNuTool/releases/latest) ) - *Full version, Minified version, Compiled variant, Executable version*
**Download:** [/releases](https://github.com/3F/GetNuTool/releases) [ **[latest](https://github.com/3F/GetNuTool/releases/latest)** ] - *Full version, Minified version, Compiled variant, Executable version*

* Demo project: [GetNuTool v1.5 `get` & `pack` commands in use](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-178)
* Demo: [GetNuTool v1.5 `get` & `pack` commands in use](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-178)

## Projects that based on GetNuTool core

* [hMSBuild](https://github.com/3F/hMSBuild) - A lightweight tool (compiled batch file ~19 Kb that can be embedded inside any scripts or other batch files) - an easy helper for searching of available MSBuild tools. https://github.com/3F/hMSBuild

## License

Expand Down Expand Up @@ -188,19 +192,9 @@ debug | false (by default), true | `v1.3+` To display additional information
> msbuild gnt.core /t:pack /p:ngin="D:\tmp\7z.Libs" /p:ngout="newdir/"
```

#### Paths to MSBuild Tools

*Use our [msbuild-helper](https://github.com/3F/GetNuTool/blob/master/msbuild.bat) and have fun. But just a note where to find the MSBuild tools by default:*
#### Path to MSBuild Tools

* All available versions on your machine: `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions`

```bash
"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe"
"C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe"
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe
+GAC_32, GAC_64, ...
```
*If you need, try [hMSBuild](https://github.com/3F/hMSBuild) and have fun.*

## Compact & Minified versions

Expand Down
9 changes: 4 additions & 5 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
@echo off

set msbuild=msbuild.bat
set msbuild=netmsb


call %msbuild% logic.targets /p:ngconfig="packages.config" /nologo /v:m /m:4 || goto err
call %msbuild% -notamd64 "gnt.sln" /l:"packages\vsSBE.CI.MSBuild\bin\CI.MSBuild.dll" /v:m /m:4
call %msbuild% "gnt.sln" /l:"packages\vsSBE.CI.MSBuild\bin\CI.MSBuild.dll" /v:m /m:4

goto exit
exit /B 0

:err

echo. Build failed. 1>&2

:exit
exit /B 1
4 changes: 2 additions & 2 deletions caller/gnt.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set gntcore=gnt.core

for %%v in (14.0, 12.0, 4.0, 3.5, 2.0) do (
for %%v in (4.0, 14.0, 12.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 (
Expand All @@ -16,7 +16,7 @@ exit /B 2

:found

echo MSBuild Tools: %msbuildexe%
:: echo MSBuild Tools: %msbuildexe%

%msbuildexe% %gntcore% /nologo /v:m /m:4 %*
REM /noconlog
Expand Down
7 changes: 3 additions & 4 deletions compress.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
@echo off

set msbuild=msbuild.bat
set msbuild=netmsb

call %msbuild% minified/.compressor /p:core="../logic.targets" /p:output="gnt.core" /nologo /v:m /m:4 %* || goto err

goto exit
exit /B 0

:err

echo. Build failed. 1>&2

:exit
exit /B 1
2 changes: 1 addition & 1 deletion embedded/exec.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set a=%a:"=%
if "%a:~0,8%"=="-unpack " goto unpack
if "%a:~0,9%"=="-msbuild " goto ufound

for %%v in (14.0, 12.0, 4.0, 3.5, 2.0) do (
for %%v in (4.0, 14.0, 12.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 (
Expand Down
7 changes: 3 additions & 4 deletions embedded/sha1.cmd
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
@echo off

set msbuild="%~dp0\..\msbuild.bat"
set msbuild="%~dp0\..\netmsb.bat"

echo SHA-1 test has been started.

call "%~dp0\gnt" -unpack || goto err
call %msbuild% "%~dp0\sha1_comparer.targets" /p:core1="%~dp0\../minified/gnt.core" /p:core2="%~dp0\gnt.core" /nologo /v:m /m:4 || goto err

goto exit
exit /B 0

:err

echo. Build failed. 1>&2

:exit
exit /B 1
61 changes: 0 additions & 61 deletions msbuild.bat

This file was deleted.

44 changes: 44 additions & 0 deletions netmsb.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@echo off
setlocal enableDelayedExpansion

:: Part of GetNuTool - https://github.com/3F/GetNuTool
:: :: If you need a common MSBuild-helper, look here - https://github.com/3F/hMSBuild


:: cfg

:: 7z & amd64\msbuild - https://github.com/3F/vsSolutionBuildEvent/issues/38
set notamd64=1


:: -

for %%v in (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 msbuildexe=%%b\MSBuild.exe

if NOT "%notamd64%" == "1" (
goto found
)

set _amd=!msbuildexe:Framework64=Framework!
set _amd=!_amd:amd64=!

if exist "!_amd!" (
set msbuildexe=!_amd!
)
goto found

)
)
echo MSBuild was not found. 1>&2
exit /B 2

:found

"!msbuildexe!" %*

exit /B 0
7 changes: 3 additions & 4 deletions packing.bat
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
@echo off

set msbuild=msbuild.bat
set msbuild=netmsb

call compress || goto err
call %msbuild% embedded/.packer /p:core="../minified/gnt.core" /p:output="gnt.bat" /nologo /v:m /m:4 %* || goto err

embedded/sha1

goto exit
exit /B 0

:err

echo. Build failed. 1>&2

:exit
exit /B 1

0 comments on commit 8fd631d

Please sign in to comment.