sftpgo.iss 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #define MyAppName "SFTPGo"
  2. #if GetEnv("SFTPGO_ISS_VERSION") != ""
  3. #define MyAppVersion GetEnv("SFTPGO_ISS_VERSION")
  4. #else
  5. #define MyAppVersion "v0.0.0"
  6. #endif
  7. #define MyAppURL "https://github.com/drakkan/sftpgo"
  8. #define MyVersionInfo StringChange(MyAppVersion,"v","")
  9. #if GetEnv("SFTPGO_ISS_DOC_URL") != ""
  10. #define DocURL GetEnv("SFTPGO_ISS_DOC_URL")
  11. #else
  12. #define DocURL "https://github.com/drakkan/sftpgo/blob/master/README.md"
  13. #endif
  14. #define MyAppExeName "sftpgo.exe"
  15. #define MyAppDir "..\output"
  16. #define MyOutputDir ".."
  17. [Setup]
  18. AppId={{1FB9D57F-00DD-4B1B-8798-1138E5CE995D}
  19. AppName={#MyAppName}
  20. AppVersion={#MyAppVersion}
  21. AppVerName={#MyAppName} {#MyAppVersion}
  22. AppPublisherURL={#MyAppURL}
  23. AppSupportURL={#MyAppURL}
  24. AppUpdatesURL={#MyAppURL}
  25. DefaultDirName={autopf}\{#MyAppName}
  26. DefaultGroupName={#MyAppName}
  27. LicenseFile={#MyAppDir}\LICENSE.txt
  28. OutputDir={#MyOutputDir}
  29. OutputBaseFilename=sftpgo_windows_x86_64
  30. SolidCompression=yes
  31. WizardStyle=modern
  32. ArchitecturesInstallIn64BitMode=x64
  33. PrivilegesRequired=admin
  34. ArchitecturesAllowed=x64
  35. MinVersion=10
  36. VersionInfoVersion={#MyVersionInfo}
  37. [Languages]
  38. Name: "english"; MessagesFile: "compiler:Default.isl"
  39. [Files]
  40. Source: "{#MyAppDir}\sftpgo.exe"; DestDir: "{app}"; Flags: ignoreversion
  41. Source: "{#MyAppDir}\sftpgo.db"; DestDir: "{commonappdata}\{#MyAppName}"; Flags: onlyifdoesntexist uninsneveruninstall
  42. Source: "{#MyAppDir}\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
  43. Source: "{#MyAppDir}\sftpgo.json"; DestDir: "{commonappdata}\{#MyAppName}"; Flags: onlyifdoesntexist uninsneveruninstall
  44. Source: "{#MyAppDir}\sftpgo_api_cli.exe"; DestDir: "{app}\examples\rest-api-cli"; Flags: ignoreversion
  45. Source: "{#MyAppDir}\templates\*"; DestDir: "{commonappdata}\{#MyAppName}\templates"; Flags: ignoreversion recursesubdirs createallsubdirs
  46. Source: "{#MyAppDir}\static\*"; DestDir: "{commonappdata}\{#MyAppName}\static"; Flags: ignoreversion recursesubdirs createallsubdirs
  47. [Dirs]
  48. Name: "{commonappdata}\{#MyAppName}\logs"; Permissions: everyone-full
  49. Name: "{commonappdata}\{#MyAppName}\backups"; Permissions: everyone-full
  50. Name: "{commonappdata}\{#MyAppName}\credentials"; Permissions: everyone-full
  51. [Icons]
  52. Name: "{group}\Web Admin"; Filename: "http://127.0.0.1:8080/web";
  53. Name: "{group}\Service Control"; WorkingDir: "{app}"; Filename: "powershell.exe"; Parameters: "-Command ""Start-Process cmd \""/k cd {app} & {#MyAppExeName} service --help\"" -Verb RunAs"; Comment: "Manage SFTPGo Service"
  54. Name: "{group}\REST API CLI"; WorkingDir: "{app}\examples\rest-api-cli"; Filename: "{cmd}"; Parameters: "/k sftpgo_api_cli.exe --help"; Comment: "Manage users, folders and connections"
  55. Name: "{group}\Documentation"; Filename: "{#DocURL}";
  56. Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
  57. [Run]
  58. Filename: "netsh"; Parameters: "advfirewall firewall delete rule name=""SFTPGo Service"""; Flags: runhidden
  59. Filename: "netsh"; Parameters: "advfirewall firewall add rule name=""SFTPGo Service"" dir=in action=allow program=""{app}\{#MyAppExeName}"""; Flags: runhidden
  60. Filename: "{app}\{#MyAppExeName}"; Parameters: "service stop"; Flags: runhidden
  61. Filename: "{app}\{#MyAppExeName}"; Parameters: "service uninstall"; Flags: runhidden
  62. Filename: "{app}\{#MyAppExeName}"; Parameters: "service install -c ""{commonappdata}\{#MyAppName}"" -l ""logs\sftpgo.log"""; Description: "Install SFTPGo Windows Service"; Flags: runhidden
  63. Filename: "{app}\{#MyAppExeName}"; Parameters: "service start"; Description: "Start SFTPGo Windows Service"; Flags: runhidden
  64. [UninstallRun]
  65. Filename: "{app}\{#MyAppExeName}"; Parameters: "service stop"; Flags: runhidden
  66. Filename: "{app}\{#MyAppExeName}"; Parameters: "service uninstall"; Flags: runhidden
  67. Filename: "netsh"; Parameters: "advfirewall firewall delete rule name=""SFTPGo Service"""; Flags: runhidden