Add Windows installer (#61)

This commit is contained in:
Till Krischer
2019-04-20 22:58:18 +02:00
committed by Maxim Baz
parent 4b4b188785
commit 54be71414a
3 changed files with 42 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
/browserpass
/browserpass-*
dist/
setup.msi

View File

@@ -6,6 +6,8 @@ BIN_DIR = $(DESTDIR)$(PREFIX)/bin
LIB_DIR = $(DESTDIR)$(PREFIX)/lib
SHARE_DIR = $(DESTDIR)$(PREFIX)/share
WINDOWS_BIN = C:\\\\\\\\Program Files\\\\\\\\Browserpass\\\\\\\\browserpass-windows64.exe
GO_GCFLAGS := "all=-trimpath=${PWD}"
GO_ASMFLAGS := "all=-trimpath=${PWD}"
GO_LDFLAGS := "-extldflags ${LDFLAGS}"
@@ -87,6 +89,10 @@ configure:
$(SED) -i 's|"path": ".*"|"path": "'"$(BIN_DIR)/$(BIN)"'"|' browser-files/chromium-host.json
$(SED) -i 's|"path": ".*"|"path": "'"$(BIN_DIR)/$(BIN)"'"|' browser-files/firefox-host.json
configure-windows:
$(SED) -i 's|"path": ".*"|"path": "'"$(WINDOWS_BIN)"'"|' browser-files/chromium-host.json
$(SED) -i 's|"path": ".*"|"path": "'"$(WINDOWS_BIN)"'"|' browser-files/firefox-host.json
.PHONY: install
install:
$(INSTALL) -Dm755 -t "$(BIN_DIR)/" $(BIN)
@@ -353,3 +359,6 @@ policies-brave-user:
;; \
*) echo "The operating system $(OS) is not supported"; exit 1 ;; \
esac
setup.msi:
wixl --arch x64 setup.wxs

32
setup.wxs Normal file
View File

@@ -0,0 +1,32 @@
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Browserpass' Id='ABCDDCBA-86C7-4D14-AEC0-86416A69ABDE' UpgradeCode='ABCDDCBA-7349-453F-94F6-BCB5110BA4FD' Language='1033' Codepage='1252' Version='3.0.6' Manufacturer='Browserpass'>
<Package Id='*' Keywords='Installer' Manufacturer='Browserpass' InstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFiles64Folder' Name='PFiles'>
<Directory Id='INSTALLDIR' Name='Browserpass'>
<Component Id='MainExecutable' Guid='ABCDDCBA-83F1-4F22-985B-FDB3C8ABD471'>
<File Id='BrowserpassEXE' Name='browserpass-windows64.exe' Source='browserpass-windows64.exe' KeyPath='yes'/>
<File Id='ChromiumHostJSON' Name='chromium-host.json' Source='browser-files/chromium-host.json' />
<File Id='ChromiumPolicyJSON' Name='chromium-policy.json' Source='browser-files/chromium-policy.json' />
<File Id='FirefoxHostJSON' Name='firefox-host.json' Source='browser-files/firefox-host.json' />
<RegistryKey Id='ChromeNativeMessaging' Root='HKLM' Key='Software\Google\Chrome\NativeMessagingHosts\com.github.browserpass.native' >
<RegistryValue Type='string' Name='' Value='C:\Program Files\Browserpass\chromium-host.json'/>
</RegistryKey>
<RegistryKey Id='FirefoxNativeMessaging' Root='HKLM' Key='Software\Mozilla\NativeMessagingHosts\com.github.browserpass.native' >
<RegistryValue Type='string' Name='' Value='C:\Program Files\Browserpass\firefox-host.json'/>
</RegistryKey>
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id='Complete' Level='1'>
<ComponentRef Id='MainExecutable' />
</Feature>
</Product>
</Wix>