diff --git a/repertory.iss.in b/repertory.iss.in index a561e3e0..c2baf23a 100644 --- a/repertory.iss.in +++ b/repertory.iss.in @@ -13,30 +13,37 @@ AppId={{BD165823-1DEF-4D23-87DC-3D7A9BB73A00} AppName={#MyAppName} AppVersion={#MyAppVersion} -;AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={autopf}\{#MyAppName} UninstallDisplayIcon={app}\{#MyAppExeName} -; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run -; on anything but x64 and Windows 11 on Arm. ArchitecturesAllowed=x64compatible -; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the -; install be done in "64-bit mode" on x64 or Windows 11 on Arm, -; meaning it should use the native 64-bit Program Files directory and -; the 64-bit view of the registry. ArchitecturesInstallIn64BitMode=x64compatible DefaultGroupName={#MyAppName} DisableProgramGroupPage=yes LicenseFile=repertory\LICENSE.md -; Uncomment the following line to run in non administrative install mode (install for current user only). -;PrivilegesRequired=lowest OutputBaseFilename=repertory_{#MyAppVersion}_windows_@PROJECT_MARCH@_setup SolidCompression=yes WizardStyle=modern +[code] +function CheckAddPath(Param: string): boolean; +var + CurPath: string; +begin + if not RegQueryStringValue(HKEY_LOCAL_MACHINE, + 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', + 'Path', CurPath) + then begin + Result := True; + exit; + end; + + Result := Pos(';' + Param + ';', ';' + CurPath + ';') = 0; +end; + [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" @@ -47,10 +54,16 @@ Name: "winfsp"; Description: "WinFSP v@WINFSP_VERSION@"; Types: full custom [Files] Source: "repertory\*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: main Source: "3rd_party\winfsp-@WINFSP_VERSION@.msi"; DestDir: "{app}"; Flags: ignoreversion; Components: winfsp -; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] -Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Parameters: "-ui --hidden" +Name: "{commonstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Parameters: "-ui --no-auto-open --hidden" [Run] -Filename: "msiexec.exe"; WorkingDir: "{app}"; Parameters: "/a winfsp-@WINFSP_VERSION@.msi /norestart"; Flags: 64bit waituntilterminated; Components: winfsp +Filename: "msiexec.exe"; WorkingDir: "{app}"; Parameters: "/a winfsp-@WINFSP_VERSION@.msi /norestart"; \ + Flags: 64bit waituntilterminated; Components: winfsp + +[Registry] +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \ + ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app};"; \ + Check: CheckAddPath('{app}') diff --git a/repertory/librepertory/include/utils/cli_utils.hpp b/repertory/librepertory/include/utils/cli_utils.hpp index bcbd5f9b..165c7a9f 100644 --- a/repertory/librepertory/include/utils/cli_utils.hpp +++ b/repertory/librepertory/include/utils/cli_utils.hpp @@ -42,6 +42,7 @@ inline const option get_directory_items_option = {"-gdi", inline const option get_pinned_files_option = {"-gpf", "--get_pinned_files"}; inline const option help_option = {"-h", "--help"}; inline const option hidden_option = {"-hidden", "--hidden"}; +inline const option launch_only_option = {"-lo", "--launch_only"}; inline const option open_files_option = {"-of", "--open_files"}; inline const option pin_file_option = {"-pf", "--pin_file"}; inline const option pinned_status_option = {"-ps", "--pinned_status"}; @@ -71,6 +72,7 @@ inline const std::vector