Open mickeyseo opened 4 years ago
pretty plz ;) thanxxxxxxxxx
@D4koon
In case you might consider implementing auto-update, I'd like to recommend Squirrel. I've seen good results with it.
I didn't have to abandon Inno Setup, either. I modified my script to use Inno as a self-extractor, basically a wrapper around Squirrel's Setup.exe
. (The SetSquirrelTemp
procedure sets us up for specifying the installation folder. Squirrel's default is %LocalAppData%\MyApp
, which may be undesirable in some cases.)
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define AppPublisher "InteXX"
#define AppExeName "MyApp v"
#define AppVersion "1.0"
#define AppName "MyApp"
#define AppUrl "https://www.MyApp.com/"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{2F651F6A-6F25-4B73-BC69-C2DC1E04420F}
AppName={#AppName}
AppVersion={#AppVersion}
AppPublisher={#AppPublisher}
AppPublisherURL={#AppUrl}
AppSupportURL={#AppUrl}
AppUpdatesURL={#AppUrl}
CreateAppDir=no
Uninstallable=no
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
OutputBaseFilename={#AppExeName}{#AppVersion}
OutputDir=D:\Dev\Projects\Products\MyApp\Application\Desktop\MyApp.UI\bin\Output
SetupIconFile=D:\Dev\Projects\Products\MyApp\Application\Desktop\MyApp.UI\Resources\Icons\MyApp.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
SetupLogging=yes
VersionInfoVersion={#AppVersion}
[Messages]
ReadyLabel2b=Click Install to install and run the application.
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "D:\Dev\Projects\Products\MyApp\Application\Desktop\MyApp.UI\bin\Deploy\Setup.exe"; DestDir: "{tmp}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Run]
Filename: "{tmp}\Setup.exe"; WorkingDir: {tmp}; BeforeInstall: SetSquirrelTemp; AfterInstall: ExitInstaller
[Code]
#ifdef UNICODE
#define AW "W"
#else
#define AW "A"
#endif
function SetEnvironmentVariable(lpName: string; lpValue: string): BOOL;
external 'SetEnvironmentVariable{#AW}@kernel32.dll stdcall';
procedure ExitProcess(uExitCode: UINT);
external 'ExitProcess@kernel32.dll stdcall';
procedure SetSquirrelTemp;
begin
if not SetEnvironmentVariable('SQUIRREL_TEMP', ExpandConstant('{localappdata}\InteXX')) then begin
MsgBox(SysErrorMessage(DLLGetLastError), mbError, MB_OK);
MsgBox('There was a problem during setup. Contact Support.', mbError, MB_OK);
ExitProcess(0);
end
end;
procedure ExitInstaller;
begin
ExitProcess(0);
end;
@D4koon
Follow-up and cautionary note for the above recommendation: Even though we have the SetSquirrelTemp
construct, Squirrel doesn't support installing to directories that require UAC approval.
Could you please add an update button to the program? You sometimes upload updates to this program, but I have to visit your repository in order to download the latest version.