Skip to content

Commit

Permalink
MvsSln project has been added as an git submodule for more convenient…
Browse files Browse the repository at this point in the history
… support.
  • Loading branch information
3F committed Jul 14, 2018
1 parent edddda6 commit 6226e80
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "GetNuTool"]
path = GetNuTool
url = https://github.com/3F/GetNuTool.git
[submodule "MvsSln"]
path = MvsSln
url = https://github.com/3F/MvsSln.git
27 changes: 14 additions & 13 deletions .vssbe
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command": "#[($(Configuration) == \"PublicRelease\") {\n #[$(cfgname = 'Release')]\n}\nelse{\n #[$(cfgname = $(Configuration))]\n}]\n\n#[$(dbin = \"bin/$(cfgname)/\")]\n\n$(revDeltaBase = \"2016/10/12\")\n$(revDeltaMin = $([System.Math]::Pow(10, 3)))\n$$(revDeltaMax = $([System.Math]::Pow(10, 5)))\n$(revDeltaMax = 65534) #[\" limit of AssemblyVersion (2^16 - 2) - i.e. 65534 max allowed \"]\n\n$(pDllExport = \"RGiesecke.DllExport\")\n$(pMeta = \"Metadata\")\n$(pNSBin = \"NSBin\")\n$(pConf = \"Configurator\")\n$(pWizard = \"Wizard\")\n$(pPeViewer = \"PeViewer\")\n$(pGetNuTool = \"GetNuTool\")\n$(pMSBuild = \"RGiesecke.DllExport.MSBuild\")\n$(odir = \"$(dbin)raw/\")\n\n#[IO delete.directory(\"$(dbin)\", true)]\n#[IO copy.directory(\"\", \"$(dbin)\", true)]",
"Command": "#[($(Configuration) == \"PublicRelease\") {\n #[$(cfgname = 'Release')]\n}\nelse{\n #[$(cfgname = $(Configuration))]\n}]\n\n#[$(dbin = \"bin/$(cfgname)/\")]\n\n$(revDeltaBase = \"2016/10/12\")\n$(revDeltaMin = $([System.Math]::Pow(10, 3)))\n$$(revDeltaMax = $([System.Math]::Pow(10, 5)))\n$(revDeltaMax = 65534) #[\" limit of AssemblyVersion (2^16 - 2) - i.e. 65534 max allowed \"]\n\n$(pDllExport = \"RGiesecke.DllExport\")\n$(pMeta = \"Metadata\")\n$(pNSBin = \"NSBin\")\n$(pMvsSln = \"MvsSln\")\n$(pConf = \"Configurator\")\n$(pWizard = \"Wizard\")\n$(pPeViewer = \"PeViewer\")\n$(pGetNuTool = \"GetNuTool\")\n$(pMSBuild = \"RGiesecke.DllExport.MSBuild\")\n$(odir = \"$(dbin)raw/\")\n\n#[IO delete.directory(\"$(dbin)\", true)]\n#[IO copy.directory(\"\", \"$(dbin)\", true)]",
"Command__": [
"#[($(Configuration) == \"PublicRelease\") {",
" #[$(cfgname = 'Release')]",
Expand All @@ -110,6 +110,7 @@
"$(pDllExport = \"RGiesecke.DllExport\")",
"$(pMeta = \"Metadata\")",
"$(pNSBin = \"NSBin\")",
"$(pMvsSln = \"MvsSln\")",
"$(pConf = \"Configurator\")",
"$(pWizard = \"Wizard\")",
"$(pPeViewer = \"PeViewer\")",
Expand All @@ -125,7 +126,7 @@
{
"Enabled": true,
"Name": "ActSubmodules",
"Caption": "git submodules",
"Caption": "submodules and packages",
"SupportMSBuild": true,
"SupportSBEScripts": true,
"IgnoreIfBuildFailed": false,
Expand All @@ -145,16 +146,24 @@
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command": "#[$(moduleGetNuTool = \"GetNuTool/gnt.sln\")]\n\n#[( #[IO exists.file(\"$(moduleGetNuTool)\")] )\n{ \n #[File scall(\"submodules.bat\", \"$(moduleGetNuTool)\", 400)]\n}\nelse{\n #[File call(\"submodules.bat\", \"$(moduleGetNuTool)\", 2000)]\n}]",
"Command": "#[$(moduleGetNuTool = \"GetNuTool/gnt.sln\")]\n\n#[( #[IO exists.file(\"$(moduleGetNuTool)\")] )\n{ \n ##[File scall(\"submodules.bat\", \"$(moduleGetNuTool)\", 400)]\n #[File call(\"submodules.bat\", \"$(moduleGetNuTool)\", 2000)]\n}\nelse{\n #[File call(\"submodules.bat\", \"$(moduleGetNuTool)\", 2000)]\n}]\n\n#[\" Packages \"]\n\n#[( !(#[IO exists.directory(\"packages\")]) || !(#[IO exists.directory(\"$(pMvsSln)/packages\")]) )\n{\n #[File call(\"packages_restore.cmd\", \"\", 2000)]\n}]",
"Command__": [
"#[$(moduleGetNuTool = \"GetNuTool/gnt.sln\")]",
"",
"#[( #[IO exists.file(\"$(moduleGetNuTool)\")] )",
"{ ",
" #[File scall(\"submodules.bat\", \"$(moduleGetNuTool)\", 400)]",
" ##[File scall(\"submodules.bat\", \"$(moduleGetNuTool)\", 400)]",
" #[File call(\"submodules.bat\", \"$(moduleGetNuTool)\", 2000)]",
"}",
"else{",
" #[File call(\"submodules.bat\", \"$(moduleGetNuTool)\", 2000)]",
"}]",
"",
"#[\" Packages \"]",
"",
"#[( !(#[IO exists.directory(\"packages\")]) || !(#[IO exists.directory(\"$(pMvsSln)/packages\")]) )",
"{",
" #[File call(\"packages_restore.cmd\", \"\", 2000)]",
"}]"
]
}
Expand Down Expand Up @@ -484,16 +493,8 @@
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command": "#[( #[IO exists.directory(\"packages/ILAsm/bin\")] )\n{ \n #[File scall(\"packages_restore.cmd\", \"\", 400)]\n}\nelse{\n #[File call(\"packages_restore.cmd\", \"\", 2000)]\n}]\n\n#[IO copy.file({\n \"packages/ILAsm/bin/Win.x86/*.dll\",\n \"packages/ILAsm/bin/Win.x86/*.exe\",\n \"packages/ILAsm/*.txt\",\n \"packages/ILAsm/*.md\"\n }, \n \"$(odir)/tools/coreclr/\", true)]",
"Command": "#[IO copy.file({\n \"packages/ILAsm/bin/Win.x86/*.dll\",\n \"packages/ILAsm/bin/Win.x86/*.exe\",\n \"packages/ILAsm/*.txt\",\n \"packages/ILAsm/*.md\"\n }, \n \"$(odir)/tools/coreclr/\", true)]",
"Command__": [
"#[( #[IO exists.directory(\"packages/ILAsm/bin\")] )",
"{ ",
" #[File scall(\"packages_restore.cmd\", \"\", 400)]",
"}",
"else{",
" #[File call(\"packages_restore.cmd\", \"\", 2000)]",
"}]",
"",
"#[IO copy.file({",
" \"packages/ILAsm/bin/Win.x86/*.dll\",",
" \"packages/ILAsm/bin/Win.x86/*.exe\",",
Expand Down
45 changes: 44 additions & 1 deletion DllExport.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2002
VisualStudioVersion = 15.0.26430.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGiesecke.DllExport", "RGiesecke.DllExport\RGiesecke.DllExport.csproj", "{AC6947C6-0637-429A-A5F1-54447A494E6D}"
EndProject
Expand Down Expand Up @@ -30,6 +30,29 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{44F550ED
tools\net.r_eg.DllExport.targets = tools\net.r_eg.DllExport.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MvsSln", "MvsSln", "{4862DD29-ED07-4342-9E4D-CDAE89433A88}"
ProjectSection(SolutionItems) = preProject
MvsSln\.gitignore = MvsSln\.gitignore
MvsSln\.version = MvsSln\.version
MvsSln\build.bat = MvsSln\build.bat
MvsSln\changelog.txt = MvsSln\changelog.txt
MvsSln\License.txt = MvsSln\License.txt
MvsSln\packages.config = MvsSln\packages.config
MvsSln\Readme.md = MvsSln\Readme.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".gnt", ".gnt", "{D221D332-2A57-44F9-B866-F7C00C29032D}"
ProjectSection(SolutionItems) = preProject
GetNuTool\.gitignore = GetNuTool\.gitignore
GetNuTool\.version = GetNuTool\.version
GetNuTool\build.bat = GetNuTool\build.bat
GetNuTool\changelog.txt = GetNuTool\changelog.txt
GetNuTool\LICENSE = GetNuTool\LICENSE
GetNuTool\logic.targets = GetNuTool\logic.targets
GetNuTool\packages.config = GetNuTool\packages.config
GetNuTool\Readme.md = GetNuTool\Readme.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{55898433-0EEF-4B38-B144-B2A40150E4F4}"
ProjectSection(SolutionItems) = preProject
.vssbe = .vssbe
Expand All @@ -52,6 +75,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wizard", "Wizard\Wizard.csp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PeViewer", "PeViewer\PeViewer.csproj", "{BE8C8005-A6C6-41D0-9DB0-6B4B7BD1077F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvsSln", "MvsSln\MvsSln\MvsSln.csproj", "{F905DFB2-2E67-4FF7-9001-924F6F2D645D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvsSlnTest", "MvsSln\MvsSlnTest\MvsSlnTest.csproj", "{EC0CA220-39EC-41E5-B9D6-88D8F860F979}"
ProjectSection(ProjectDependencies) = postProject
{F905DFB2-2E67-4FF7-9001-924F6F2D645D} = {F905DFB2-2E67-4FF7-9001-924F6F2D645D}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -107,12 +137,25 @@ Global
{BE8C8005-A6C6-41D0-9DB0-6B4B7BD1077F}.PublicRelease|Any CPU.Build.0 = Release|Any CPU
{BE8C8005-A6C6-41D0-9DB0-6B4B7BD1077F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE8C8005-A6C6-41D0-9DB0-6B4B7BD1077F}.Release|Any CPU.Build.0 = Release|Any CPU
{F905DFB2-2E67-4FF7-9001-924F6F2D645D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F905DFB2-2E67-4FF7-9001-924F6F2D645D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F905DFB2-2E67-4FF7-9001-924F6F2D645D}.PublicRelease|Any CPU.ActiveCfg = Release|Any CPU
{F905DFB2-2E67-4FF7-9001-924F6F2D645D}.PublicRelease|Any CPU.Build.0 = Release|Any CPU
{F905DFB2-2E67-4FF7-9001-924F6F2D645D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F905DFB2-2E67-4FF7-9001-924F6F2D645D}.Release|Any CPU.Build.0 = Release|Any CPU
{EC0CA220-39EC-41E5-B9D6-88D8F860F979}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC0CA220-39EC-41E5-B9D6-88D8F860F979}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC0CA220-39EC-41E5-B9D6-88D8F860F979}.PublicRelease|Any CPU.ActiveCfg = Release|Any CPU
{EC0CA220-39EC-41E5-B9D6-88D8F860F979}.PublicRelease|Any CPU.Build.0 = Release|Any CPU
{EC0CA220-39EC-41E5-B9D6-88D8F860F979}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC0CA220-39EC-41E5-B9D6-88D8F860F979}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{44F550ED-6D5E-45CB-8FD0-CBB35051B8E1} = {E623294B-0FEA-4FA2-BA15-2750FE503F50}
{4862DD29-ED07-4342-9E4D-CDAE89433A88} = {E623294B-0FEA-4FA2-BA15-2750FE503F50}
{55898433-0EEF-4B38-B144-B2A40150E4F4} = {E623294B-0FEA-4FA2-BA15-2750FE503F50}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
1 change: 1 addition & 0 deletions MvsSln
Submodule MvsSln added at 3a97c3
28 changes: 14 additions & 14 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,22 @@ Copyright (c) 2016-2018 Denis Kuzmin <[email protected]> :: github.com/3F
[![MvsSln](https://img.shields.io/badge/MvsSln-v2.0.0-865FC5.svg)](https://github.com/3F/MvsSln)
[![Conari](https://img.shields.io/badge/Conari-v1.3.0-8AA875.svg)](https://github.com/3F/Conari)


**[Quick start:](https://github.com/3F/DllExport/wiki/Quick-start)**

[`DllExport`](https://3f.github.io/DllExport/releases/latest/manager/)` -action Configure` [[?](#how-to-get-dllexport)]

> *[How to (Screencast)](https://www.youtube.com/watch?v=sBWt-KdQtoc)*
> 1:[ ***[Quick start](https://www.youtube.com/watch?v=sBWt-KdQtoc)*** ] 2:[ [C++ ❤ C# 💕C++](https://www.youtube.com/watch?v=9Hyg3_WE9Ks) ] 3:[ [Complex types and Strings](https://www.youtube.com/watch?v=QXMj9-8XJnY) ]
> -> { **[Wiki](https://github.com/3F/DllExport/wiki)** }

~~~---~~~
`~~~---~~~`

```csharp
[DllExport("Init", CallingConvention.Cdecl)]
public static int entrypoint(IntPtr L)
public static int entrypoint(IntPtr l)
{
// ... it will be called from Lua script
lua_pushcclosure(L, onProc, 0);
lua_setglobal(L, "onKeyDown");
lua_pushcclosure(l, onProc, 0);
lua_setglobal(l, "onKeyDown");

return 0;
}
Expand All @@ -57,7 +56,7 @@ Where to look ? v1.2+ provides dynamic definitions of namespaces (ddNS feature),
```cpp
Via Cecil or direct modification:

000005B0 00 C4 7B 01 00 00 00 2F 00 12 05 .Ä{..../...
000005B0 00 C4 7B 01 00 00 00 2F 00 12 05 .Д{..../...
000005C0 00 00 02 00 00 00 00 00 00 00 00 00 00 00 26 00 ..............&.
000005D0 20 02 00 00 00 00 00 00 00 49 2E 77 61 6E 74 2E ........I.want. <<<-
000005E0 74 6F 2E 66 6C 79 00 00 00 00 00 00 00 00 00 00 to.fly.......... <<<-
Expand All @@ -79,7 +78,7 @@ Our Wizard and embeddable manager:
[Initially](https://github.com/3F/DllExport/issues/3) the original tool `UnmanagedExports` was distributed by Robert Giesecke as an closed-source tool **under the [MIT License](https://opensource.org/licenses/mit-license.php)**:
* [Official page](https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports) - *posted Jul 9, 2009 [ updated Dec 19, 2012 ]*
* [Official NuGet Packages](https://www.nuget.org/packages/UnmanagedExports)
* [Official NuGet Packages](https://www.nuget.org/packages/UnmanagedExports)
Now, we will be more open ! all details [here](https://github.com/3F/DllExport/issues/3)
Expand Down Expand Up @@ -131,14 +130,14 @@ Read also my explanations from here: [about mscoree](https://github.com/3F/DllEx

### How to get DllExport

**v1.6+** have no official support of any standard NuGet clients. [[?](https://github.com/3F/DllExport/issues/38)]
**v1.6+** have no official support of any standard NuGet clients. [[?](https://github.com/3F/DllExport/wiki/DllExport-Manager-Q-A)]

* [New Wizard and embeddable manager](https://www.youtube.com/watch?v=sBWt-KdQtoc)
* [Quick start](https://github.com/3F/DllExport/wiki/Quick-start)
* Wiki. [Quick start](https://github.com/3F/DllExport/wiki/Quick-start)

Get [DllExport.bat](https://3F.github.io/DllExport/releases/latest/manager/) (text-based script ~18 Kb without powershell and dotnet-cli) from any place. For example, you can still get it from packages via NuGet server ([how to](https://youtu.be/okPThdWDZMM?t=1m1s)) or it also can be embedded inside any other your scripts/project files/etc.
Get [DllExport.bat](https://3F.github.io/DllExport/releases/latest/manager/) from any place. For example, you can still get it from packages via NuGet server ([how to](https://youtu.be/okPThdWDZMM?t=1m1s)) or it also can be embedded inside any other your scripts/project files/etc.

DllExport.**bat** mainly is a wrapper that's based on [GetNuTool core](https://github.com/3F/GetNuTool). Finally it just aggregates calling to Wizard that's based on [MvsSln](https://github.com/3F/MvsSln). [[?](https://github.com/3F/DllExport/issues/63#issuecomment-354633464)]
*DllExport.bat was based on [GetNuTool core](https://github.com/3F/GetNuTool) that's Cross-Platform Embeddable Package Manager that requires only MSBuild. Finally it just aggregates calling to Wizard that was based on [MvsSln](https://github.com/3F/MvsSln). [[?](https://github.com/3F/DllExport/wiki/DllExport-Manager-Q-A#is-this-cross-platform-solution-)]*

**Please note**: You do not need to call manually DllExport.bat after initial configuration. It still will be **automatically** for `-action Restore` command etc.

Expand Down Expand Up @@ -174,6 +173,7 @@ Other variants:
* (deprecated) NuGet Commandline: `nuget install DllExport`
* [/releases](https://github.com/3F/DllExport/releases) [ [latest](https://github.com/3F/DllExport/releases/latest) ]
* [Nightly builds](https://ci.appveyor.com/project/3Fs/dllexport/history) (`/artifacts` page). But remember: It can be unstable or not work at all. Use this for tests of latest changes.
* Artifacts [older than 6 months](https://www.appveyor.com/docs/packaging-artifacts/#artifacts-retention-policy) you can also find as `Pre-release` with mark `🎲 Nightly build` on [GitHub Releases](https://github.com/3F/DllExport/releases) page.

### How to Build

Expand Down
8 changes: 4 additions & 4 deletions Wizard/Wizard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
<Reference Include="Microsoft.Build.Utilities.v4.0">
<Private>True</Private>
</Reference>
<Reference Include="MvsSln, Version=2.0.0.24315, Culture=neutral, PublicKeyToken=87f0bd8fb7f0a2c4, processorArchitecture=MSIL">
<HintPath>..\packages\MvsSln.2.0.0\lib\net40\MvsSln.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
Expand Down Expand Up @@ -125,9 +122,12 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MvsSln\MvsSln\MvsSln.csproj">
<Project>{f905dfb2-2e67-4ff7-9001-924f6f2d645d}</Project>
<Name>MvsSln</Name>
</ProjectReference>
<ProjectReference Include="..\NSBin\NSBin.csproj">
<Project>{311706a5-5ed2-4006-b794-055009d8a256}</Project>
<Name>NSBin</Name>
Expand Down
4 changes: 0 additions & 4 deletions Wizard/packages.config

This file was deleted.

10 changes: 9 additions & 1 deletion packages_restore.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ set _gntArgs=%*
:found

echo.
echo. [ Restoring of packages. Please wait ... ]
echo. [ Restoring packages. Please wait ... ]
echo.


:: -
echo.
echo MvsSln ...
call %_gnt% %_gntArgs% /p:wpath="%cd%/MvsSln" /p:ngconfig="packages.config;MvsSlnTest/packages.config" /nologo /v:m /m:4 || goto err

:: -
echo.
echo General ...
call %_gnt% %_gntArgs% /p:wpath="%cd%" /p:ngconfig="packages.config;Wizard/packages.config;PeViewer/packages.config;NSBin/packages.config;RGiesecke.DllExport/packages.config;RGiesecke.DllExport.MSBuild/packages.config" /nologo /v:m /m:4 || goto err

goto exit
Expand Down
3 changes: 3 additions & 0 deletions submodules.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ echo.
:: GetNuTool
git submodule update --init --recursive GetNuTool || goto gitNotFound

:: MvsSln
git submodule update --init --recursive MvsSln || goto gitNotFound

:: TODO option for expensive coreclr

exit /B 0
Expand Down

0 comments on commit 6226e80

Please sign in to comment.