Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
Build photosorcery on windows
Change name file because doens't works on windows
Fixed globalshortcut for windows
  • Loading branch information
RgtArRr authored and briandennis committed May 25, 2017
1 parent 8415914 commit 66a831d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Binary file added bin/photosorcery.exe
Binary file not shown.
6 changes: 5 additions & 1 deletion src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ module.exports = {
},

init (appPath) {
binary = `${appPath}/bin/photosorcery`
if (process.platform === 'win32') {
binary = `${appPath}/bin/photosorcery.exe`
} else {
binary = `${appPath}/bin/photosorcery`
}
}
}
2 changes: 1 addition & 1 deletion src/helpers/configure.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { globalShortcut } = require('electron')

module.exports = function(mb) {
globalShortcut.register('Command+Shift+8', () => {
globalShortcut.register('CommandOrControl+Shift+8', () => {
if (mb.window && mb.window.isVisible()) mb.hideWindow()
else mb.showWindow()
})
Expand Down
5 changes: 2 additions & 3 deletions src/helpers/util.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
const { pluck, compose, map } = require('./functional')
const { fileTypes } = require('./constants')
const pathNode = require('path')

const replaceSpaceCharacters = str =>
str.replace(/\s/g, '\\ ')
.replace(/'/g, '\\\'')

const concatFiles = files =>
files.map(path => path.split('/').pop())
.map(file => file.split('.')[0])
.map(file => file.substr(0, 10))
.map(file => pathNode.basename(file, pathNode.extname(file)))
.join('_')
.replace(/\s/g, '')
.substr(0, 50)

const filterImages = files => files.filter(file => file.type.includes('image'))
Expand Down

0 comments on commit 66a831d

Please sign in to comment.