Skip to content

Commit

Permalink
feat: add setup
Browse files Browse the repository at this point in the history
  • Loading branch information
depthbomb committed Aug 12, 2022
1 parent 9436ca6 commit e06a0f5
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions setup.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#define MyAppName "SpotlightSaver"
#define MyAppDescription "Saves the pretty Windows 10 lockscreen wallpapers to your pictures folder"
#define MyAppVersion "2.1.0.0"
#define MyAppPublisher "Caprine Logic"
#define MyAppExeName "spotlight_saver.exe"
#define MyAppCopyright "Copyright (C) 2022 Caprine Logic"

[Setup]
AppId={{D73EBD89-4171-4B7F-8911-7E3B65CDCBEA}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppCopyright={#MyAppCopyright}
VersionInfoVersion={#MyAppVersion}
DefaultDirName={autopf}\{#MyAppPublisher}\{#MyAppName}
DisableDirPage=yes
DisableProgramGroupPage=yes
PrivilegesRequired=admin
AllowNoIcons=yes
OutputDir=.\build
OutputBaseFilename=ss_setup
SetupIconFile=.\icon.ico
Compression=lzma2/ultra64
SolidCompression=yes
WizardStyle=modern
WizardResizable=no
ArchitecturesAllowed=x64
UninstallDisplayIcon={app}\{#MyAppExeName}
UninstallDisplayName={#MyAppName}
ShowTasksTreeLines=True
AlwaysShowDirOnReadyPage=True
VersionInfoCompany={#MyAppPublisher}
VersionInfoCopyright={#MyAppCopyright}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
VersionInfoProductTextVersion={#MyAppVersion}
VersionInfoDescription={#MyAppDescription}

[Code]
function FromUpdate: Boolean;
begin
Result := ExpandConstant('{param:update|no}') = 'yes'
end;
function FromNormal: Boolean;
begin
Result := FromUpdate = False
end;
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
Name: startup; Description: "Run on Startup"

[Files]
Source: ".\dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "NetCheck"; ValueData: "{app}\{#MyAppExeName}"; Tasks: startup; Flags: uninsdeletevalue

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent; Check: FromUpdate
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent unchecked; Check: FromNormal

[UninstallDelete]
Type: dirifempty; Name: "{app}"

0 comments on commit e06a0f5

Please sign in to comment.