Script for auto copying app files after compiling

master
1987kostya 4 years ago
parent 97771e366a
commit a32893c52b

1
.gitignore vendored

@ -26,6 +26,7 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/
Build
# Visual Studio 2015/2017 cache/options directory
.vs/

@ -5,8 +5,6 @@ VisualStudioVersion = 16.0.30517.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetCTFDumper", "DotNetCTFDumper\DotNetCTFDumper.csproj", "{86D99F9E-98FB-4E50-AB68-F5C115850C33}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExamplePlugin", "ExamplePlugin\ExamplePlugin.csproj", "{9A4499BF-534F-4397-AF0D-C663688A20E5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -23,14 +21,6 @@ Global
{86D99F9E-98FB-4E50-AB68-F5C115850C33}.Release|Any CPU.Build.0 = Release|Any CPU
{86D99F9E-98FB-4E50-AB68-F5C115850C33}.Release|x64.ActiveCfg = Release|x64
{86D99F9E-98FB-4E50-AB68-F5C115850C33}.Release|x64.Build.0 = Release|x64
{9A4499BF-534F-4397-AF0D-C663688A20E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A4499BF-534F-4397-AF0D-C663688A20E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A4499BF-534F-4397-AF0D-C663688A20E5}.Debug|x64.ActiveCfg = Debug|Any CPU
{9A4499BF-534F-4397-AF0D-C663688A20E5}.Debug|x64.Build.0 = Debug|Any CPU
{9A4499BF-534F-4397-AF0D-C663688A20E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A4499BF-534F-4397-AF0D-C663688A20E5}.Release|Any CPU.Build.0 = Release|Any CPU
{9A4499BF-534F-4397-AF0D-C663688A20E5}.Release|x64.ActiveCfg = Release|Any CPU
{9A4499BF-534F-4397-AF0D-C663688A20E5}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -76,17 +76,10 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Reference Include="Be.Windows.Forms.HexBox, Version=1.6.0.18788, Culture=neutral, PublicKeyToken=e0e5adf0ebc99863">
<HintPath>C:\Users\ivani\Desktop\Be.HexEditor-1.6.0\sources\Be.Windows.Forms.HexBox\bin\Debug\Be.Windows.Forms.HexBox.dll</HintPath>
</Reference>
<Reference Include="Be.Windows.Forms.HexBox, Version=1.6.1.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Be.Windows.Forms.HexBox.1.6.1\lib\net40\Be.Windows.Forms.HexBox.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DotNetZip, Version=1.15.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745">
<HintPath>..\packages\DotNetZip.1.15.0\lib\net40\DotNetZip.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Joveler.Compression.ZLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Joveler.Compression.ZLib.4.0.0\lib\net451\Joveler.Compression.ZLib.dll</HintPath>
<Private>True</Private>
@ -286,5 +279,22 @@
<Error Condition="!Exists('..\packages\Joveler.Compression.ZLib.4.0.0\build\net451\Joveler.Compression.ZLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Joveler.Compression.ZLib.4.0.0\build\net451\Joveler.Compression.ZLib.targets'))" />
</Target>
<Import Project="..\packages\Joveler.Compression.ZLib.4.0.0\build\net451\Joveler.Compression.ZLib.targets" Condition="Exists('..\packages\Joveler.Compression.ZLib.4.0.0\build\net451\Joveler.Compression.ZLib.targets')" />
<PropertyGroup>
<PostBuildEvent>md $(SolutionDir)\Build\
md $(SolutionDir)\Build\x64\
copy $(TargetPath) $(SolutionDir)Build\DotNetCTFDumper.exe
copy $(SolutionDir)Dependencies\Decrypter-x64.dll $(SolutionDir)Build\Decrypter-x64.dll
copy $(TargetDir)\x64\zlibwapi.dll $(SolutionDir)Build\x64\zlibwapi.dll
copy $(TargetDir)DotNetCTFDumper.pdb $(SolutionDir)Build\DotNetCTFDumper.pdb
copy $(TargetDir)Be.Windows.Forms.HexBox.dll $(SolutionDir)Build\Be.Windows.Forms.HexBox.dll
copy $(TargetDir)Joveler.Compression.ZLib.dll $(SolutionDir)Build\Joveler.Compression.ZLib.dll
copy $(TargetDir)Joveler.DynLoader.dll $(SolutionDir)Build\Joveler.DynLoader.dll
copy $(TargetDir)System.Buffers.dll $(SolutionDir)Build\System.Buffers.dll
copy $(TargetDir)System.Memory.dll $(SolutionDir)Build\System.Memory.dll
copy $(TargetDir)System.Memory.dll $(SolutionDir)Build\System.Memory.dll
copy $(TargetDir)System.Numerics.Vectors.dll $(SolutionDir)Build\System.Numerics.Vectors.dll
copy $(TargetDir)System.Runtime.CompilerServices.Unsafe.dll $(SolutionDir)Build\System.Runtime.CompilerServices.Unsafe.dll
</PostBuildEvent>
</PropertyGroup>
</Project>

@ -125,7 +125,12 @@ namespace DotNetCTFDumper.GUI
{
var worker = new BackgroundWorker();
worker.DoWork += (workSender, workE) => StartReading();
worker.RunWorkerCompleted += (workSender, workE) => AfterLoad();
worker.RunWorkerCompleted += (workSender, workE) =>
{
AfterLoad();
};
worker.RunWorkerAsync();
}
@ -221,10 +226,10 @@ namespace DotNetCTFDumper.GUI
{
listBox1.Items.Add($"Name: {nodeChunk.Name}");
listBox1.Items.Add($"Id: {nodeChunk.Id}");
listBox1.Items.Add($"Id: {nodeChunk.Id} - 0x{nodeChunk.Id:X4}");
listBox1.Items.Add($"Flag: {nodeChunk.Flag}");
listBox1.Items.Add($"Size: {nodeChunk.Size.ToPrettySize()}");
if (nodeChunk.DecompressedSize > -1)
if (nodeChunk.DecompressedSize > 0)
listBox1.Items.Add($"Decompressed Size: {nodeChunk.DecompressedSize.ToPrettySize()}");
}
@ -251,6 +256,8 @@ namespace DotNetCTFDumper.GUI
public void AfterLoad()
{
Logger.Log("Loading GUI");
//GameData gameData = null;
var exe = Exe.Instance;
var gameData = exe.GameData;

@ -31,6 +31,6 @@ namespace DotNetCTFDumper
public static bool DoMFA;
public static bool UseGUI;
public static string DumperVersion = "CTFAN 0.1.5-a Debug";
public static string DumperVersion = "CTFAN 0.1.5-с Alpha";
}
}

@ -1,17 +0,0 @@
using System;
using DotNetCTFDumper.MMFParser.EXE;
using DotNetCTFDumper.PluginAPI;
namespace ExamplePlugin
{
public class ExamplePlugin:IPlugin
{
public object Activate(object input)
{
var data = (GameData) input;
PluginAPI.Message(data.TargetFilename);
return null;
}
}
}

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9A4499BF-534F-4397-AF0D-C663688A20E5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExamplePlugin</RootNamespace>
<AssemblyName>ExamplePlugin</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DotNetCTFDumper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\DotNetCTFDumper\bin\x64\Debug\DotNetCTFDumper.exe</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

@ -1,37 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
using DotNetCTFDumper.PluginAPI;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ExamplePlugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ExamplePlugin")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: CTFDumperPlugin("PathLogger",PluginIOType.GameData)]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9A4499BF-534F-4397-AF0D-C663688A20E5")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Binary file not shown.
Loading…
Cancel
Save