diff --git a/IPA/PatchContext.cs b/IPA/PatchContext.cs index c5c5461..c8a3f17 100644 --- a/IPA/PatchContext.cs +++ b/IPA/PatchContext.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Reflection; using System.Text; namespace IPA @@ -28,6 +29,7 @@ namespace IPA public string ProjectRoot { get; private set; } public string IPARoot { get; private set; } public string ShortcutPath { get; private set; } + public string IPA { get; private set; } private PatchContext() { } @@ -39,6 +41,7 @@ namespace IPA context.Executable = args[0]; context.ProjectRoot = Path.GetDirectoryName(context.Executable); context.IPARoot = Path.Combine(context.ProjectRoot, "IPA"); + context.IPA = Assembly.GetExecutingAssembly().Location ?? Path.Combine(context.ProjectRoot, "IPA.exe"); context.LauncherPathSrc = Path.Combine(context.IPARoot, "Launcher.exe"); context.DataPathSrc = Path.Combine(context.IPARoot, "Data"); context.PluginsFolder = Path.Combine(context.ProjectRoot, "Plugins"); diff --git a/IPA/Program.cs b/IPA/Program.cs index 7b27295..ea392e3 100644 --- a/IPA/Program.cs +++ b/IPA/Program.cs @@ -92,8 +92,17 @@ namespace IPA // Creating shortcut if(!File.Exists(context.ShortcutPath)) { - Console.Write("Creating shortcut... "); - Shortcut.Create(context.ShortcutPath, Assembly.GetExecutingAssembly().Location, Args(context.Executable, "--launch"), context.ProjectRoot, "Launches the game and makes sure it's in a patched state", "", context.Executable); + Console.Write("Creating shortcut to IPA ({0})... ", context.IPA); + Shortcut.Create( + fileName: context.ShortcutPath, + targetPath: context.IPA, + arguments: Args(context.Executable, "--launch"), + workingDirectory: context.ProjectRoot, + description: "Launches the game and makes sure it's in a patched state", + hotkey: "", + iconPath: context.Executable + ); + Console.WriteLine("Created"); } }