diff --git a/README.md b/README.md index 65aa75c..dbe078f 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,17 @@ # GetNuTool -The lightweight non-binary tool for work with NuGet packages via basic MSBuild Tool (msbuild.exe without additional extensions etc.) +The lightweight non-binary tool for work with NuGet packages via basic MSBuild Tools (without additional extensions etc.) ```bash +> gnt > msbuild.exe gnt.core ``` **Download:** [/releases](https://github.com/3F/GetNuTool/releases) ( [latest](https://github.com/3F/GetNuTool/releases/latest) ) -Demo projects: +* Available: *Full version, Compact version, Compiled variant, Executable version* -* [![](https://img.shields.io/badge/build143-passing-brightgreen.svg?style=flat-square)](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-143) [GetNuTool v1.3 `get` & `pack` commands in use](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-143) +Demo project: [![](https://img.shields.io/badge/build143-passing-brightgreen.svg?style=flat)](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-143) [GetNuTool v1.3 `get` & `pack` commands in use](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-143) ## License @@ -28,15 +29,15 @@ The [MIT License (MIT)](https://github.com/3F/GetNuTool/blob/master/LICENSE) ### For what -Firstly, **it's not for** adding libraries for your projects (use standard nuget clients). This to providing tools for additional maintenance of your projects and libraries, building processes, debugging, and similar. For all that should be used as a tool for all projects (solution-level) or for each. +Mainly, it's not for adding libraries for your projects (see standard nuget clients). This to providing tools for additional maintenance of your projects and libraries, building processes, debugging, and similar. For all that should be used as a tool for all projects (solution-level) or for each. #### Restoring packages inside Visual Studio IDE -The GetNuTool can't use events from Visual Studio by default. However, it can be combined with other our tool for complex work with **a lot of events** of VS IDE & MSBuild: +The GetNuTool can't use events from Visual Studio **by default**. However, it can be combined with other our tool for complex work with **a lot of events** of VS IDE & MSBuild: * [vsSolutionBuildEvent](http://vssbe.r-eg.net) - [0d1dbfd7-ed8a-40af-ae39-281bfeca2334](https://visualstudiogallery.msdn.microsoft.com/0d1dbfd7-ed8a-40af-ae39-281bfeca2334/) -So you can use this as you want, for example, to automatically getting tool above for work with complex scripts with MSBuild Tool and Visual Studio as unified engine., etc. +So you can use this as you want, for example, automatically getting tool above for work with complex scripts with MSBuild Tool and Visual Studio as unified engine., etc. ## Commands @@ -46,20 +47,21 @@ The `get` command is used by default. For getting & extracting packages. You can Settings: -Property | Description ----------|------------ -ngconfig | Where to look the packages.config files. -ngserver | NuGet server. +Property | Description +-----------|------------ +ngconfig | Where to look the packages.config files. +ngserver | NuGet server. ngpackages | List of packages. Uses first if defined, otherwise find packages.config -ngpath | Common path for all packages. +ngpath | Common path for all packages. +wpath |`v1.4+` To define working directory. Samples: ```bash -> msbuild.exe gnt.core /p:ngpath="special-packages/new" +> msbuild gnt.core /p:ngpath="special-packages/new" ``` ```bash -> msbuild.exe gnt.core /p:ngconfig=".nuget/packages.config" /p:ngpath="../packages" +> msbuild gnt.core /p:ngconfig=".nuget/packages.config" /p:ngpath="../packages" ``` #### Format of packages list @@ -111,35 +113,47 @@ Property | Description ---------|------------ ngin | To select path to directory for packing with `.nuspec` file. ngout | Optional path to output the final `.nupkg` package. +wpath |`v1.4+` To define working directory. ```bash -> msbuild.exe gnt.core /t:pack /p:ngin="path to .nuspec" -> msbuild.exe gnt.core /t:pack /p:ngin="path to .nuspec" /p:ngout="path for .nupkg" +> msbuild gnt.core /t:pack /p:ngin="path to .nuspec" +> msbuild gnt.core /t:pack /p:ngin="path to .nuspec" /p:ngout="path for .nupkg" ``` ## Properties Property | Values | Description ---------|--------------------------|------------ -debug | false (by default), true | v1.3+ To display additional information from selected command. +debug | false (by default), true | `v1.3+` To display additional information from selected command. ## Examples +*note: `v1.4+` also provides executable variant of GetNuTool.* + ```bash +> gnt /p:ngpackages="DllExport" +> msbuild gnt.core /p:ngpackages="DllExport" +``` -> msbuild.exe gnt.core -> msbuild.exe gnt.core /p:ngpackages="7z.Libs/15.12.0;vsSBE.CI.MSBuild/1.5.1:../packages/CI.MSBuild" +```bash +> msbuild gnt.core +> msbuild gnt.core /p:ngpackages="7z.Libs/15.12.0;vsSBE.CI.MSBuild/1.5.1:../packages/CI.MSBuild" ``` ```bash -> msbuild.exe gnt.core /t:pack /p:ngin="D:\tmp\7z.Libs" -> msbuild.exe gnt.core /t:pack /p:ngin="D:\tmp\7z.Libs" /p:ngout="newdir/" +> msbuild gnt.core /t:pack /p:ngin="D:\tmp\7z.Libs" +> msbuild gnt.core /t:pack /p:ngin="D:\tmp\7z.Libs" /p:ngout="newdir/" ``` -#### Paths to msbuild.exe +#### Paths to MSBuild Tools -*just a note where to find the msbuild tool by default:* +Use our MSBuild searcher - [msbuild](https://github.com/3F/GetNuTool/blob/master/msbuild.bat) for more convenience. +*but, just a note where to find the msbuild tool by default:* + +* All available versions on your machine: `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions` + +for example: ```bash "C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" @@ -152,13 +166,17 @@ C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe ## Compact version -Use our compressor from [here](https://github.com/3F/GetNuTool/tree/master/compact) if needed. +To build manually this version, you should use our compressor from [here](https://github.com/3F/GetNuTool/tree/master/compact) if needed. Currently compact version ~4 Kb for `get` command and ~4 Kb for `pack` command, i.e. ~8 Kb in total. ```bash -> msbuild.exe .compressor -> msbuild.exe .compressor /p:core="path to core" /p:output="output file" +> compress +``` + +```bash +> msbuild .compressor +> msbuild .compressor /p:core="path to core" /p:output="output file" ``` ## Compiled variant @@ -169,3 +187,24 @@ The GetNuTool now is part of [NuGetComponent](http://vssbe.r-eg.net/doc/Scripts/ #[NuGet gnt.raw("/t:pack /p:ngin=\"D:\7z.Libs\"")] ... ``` + +## Executable version + +The `gnt.bat` is already contains `gnt.core` logic. It stored **inside script**. + +To build manually this version, you should use our packer from [here](https://github.com/3F/GetNuTool/tree/master/wrapper) if needed. + +```bash +> packing +``` + +```bash +> msbuild wrapper/.packer /p:core="path to compact core" /p:output="output file" +``` + +Then you can use simply: + +```bash +> gnt /p:ngpackages="vsSBE.CI.MSBuild" +``` +**note:** you do not need the `gnt.core` or something else ! the final script provides all of what you need as non-binary tool ~10 Kb. diff --git a/changelog.txt b/changelog.txt index fafd2d3..956ea42 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,11 @@ GetNuTool ____________________ +[v1.4] + * NEW: Added `/p:wpath` key to define working directory. + * NEW: Support of executable package. + * NEW: MSBuild searcher. + [v1.3] * NEW: Added `/p:debug` to display additional information from selected command. * CHANGED: Compact output for processed files. diff --git a/gnt.core b/gnt.core index 8cebbb2..fbc2615 100644 --- a/gnt.core +++ b/gnt.core @@ -9,7 +9,7 @@ @@ -344,7 +344,7 @@ - 1.3 + 1.4