Skip to content

Commit e45872a

Browse files
committed
Merge branch 'master' of github.com:loopline-systems/electron-builder
2 parents 23c9290 + 55bbd44 commit e45872a

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ config.json.sample:
105105
},
106106
"win" : {
107107
"title" : "Loopline Systems",
108+
"version" : "x.x.x.x",
108109
"icon" : "assets/win/icon.ico",
109110
"nsiTemplate" : "path/to/custom/installer.nsi.tpl"
110111
}
@@ -129,6 +130,9 @@ This property contains the configuration for the OSX dmg window. This property i
129130
### `win.title`
130131
Title of your application shown in generated windows installer.
131132

133+
### `win.version`
134+
Version of your application shown in add/remove programs list.
135+
132136
### `win.icon`
133137
Icon to be shown in installation process.
134138

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
var platforms = require( './lib/platforms' );
1111
var path = require( 'path' );
1212
var fs = require( 'fs' );
13+
var mkdirp = require( 'mkdirp' );
1314

1415
/**
1516
* Prototype for electron-builder
@@ -42,7 +43,7 @@ var Builder = {
4243
// directory exists
4344
if ( !fs.existsSync( options.out ) ) {
4445
options.log( '- Ouput directory ´' + options.out + '´ does not exist ' );
45-
fs.mkdirSync( options.out );
46+
mkdirp.sync( options.out );
4647
options.log( '- Created ´' + options.out + '´ ' );
4748
}
4849

lib/win.js

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ var WinBuilder = {
3232
var configFilePath = writeConfigFile( nsiTemplate, {
3333
appPath : _windowsify( options.appPath ),
3434
name : options.config.win.title,
35+
version : options.config.win.version,
3536
out : _windowsify( options.out )
3637
} );
3738

package.json

+20-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,23 @@
1212
"url": "https://github.com/loopline-systems/electron-builder.git"
1313
},
1414
"keywords": [
15-
"electron"
15+
"electron",
16+
"builder",
17+
"build",
18+
"installer",
19+
"install",
20+
"packager",
21+
"pack",
22+
"nsis",
23+
"appdmg",
24+
"app",
25+
"dmg",
26+
"msi",
27+
"exe",
28+
"setup",
29+
"Windows",
30+
"OS X",
31+
"Mac"
1632
],
1733
"bin": {
1834
"electron-builder": "cli.js"
@@ -28,7 +44,8 @@
2844
"lodash.assign": "^3.2.0",
2945
"lodash.camelcase": "^3.0.1",
3046
"lodash.template": "^3.6.1",
31-
"meow": "^3.1.0"
47+
"meow": "^3.1.0",
48+
"mkdirp": "^0.5.1"
3249
},
3350
"optionalDependencies": {
3451
"appdmg": "^0.3.1"
@@ -37,7 +54,7 @@
3754
"eslint": "^0.21.2",
3855
"proxyquire": "^1.5.0",
3956
"tap-nyan": "0.0.2",
40-
"tap-spec": "^3.0.0",
57+
"tap-spec": "^4.1.1",
4158
"tape": "^4.0.0",
4259
"tmp": "0.0.28"
4360
}

templates/installer.nsi.tpl

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
!define APP_NAME "<%= name %>"
2+
!define APP_VERSION "<%= version %>"
23
!define APP_DIR "${APP_NAME}"
34

45
Name "${APP_NAME}"
@@ -58,6 +59,8 @@ Section
5859
"UninstallString" "$INSTDIR\Uninstall ${APP_NAME}.exe"
5960
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
6061
"DisplayIcon" "$INSTDIR\icon.ico"
62+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
63+
"DisplayVersion" "$APP_VERSION"
6164
SectionEnd
6265

6366
# create a section to define what the uninstaller does

0 commit comments

Comments
 (0)