Skip to content

Commit

Permalink
Merge pull request #83 from demetris-manikas/FEAT-win-uninstall-info
Browse files Browse the repository at this point in the history
Added publisher and size shown in win uninstall
  • Loading branch information
stefanjudis committed Dec 23, 2015
2 parents de98154 + 3a676f6 commit 9122b6c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ config.json.sample:
"win" : {
"title" : "Loopline Systems",
"version" : "x.x.x.x",
"publisher": "Publisher Info",
"icon" : "assets/win/icon.ico",
"verbosity": 1,
"nsiTemplate" : "path/to/custom/installer.nsi.tpl", // optional
Expand Down Expand Up @@ -142,6 +143,9 @@ Title of your application shown in generated windows installer.
### `win.version`
Version of your application shown in add/remove programs list.

### `win.publisher`
Publisher shown in add/remove programs list.

### `win.icon`
Icon to be shown in installation process.

Expand Down
11 changes: 6 additions & 5 deletions lib/win.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ var WinBuilder = {
options.log( '- Starting creation of installer for ´' + options.platform );

var win = options.config.win;
var nsiTemplate = win.nsiTemplate || path.join(
__dirname,
'..',
'templates/installer.nsi.tpl'

var nsiTemplate = win.nsiTemplate || path.join(
__dirname,
'..',
'templates/installer.nsi.tpl'
);

var configFilePath = writeConfigFile( nsiTemplate, {
appPath : _windowsify( options.appPath ),
name : win.title,
version : win.version,
fileAssociation : win.fileAssociation,
publisher : win.publisher,
out : _windowsify( options.out )
} );

Expand Down
12 changes: 11 additions & 1 deletion templates/installer.nsi.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
!define APP_NAME "<%= name %>"
!define APP_VERSION "<%= version %>"
!define APP_PUBLISHER "<%= publisher %>"

!define APP_DIR "${APP_NAME}"

Name "${APP_NAME}"
Expand All @@ -8,9 +10,9 @@ Name "${APP_NAME}"
!define MUI_ICON "icon.ico"
!define MUI_UNICON "icon.ico"


!addplugindir .
!include "nsProcess.nsh"
!include "FileFunc.nsh"

<% if(fileAssociation){ %>
# include file association script
Expand Down Expand Up @@ -88,6 +90,14 @@ Section
"DisplayIcon" "$INSTDIR\icon.ico"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"DisplayVersion" "${APP_VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"Publisher" "${APP_PUBLISHER}"

${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"EstimatedSize" "$0"

SectionEnd

# create a section to define what the uninstaller does
Expand Down

0 comments on commit 9122b6c

Please sign in to comment.