Skip to content

Commit

Permalink
Add installers
Browse files Browse the repository at this point in the history
  • Loading branch information
SamJakob committed Dec 18, 2019
1 parent daff9bd commit 5b05318
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,22 @@ $ ./build.sh windows

- For servers:
```bash
$ go build server/server.go
$ GOOS="<darwin/windows/linux>" go build server/server.go
```
> The resulting executable will be placed in the project root directory.
## Installers
The `installers/` directory contains scripts for each platform to generate an installer application.
Each platform's installer directory, contains the relevant information for that installer.
- [macOS](installers/darwin)
- [Windows](installers/windows)
- [Linux](installers/linux)

## Usage
### Desktops
The proxy will add a tray icon to the native system tray for your platform, which will contain all of the options for the proxy.

### Servers
To use the proxy on a server, clone the package and use:
```bash
$ ./server --host="<hostname>:<port>" --token="<token_or_blank>"
Expand Down
1 change: 1 addition & 0 deletions installers/darwin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Darwin Installer
1 change: 1 addition & 0 deletions installers/linux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Linux Installer
4 changes: 4 additions & 0 deletions installers/windows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Windows Installer

The Windows installer includes an [Inno Setup](http://jrsoftware.org/isdl.php) script, that can be used to build an installer. It automatically gathers the necessary files from the `out/` directory, and allows the user to select the path they would like to use for installation.
> **NOTE**: This Inno Setup script can only be executed using the Inno Setup application, thus this installer can only be built using Windows.
53 changes: 53 additions & 0 deletions installers/windows/inno-setup-installer.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
; Inno Setup 6.0 Script for the Postwoman Proxy.
; Created by NBTX.

#define MyAppName "Postwoman Proxy"
#define MyAppVersion "1.0"
#define MyAppPublisher "Postwoman.io"
#define MyAppURL "https://postwoman.io/"
#define MyAppExeName "postwoman-proxy.exe"

[Setup]
; Randomly generated GUID.
AppId={{286048FA-D576-49B9-915E-13598FB92DA9}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
UsedUserAreasWarning=no
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=..\..\out\windows\installer
OutputBaseFilename=Install Postwoman Proxy
SetupIconFile=..\..\icons\icon.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode

[Files]
Source: "..\..\out\windows\postwoman-proxy.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\out\windows\data"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\..\out\windows\icons\*"; DestDir: "{app}\icons"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

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

0 comments on commit 5b05318

Please sign in to comment.