Skip to content

Commit

Permalink
Fixes path to MetaLib & -action Update command - #38
Browse files Browse the repository at this point in the history
Also added release version via vssbe scripts
  • Loading branch information
3F committed Aug 6, 2017
1 parent bec432d commit 43f57f0
Show file tree
Hide file tree
Showing 20 changed files with 617 additions and 74 deletions.
1 change: 1 addition & 0 deletions .release.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

43 changes: 31 additions & 12 deletions .vssbe

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Configurator/ConfVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ internal struct ConfVersion

public const string S_NUM = "1.5.2";
public const string S_REV = "9361";
public const string S_REL = "";

public const string S_NUM_REV = S_NUM + "." + S_REV;

public const string BRANCH_SHA1 = "-";
public const string BRANCH_NAME = "-";
public const string BRANCH_REVC = "-";

internal const string S_INFO = S_NUM_REV + " [ " + BRANCH_SHA1 + " ]";
internal const string S_INFO = S_NUM_REV + " " + S_REL + " [ " + BRANCH_SHA1 + " ]";
internal const string S_INFO_FULL = S_INFO + " /'" + BRANCH_NAME + "':" + BRANCH_REVC;
}
}
5 changes: 3 additions & 2 deletions DllExport.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{E623294B-0FEA-4FA2-BA15-2750FE503F50}"
ProjectSection(SolutionItems) = preProject
.gitmodules = .gitmodules
.release.version = .release.version
.version = .version
3rd-party.txt = 3rd-party.txt
changelog.txt = changelog.txt
Expand Down Expand Up @@ -95,8 +96,8 @@ Global
{3CFD9EB8-69BC-4B41-9ABA-9C1850BE324A}.Release|Any CPU.Build.0 = Release|Any CPU
{D10CF407-4483-4657-9FEA-BDB467391F3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D10CF407-4483-4657-9FEA-BDB467391F3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D10CF407-4483-4657-9FEA-BDB467391F3A}.PublicRelease|Any CPU.ActiveCfg = Release|Any CPU
{D10CF407-4483-4657-9FEA-BDB467391F3A}.PublicRelease|Any CPU.Build.0 = Release|Any CPU
{D10CF407-4483-4657-9FEA-BDB467391F3A}.PublicRelease|Any CPU.ActiveCfg = PublicRelease|Any CPU
{D10CF407-4483-4657-9FEA-BDB467391F3A}.PublicRelease|Any CPU.Build.0 = PublicRelease|Any CPU
{D10CF407-4483-4657-9FEA-BDB467391F3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D10CF407-4483-4657-9FEA-BDB467391F3A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
Expand Down
2 changes: 1 addition & 1 deletion GetNuTool
Submodule GetNuTool updated 1 files
+1 −1 logic.targets
58 changes: 47 additions & 11 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ Where to look ? v1.2+ provides dynamic definitions of namespaces (ddNS feature),
[![](https://raw.githubusercontent.com/3F/DllExport/master/Resources/img/DllExport.png)](#)
[![](https://raw.githubusercontent.com/3F/DllExport/master/Resources/img/DllExport_ordinals.png)](https://github.com/3F/DllExport/issues/11#issuecomment-250907940)
New Wizard and our lightweight manager [[?](https://github.com/3F/DllExport/issues/38)]:
[![youtube.com/watch?v=okPThdWDZMM](https://raw.githubusercontent.com/3F/DllExport/master/Resources/img/DllExport_Wizard_overview_youtube.jpg)](https://www.youtube.com/watch?v=okPThdWDZMM)
----
Expand All @@ -73,7 +77,7 @@ It still under the [MIT License (MIT)](https://github.com/3F/DllExport/blob/mast
### How it works
Current features has been implemented through [ILDasm](https://github.com/3F/coreclr/tree/master/src/ildasm) & [ILAsm](https://github.com/3F/coreclr/tree/master/src/ilasm) that does the all required steps via `.export` directive.
Current features has been implemented through [ILDasm](https://github.com/3F/coreclr/tree/master/src/ildasm) & [ILAsm](https://github.com/3F/coreclr/tree/master/src/ilasm) that does the all required steps via `.export` directive ([it's specific directive for ILAsm compiler only](https://github.com/3F/DllExport/issues/45#issuecomment-317802099)).
**What inside ? or how works the .export directive ?**
Expand Down Expand Up @@ -108,16 +112,44 @@ HRESULT Assembler::CreateExportDirectory()
~ now we're ready to miracles ~
```

or read my short explanations from here: [DllMain & the export-table](https://github.com/3F/DllExport/issues/5#issuecomment-240697109); [DllExport.dll](https://github.com/3F/DllExport/issues/28#issuecomment-281957212); [.exp & .lib](https://github.com/3F/DllExport/issues/9#issuecomment-246189220); [ordinals](https://github.com/3F/DllExport/issues/8#issuecomment-245228065) ...
Read also my explanations from here: [about mscoree](https://github.com/3F/DllExport/issues/45#issuecomment-317802099); [DllMain & the export-table](https://github.com/3F/DllExport/issues/5#issuecomment-240697109); [DllExport.dll](https://github.com/3F/DllExport/issues/28#issuecomment-281957212); [.exp & .lib](https://github.com/3F/DllExport/issues/9#issuecomment-246189220); [ordinals](https://github.com/3F/DllExport/issues/8#issuecomment-245228065) ...

### How to get DllExport

Available variants:
Attention please: **v1.6+** does not support standard NuGet clients anymore [[?](https://github.com/3F/DllExport/issues/38)] But you can still easily get our package and flexibly configure what you need ([Sample](https://www.youtube.com/watch?v=okPThdWDZMM)):

Firstly, get our [DllExport.bat](#) (~18 Kb) from any place (for example, you can still get it from package via NuGet server - [how to](https://www.youtube.com/watch?v=okPThdWDZMM)) or it also can be embedded inside any other your scripts because it's simple batch script (without powershell scripts and dotnet-cli).

* To install/uninstall or to reconfigure your project:

```
DllExport -action Configure
```

* To upgrade already used version:

```
DllExport -action Update
```

* NuGet PM: `Install-Package DllExport`
* [GetNuTool](https://github.com/3F/GetNuTool): `msbuild gnt.core /p:ngpackages="DllExport"` or [gnt](https://github.com/3F/GetNuTool/releases/download/v1.6/gnt.bat) /p:ngpackages="DllExport"
* NuGet Commandline: `nuget install DllExport`
* [/releases](https://github.com/3F/DllExport/releases) ( [latest](https://github.com/3F/DllExport/releases/latest) )
* To manually restore package (It should be automatically restored by any Build operation of your configured projects or when you open Visual Studio. But if you need, use this):
```
DllExport -action Restore
```

* All available features:

```
DllExport -h
```

Other variants:

* `gnt /p:ngpackages="DllExport"` [[?](https://github.com/3F/GetNuTool)]
* [GetNuTool](https://github.com/3F/GetNuTool): `msbuild gnt.core /p:ngpackages="DllExport"` or [gnt](https://github.com/3F/GetNuTool/releases/download/v1.6/gnt.bat) /p:ngpackages="DllExport"
* (deprecated) NuGet PM: `Install-Package DllExport`
* (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.

### How to Build
Expand Down Expand Up @@ -184,9 +216,13 @@ build_coreclr_x86_x64.cmd
* [![NuGet package](https://img.shields.io/nuget/v/ILAsm.svg)](https://www.nuget.org/packages/ILAsm/)
* Look also [here](https://github.com/3F/coreclr/issues/1)

-------------

**Support ?**
### Donation

Please note again, the initial [UnmanagedExports](https://www.nuget.org/packages/UnmanagedExports) was created by Robert Giesecke. You should [visit its page](https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports) if you need.

But this repository does not related with Robert and generally maintained by [github.com/3F](https://github.com/3F) developer (Follow: [[G+](https://plus.google.com/+DenisKuzmin3F)]; [[GitHub](https://github.com/3F)]). **So** if you think that our improvements, fixes, other changes, support, information, I don't know... if something are helpful for you from this, donations are welcome, and thanks !


[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=entry%2ereg%40gmail%2ecom&lc=US&item_name=3F%2dOpenSource%20%5b%20github%2ecom%2f3F&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) ( github.com/3F )

[just a note again...](https://plus.google.com/101239554716569212042/posts/6yP64gDyum1)
*I mentioned earlier that DllExport is not priority for me (current impl.) "- I will do something from current tasks, but guys, please support it with me" and... why so many support from me o_o*
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Wizard/CfgBatWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private string CopyFromPkg(string fname)
{
File.WriteAllText(
dest.AddFileNamePostfix("_Configure"),
"DllExport -action Configure"
"DllExport -action Configure %*"
);
}
}
Expand Down
89 changes: 60 additions & 29 deletions Wizard/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,36 +139,22 @@ protected ISender Log
/// <returns></returns>
public bool Configure(ActionType type)
{
if(type == ActionType.Restore)
{
if(Installed) {
CfgDDNS();
switch(type) {
case ActionType.Restore: {
ActionRestore();
break;
}
return true;
}

if(type == ActionType.Configure || type == ActionType.Update)
{
Reset();
XProject.Reevaluate();

if(Config.Install)
{
CfgNamespace();
CfgPlatform();
CfgCompiler();

AddDllExportLib();

XProject.SetProperties(ConfigProperties);
XProject.Reevaluate();
case ActionType.Update: {
ActionUpdate();
break;
}
case ActionType.Configure: {
ActionConfigure();
break;
}

Save();
return true;
}

return false;
return true;
}

/// <param name="xproject"></param>
Expand All @@ -191,6 +177,49 @@ public Project(IXProject xproject, IConfigInitializer init)
);
}

protected void ActionRestore()
{
if(Installed) {
CfgDDNS();
}
}

protected void ActionUpdate()
{
Reset(false);
XProject.Reevaluate();

if(Installed)
{
CfgDDNS();

AddDllExportLib();
XProject.Reevaluate();
}

Save();
}

protected void ActionConfigure()
{
Reset(true);
XProject.Reevaluate();

if(Config.Install)
{
CfgNamespace();
CfgPlatform();
CfgCompiler();

AddDllExportLib();

XProject.SetProperties(ConfigProperties);
XProject.Reevaluate();
}

Save();
}

protected IUserConfig GetUserConfig(IXProject project, IConfigInitializer cfg)
{
if(Installed) {
Expand Down Expand Up @@ -282,10 +311,12 @@ protected void CfgCompiler()
Log.send(this, $"Use our IL Assembler: {Config.Compiler.ourILAsm}");
}

protected void Reset()
protected void Reset(bool properties)
{
RemoveProperties(ConfigProperties.Keys.ToArray());
ConfigProperties.Clear();
if(properties) {
RemoveProperties(ConfigProperties.Keys.ToArray());
ConfigProperties.Clear();
}

RemoveDllExportLib();
}
Expand Down
63 changes: 63 additions & 0 deletions Wizard/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 43f57f0

Please sign in to comment.