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

Commit aec2d05

Browse files
committed
Merge pull request #264 from adobe/linux
Update Linux to CEF 3.1453.1255
2 parents e2c899c + a915a0a commit aec2d05

16 files changed

+1064
-273
lines changed

.gitignore

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,21 @@ libcef_dll
3939
tools
4040

4141
/installer/mac/staging/
42-
42+
/installer/linux/brackets.deb
43+
/installer/linux/debian/usr/lib/
4344
/installer/win/staging/
4445
*.wixpdb
4546
*.wixobj
4647
bracketsharvestmanager.wxs
4748
fr-fr.mst
49+
50+
appshell.gyp
51+
appshell_extensions_js.o
52+
Makefile
53+
appshell.Makefile
54+
Brackets.target.mk
55+
libcef_dll_wrapper.target.mk
56+
appshell/gtk
57+
appshell/gtk/*
58+
4859
appshell/node-core/node_modules

Gruntfile.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ module.exports = function (grunt) {
2727

2828
var common = require("./tasks/common")(grunt),
2929
resolve = common.resolve,
30-
staging = (common.platform() === "mac") ? "installer/mac/staging/<%= build.name %>.app/Contents" : "installer/win/staging";
30+
staging;
31+
32+
if (common.platform() === "mac") {
33+
staging = "installer/mac/staging/<%= build.name %>.app/Contents"
34+
} else if (common.platform() === "win") {
35+
staging = "installer/win/staging";
36+
} else {
37+
staging = "installer/linux/debian/usr/lib/brackets";
38+
}
3139

3240
grunt.initConfig({
3341
"pkg": grunt.file.readJSON("package.json"),
@@ -63,8 +71,10 @@ module.exports = function (grunt) {
6371
"downloads" : ["downloads"],
6472
"installer-mac" : ["installer/mac/*.dmg"],
6573
"installer-win" : ["installer/win/*.msi"],
74+
"installer-linux" : ["installer/linux/brackets.deb"],
6675
"staging-mac" : ["installer/mac/staging"],
6776
"staging-win" : ["installer/win/staging"],
77+
"staging-linux" : ["<%= build.staging %>"],
6878
"www" : ["<%= build.staging %>/www", "<%= build.staging %>/samples"]
6979
},
7080
"copy": {
@@ -106,6 +116,23 @@ module.exports = function (grunt) {
106116
]
107117
},
108118
*/
119+
"linux": {
120+
"files": [
121+
{
122+
"expand" : true,
123+
"cwd" : "out/Release",
124+
"src" : [
125+
"lib/**",
126+
"locales/**",
127+
"appshell.ico",
128+
"Brackets",
129+
"cef.pak",
130+
"devtools_resources.pak"
131+
],
132+
"dest" : "<%= build.staging %>"
133+
}
134+
]
135+
},
109136
"www": {
110137
"files": [
111138
{

appshell.gyp.txt

Lines changed: 99 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
{
66
'variables': {
7+
'pkg-config': 'pkg-config',
8+
'target_arch%': 'environment',
79
'chromium_code': 1,
810
'conditions': [
911
[ 'OS=="mac"', {
@@ -209,10 +211,62 @@
209211
'<@(appshell_sources_mac)',
210212
],
211213
}],
212-
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
214+
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
215+
'actions': [
216+
{
217+
'action_name': 'appshell_extensions_js',
218+
'inputs': [
219+
'appshell/appshell_extensions.js',
220+
],
221+
'outputs': [
222+
'appshell_extensions_js.o',
223+
],
224+
'action': [
225+
'objcopy',
226+
'--input',
227+
'binary',
228+
'--output',
229+
'<(output_bfd)',
230+
'--binary-architecture',
231+
'i386',
232+
'<@(_inputs)',
233+
'<@(_outputs)',
234+
],
235+
'message': 'compiling js resource'
236+
},
237+
{
238+
'action_name': 'appicon',
239+
'inputs': [
240+
'appshell/res/appshell.ico',
241+
],
242+
'outputs': [
243+
'appshell/gtk/appicon.h',
244+
],
245+
'action': '<!(mkdir -p appshell/gtk; gdk-pixbuf-csource --name=appicon appshell/res/appshell.ico > appshell/gtk/appicon.h)',
246+
#Such a hack. GYP let me do bash redirections!
247+
},
248+
],
249+
'cflags': [
250+
'<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)',
251+
'<(march)',
252+
],
253+
'include_dirs': [
254+
'.',
255+
],
256+
'default_configuration': 'Release',
257+
'configurations': {
258+
'Release': {},
259+
'Debug': {},
260+
},
213261
'copies': [
214262
{
215-
'destination': '<(PRODUCT_DIR)/files',
263+
'destination': '<(PRODUCT_DIR)/lib',
264+
'files': [
265+
'<@(appshell_bundle_libraries_linux)',
266+
],
267+
},
268+
{
269+
'destination': '<(PRODUCT_DIR)',
216270
'files': [
217271
'<@(appshell_bundle_resources_linux)',
218272
],
@@ -222,6 +276,18 @@
222276
'<@(includes_linux)',
223277
'<@(appshell_sources_linux)',
224278
],
279+
'link_settings': {
280+
'ldflags': [
281+
'<!@(<(pkg-config) --libs-only-other gtk+-2.0 gthread-2.0)',
282+
'-Wl,-rpath,\$$ORIGIN/lib',
283+
'<(march)'
284+
],
285+
'libraries': [
286+
'<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)',
287+
'$(BUILDTYPE)/libcef.so',
288+
'appshell_extensions_js.o',
289+
],
290+
},
225291
}],
226292
],
227293
},
@@ -254,6 +320,19 @@
254320
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
255321
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
256322
},
323+
'conditions': [
324+
['OS=="linux"', {
325+
'cflags': [
326+
'<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)',
327+
'<(march)',
328+
],
329+
'default_configuration': 'Release',
330+
'configurations': {
331+
'Release': {},
332+
'Debug': {},
333+
},
334+
}]
335+
]
257336
},
258337
],
259338
'conditions': [
@@ -323,5 +402,23 @@
323402
}, # target appshell_helper_app
324403
],
325404
}], # OS=="mac"
405+
['target_arch=="ia32"', {
406+
'variables': {
407+
'output_bfd': 'elf32-i386',
408+
'march': '-m32',
409+
},
410+
}],
411+
['target_arch=="x64"', {
412+
'variables': {
413+
'output_bfd': 'elf64-x86-64',
414+
'march': '-m64',
415+
},
416+
}],
417+
['target_arch=="environment"', {
418+
'variables': {
419+
'output_bfd': '<!(uname -m | sed "s/x86_64/elf64-x86-64/;s/i.86/elf32-i386/")',
420+
'march': ' ',
421+
},
422+
}],
326423
],
327424
}

0 commit comments

Comments
 (0)