Skip to content

Commit

Permalink
Merge pull request #256 from evolus/development
Browse files Browse the repository at this point in the history
added support for linux i386.
  • Loading branch information
mbrainiac authored Feb 9, 2017
2 parents f4ded54 + 6b3b7e7 commit 08cef57
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git lfs pull; fi
- 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
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git-lfs-1.2.0/git-lfs pull; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y ruby-dev gcc make; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y ruby-dev gcc make gcc-multilib g++-multilib; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then gem install --no-ri --no-rdoc fpm; fi

install:
- nvm install $NODE_VERSION
- npm install

script:
- npm run dist
- npm run dist:$TRAVIS_OS_NAME

branches:
only:
Expand Down
13 changes: 13 additions & 0 deletions app/pencil-core/common/DocumentHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ DocumentHandler.prototype.loadDocument = function(filePath, callback){
}
}

DocumentHandler.prototype.loadDocumentFromArguments = function(filePath){
var ext = path.extname(filePath);
var handler = this.fileHandler[ext];
if (handler && handler.loadDocument) {
var thiz = this;
handler.loadDocument(filePath, function () {
if (handler.saveDocument != null) {
thiz.actived(ext);
}
});
}
}

DocumentHandler.prototype.pickupTargetFileToSave = function (callback) {
var filters = [];
var defaultFileType = this.getDefaultFileType();
Expand Down
4 changes: 2 additions & 2 deletions app/pencil-core/common/pencil.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ Pencil.boot = function (event) {
Pencil.handleArguments = function() {
var remote = require('electron').remote;
var appArguments = remote.getGlobal('sharedObject').appArguments;
if (appArguments && appArguments.length > 1 && !Util.isDev()) {
Pencil.documentHandler.loadDocument(appArguments[1], function() {});
if (appArguments && appArguments.length > 1) {
Pencil.documentHandler.loadDocumentFromArguments(appArguments[1]);
}
};
Pencil.setTitle = function (s) {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Pencil",
"devDependencies": {
"electron-builder": "13.0.0",
"electron-builder": "13.3.0",
"electron": "1.4.14",
"rimraf": "^2.5.4"
},
Expand All @@ -14,7 +14,7 @@
},
"dmg": {
"contents": [{
"x": 355,
"x": 356,
"y": 140,
"type": "link",
"path": "/Applications"
Expand Down Expand Up @@ -51,8 +51,8 @@
"cache": ".electron-cache"
},
"fileAssociations": {
"ext": ["ep", "epz", "epgz"],
"name": "Pencil Document"
"ext": ["ep", "epz", "epgz"],
"name": "Pencil Document"
}
},
"scripts": {
Expand All @@ -64,9 +64,9 @@
"pack": "build",
"dist": "build",
"release": "build",
"dist:linux": "./node_modules/.bin/build --linux --x64",
"dist:linux": "./node_modules/.bin/build --linux --ia32 --x64",
"dist:win32": "./node_modules/.bin/build --windows --ia32 --x64",
"dist:darwin": "./node_modules/.bin/build --osx"
"dist:osx": "./node_modules/.bin/build --macos"
},
"private": true
}

0 comments on commit 08cef57

Please sign in to comment.