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

Commit 6268884

Browse files
committed
Update version
1 parent 3fb613d commit 6268884

File tree

14 files changed

+63
-221
lines changed

14 files changed

+63
-221
lines changed

Confuser.CLI/Confuser.CLI.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
<Reference Include="System.Xml" />
5555
</ItemGroup>
5656
<ItemGroup>
57+
<Compile Include="..\GlobalAssemblyInfo.cs">
58+
<Link>Properties\GlobalAssemblyInfo.cs</Link>
59+
</Compile>
5760
<Compile Include="Program.cs" />
5861
<Compile Include="Properties\AssemblyInfo.cs" />
5962
</ItemGroup>
+2-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
3-
using System.Runtime.InteropServices;
42

5-
// General Information about an assembly is controlled through the following
6-
// set of attributes. Change these attribute values to modify the information
7-
// associated with an assembly.
8-
[assembly: AssemblyTitle("Confuser.CLI")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("Ki")]
12-
[assembly: AssemblyProduct("Confuser.CLI")]
13-
[assembly: AssemblyCopyright("Copyright © Ki 2014")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
16-
17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
20-
[assembly: ComVisible(false)]
21-
22-
// The following GUID is for the ID of the typelib if this project is exposed to COM
23-
[assembly: Guid("9ded6040-ae5e-46a2-b80c-5c05686b725e")]
24-
25-
// Version information for an assembly consists of the following four values:
26-
//
27-
// Major Version
28-
// Minor Version
29-
// Build Number
30-
// Revision
31-
//
32-
// You can specify all the values or you can default the Build and Revision Numbers
33-
// by using the '*' as shown below:
34-
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
3+
[assembly: AssemblyTitle("ConfuserEx Command-line")]
4+
[assembly: AssemblyDescription("Command-line interface of ConfuserEx")]

Confuser.Core/Confuser.Core.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
<Reference Include="System.Xml" />
5151
</ItemGroup>
5252
<ItemGroup>
53+
<Compile Include="..\GlobalAssemblyInfo.cs">
54+
<Link>Properties\GlobalAssemblyInfo.cs</Link>
55+
</Compile>
5356
<Compile Include="Annotations.cs" />
5457
<Compile Include="LZMA\Common\CRC.cs" />
5558
<Compile Include="LZMA\Common\InBuffer.cs" />

Confuser.Core/ConfuserEngine.cs

+17-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,27 @@
1212
using MethodAttributes = dnlib.DotNet.MethodAttributes;
1313
using MethodImplAttributes = dnlib.DotNet.MethodImplAttributes;
1414
using TypeAttributes = dnlib.DotNet.TypeAttributes;
15+
using InformationalAttribute = System.Reflection.AssemblyInformationalVersionAttribute;
16+
using ProductAttribute = System.Reflection.AssemblyProductAttribute;
17+
using CopyrightAttribute = System.Reflection.AssemblyCopyrightAttribute;
1518

1619
namespace Confuser.Core {
1720
/// <summary>
1821
/// The processing engine of Confuser.
1922
/// </summary>
2023
public static class ConfuserEngine {
24+
public static readonly string Version;
25+
static readonly string Copyright;
26+
static ConfuserEngine()
27+
{
28+
var assembly = typeof(ConfuserEngine).Assembly;
29+
var nameAttr = (ProductAttribute)assembly.GetCustomAttributes(typeof(ProductAttribute), false)[0];
30+
var verAttr = (InformationalAttribute)assembly.GetCustomAttributes(typeof(InformationalAttribute), false)[0];
31+
var cpAttr = (CopyrightAttribute)assembly.GetCustomAttributes(typeof(CopyrightAttribute), false)[0];
32+
Version = string.Format("{0} {1}", nameAttr.Product, verAttr.InformationalVersion);
33+
Copyright = cpAttr.Copyright;
34+
}
35+
2136
/// <summary>
2237
/// Runs the engine with the specified parameters.
2338
/// </summary>
@@ -268,7 +283,7 @@ private static void Inspection(ConfuserContext context) {
268283
marker.Mark(ctor);
269284

270285
var attr = new CustomAttribute(ctor);
271-
attr.ConstructorArguments.Add(new CAArgument(module.CorLibTypes.String, "ConfuserEx 0.1"));
286+
attr.ConstructorArguments.Add(new CAArgument(module.CorLibTypes.String, Version));
272287

273288
module.CustomAttributes.Add(attr);
274289
}
@@ -348,7 +363,7 @@ private static void PrintInfo(ConfuserContext context) {
348363
context.Logger.Info("Protecting packer stub...");
349364
}
350365
else {
351-
context.Logger.Info("ConfuserEx v0.1 Copyright (C) Ki 2014");
366+
context.Logger.InfoFormat("{0} {1}", Version, Copyright);
352367

353368
Type mono = Type.GetType("Mono.Runtime");
354369
context.Logger.InfoFormat("Running on {0}, {1}, {2} bits",
+2-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.InteropServices;
32

4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
7-
8-
[assembly: AssemblyTitle("Confuser.Core")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("Ki")]
12-
[assembly: AssemblyProduct("Confuser.Core")]
13-
[assembly: AssemblyCopyright("Copyright © Ki 2014")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
16-
17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
20-
21-
[assembly: ComVisible(false)]
22-
23-
// The following GUID is for the ID of the typelib if this project is exposed to COM
24-
25-
[assembly: Guid("9568cea4-2f28-4cdf-941d-ebf324896e23")]
26-
27-
// Version information for an assembly consists of the following four values:
28-
//
29-
// Major Version
30-
// Minor Version
31-
// Build Number
32-
// Revision
33-
//
34-
// You can specify all the values or you can default the Build and Revision Numbers
35-
// by using the '*' as shown below:
36-
// [assembly: AssemblyVersion("1.0.*")]
37-
38-
[assembly: AssemblyVersion("1.0.0.0")]
39-
[assembly: AssemblyFileVersion("1.0.0.0")]
3+
[assembly: AssemblyTitle("ConfuserEx Core")]
4+
[assembly: AssemblyDescription("Core framework of ConfuserEx")]

Confuser.DynCipher/Confuser.DynCipher.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
<Reference Include="System.Core" />
4242
</ItemGroup>
4343
<ItemGroup>
44+
<Compile Include="..\GlobalAssemblyInfo.cs">
45+
<Link>Properties\GlobalAssemblyInfo.cs</Link>
46+
</Compile>
4447
<Compile Include="AST\ArrayIndexExpression.cs" />
4548
<Compile Include="AST\AssignmentStatement.cs" />
4649
<Compile Include="AST\BinOpExpression.cs" />
+2-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.InteropServices;
32

4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
7-
8-
[assembly: AssemblyTitle("Confuser.DynCipher")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("Ki")]
12-
[assembly: AssemblyProduct("Confuser.DynCipher")]
13-
[assembly: AssemblyCopyright("Copyright © Ki 2014")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
16-
17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
20-
21-
[assembly: ComVisible(false)]
22-
23-
// The following GUID is for the ID of the typelib if this project is exposed to COM
24-
25-
[assembly: Guid("ea911147-8530-453e-95cd-76ff8b6b235f")]
26-
27-
// Version information for an assembly consists of the following four values:
28-
//
29-
// Major Version
30-
// Minor Version
31-
// Build Number
32-
// Revision
33-
//
34-
// You can specify all the values or you can default the Build and Revision Numbers
35-
// by using the '*' as shown below:
36-
// [assembly: AssemblyVersion("1.0.*")]
37-
38-
[assembly: AssemblyVersion("1.0.0.0")]
39-
[assembly: AssemblyFileVersion("1.0.0.0")]
3+
[assembly: AssemblyTitle("ConfuserEx Dynamic Cipher Library")]
4+
[assembly: AssemblyDescription("Cipher generator of ConfuserEx")]

Confuser.Protections/Confuser.Protections.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
<Reference Include="System.Xml" />
4949
</ItemGroup>
5050
<ItemGroup>
51+
<Compile Include="..\GlobalAssemblyInfo.cs">
52+
<Link>Properties\GlobalAssemblyInfo.cs</Link>
53+
</Compile>
5154
<Compile Include="AntiILDasmProtection.cs" />
5255
<Compile Include="AntiTamper\AntiTamperProtection.cs" />
5356
<Compile Include="AntiTamper\DynamicDeriver.cs" />
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.InteropServices;
32

4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
7-
8-
[assembly: AssemblyTitle("Confuser.Protections")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("Ki")]
12-
[assembly: AssemblyProduct("Confuser.Protections")]
13-
[assembly: AssemblyCopyright("Copyright © Ki 2014")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
16-
17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
20-
21-
[assembly: ComVisible(false)]
22-
23-
// The following GUID is for the ID of the typelib if this project is exposed to COM
24-
25-
[assembly: Guid("455dc122-c4ca-45fa-bbb9-267811b2a30c")]
26-
27-
// Version information for an assembly consists of the following four values:
28-
//
29-
// Major Version
30-
// Minor Version
31-
// Build Number
32-
// Revision
33-
//
34-
// You can specify all the values or you can default the Build and Revision Numbers
35-
// by using the '*' as shown below:
36-
// [assembly: AssemblyVersion("1.0.*")]
37-
38-
[assembly: AssemblyVersion("1.0.0.0")]
39-
[assembly: AssemblyFileVersion("1.0.0.0")]
3+
[assembly: AssemblyTitle("ConfuserEx Protections")]
4+
[assembly: AssemblyDescription("Protections and packers of ConfuserEx")]

Confuser.Renamer/Confuser.Renamer.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
<Reference Include="System.Xml" />
4343
</ItemGroup>
4444
<ItemGroup>
45+
<Compile Include="..\GlobalAssemblyInfo.cs">
46+
<Link>Properties\GlobalAssemblyInfo.cs</Link>
47+
</Compile>
4548
<Compile Include="AnalyzePhase.cs" />
4649
<Compile Include="Analyzers\InterReferenceAnalyzer.cs" />
4750
<Compile Include="Analyzers\LdtokenEnumAnalyzer.cs" />
+2-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.InteropServices;
32

4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
7-
8-
[assembly: AssemblyTitle("Confuser.Renamer")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("Ki")]
12-
[assembly: AssemblyProduct("Confuser.Renamer")]
13-
[assembly: AssemblyCopyright("Copyright © Ki 2014")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
16-
17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
20-
21-
[assembly: ComVisible(false)]
22-
23-
// The following GUID is for the ID of the typelib if this project is exposed to COM
24-
25-
[assembly: Guid("57f34c9c-99bd-48eb-a521-7ded19ec7ab4")]
26-
27-
// Version information for an assembly consists of the following four values:
28-
//
29-
// Major Version
30-
// Minor Version
31-
// Build Number
32-
// Revision
33-
//
34-
// You can specify all the values or you can default the Build and Revision Numbers
35-
// by using the '*' as shown below:
36-
// [assembly: AssemblyVersion("1.0.*")]
37-
38-
[assembly: AssemblyVersion("1.0.0.0")]
39-
[assembly: AssemblyFileVersion("1.0.0.0")]
3+
[assembly: AssemblyTitle("ConfuserEx Renamer")]
4+
[assembly: AssemblyDescription("Renaming analysis of ConfuserEx")]

Confuser.Runtime/Confuser.Runtime.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
<AssemblyOriginatorKeyFile>..\ConfuserEx.snk</AssemblyOriginatorKeyFile>
4141
</PropertyGroup>
4242
<ItemGroup>
43+
<Compile Include="..\GlobalAssemblyInfo.cs">
44+
<Link>Properties\GlobalAssemblyInfo.cs</Link>
45+
</Compile>
4346
<Compile Include="AntiDump.cs" />
4447
<Compile Include="AntiDebug.Win32.cs" />
4548
<Compile Include="AntiDebug.Antinet.cs" />
+2-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.InteropServices;
32

4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
7-
8-
[assembly: AssemblyTitle("Confuser.Runtime")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("Ki")]
12-
[assembly: AssemblyProduct("Confuser.Runtime")]
13-
[assembly: AssemblyCopyright("Copyright © Ki 2014")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
16-
17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
20-
21-
[assembly: ComVisible(false)]
22-
23-
// The following GUID is for the ID of the typelib if this project is exposed to COM
24-
25-
[assembly: Guid("960e5417-056a-4466-8b83-ac881038cf69")]
26-
27-
// Version information for an assembly consists of the following four values:
28-
//
29-
// Major Version
30-
// Minor Version
31-
// Build Number
32-
// Revision
33-
//
34-
// You can specify all the values or you can default the Build and Revision Numbers
35-
// by using the '*' as shown below:
36-
// [assembly: AssemblyVersion("1.0.*")]
37-
38-
[assembly: AssemblyVersion("1.0.0.0")]
39-
[assembly: AssemblyFileVersion("1.0.0.0")]
3+
[assembly: AssemblyTitle("ConfuserEx Runtime")]
4+
[assembly: AssemblyDescription("Runtime library of ConfuserEx")]

GlobalAssemblyInfo.cs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Reflection;
2+
3+
[assembly: AssemblyProduct("ConfuserEx")]
4+
[assembly: AssemblyCompany("Ki")]
5+
[assembly: AssemblyCopyright("Copyright (C) Ki 2014")]
6+
7+
#if DEBUG
8+
9+
[assembly: AssemblyConfiguration("Debug")]
10+
#else
11+
[assembly: AssemblyConfiguration("Release")]
12+
#endif
13+
14+
[assembly: AssemblyVersion("0.1.0.0")]
15+
[assembly: AssemblyFileVersion("0.1.0.0")]
16+
[assembly: AssemblyInformationalVersion("v0.1.0")]

0 commit comments

Comments
 (0)