-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed possible issue with getting DWM pid.
- Loading branch information
Showing
3 changed files
with
111 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define MyAppName "Win11 Toggle Rounded Corners" | ||
#define MyAppVersion "1.2" | ||
#define MyAppPublisher "oberrich" | ||
#define MyAppURL "https://github.com/oberrich/win11-toggle-rounded-corners" | ||
|
||
[Setup] | ||
AppId={{5B8824C9-B4BE-4B1C-AA9F-BA8362C44B96} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
AppCopyright=Copyright (C) 2023 oberrich, MIT License | ||
DefaultDirName={autopf}\{#MyAppName} | ||
DefaultGroupName={#MyAppName} | ||
DisableProgramGroupPage=yes | ||
LicenseFile=LICENSE | ||
PrivilegesRequired=admin | ||
OutputBaseFilename=win11-toggle-rounded-corners-setup | ||
Compression=lzma | ||
SolidCompression=yes | ||
WizardStyle=modern | ||
ArchitecturesAllowed=x64 | ||
ArchitecturesInstallIn64BitMode=x64 | ||
MissingRunOnceIdsWarning=no | ||
OutputDir=build | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Files] | ||
; Place any regular files here | ||
Source: "LICENSE"; DestDir: "{app}"; | ||
; These files will be downloaded | ||
Source: "{tmp}\win11-toggle-rounded-corners.exe"; DestDir: "{app}"; Flags: external | ||
|
||
[Code] | ||
var | ||
DownloadPage: TDownloadWizardPage; | ||
function OnDownloadProgress(const Url, FileName: String; const Progress, ProgressMax: Int64): Boolean; | ||
begin | ||
if Progress = ProgressMax then | ||
Log(Format('Successfully downloaded file to {tmp}: %s', [FileName])); | ||
Result := True; | ||
end; | ||
procedure InitializeWizard; | ||
begin | ||
DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), @OnDownloadProgress); | ||
end; | ||
function NextButtonClick(CurPageID: Integer): Boolean; | ||
begin | ||
if CurPageID = wpReady then begin | ||
DownloadPage.Clear; | ||
DownloadPage.Add('https://github.com/oberrich/win11-toggle-rounded-corners/releases/latest/download/win11-toggle-rounded-corners.exe', 'win11-toggle-rounded-corners.exe', ''); | ||
DownloadPage.Show; | ||
try | ||
try | ||
DownloadPage.Download; // This downloads the files to {tmp} | ||
Result := True; | ||
except | ||
if DownloadPage.AbortedByUser then | ||
Log('Aborted by user.') | ||
else | ||
SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbCriticalError, MB_OK, IDOK); | ||
Result := False; | ||
end; | ||
finally | ||
DownloadPage.Hide; | ||
end; | ||
end else | ||
Result := True; | ||
end; | ||
[Run] | ||
Filename: "schtasks"; \ | ||
Parameters: "/Create /F /RL highest /SC onlogon /TN ""Run win11-toggle-rounded-corners as admin on logon"" /TR ""'{app}\win11-toggle-rounded-corners.exe' --disable"""; \ | ||
Description: "Automatically run on logon"; \ | ||
Flags: runhidden runascurrentuser postinstall | ||
Filename: "{app}\win11-toggle-rounded-corners.exe"; \ | ||
Description: "Run now"; \ | ||
Parameters: "--disable"; \ | ||
Flags: runhidden runascurrentuser nowait postinstall | ||
|
||
[UninstallRun] | ||
Filename: "schtasks"; \ | ||
Parameters: "/Delete /F /TN ""Run win11-toggle-rounded-corners as admin on logon"""; \ | ||
Flags: runhidden runascurrentuser |