Skip to content

Commit

Permalink
Merge pull request #2 from mukaschultze/improved-cli
Browse files Browse the repository at this point in the history
Improved cli
  • Loading branch information
mukaschultze committed Aug 10, 2019
2 parents 9657d0c + 26bfe90 commit 7da5ef6
Show file tree
Hide file tree
Showing 10 changed files with 319 additions and 120 deletions.
20 changes: 16 additions & 4 deletions dark-skin.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2003
MinimumVisualStudioVersion = 10.0.40219.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.29201.188
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dark-skin", "dark-skin\dark-skin.csproj", "{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Debug|x64.ActiveCfg = Debug|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Debug|x64.Build.0 = Debug|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Debug|x86.ActiveCfg = Debug|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Debug|x86.Build.0 = Debug|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Release|Any CPU.Build.0 = Release|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Release|x64.ActiveCfg = Release|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Release|x64.Build.0 = Release|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Release|x86.ActiveCfg = Release|Any CPU
{7C0252E3-4D08-445B-9D3C-1DD49620BBF4}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A491635B-D3B4-4E23-890A-91DAFB42D199}
SolutionGuid = {EF525544-E552-4928-9F1B-9848C7A4DCE5}
EndGlobalSection
EndGlobal
12 changes: 6 additions & 6 deletions dark-skin/CVDump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public class CVDump : IDisposable {
public void Execute(string exePath, DataReceivedEventHandler outputCallback, DataReceivedEventHandler errorCallback, string arguments = "-headers -p") {

var startOptions = new ProcessStartInfo {
FileName = cvDumpExe,
Arguments = string.Format("{0} {1}", arguments, exePath),
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true
FileName = cvDumpExe,
Arguments = string.Format("{0} {1}", arguments, exePath),
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true
};

var process = Process.Start(startOptions);
Expand Down
4 changes: 4 additions & 0 deletions dark-skin/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd" >
<Costura IncludeDebugSymbols='false'/>
</Weavers>
111 changes: 111 additions & 0 deletions dark-skin/FodyWeavers.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
22 changes: 22 additions & 0 deletions dark-skin/Options.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using CommandLine;

namespace DarkSkin {

[Verb("enable", HelpText = "Unlock the dark skin.")]
class EnableOptions : BaseOption { }

[Verb("disable", HelpText = "Revert the skin to the original.")]
class DisableOptions : BaseOption { }

[Verb("findhex", HelpText = "Find and list the addresses and hexes of the GetSkinIdx methods")]
class FindHexOptions : BaseOption { }

class BaseOption {
[Value(0, MetaName = "unityExe", Default = ".")]
public string InputFile { get; set; }

[Option('f', "fast-enumerator", Default = false, HelpText = "Use fast file enumeration to search for executables, otherwise use recursive enumeration.")]
public bool FastEnumerator { get; set; }
}

}
Loading

0 comments on commit 7da5ef6

Please sign in to comment.