Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Julian | 12427d0790 | |
Julian | d479e1637c | |
Julian | d03f66fe75 |
|
@ -2,7 +2,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net4.7.2</TargetFramework>
|
<TargetFramework>net4.7.2</TargetFramework>
|
||||||
<Version>1.1.0</Version>
|
<Version>1.1.1</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
@ -37,17 +36,12 @@ namespace DeezShade {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var installerUrl =
|
var installerUrl = "https://gshade.org/releases/GShade.Latest.Installer.exe";
|
||||||
"https://github.com/Mortalitas/GShade/releases/latest/download/GShade.Latest.Installer.exe";
|
|
||||||
var zipUrl = "https://github.com/Mortalitas/GShade/releases/latest/download/GShade.Latest.zip";
|
|
||||||
|
|
||||||
var exePath = tempPath + "GShade.Latest.Installer.exe";
|
var exePath = tempPath + "GShade.Latest.Installer.exe";
|
||||||
var zipPath = tempPath + "GShade.Latest.zip";
|
|
||||||
|
|
||||||
Console.WriteLine("Downloading GShade installer...");
|
Console.WriteLine("Downloading GShade installer...");
|
||||||
using (var client = new WebClient()) {
|
using (var client = new WebClient()) {
|
||||||
client.DownloadFile(installerUrl, exePath);
|
client.DownloadFile(installerUrl, exePath);
|
||||||
client.DownloadFile(zipUrl, zipPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// I'm using the official GShade installer, am I not? :^
|
// I'm using the official GShade installer, am I not? :^
|
||||||
|
@ -60,10 +54,10 @@ namespace DeezShade {
|
||||||
|
|
||||||
// Patch GShade from shutting off your computer (LMAO)
|
// Patch GShade from shutting off your computer (LMAO)
|
||||||
Console.WriteLine("Patching GShade malware...");
|
Console.WriteLine("Patching GShade malware...");
|
||||||
type.GetField("_instReady").SetValue(null, true); // wp
|
|
||||||
var harmony = new Harmony("com.notnite.thanks-marot");
|
var harmony = new Harmony("com.notnite.thanks-marot");
|
||||||
var lolMethod = type.GetMethod("www", BindingFlags.Static | BindingFlags.NonPublic);
|
|
||||||
harmony.Patch(lolMethod, new HarmonyMethod(typeof(Program).GetMethod(nameof(LolDetour))));
|
var getProcessesByName = typeof(Process).GetMethod("GetProcessesByName", new[] { typeof(string) });
|
||||||
|
harmony.Patch(getProcessesByName, new HarmonyMethod(typeof(Program).GetMethod(nameof(ProcessDetour))));
|
||||||
|
|
||||||
Console.WriteLine("Requesting new files through GShade installer...");
|
Console.WriteLine("Requesting new files through GShade installer...");
|
||||||
type.GetMethod("CopyZipDeployProcess").Invoke(null, null);
|
type.GetMethod("CopyZipDeployProcess").Invoke(null, null);
|
||||||
|
@ -72,7 +66,7 @@ namespace DeezShade {
|
||||||
|
|
||||||
// File.Copy gives an access denied error, so let's make it ourself
|
// File.Copy gives an access denied error, so let's make it ourself
|
||||||
var src = tempPath + "gshade-shaders";
|
var src = tempPath + "gshade-shaders";
|
||||||
var dst = Path.Combine(gameInstall, "gshade-shaders");
|
var dst = Path.Combine(gameInstall, "reshade-shaders");
|
||||||
|
|
||||||
void RecursiveClone(string path) {
|
void RecursiveClone(string path) {
|
||||||
var path2 = Path.Combine(src, path);
|
var path2 = Path.Combine(src, path);
|
||||||
|
@ -95,15 +89,13 @@ namespace DeezShade {
|
||||||
|
|
||||||
Console.WriteLine("Moving shaders to game directory...");
|
Console.WriteLine("Moving shaders to game directory...");
|
||||||
RecursiveClone("");
|
RecursiveClone("");
|
||||||
Directory.CreateDirectory(Path.Combine(gameInstall, "gshade-addons"));
|
Directory.CreateDirectory(Path.Combine(gameInstall, "reshade-addons"));
|
||||||
|
|
||||||
Console.Write("Use ReShade (y/n)? ");
|
Directory.Move(Path.Combine(gameInstall, "gshade-presets"), Path.Combine(gameInstall, "reshade-presets"));
|
||||||
var useReShade = Console.ReadLine().ToLower() == "y";
|
|
||||||
|
|
||||||
if (useReShade) {
|
|
||||||
Console.WriteLine("Downloading ReShade...");
|
Console.WriteLine("Downloading ReShade...");
|
||||||
var reshadeUrl = "http://static.reshade.me/downloads/ReShade_Setup_5.6.0_Addon.exe";
|
var reshadeUrl = "http://reshade.me/downloads/ReShade_Setup_5.7.0_Addon.exe";
|
||||||
var reshadePath = tempPath + "ReShade_Setup_5.6.0_Addon.exe";
|
var reshadePath = tempPath + "ReShade_Setup_5.7.0_Addon.exe";
|
||||||
using (var client = new WebClient()) {
|
using (var client = new WebClient()) {
|
||||||
client.DownloadFile(reshadeUrl, reshadePath);
|
client.DownloadFile(reshadeUrl, reshadePath);
|
||||||
}
|
}
|
||||||
|
@ -125,31 +117,24 @@ namespace DeezShade {
|
||||||
Console.WriteLine("Writing ReShade config...");
|
Console.WriteLine("Writing ReShade config...");
|
||||||
var configText = @"[GENERAL]
|
var configText = @"[GENERAL]
|
||||||
[GENERAL]
|
[GENERAL]
|
||||||
EffectSearchPaths=.\gshade-shaders\Shaders\**
|
EffectSearchPaths=.\reshade-shaders\Shaders\**
|
||||||
TextureSearchPaths=.\gshade-shaders\Textures\**
|
TextureSearchPaths=.\reshade-shaders\Textures\**
|
||||||
".Trim();
|
".Trim();
|
||||||
|
|
||||||
File.WriteAllText(configPath, configText);
|
File.WriteAllText(configPath, configText);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Console.WriteLine("Extracting DLL and config...");
|
|
||||||
var zip = ZipFile.OpenRead(zipPath);
|
|
||||||
|
|
||||||
if (File.Exists(Path.Combine(gameInstall, "dxgi.dll"))) {
|
|
||||||
File.Move(Path.Combine(gameInstall, "dxgi.dll"), Path.Combine(gameInstall, "dxgi.dll.old"));
|
|
||||||
}
|
|
||||||
|
|
||||||
zip.GetEntry("GShade64.dll").ExtractToFile(Path.Combine(gameInstall, "dxgi.dll"), true);
|
|
||||||
zip.GetEntry("GShade.ini").ExtractToFile(Path.Combine(gameInstall, "GShade.ini"), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
Console.WriteLine("Done!\nSupport FOSS, and thank you for using DeezShade!\nPress any key to continue.");
|
Console.WriteLine("Done!\nSupport FOSS, and thank you for using DeezShade!\nPress any key to continue.");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool LolDetour() {
|
public static bool ProcessDetour(ref Process[] __result, string processName) {
|
||||||
// thank you for writing malware marot
|
if (processName == "GShade.Installer") {
|
||||||
|
__result = Array.Empty<Process>();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
Okay, now it's just funny. With love from NotNet and friends.
|
Okay, now it's just funny. With love from NotNet and friends.
|
||||||
|
|
||||||
DeezShade is a continuation of [GeezShade](https://git.n2.pm/NotNite/geezshade), in C#.
|
DeezShade is a continuation of [GeezShade](https://git.n2.pm/NotNite/geezshade), in C#. It allows you to download GShade shaders and presets while using them with ReShade.
|
||||||
|
|
||||||
Note that this doesn't actually install vanilla ReShade (yet) - [do that yourself](https://reshade.me/) (but get the full addon build).
|
Warning: This might break or be dangerous, and I don't always have time to fix it. Marot can and has done arbitrary things through DeezShade like performing a PC shutdown. Consider following [this guide](https://gist.github.com/ry00001/3e2e63b986cb0c673645ea42ffafcc26) for manual installation steps.
|
||||||
|
|
||||||
[CLICK HERE TO INSTALL IT.](https://git.n2.pm/NotNite/DeezShade/releases/latest)
|
[CLICK HERE TO INSTALL IT.](https://git.n2.pm/NotNite/DeezShade/releases/latest)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue