Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
ILMerge support
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.code.sf.net/p/reflexil/code@268 245f54d4-4a38-0410-b06a-b1304f9c06f5
  • Loading branch information
sailro authored and sailro committed Aug 9, 2013
1 parent cd3c61d commit 15e75c8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Build/Binary/generate.AIO.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

generate AIO
14 changes: 11 additions & 3 deletions Build/Binary/generate.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set PATH=.\tools;%WINDIR%\Microsoft.NET\Framework\v4.0.30319;%PATH%

msbuild ..\..\reflexil.sln /p:Configuration=Release;TargetFrameworkVersion=v3.5
msbuild ..\..\reflexil.sln /t:Clean,Build /p:Configuration=Release;TargetFrameworkVersion=v3.5

rm -fr output
mkdir output
Expand All @@ -21,11 +21,19 @@ cd ..\..\
cd .\Build\Binary\
mv ..\..\licenses.zip output

rem ILMerge /keyfile:..\..\Keys\reflexil.snk /out:.\output\Reflexil.AIO.dll .\output\Reflexil.dll .\output\Reflexil.Reflector.dll .\output\Be.Windows.Forms.HexBox.dll .\output\De4dot.dll .\output\ICSharpCode.NRefactory.dll .\output\ICSharpCode.SharpDevelop.Dom.dll .\output\ICSharpCode.TextEditor.dll .\output\Mono.Cecil.dll .\output\Mono.Cecil.Mdb.dll .\output\Mono.Cecil.Pdb.dll /lib:..\..\Plugins\Reflexil.Reflector\Libs\Binaries

grep "AssemblyVersion" ..\..\Properties\SolutionVersion.cs | sed "s/.*\"\(.\..\)\..\..\".*/\1/g" > version.txt
set /P REFLEXIL_VERSION=<version.txt

IF "%1"=="AIO" GOTO ILMERGE
GOTO CLEANUP

:ILMERGE
set ASSEMBLIES=.\output\Reflexil.dll .\output\Reflexil.Reflector.dll .\output\Be.Windows.Forms.HexBox.dll .\output\De4dot.dll .\output\ICSharpCode.NRefactory.dll .\output\ICSharpCode.SharpDevelop.Dom.dll .\output\ICSharpCode.TextEditor.dll .\output\Mono.Cecil.dll .\output\Mono.Cecil.Mdb.dll .\output\Mono.Cecil.Pdb.dll
ILMerge /ndebug /keyfile:..\..\Keys\reflexil.snk /out:.\output\Reflexil.Reflector.AIO.dll %ASSEMBLIES% /lib:..\..\Plugins\Reflexil.Reflector\Libs\Binaries
rm %ASSEMBLIES% .\output\Reflexil.CecilStudio.dll .\output\Reflexil.dll.config
set REFLEXIL_VERSION=%REFLEXIL_VERSION%.AIO

:CLEANUP
rm -fr reflexil.%REFLEXIL_VERSION%.bin
mv output reflexil.%REFLEXIL_VERSION%.bin

Expand Down
4 changes: 2 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
////////////////////////////////////////////////////////////////////////////////
// v1.6 - dd/mm/2012 ///////////////////////////////////////////////////////////
// v1.6 - 17/01/2013 ///////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

news:
-
- Optional ILMerged version to prevent unexpected Mono.Cecil assemblies.

upgrades:
- de4dot 1.9.0 update. New deobfuscation support for CodeFort, CodeWall,
Expand Down
7 changes: 5 additions & 2 deletions Plugins/BasePackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,11 @@ public void CheckPrerequisites()
if (!FrameworkVersionChecker.IsVersionInstalled(FrameworkVersions.v3_5) && !FrameworkVersionChecker.IsVersionInstalled(FrameworkVersions.Mono_2_4))
ShowMessage("Warning, Reflexil is unable to locate .NET Framework 3.5 or Mono 2.4! This is required!");

var marker = Type.GetType("Mono.Cecil.MonoCecilReflexilMarker, Mono.Cecil", false);
if (marker == null)
// Standalone or ILMerged
var marker = Type.GetType("Mono.Cecil.MonoCecilReflexilMarker, Mono.Cecil", false) ??
Type.GetType("Mono.Cecil.MonoCecilReflexilMarker", false);

if (marker == null)
ShowMessage("Warning, Reflexil is unable to locate customized Mono.Cecil assembly. Please use Mono.Cecil from Reflexil package! (optionally check your GAC).");

}
Expand Down

0 comments on commit 15e75c8

Please sign in to comment.