From 555dd86e8450c39f3f9b1ebe42bae8dd86bd2477 Mon Sep 17 00:00:00 2001 From: "Soy R.A." <36781536+SoyRA@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:28:54 -0300 Subject: [PATCH 1/3] Allow installation only on Windows 8 and higher --- inno.iss | 1 + 1 file changed, 1 insertion(+) diff --git a/inno.iss b/inno.iss index 0636ae7..8aff1fc 100644 --- a/inno.iss +++ b/inno.iss @@ -41,6 +41,7 @@ DisableDirPage=auto ArchitecturesAllowed=x64compatible ArchitecturesInstallIn64BitMode=x64compatible DirExistsWarning=no +MinVersion=6.2.9200 [Files] Source: "{#MainJarFile}"; DestDir: "{app}"; Flags: ignoreversion From 7425daca0be6626f66d8fcb62189010087eef824 Mon Sep 17 00:00:00 2001 From: "Soy R.A." <36781536+SoyRA@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:32:08 -0300 Subject: [PATCH 2/3] Delete jre folder before renaming the new one Since the user might want to update/reinstall --- inno.iss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inno.iss b/inno.iss index 8aff1fc..a6d31f7 100644 --- a/inno.iss +++ b/inno.iss @@ -128,6 +128,14 @@ end; procedure RenameJRE; begin + if DirExists(ExpandConstant('{app}\\jre')) then begin + Log('Deleting old jre directory'); + if not DelTree(ExpandConstant('{app}\\jre'), True, True, True) then begin + Log('Failed to delete old jre folder'); + Exit; + end; + end; + Log('Renaming jre directory'); if not RenameFile(ExpandConstant('{app}\\{#JREFolder}'), ExpandConstant('{app}\\jre')) then begin Log('Failed to rename jre folder'); From f9d94e4672dc8e832fa8bbbedd264acf4101c2a5 Mon Sep 17 00:00:00 2001 From: "Soy R.A." <36781536+SoyRA@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:38:02 -0300 Subject: [PATCH 3/3] Also delete some launcher files when uninstalling --- inno.iss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inno.iss b/inno.iss index a6d31f7..d178c6d 100644 --- a/inno.iss +++ b/inno.iss @@ -261,6 +261,10 @@ Filename: "{tmp}\7za.exe"; Parameters: "x -y {tmp}\jre.zip"; WorkingDir: "{app}" Filename: "{app}\jre\bin\javaw.exe"; Parameters: "-Xmx512M -jar ""{app}\{#MainJarFile}"""; Description: "{cm:LaunchProgram,{#AppName}}"; Flags: nowait postinstall skipifsilent [UninstallDelete] +; Installer files Type: filesandordirs; Name: "{app}\jre" Type: filesandordirs; Name: "{userappdata}\.minecraft\{#AppDir}" -Type: filesandordirs; Name: "{userappdata}\.minecraft\{#AppDir}\javafx" \ No newline at end of file +Type: filesandordirs; Name: "{userappdata}\.minecraft\{#AppDir}\javafx" +; Installer + Launcher files +Type: filesandordirs; Name: "{userappdata}\.minecraft\launcher_profiles.json.skbak" +Type: filesandordirs; Name: "{userappdata}\.minecraft\sklauncher-fx.jar" \ No newline at end of file