Skip to content

Commit 83a1de5

Browse files
author
Matt Karl
committed
Tasks for building 32-bit and 64-bit packages
1 parent 6635bed commit 83a1de5

File tree

14 files changed

+260
-64
lines changed

14 files changed

+260
-64
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SpringRollStudio",
3-
"version": "0.1.3",
3+
"version": "0.2.0",
44
"private": true,
55
"dependencies": {
66
"jqueryui": "*",

deploy/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<head>
44
<meta charset="utf-8">
55
<title>SpringRoll Studio</title>
6-
<link href="assets/css/libraries.css?v=0.1.3" rel="stylesheet">
7-
<link href="assets/css/main.css?v=0.1.3" rel="stylesheet">
8-
<script src="assets/js/libraries.js?v=0.1.3"></script>
9-
<script src="assets/js/main.js?v=0.1.3"></script>
6+
<link href="assets/css/libraries.css?v=0.2.0" rel="stylesheet">
7+
<link href="assets/css/main.css?v=0.2.0" rel="stylesheet">
8+
<script src="assets/js/libraries.js?v=0.2.0"></script>
9+
<script src="assets/js/main.js?v=0.2.0"></script>
1010
</head>
1111
<body>
1212
<div class="modules btn-group-vertical">

deploy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "SpringRollStudio",
33
"description": "Application for SpringRoll projects",
4-
"version": "0.1.3",
4+
"version": "0.2.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/SpringRoll/SpringRollStudio"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"x": 192,
1515
"y": 344,
1616
"type": "file",
17-
"path": "../build/SpringRollStudio/osx/SpringRollStudio.app"
17+
"path": "../build/SpringRollStudio/osx32/SpringRollStudio.app"
1818
}
1919
]
2020
}

installer/osx64.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"title": "SpringRollStudio",
3+
"icon": "../deploy/assets/images/icon.icns",
4+
"background": "assets/background.png",
5+
"icon-size": 80,
6+
"contents": [
7+
{
8+
"x": 448,
9+
"y": 344,
10+
"type": "link",
11+
"path": "/Applications"
12+
},
13+
{
14+
"x": 192,
15+
"y": 344,
16+
"type": "file",
17+
"path": "../build/SpringRollStudio/osx64/SpringRollStudio.app"
18+
}
19+
]
20+
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
!define DESCRIPTION "Application for SpringRoll projects"
44
# These three must be integers
55
!define VERSIONMAJOR 0
6-
!define VERSIONMINOR 1
7-
!define VERSIONBUILD 3
6+
!define VERSIONMINOR 2
7+
!define VERSIONBUILD 0
88
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
99
# It is possible to use "mailto:" links in here to open the email client
1010
!define HELPURL "https://github.com/SpringRoll/SpringRollStudio/issues"
@@ -15,7 +15,7 @@ Name "${APPNAME}"
1515
Icon "..\deploy\assets\images\icon.ico"
1616

1717
# define the resulting installer's name:
18-
OutFile "..\build\${APPNAME}-Setup.exe"
18+
OutFile "..\build\${APPNAME}-Setup-x32.exe"
1919

2020
# Destintation install directory
2121
InstallDir "$PROGRAMFILES\${APPNAME}"
@@ -29,12 +29,12 @@ Section
2929
# specify the files to go in the output path
3030
# these are the Windows files produced by grunt-node-webkit-builder
3131
File "../deploy/assets/images/icon.ico"
32-
File "../build/${APPNAME}/win/ffmpegsumo.dll"
33-
File "../build/${APPNAME}/win/icudtl.dat"
34-
File "../build/${APPNAME}/win/libEGL.dll"
35-
File "../build/${APPNAME}/win/libGLESv2.dll"
36-
File "../build/${APPNAME}/win/nw.pak"
37-
File "../build/${APPNAME}/win/${APPNAME}.exe"
32+
File "../build/${APPNAME}/win32/ffmpegsumo.dll"
33+
File "../build/${APPNAME}/win32/icudtl.dat"
34+
File "../build/${APPNAME}/win32/libEGL.dll"
35+
File "../build/${APPNAME}/win32/libGLESv2.dll"
36+
File "../build/${APPNAME}/win32/nw.pak"
37+
File "../build/${APPNAME}/win32/${APPNAME}.exe"
3838

3939
# define the uninstaller name
4040
WriteUninstaller "$INSTDIR\Uninstall.exe"

installer/win64.nsi

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
!define APPNAME "SpringRollStudio"
2+
!define COMPANYNAME "CloudKid"
3+
!define DESCRIPTION "Application for SpringRoll projects"
4+
# These three must be integers
5+
!define VERSIONMAJOR 0
6+
!define VERSIONMINOR 2
7+
!define VERSIONBUILD 0
8+
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
9+
# It is possible to use "mailto:" links in here to open the email client
10+
!define HELPURL "https://github.com/SpringRoll/SpringRollStudio/issues"
11+
!define UPDATEURL "https://github.com/SpringRoll/SpringRollStudio/releases"
12+
!define ABOUTURL "https://github.com/SpringRoll/SpringRollStudio"
13+
14+
Name "${APPNAME}"
15+
Icon "..\deploy\assets\images\icon.ico"
16+
17+
# define the resulting installer's name:
18+
OutFile "..\build\${APPNAME}-Setup-x64.exe"
19+
20+
# Destintation install directory
21+
InstallDir "$PROGRAMFILES\${APPNAME}"
22+
23+
# default section start
24+
Section
25+
26+
# define the path to which the installer should install
27+
SetOutPath "$INSTDIR"
28+
29+
# specify the files to go in the output path
30+
# these are the Windows files produced by grunt-node-webkit-builder
31+
File "../deploy/assets/images/icon.ico"
32+
File "../build/${APPNAME}/win64/ffmpegsumo.dll"
33+
File "../build/${APPNAME}/win64/icudtl.dat"
34+
File "../build/${APPNAME}/win64/libEGL.dll"
35+
File "../build/${APPNAME}/win64/libGLESv2.dll"
36+
File "../build/${APPNAME}/win64/nw.pak"
37+
File "../build/${APPNAME}/win64/${APPNAME}.exe"
38+
39+
# define the uninstaller name
40+
WriteUninstaller "$INSTDIR\Uninstall.exe"
41+
42+
# create a shortcut in the start menu
43+
CreateDirectory "$SMPROGRAMS\${APPNAME}"
44+
CreateShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
45+
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\${APPNAME}.exe" "" "$INSTDIR\icon.ico"
46+
47+
# Registry information for add/remove programs
48+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayName" "${COMPANYNAME} - ${APPNAME} - ${DESCRIPTION}"
49+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
50+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
51+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "InstallLocation" "$\"$INSTDIR$\""
52+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayIcon" "$\"$INSTDIR\icon.ico$\""
53+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "Publisher" "$\"${COMPANYNAME}$\""
54+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "HelpLink" "$\"${HELPURL}$\""
55+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "URLUpdateInfo" "$\"${UPDATEURL}$\""
56+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "URLInfoAbout" "$\"${ABOUTURL}$\""
57+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayVersion" "$\"${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}$\""
58+
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "VersionMajor" ${VERSIONMAJOR}
59+
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "VersionMinor" ${VERSIONMINOR}
60+
61+
# There is no option for modifying or repairing the install
62+
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoModify" 1
63+
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoRepair" 1
64+
65+
SectionEnd
66+
67+
# create a section to define what the uninstaller does
68+
Section "Uninstall"
69+
70+
# delete the uninstaller
71+
Delete $INSTDIR\Uninstall.exe
72+
73+
# delete the installed files
74+
Delete "$INSTDIR\icon.ico"
75+
Delete "$INSTDIR\ffmpegsumo.dll"
76+
Delete "$INSTDIR\icudt.dll"
77+
Delete "$INSTDIR\libEGL.dll"
78+
Delete "$INSTDIR\libGLESv2.dll"
79+
Delete "$INSTDIR\nw.pak"
80+
Delete "$INSTDIR\${APPNAME}.exe"
81+
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
82+
Delete "$SMPROGRAMS\${APPNAME}\Uninstall.lnk"
83+
rmDir "$SMPROGRAMS\${APPNAME}"
84+
rmDir $INSTDIR
85+
86+
# Remove uninstaller information from the registry
87+
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}"
88+
89+
SectionEnd

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "SpringRollStudio",
33
"private": true,
4-
"version": "0.1.3",
4+
"version": "0.2.0",
55
"dependencies": {
66
"grunt": "~0.4.5",
77
"grunt-exec": "~0.4.6",
8-
"grunt-node-webkit-builder": "^0.2.2",
8+
"grunt-node-webkit-builder": "~1.0.0",
99
"lodash": "~3.0.0",
1010
"project-grunt": "*"
1111
}

project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SpringRollStudio",
3-
"version": "0.1.3",
3+
"version": "0.2.0",
44
"main": [
55
"components/node-webkit-app/src/utils/UpdateChecker.js",
66
"components/node-webkit-app/src/NodeWebkitApp.js",

tasks/aliases.js

Lines changed: 66 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,72 @@
11
module.exports = function(grunt)
22
{
3-
grunt.registerTask('app', 'Build the Application', [
4-
'clean:main',
5-
'jshint:main',
6-
'uglify:app',
7-
'clean:css',
8-
'less:release',
9-
'moduleAppTasks',
10-
'libs',
11-
'exec:appModules',
12-
'nodewebkit'
13-
]);
3+
// Can build against a specific platform, for instance app:osx32
4+
// no platform will build for all platforms
5+
grunt.registerTask('app', 'Build the Application', function(platform)
6+
{
7+
grunt.task.run(
8+
'clean:main',
9+
'jshint:main',
10+
'uglify:app',
11+
'clean:css',
12+
'less:release',
13+
'moduleAppTasks',
14+
'libs',
15+
'exec:appModules',
16+
'nodewebkit:' + (platform || 'all')
17+
);
18+
});
1419

15-
grunt.registerTask('app-debug', 'Build the Application in debug mode', [
16-
'clean:main',
17-
'jshint:main',
18-
'concat:main',
19-
'replace:app',
20-
'clean:css',
21-
'less:development',
22-
'moduleAppTasksDebug',
23-
'libs-debug',
24-
'exec:appModules',
25-
'nodewebkit'
26-
]);
20+
// Same as the app task except that the code is build in DEBUG mode
21+
grunt.registerTask('app-debug', 'Build the Application in debug mode', function(platform)
22+
{
23+
grunt.task.run(
24+
'clean:main',
25+
'jshint:main',
26+
'concat:main',
27+
'replace:app',
28+
'clean:css',
29+
'less:development',
30+
'moduleAppTasksDebug',
31+
'libs-debug',
32+
'exec:appModules',
33+
'nodewebkit:' + (platform || 'all')
34+
);
35+
});
2736

28-
grunt.registerTask('package', [
29-
'clean:installers',
30-
'exec:createWinInstall',
31-
'exec:createOSXInstall'
32-
]);
37+
// Package the app into the installers
38+
// which are user-friend packages for installing
39+
// on the user's platform
40+
grunt.registerTask('package', function(platform)
41+
{
42+
var tasks = ['clean:installers'];
3343

34-
grunt.registerTask(
35-
'open',
36-
'Open the OS X App',
37-
['exec:openOSXApp']
38-
);
44+
// Package a single platform
45+
if (platform)
46+
{
47+
tasks.push('exec:package' + platform);
48+
}
49+
// Package all platforms
50+
else
51+
{
52+
tasks.push(
53+
'exec:packagewin32',
54+
'exec:packagewin64',
55+
'exec:packageosx32',
56+
'exec:packageosx64'
57+
);
58+
}
59+
grunt.task.run(tasks);
60+
});
61+
62+
// Open the application directly
63+
grunt.registerTask('open', 'Open the App', function(platform)
64+
{
65+
if (!platform)
66+
{
67+
grunt.fail.fatal("Open must have a platform, e.g.,'osx64'");
68+
return;
69+
}
70+
grunt.task.run('exec:open' + platform);
71+
});
3972
};

0 commit comments

Comments
 (0)