diff --git a/scriptsharp/ScriptSharp/Script4N6.cs b/scriptsharp/ScriptSharp/Script4N6.cs index 6bb0a39..dd7d86d 100644 --- a/scriptsharp/ScriptSharp/Script4N6.cs +++ b/scriptsharp/ScriptSharp/Script4N6.cs @@ -36,7 +36,7 @@ await Task.WhenAll( Program.DownloadRepoKMB(), DownloadRepo4N6()); // start android studio - Utils.CreateDesktopShortcut("IntelliJ", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "idea", "bin", "idea64.exe")); + Utils.CreateDesktopShortcut("IntelliJ", Program.PathToIntellij()); await Utils.StartAndroidStudio(); Utils.StartKMB(); diff --git a/scriptsharp/ScriptSharp/Script5N6.cs b/scriptsharp/ScriptSharp/Script5N6.cs index 035c98b..8496749 100644 --- a/scriptsharp/ScriptSharp/Script5N6.cs +++ b/scriptsharp/ScriptSharp/Script5N6.cs @@ -42,7 +42,7 @@ await Task.WhenAll( await InstallFlutter(); Utils.StartKMB(); await Utils.StartAndroidStudio(); - Utils.CreateDesktopShortcut("IntelliJ", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "idea", "bin", "idea64.exe")); + Utils.CreateDesktopShortcut("IntelliJ", Program.PathToIntellij()); LogSingleton.Get.LogAndWriteLine(" FAIT 5N6 Flutter complet"); } @@ -98,7 +98,7 @@ await Task.WhenAll( Program.InstallAndroidStudio(), Program.DownloadRepoKMB(), DownloadRepo5N6()); - Utils.CreateDesktopShortcut("IntelliJ", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "idea", "bin", "idea64.exe")); + Utils.CreateDesktopShortcut("IntelliJ", Program.PathToIntellij()); Utils.AddToPath(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "idea", "bin")); Utils.RunCommand(Program.PathToAndroidStudio() + " installPlugins io.flutter"); Utils.RunCommand(Program.PathToAndroidStudio() + " installPlugins com.github.copilot"); diff --git a/scriptsharp/ScriptSharp/Utils.cs b/scriptsharp/ScriptSharp/Utils.cs index aa2982f..05f2a59 100644 --- a/scriptsharp/ScriptSharp/Utils.cs +++ b/scriptsharp/ScriptSharp/Utils.cs @@ -258,8 +258,7 @@ public static async Task StartIntellij() { // start android studio LogSingleton.Get.LogAndWriteLine("Démarrage d'Intellij IDEA"); - string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); - string path = Path.Combine(desktopPath, "idea","bin","idea64.exe"); + string path = Program.PathToIntellij(); CreateDesktopShortcut("Intellij", path); if (File.Exists(path)) {