Skip to content

Commit b475567

Browse files
committed
Add files
1 parent 0acdc72 commit b475567

6 files changed

Lines changed: 338 additions & 0 deletions

File tree

App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
</configuration>

ConsoleApp1.csproj

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{CCF3E0CA-483F-4F3E-AFF2-834B6F2C72DC}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>ARCToolMultiPacker</RootNamespace>
10+
<AssemblyName>ARCToolMultiPacker</AssemblyName>
11+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<Deterministic>true</Deterministic>
14+
<PublishUrl>publish\</PublishUrl>
15+
<Install>true</Install>
16+
<InstallFrom>Disk</InstallFrom>
17+
<UpdateEnabled>false</UpdateEnabled>
18+
<UpdateMode>Foreground</UpdateMode>
19+
<UpdateInterval>7</UpdateInterval>
20+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
21+
<UpdatePeriodically>false</UpdatePeriodically>
22+
<UpdateRequired>false</UpdateRequired>
23+
<MapFileExtensions>true</MapFileExtensions>
24+
<ApplicationRevision>0</ApplicationRevision>
25+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
26+
<IsWebBootstrapper>false</IsWebBootstrapper>
27+
<UseApplicationTrust>false</UseApplicationTrust>
28+
<BootstrapperEnabled>true</BootstrapperEnabled>
29+
</PropertyGroup>
30+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
31+
<PlatformTarget>AnyCPU</PlatformTarget>
32+
<DebugSymbols>true</DebugSymbols>
33+
<DebugType>full</DebugType>
34+
<Optimize>false</Optimize>
35+
<OutputPath>bin\Debug\</OutputPath>
36+
<DefineConstants>DEBUG;TRACE</DefineConstants>
37+
<ErrorReport>prompt</ErrorReport>
38+
<WarningLevel>4</WarningLevel>
39+
<Prefer32Bit>false</Prefer32Bit>
40+
</PropertyGroup>
41+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
42+
<PlatformTarget>AnyCPU</PlatformTarget>
43+
<DebugType>pdbonly</DebugType>
44+
<Optimize>true</Optimize>
45+
<OutputPath>bin\Release\</OutputPath>
46+
<DefineConstants>TRACE</DefineConstants>
47+
<ErrorReport>prompt</ErrorReport>
48+
<WarningLevel>4</WarningLevel>
49+
</PropertyGroup>
50+
<PropertyGroup>
51+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
52+
</PropertyGroup>
53+
<PropertyGroup>
54+
<SignManifests>true</SignManifests>
55+
</PropertyGroup>
56+
<PropertyGroup>
57+
<ManifestCertificateThumbprint>6A1E6BF39262820CA2019749FD1EC07BF1F54521</ManifestCertificateThumbprint>
58+
</PropertyGroup>
59+
<PropertyGroup>
60+
<ApplicationIcon>gam01_101_BM.ico</ApplicationIcon>
61+
</PropertyGroup>
62+
<ItemGroup>
63+
<Reference Include="System" />
64+
<Reference Include="System.Core" />
65+
<Reference Include="System.Xml.Linq" />
66+
<Reference Include="System.Data.DataSetExtensions" />
67+
<Reference Include="Microsoft.CSharp" />
68+
<Reference Include="System.Data" />
69+
<Reference Include="System.Net.Http" />
70+
<Reference Include="System.Xml" />
71+
</ItemGroup>
72+
<ItemGroup>
73+
<Compile Include="Program.cs" />
74+
<Compile Include="Properties\AssemblyInfo.cs" />
75+
</ItemGroup>
76+
<ItemGroup>
77+
<None Include="App.config" />
78+
</ItemGroup>
79+
<ItemGroup>
80+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
81+
<Visible>False</Visible>
82+
<ProductName>.NET Framework 3.5 SP1</ProductName>
83+
<Install>false</Install>
84+
</BootstrapperPackage>
85+
</ItemGroup>
86+
<ItemGroup>
87+
<Content Include="gam01_101_BM.ico" />
88+
</ItemGroup>
89+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
90+
</Project>

ConsoleApp1.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30413.136
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1.csproj", "{CCF3E0CA-483F-4F3E-AFF2-834B6F2C72DC}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{CCF3E0CA-483F-4F3E-AFF2-834B6F2C72DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{CCF3E0CA-483F-4F3E-AFF2-834B6F2C72DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{CCF3E0CA-483F-4F3E-AFF2-834B6F2C72DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{CCF3E0CA-483F-4F3E-AFF2-834B6F2C72DC}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {5F20DF3D-3A2A-41E8-A467-D6FBE1F1D246}
24+
EndGlobalSection
25+
EndGlobal

Program.cs

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
using System;
2+
using System.Diagnostics;
3+
using System.IO;
4+
using System.Linq;
5+
6+
namespace ARCToolMultiPacker
7+
{
8+
internal class Program
9+
{
10+
private static readonly string Dir = Directory.GetCurrentDirectory();
11+
private static readonly string DdArgs = "-dd -texRE6 -alwayscomp -pc -txt -v 7";
12+
private static readonly string DdoArgs = "-ddo -texRE6 -alwayscomp -pc -txt -v 7";
13+
private static readonly string Dmc4Args = "-pc -dmc4 -xmem -noxmemmagic -texRE5 -alwayscomp";
14+
private static readonly string DmcSE4Args = "-pc -dmc4se -texDMC4SE -alwayscomp -txt -v 7";
15+
private static readonly string Re0Args = "-re0 -texRE6 -alwayscomp -pc -txt -v 7";
16+
private static readonly string ReHDArgs = "-rehd -texRE6 -alwayscomp -pc -txt -v 7";
17+
private static readonly string Re5Args = "-alwayscomp -re5 -texRE5 -v 7 -pc"; //tex
18+
private static readonly string Re6Args = "-re6 -alwayscomp -pc -txt -v 7"; //tex
19+
private static readonly string RevArgs = "-rev -alwayscomp -pc -txt -v 7"; //tex
20+
private static readonly string Rev2Args = "-rev2 -texRE6 -alwayscomp -pc -txt -v 7"; //tex
21+
22+
private static string[] folderList;
23+
24+
private static string GameArgs;
25+
private static bool unpack;
26+
private static bool tex;
27+
28+
/// <summary>
29+
/// Format: .\ARCToolMultiPacker.exe [game] [tex(optional)] [unpack/repack] [folders]
30+
/// Written by Mario Schweidler (frofoo/neatodev)
31+
/// </summary>
32+
/// <param name="args"></param>
33+
private static void Main(string[] args)
34+
{
35+
DefineParams(args);
36+
foreach (var arg in folderList)
37+
if (unpack && tex)
38+
{
39+
var files = Directory.GetFiles(Dir + "\\" + arg);
40+
foreach (var file in files)
41+
try
42+
{
43+
Process.Start(".\\ARCtool.exe", GameArgs + " -tex " + file);
44+
}
45+
catch (FileNotFoundException e)
46+
{
47+
Console.WriteLine("Could not extract file. Is the path valid? " + e);
48+
}
49+
}
50+
else if (unpack)
51+
{
52+
var files = Directory.GetFiles(Dir + "\\" + arg);
53+
foreach (var file in files)
54+
try
55+
{
56+
Process.Start(".\\ARCtool.exe", GameArgs + " " + file);
57+
}
58+
catch (FileNotFoundException e)
59+
{
60+
Console.WriteLine("Could not extract file. Is the path valid? " + e);
61+
}
62+
}
63+
else if (!unpack || (!unpack && tex))
64+
{
65+
var folders = Directory.GetDirectories(Dir + "\\" + arg);
66+
foreach (var folder in folders)
67+
try
68+
{
69+
Process.Start(".\\ARCtool.exe", GameArgs + " " + folder);
70+
}
71+
catch (DirectoryNotFoundException e)
72+
{
73+
Console.WriteLine("Could not pack file. Is the path valid? " + e);
74+
}
75+
}
76+
}
77+
78+
private static void DefineParams(string[] args)
79+
{
80+
string[] argList = args;
81+
DefineGame(argList[0]);
82+
83+
switch (argList[1])
84+
{
85+
case "tex":
86+
tex = true;
87+
break;
88+
89+
case "unpack":
90+
unpack = true;
91+
folderList = argList.Skip(2).ToArray();
92+
break;
93+
94+
case "repack":
95+
unpack = false;
96+
folderList = argList.Skip(2).ToArray();
97+
98+
break;
99+
100+
default:
101+
throw new Exception();
102+
}
103+
104+
if (!argList[1].Equals("unpack") && !argList[1].Equals("repack"))
105+
{
106+
107+
Console.WriteLine(!argList[1].Equals("unpack") && !argList[1].Equals("repack"));
108+
109+
switch (argList[2])
110+
{
111+
case "unpack":
112+
unpack = true;
113+
folderList = argList.Skip(3).ToArray();
114+
115+
break;
116+
117+
case "repack":
118+
unpack = false;
119+
folderList = argList.Skip(3).ToArray();
120+
121+
break;
122+
123+
default:
124+
Console.WriteLine("Penis music");
125+
throw new Exception();
126+
127+
}
128+
}
129+
130+
}
131+
132+
private static void DefineGame(string arg)
133+
{
134+
switch (arg)
135+
{
136+
case "dd":
137+
GameArgs = DdArgs;
138+
break;
139+
case "ddo":
140+
GameArgs = DdoArgs;
141+
break;
142+
143+
case "dmc4":
144+
GameArgs = Dmc4Args;
145+
break;
146+
147+
case "dmc4se":
148+
GameArgs = DmcSE4Args;
149+
break;
150+
151+
case "re0":
152+
GameArgs = Re0Args;
153+
break;
154+
155+
case "re5":
156+
GameArgs = Re5Args;
157+
break;
158+
159+
case "re6":
160+
GameArgs = Re6Args;
161+
break;
162+
163+
case "reHD":
164+
GameArgs = ReHDArgs;
165+
break;
166+
167+
case "rev":
168+
GameArgs = RevArgs;
169+
break;
170+
171+
case "rev2":
172+
GameArgs = Rev2Args;
173+
break;
174+
175+
default:
176+
throw new Exception();
177+
}
178+
}
179+
180+
}
181+
}

Properties/AssemblyInfo.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
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("ARCToolMultiPacker")]
9+
[assembly: AssemblyDescription("Uses ARCTool to pack/unpack all files in a folder simultaneously.")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("ARCToolMultiPacker")]
13+
[assembly: AssemblyCopyright("Mario Schweidler")]
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(true)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("ccf3e0ca-483f-4f3e-aff2-834b6f2c72dc")]
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")]

gam01_101_BM.ico

162 KB
Binary file not shown.

0 commit comments

Comments
 (0)