Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit 4d58588

Browse files
author
Marcel Gerber
committed
Merge remote-tracking branch 'upstream/master' into sprint-to-release-fixup
Conflicts: tasks/build.js
2 parents a3b82de + a0de7f8 commit 4d58588

File tree

4 files changed

+104
-63
lines changed

4 files changed

+104
-63
lines changed

CEF-Info.plist

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>BuildMachineOSBuild</key>
6+
<string>11G56</string>
7+
<key>CFBundleDevelopmentRegion</key>
8+
<string>English</string>
9+
<key>CFBundleExecutable</key>
10+
<string>libcef</string>
11+
<key>CFBundleGetInfoString</key>
12+
<string>CEF 1547</string>
13+
<key>CFBundleIdentifier</key>
14+
<string>com.cef</string>
15+
<key>CFBundleInfoDictionaryVersion</key>
16+
<string>6.0</string>
17+
<key>CFBundleName</key>
18+
<string>cef</string>
19+
<key>CFBundlePackageType</key>
20+
<string>FMWK</string>
21+
<key>CFBundleShortVersionString</key>
22+
<string>1547</string>
23+
<key>CFBundleSignature</key>
24+
<string>????</string>
25+
<key>CFBundleVersion</key>
26+
<string>1547</string>
27+
<key>DTCompiler</key>
28+
<string>com.apple.compilers.llvm.clang.1_0</string>
29+
<key>DTPlatformBuild</key>
30+
<string>4G2008a</string>
31+
<key>DTPlatformVersion</key>
32+
<string>GM</string>
33+
<key>DTSDKBuild</key>
34+
<string>11E52</string>
35+
<key>DTSDKName</key>
36+
<string>macosx10.7</string>
37+
<key>DTXcode</key>
38+
<string>0452</string>
39+
<key>DTXcodeBuild</key>
40+
<string>4G2008a</string>
41+
</dict>
42+
</plist>

Gruntfile.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ module.exports = function (grunt) {
118118
}
119119
]
120120
},
121-
// FIXME: see stage-mac task issues with copying .app bundles
122-
/*
123121
"mac": {
124122
"files": [
125123
{
@@ -128,9 +126,19 @@ module.exports = function (grunt) {
128126
"src" : ["**"],
129127
"dest" : "installer/mac/staging/<%= build.name %>.app/"
130128
}
129+
],
130+
options: {
131+
mode: true
132+
}
133+
},
134+
"cefplist" : {
135+
"files": [
136+
{
137+
"src" : "CEF-Info.plist",
138+
"dest" : "installer/mac/staging/<%= build.name %>.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources/Info.plist"
139+
}
131140
]
132141
},
133-
*/
134142
"linux": {
135143
"files": [
136144
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"grunt": "0.4.1",
1616
"grunt-cli": "0.1.6",
1717
"grunt-contrib-jshint": "0.2.0",
18-
"grunt-contrib-copy": "0.4.0",
18+
"grunt-contrib-copy": "0.5.0",
1919
"grunt-contrib-clean": "0.4.0",
2020
"guid": "0.0.10",
2121
"grunt-curl": "2.0.2",

tasks/build.js

Lines changed: 50 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
/*
22
* Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
3-
*
3+
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
5-
* copy of this software and associated documentation files (the "Software"),
6-
* to deal in the Software without restriction, including without limitation
7-
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8-
* and/or sell copies of the Software, and to permit persons to whom the
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
99
* Software is furnished to do so, subject to the following conditions:
10-
*
10+
*
1111
* The above copyright notice and this permission notice shall be included in
1212
* all copies or substantial portions of the Software.
13-
*
13+
*
1414
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1616
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19-
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2020
* DEALINGS IN THE SOFTWARE.
21-
*
21+
*
2222
*/
2323
/*jslint vars:true, regexp:true, nomen:true*/
2424
/*global module, require, process*/
2525

2626
module.exports = function (grunt) {
2727
"use strict";
28-
28+
2929
var fs = require("fs"),
3030
common = require("./common")(grunt),
3131
q = require("q"),
@@ -34,20 +34,20 @@ module.exports = function (grunt) {
3434
resolve = common.resolve,
3535
platform = common.platform(),
3636
_ = grunt.util._;
37-
37+
3838
function getBracketsEnv() {
3939
var env = _.extend(process.env);
40-
40+
4141
env.BRACKETS_SRC = resolve(grunt.config("git.www.repo"));
4242
env.BRACKETS_APP_NAME = grunt.config("build.name");
43-
43+
4444
return env;
4545
}
46-
46+
4747
// task: full-build
4848
grunt.registerTask("full-build", ["git", "create-project", "build-www", "build", "stage", "package"]);
4949
grunt.registerTask("installer", ["full-build", "build-installer"]);
50-
50+
5151
// task: build
5252
grunt.registerTask("build", "Build shell executable. Run 'grunt full-build' to update repositories, build the shell and package www files.", function (wwwBranch, shellBranch) {
5353
grunt.task.run("build-" + platform);
@@ -63,11 +63,11 @@ module.exports = function (grunt) {
6363
return false;
6464
}
6565
});
66-
66+
6767
// task: build-mac
6868
grunt.registerTask("build-mac", "Build mac shell", function () {
6969
var done = this.async();
70-
70+
7171
spawn([
7272
"xcodebuild -project appshell.xcodeproj -config Release clean",
7373
"xcodebuild -project appshell.xcodeproj -config Release build"
@@ -83,44 +83,44 @@ module.exports = function (grunt) {
8383
done(false);
8484
});
8585
});
86-
86+
8787
// task: build-win
8888
grunt.registerTask("build-win", "Build windows shell", function () {
8989
var done = this.async();
90-
90+
9191
spawn("cmd.exe /c scripts\\build_projects.bat").then(function () {
9292
done();
9393
}, function (err) {
9494
grunt.log.error(err);
9595
done(false);
9696
});
9797
});
98-
98+
9999
// task: build-linux
100100
grunt.registerTask("build-linux", "Build linux shell", function () {
101101
var done = this.async();
102-
102+
103103
spawn("make").then(function () {
104104
done();
105105
}, function (err) {
106106
grunt.log.error(err);
107107
done(false);
108108
});
109109
});
110-
110+
111111
// task: git
112112
grunt.registerMultiTask("git", "Pull specified repo branch from origin", function () {
113113
var repo = this.data.repo;
114-
114+
115115
if (!repo) {
116116
grunt.fail.fatal("Missing repo config");
117117
}
118-
118+
119119
repo = resolve(repo);
120-
120+
121121
if (this.data.branch) {
122122
grunt.log.writeln("Updating repo " + this.target + " at " + repo + " to branch " + this.data.branch);
123-
123+
124124
var done = this.async(),
125125
promise = spawn([
126126
"git fetch origin",
@@ -129,7 +129,7 @@ module.exports = function (grunt) {
129129
"git submodule sync",
130130
"git submodule update --init --recursive"
131131
], { cwd: repo });
132-
132+
133133
promise.then(function () {
134134
done();
135135
}, function (err) {
@@ -140,84 +140,75 @@ module.exports = function (grunt) {
140140
grunt.log.writeln("Skipping fetch for " + this.target + " repo");
141141
}
142142
});
143-
143+
144144
// task: stage
145145
grunt.registerTask("stage", "Stage release files", function () {
146146
// stage platform-specific binaries
147147
grunt.task.run(["clean:staging-" + platform, "stage-" + platform]);
148148
});
149-
149+
150150
// task: stage-mac
151151
grunt.registerTask("stage-mac", "Stage mac executable files", function () {
152-
var done = this.async();
153-
154-
// this should have been a grunt-contrib-copy task "copy:mac", but something goes wrong when creating the .app folder
155-
spawn([
156-
"mkdir installer/mac/staging",
157-
"cp -R xcodebuild/Release/" + grunt.config("build.name") + ".app installer/mac/staging/"
158-
]).then(function () {
159-
done();
160-
}, function (err) {
161-
grunt.log.error(err);
162-
done(false);
163-
});
152+
// stage platform-specific binaries, then package www files
153+
grunt.task.run("copy:mac");
154+
grunt.task.run("copy:cefplist");
164155
});
165-
156+
166157
// task: stage-win
167158
grunt.registerTask("stage-win", "Stage win executable files", function () {
168159
// stage platform-specific binaries, then package www files
169160
grunt.task.run("copy:win");
170161
});
171-
162+
172163
// task: stage-linux
173164
grunt.registerTask("stage-linux", "Stage linux executable files", function () {
174165
// stage platform-specific binaries, then package www files
175166
grunt.task.run("copy:linux");
176167
});
177-
168+
178169
// task: package
179170
grunt.registerTask("package", "Package www files", function () {
180171
grunt.task.run(["clean:www", "copy:www", "copy:samples"]);
181172
});
182-
173+
183174
// task: build-installer
184175
grunt.registerTask("build-installer", "Build installer", function () {
185176
// TODO update brackets.config.json
186177
grunt.task.run(["clean:installer-" + platform, "build-installer-" + platform]);
187178
});
188-
179+
189180
// task: build-installer-mac
190181
grunt.registerTask("build-installer-mac", "Build mac installer", function () {
191182
var done = this.async();
192-
183+
193184
spawn(["bash buildInstaller.sh"], { cwd: resolve("installer/mac"), env: getBracketsEnv() }).then(function () {
194185
done();
195186
}, function (err) {
196187
grunt.log.error(err);
197188
done(false);
198189
});
199190
});
200-
191+
201192
// task: build-installer-win
202193
grunt.registerTask("build-installer-win", "Build windows installer", function () {
203194
var done = this.async();
204-
195+
205196
spawn(["cmd.exe /c ant.bat -f brackets-win-install-build.xml"], { cwd: resolve("installer/win"), env: getBracketsEnv() }).then(function () {
206197
done();
207198
}, function (err) {
208199
grunt.log.error(err);
209200
done(false);
210201
});
211202
});
212-
203+
213204
// task: build-installer-linux
214205
grunt.registerTask("build-installer-linux", "Build linux installer", function () {
215206
grunt.task.requires(["package"]);
216-
207+
217208
var template = grunt.file.read("installer/linux/debian/control"),
218209
templateData = {},
219210
content;
220-
211+
221212
// populate debian control template fields
222213
templateData.version = grunt.file.readJSON(grunt.config("config-json")).version;
223214
templateData.size = 0;
@@ -228,15 +219,15 @@ module.exports = function (grunt) {
228219
templateData.size += fs.statSync(abspath).size;
229220
});
230221
templateData.size = Math.round(templateData.size / 1000);
231-
222+
232223
// write file
233224
content = grunt.template.process(template, { data: templateData });
234225
grunt.file.write("installer/linux/debian/package-root/DEBIAN/control", content);
235-
226+
236227
var done = this.async(),
237228
version = semver.parse(grunt.config("pkg").version),
238229
release = version.major + "." + version.minor;
239-
230+
240231
spawn(["bash build_installer.sh"], { cwd: resolve("installer/linux"), env: getBracketsEnv() }).then(function () {
241232
return common.rename("installer/linux/brackets.deb", "installer/linux/Brackets Release " + release + " " + common.arch() + "-bit.deb");
242233
}).then(function () {
@@ -248,7 +239,7 @@ module.exports = function (grunt) {
248239
});
249240

250241
// task: build-linux-archive
251-
grunt.registerTask("build-linux-archive", "Build portable Linux .tar.gz", function() {
242+
grunt.registerTask("build-linux-archive", "Build portable Linux .tar.gz", function () {
252243
grunt.task.requires(["package"]);
253244

254245
var done = this.async(),

0 commit comments

Comments
 (0)