mirror of
https://github.com/ShiftOS-Rewind/shiftskn.git
synced 2025-01-22 17:52:14 +00:00
Add (unfinished) code
I think this one can decompile 0.0.x skins, not sure... Maybe I should check?
This commit is contained in:
parent
d078e1089c
commit
70d9df993d
24 changed files with 263 additions and 0 deletions
BIN
.vs/shiftskn/v15/.suo
Normal file
BIN
.vs/shiftskn/v15/.suo
Normal file
Binary file not shown.
BIN
.vs/shiftskn/v15/sqlite3/storage.ide
Normal file
BIN
.vs/shiftskn/v15/sqlite3/storage.ide
Normal file
Binary file not shown.
25
shiftskn.sln
Normal file
25
shiftskn.sln
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.26730.12
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "shiftskn", "shiftskn\shiftskn.csproj", "{93CE219A-8F1F-41B6-9879-6D2ECCEBC984}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{93CE219A-8F1F-41B6-9879-6D2ECCEBC984}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{93CE219A-8F1F-41B6-9879-6D2ECCEBC984}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{93CE219A-8F1F-41B6-9879-6D2ECCEBC984}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{93CE219A-8F1F-41B6-9879-6D2ECCEBC984}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {905469C2-9FEE-4996-9A37-CEFCE34414F8}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
6
shiftskn/App.config
Normal file
6
shiftskn/App.config
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
20
shiftskn/Decode.cs
Normal file
20
shiftskn/Decode.cs
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace shiftskn
|
||||||
|
{
|
||||||
|
public abstract class Decode
|
||||||
|
{
|
||||||
|
public static void DecodeSkinToDir(string inputFile, string outputPath)
|
||||||
|
{
|
||||||
|
string folderName = @"\" + Path.GetFileNameWithoutExtension(inputFile);
|
||||||
|
outputPath = outputPath.TrimEnd(Path.DirectorySeparatorChar);
|
||||||
|
outputPath = outputPath + folderName;
|
||||||
|
ZipFile.ExtractToDirectory(inputFile, outputPath);
|
||||||
|
Console.WriteLine("Extracted " + Path.GetFileName(inputFile) + " to " + outputPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
shiftskn/Help.cs
Normal file
17
shiftskn/Help.cs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace shiftskn
|
||||||
|
{
|
||||||
|
public abstract class Help
|
||||||
|
{
|
||||||
|
public static void PrintHelp()
|
||||||
|
{
|
||||||
|
Console.WriteLine("ShiftOS Skin Decoder v1.0 - By AShifter\n");
|
||||||
|
Console.WriteLine("args:\n" +
|
||||||
|
"decode [INPUTPATH] [OUTPUTPATH] [SKINVER] [FLAGS] | Decode a SKN file\n" +
|
||||||
|
"picpng [INPUTPATH] [(optional)OUTPUTPATH] [FLAGS] | convert a .PIC to a .PNG");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
22
shiftskn/Pic2PNG.cs
Normal file
22
shiftskn/Pic2PNG.cs
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace shiftskn
|
||||||
|
{
|
||||||
|
public abstract class Pic2PNG
|
||||||
|
{
|
||||||
|
public static void Convert(string input, string output = "")
|
||||||
|
{
|
||||||
|
if (output == "" || output == null)
|
||||||
|
{
|
||||||
|
output = input;
|
||||||
|
}
|
||||||
|
Image pic = Image.FromFile(input);
|
||||||
|
output = Path.ChangeExtension(output, "png");
|
||||||
|
pic.Save(output, ImageFormat.Png);
|
||||||
|
Console.WriteLine("Converted " + Path.GetFileName(input) + " to " + Path.GetFileName(output));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
59
shiftskn/Program.cs
Normal file
59
shiftskn/Program.cs
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
|
||||||
|
namespace shiftskn
|
||||||
|
{
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
// Variable Declarations
|
||||||
|
int argsLength = args.Length;
|
||||||
|
|
||||||
|
if (argsLength < 2)
|
||||||
|
{
|
||||||
|
ShowHelp();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argsLength >= 2)
|
||||||
|
{
|
||||||
|
if (args[0] == "picpng")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (args.Length >= 3)
|
||||||
|
{
|
||||||
|
Pic2PNG.Convert(args[1], args[2]);
|
||||||
|
}
|
||||||
|
Pic2PNG.Convert(args[1]);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
ShowHelp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (args[0] == "decode")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Decode.DecodeSkinToDir(args[1], args[2]);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
ShowHelp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowHelp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ShowHelp()
|
||||||
|
{
|
||||||
|
Help.PrintHelp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
shiftskn/Properties/AssemblyInfo.cs
Normal file
36
shiftskn/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 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("shiftskn")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("shiftskn")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 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("93ce219a-8f1f-41b6-9879-6d2eccebc984")]
|
||||||
|
|
||||||
|
// 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")]
|
BIN
shiftskn/bin/Debug/Pic2PNG
Normal file
BIN
shiftskn/bin/Debug/Pic2PNG
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
shiftskn/bin/Debug/shiftskn.exe
Normal file
BIN
shiftskn/bin/Debug/shiftskn.exe
Normal file
Binary file not shown.
6
shiftskn/bin/Debug/shiftskn.exe.config
Normal file
6
shiftskn/bin/Debug/shiftskn.exe.config
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
BIN
shiftskn/bin/Debug/shiftskn.pdb
Normal file
BIN
shiftskn/bin/Debug/shiftskn.pdb
Normal file
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
fa7e0d0b82be17d9f5a08013a6aed5589a65e7d2
|
7
shiftskn/obj/Debug/shiftskn.csproj.FileListAbsolute.txt
Normal file
7
shiftskn/obj/Debug/shiftskn.csproj.FileListAbsolute.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
E:\Documents\GitHub\shiftskn\shiftskn\bin\Debug\shiftskn.exe.config
|
||||||
|
E:\Documents\GitHub\shiftskn\shiftskn\bin\Debug\shiftskn.exe
|
||||||
|
E:\Documents\GitHub\shiftskn\shiftskn\bin\Debug\shiftskn.pdb
|
||||||
|
E:\Documents\GitHub\shiftskn\shiftskn\obj\Debug\shiftskn.csproj.CoreCompileInputs.cache
|
||||||
|
E:\Documents\GitHub\shiftskn\shiftskn\obj\Debug\shiftskn.exe
|
||||||
|
E:\Documents\GitHub\shiftskn\shiftskn\obj\Debug\shiftskn.pdb
|
||||||
|
E:\Documents\GitHub\shiftskn\shiftskn\obj\Debug\shiftskn.csprojResolveAssemblyReference.cache
|
BIN
shiftskn/obj/Debug/shiftskn.csprojResolveAssemblyReference.cache
Normal file
BIN
shiftskn/obj/Debug/shiftskn.csprojResolveAssemblyReference.cache
Normal file
Binary file not shown.
BIN
shiftskn/obj/Debug/shiftskn.exe
Normal file
BIN
shiftskn/obj/Debug/shiftskn.exe
Normal file
Binary file not shown.
BIN
shiftskn/obj/Debug/shiftskn.pdb
Normal file
BIN
shiftskn/obj/Debug/shiftskn.pdb
Normal file
Binary file not shown.
58
shiftskn/shiftskn.csproj
Normal file
58
shiftskn/shiftskn.csproj
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" 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>{93CE219A-8F1F-41B6-9879-6D2ECCEBC984}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>shiftskn</RootNamespace>
|
||||||
|
<AssemblyName>shiftskn</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
</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="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.IO.Compression.FileSystem" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Decode.cs" />
|
||||||
|
<Compile Include="Help.cs" />
|
||||||
|
<Compile Include="Pic2PNG.cs" />
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
6
shiftskn/shiftskn.csproj.user
Normal file
6
shiftskn/shiftskn.csproj.user
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||||
|
<StartArguments>picpng E:\Documents\ShiftOS_Shared\skn\ZorinOS\applauncher.pic</StartArguments>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
Loading…
Reference in a new issue