From b182d945af65b973d27672b829e5ab7a1df97090 Mon Sep 17 00:00:00 2001 From: deguet Date: Wed, 16 Oct 2024 16:22:02 -0400 Subject: [PATCH] Chemin vers appluis --- scriptsharp/ScriptSharp/Script4N6.cs | 2 +- scriptsharp/ScriptSharp/Script5N6.cs | 4 ++-- scriptsharp/ScriptSharp/Utils.cs | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scriptsharp/ScriptSharp/Script4N6.cs b/scriptsharp/ScriptSharp/Script4N6.cs index 9b4e7bf..cc11dea 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 1f7d1e2..a19cfd1 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()); Utils.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 5cc92f5..3e70e69 100644 --- a/scriptsharp/ScriptSharp/Utils.cs +++ b/scriptsharp/ScriptSharp/Utils.cs @@ -304,8 +304,7 @@ public static async Task StartIntellij() { // start android studio 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)) {