diff --git a/.vs/shiftskn/v15/.suo b/.vs/shiftskn/v15/.suo new file mode 100644 index 0000000..b74d44e Binary files /dev/null and b/.vs/shiftskn/v15/.suo differ diff --git a/.vs/shiftskn/v15/sqlite3/storage.ide b/.vs/shiftskn/v15/sqlite3/storage.ide new file mode 100644 index 0000000..c6981e2 Binary files /dev/null and b/.vs/shiftskn/v15/sqlite3/storage.ide differ diff --git a/shiftskn.sln b/shiftskn.sln new file mode 100644 index 0000000..30ad150 --- /dev/null +++ b/shiftskn.sln @@ -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 diff --git a/shiftskn/App.config b/shiftskn/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/shiftskn/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/shiftskn/Decode.cs b/shiftskn/Decode.cs new file mode 100644 index 0000000..4041a6a --- /dev/null +++ b/shiftskn/Decode.cs @@ -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); + } + } +} diff --git a/shiftskn/Help.cs b/shiftskn/Help.cs new file mode 100644 index 0000000..729f51a --- /dev/null +++ b/shiftskn/Help.cs @@ -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"); + } + } +} diff --git a/shiftskn/Pic2PNG.cs b/shiftskn/Pic2PNG.cs new file mode 100644 index 0000000..7afc57e --- /dev/null +++ b/shiftskn/Pic2PNG.cs @@ -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)); + } + } +} diff --git a/shiftskn/Program.cs b/shiftskn/Program.cs new file mode 100644 index 0000000..4631523 --- /dev/null +++ b/shiftskn/Program.cs @@ -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(); + } + } +} \ No newline at end of file diff --git a/shiftskn/Properties/AssemblyInfo.cs b/shiftskn/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..23dcf8b --- /dev/null +++ b/shiftskn/Properties/AssemblyInfo.cs @@ -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")] diff --git a/shiftskn/bin/Debug/Pic2PNG b/shiftskn/bin/Debug/Pic2PNG new file mode 100644 index 0000000..7bc9ad9 Binary files /dev/null and b/shiftskn/bin/Debug/Pic2PNG differ diff --git a/shiftskn/bin/Debug/shiftskn.exe b/shiftskn/bin/Debug/shiftskn.exe new file mode 100644 index 0000000..511212d Binary files /dev/null and b/shiftskn/bin/Debug/shiftskn.exe differ diff --git a/shiftskn/bin/Debug/shiftskn.exe.config b/shiftskn/bin/Debug/shiftskn.exe.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/shiftskn/bin/Debug/shiftskn.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/shiftskn/bin/Debug/shiftskn.pdb b/shiftskn/bin/Debug/shiftskn.pdb new file mode 100644 index 0000000..f1d5e7c Binary files /dev/null and b/shiftskn/bin/Debug/shiftskn.pdb differ diff --git a/shiftskn/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/shiftskn/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ed2c5f9 Binary files /dev/null and b/shiftskn/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/shiftskn/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/shiftskn/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/shiftskn/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/shiftskn/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/shiftskn/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/shiftskn/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/shiftskn/obj/Debug/shiftskn.csproj.CoreCompileInputs.cache b/shiftskn/obj/Debug/shiftskn.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..29e34e4 --- /dev/null +++ b/shiftskn/obj/Debug/shiftskn.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +fa7e0d0b82be17d9f5a08013a6aed5589a65e7d2 diff --git a/shiftskn/obj/Debug/shiftskn.csproj.FileListAbsolute.txt b/shiftskn/obj/Debug/shiftskn.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..2dda4aa --- /dev/null +++ b/shiftskn/obj/Debug/shiftskn.csproj.FileListAbsolute.txt @@ -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 diff --git a/shiftskn/obj/Debug/shiftskn.csprojResolveAssemblyReference.cache b/shiftskn/obj/Debug/shiftskn.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..61fd628 Binary files /dev/null and b/shiftskn/obj/Debug/shiftskn.csprojResolveAssemblyReference.cache differ diff --git a/shiftskn/obj/Debug/shiftskn.exe b/shiftskn/obj/Debug/shiftskn.exe new file mode 100644 index 0000000..511212d Binary files /dev/null and b/shiftskn/obj/Debug/shiftskn.exe differ diff --git a/shiftskn/obj/Debug/shiftskn.pdb b/shiftskn/obj/Debug/shiftskn.pdb new file mode 100644 index 0000000..f1d5e7c Binary files /dev/null and b/shiftskn/obj/Debug/shiftskn.pdb differ diff --git a/shiftskn/shiftskn.csproj b/shiftskn/shiftskn.csproj new file mode 100644 index 0000000..def2777 --- /dev/null +++ b/shiftskn/shiftskn.csproj @@ -0,0 +1,58 @@ + + + + + Debug + AnyCPU + {93CE219A-8F1F-41B6-9879-6D2ECCEBC984} + Exe + shiftskn + shiftskn + v4.6.1 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/shiftskn/shiftskn.csproj.user b/shiftskn/shiftskn.csproj.user new file mode 100644 index 0000000..1c99a68 --- /dev/null +++ b/shiftskn/shiftskn.csproj.user @@ -0,0 +1,6 @@ + + + + picpng E:\Documents\ShiftOS_Shared\skn\ZorinOS\applauncher.pic + + \ No newline at end of file