Skip to content

Commit 08cef57

Browse files
authored
Merge pull request #256 from evolus/development
added support for linux i386.
2 parents f4ded54 + 6b3b7e7 commit 08cef57

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ before_install:
4848
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git lfs pull; fi
4949
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -L https://github.com/github/git-lfs/releases/download/v1.2.0/git-lfs-linux-amd64-1.2.0.tar.gz | tar -xz; fi
5050
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git-lfs-1.2.0/git-lfs pull; fi
51-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y ruby-dev gcc make; fi
51+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y ruby-dev gcc make gcc-multilib g++-multilib; fi
5252
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then gem install --no-ri --no-rdoc fpm; fi
5353

5454
install:
5555
- nvm install $NODE_VERSION
5656
- npm install
5757

5858
script:
59-
- npm run dist
59+
- npm run dist:$TRAVIS_OS_NAME
6060

6161
branches:
6262
only:

app/pencil-core/common/DocumentHandler.js

+13
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ DocumentHandler.prototype.loadDocument = function(filePath, callback){
8383
}
8484
}
8585

86+
DocumentHandler.prototype.loadDocumentFromArguments = function(filePath){
87+
var ext = path.extname(filePath);
88+
var handler = this.fileHandler[ext];
89+
if (handler && handler.loadDocument) {
90+
var thiz = this;
91+
handler.loadDocument(filePath, function () {
92+
if (handler.saveDocument != null) {
93+
thiz.actived(ext);
94+
}
95+
});
96+
}
97+
}
98+
8699
DocumentHandler.prototype.pickupTargetFileToSave = function (callback) {
87100
var filters = [];
88101
var defaultFileType = this.getDefaultFileType();

app/pencil-core/common/pencil.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ Pencil.boot = function (event) {
164164
Pencil.handleArguments = function() {
165165
var remote = require('electron').remote;
166166
var appArguments = remote.getGlobal('sharedObject').appArguments;
167-
if (appArguments && appArguments.length > 1 && !Util.isDev()) {
168-
Pencil.documentHandler.loadDocument(appArguments[1], function() {});
167+
if (appArguments && appArguments.length > 1) {
168+
Pencil.documentHandler.loadDocumentFromArguments(appArguments[1]);
169169
}
170170
};
171171
Pencil.setTitle = function (s) {

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Pencil",
33
"devDependencies": {
4-
"electron-builder": "13.0.0",
4+
"electron-builder": "13.3.0",
55
"electron": "1.4.14",
66
"rimraf": "^2.5.4"
77
},
@@ -14,7 +14,7 @@
1414
},
1515
"dmg": {
1616
"contents": [{
17-
"x": 355,
17+
"x": 356,
1818
"y": 140,
1919
"type": "link",
2020
"path": "/Applications"
@@ -51,8 +51,8 @@
5151
"cache": ".electron-cache"
5252
},
5353
"fileAssociations": {
54-
"ext": ["ep", "epz", "epgz"],
55-
"name": "Pencil Document"
54+
"ext": ["ep", "epz", "epgz"],
55+
"name": "Pencil Document"
5656
}
5757
},
5858
"scripts": {
@@ -64,9 +64,9 @@
6464
"pack": "build",
6565
"dist": "build",
6666
"release": "build",
67-
"dist:linux": "./node_modules/.bin/build --linux --x64",
67+
"dist:linux": "./node_modules/.bin/build --linux --ia32 --x64",
6868
"dist:win32": "./node_modules/.bin/build --windows --ia32 --x64",
69-
"dist:darwin": "./node_modules/.bin/build --osx"
69+
"dist:osx": "./node_modules/.bin/build --macos"
7070
},
7171
"private": true
7272
}

0 commit comments

Comments
 (0)