Skip to content

Commit

Permalink
Fix loading of files by double clicking them in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Humfrey authored and Joseph Humfrey committed Jun 21, 2016
1 parent 59f5951 commit a1bc21d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions BUILD_FOR_WINDOWS.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
electron-packager app Inky --platform=win32 --arch=x64 --icon=resources/Icon1024.png.ico --prune --asar --asar-unpack="inklecate_win.exe" --ignore="inklecate_mac" --version-string.ProductName="Inky" --version-string.CompanyName="inkle Ltd" --version-string.FileDescription="Inky" --version-string.OriginalFilename="Inky" --version-string.InternalName="Inky" --overwrite
11 changes: 6 additions & 5 deletions app/main-process/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ app.on('will-finish-launching', function() {
event.preventDefault();
});

if( process.platform == "win32" && process.argv.length > 1 ) {
var fileToOpen = process.argv[1];
ProjectWindow.open(fileToOpen);
}
});

let isQuitting = false;
Expand Down Expand Up @@ -69,7 +65,12 @@ app.on('ready', function() {
}
});

var w = ProjectWindow.createEmpty();
if( process.platform == "win32" && process.argv.length > 1 ) {
var fileToOpen = process.argv[1];
ProjectWindow.open(fileToOpen);
} else {
var w = ProjectWindow.createEmpty();
}

// Debug
//w.openDevTools();
Expand Down

0 comments on commit a1bc21d

Please sign in to comment.