Merge branch 'master' into master-windows-changes

This commit is contained in:
Martin Dosch 2020-05-03 11:11:19 +02:00
commit 64260ee8c0
5 changed files with 87 additions and 0 deletions

View file

@ -0,0 +1,23 @@
# Dino Windows Installer
## Requirements
To create the Dino windows installer you need this:
* nsis (e.g. `apt install nsis` on Debian)
* Dino compiled for windows in input directory
* logo.ico in input directory
* Download https://dino.im/img/logo.svg
* Convert it to ico (e.g. `convert -background transparent -define 'icon:auto-resize=16,24,32,64' logo.svg logo.ico` (requires imagemagick)
## Create installer
Simply run `makensis dino.nsi`
## ToDo
* Create a [good looking MUI Installer](https://nsis.sourceforge.io/Docs/Modern%20UI/Readme.html)
* Sign the installer
* Requires to [buy a certificate](https://comodosslstore.com/resources/free-code-signing-certificate/)
* Maybe there can be a [free one for open source programs](https://www.codenotary.io/with-codenotary-you-never-have-to-pay-for-code-signing-certificates-again/) - Not yet read thoroughly whether there is a catch.
* https://stackoverflow.com/questions/9527160/sign-nsis-installer-on-linux-box
* https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Signing_an_executable_with_Authenticode

View file

@ -0,0 +1,52 @@
Unicode True
!define MUI_PRODUCT "Dino"
!define MUI_PRODUCT_NAME ${MUI_PRODUCT}
!define PRODUCT_WEBSITE "https://dino.im"
!define MUI_ICON "input/logo.ico"
!define ICON "input/logo.ico"
# define installer name
OutFile "dino-installer.exe"
BrandingText "Dino - Communicating happiness"
# set install directory
InstallDir $PROGRAMFILES64\dino
# default section start
Section
# Install binary and DLLs
SetOutPath $INSTDIR\bin
File input/*.dll input/dino.exe
# Install the libs and shared files
SetOutPath $INSTDIR
File /r /x dino.exe /x plugins /x ./*.dll input/*
# Install the plugins
SetOutPath $INSTDIR\lib\dino\plugins
File input/plugins/*
# define uninstaller name
WriteUninstaller $INSTDIR\uninstaller.exe
# Create a shortcut for startmenu
CreateShortcut "$SMPROGRAMS\dino.lnk" "$INSTDIR\bin\dino.exe" "" "$INSTDIR\logo.ico"
# default section end
SectionEnd
# Uninsaller section
Section "Uninstall"
# Always delete uninstaller first
Delete $INSTDIR\uninstaller.exe
# now delete installed file
Delete $INSTDIR\*
# Delete the directory
RMDir /r $INSTDIR
SectionEnd

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.6 KiB

11
windows-installer/sign.sh Normal file
View file

@ -0,0 +1,11 @@
#! /bin/bash
signcode \
-spc TODO.spc \
-v TODO.pvk \
-a sha1 -$ commercial \
-n Dino \
-i https://dino.im/ \
-t http://timestamp.verisign.com/scripts/timstamp.dll \
-tr 10 \
dino-installer.exe