-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d401b51
commit 44c3e7e
Showing
9 changed files
with
85 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use strict'; | ||
|
||
export const IS_DEV = process.env.NODE_ENV !== 'production'; | ||
export const IS_PROD = process.env.NODE_ENV === 'production'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
import path from 'path'; | ||
import { remote } from 'electron'; | ||
import getPlatform from './get-platform'; | ||
import { IS_PROD } from '../constants/env'; | ||
import { PATHS } from './paths'; | ||
|
||
const { root } = PATHS; | ||
const { isPackaged, getAppPath } = remote.app; | ||
|
||
const binariesPath = | ||
IS_PROD && isPackaged | ||
? path.join(path.dirname(getAppPath()), '..', './Resources', './bin') | ||
: path.join(root, './resources', getPlatform(), './bin'); | ||
|
||
export const mtp = path.resolve(path.join(binariesPath, './mtp-cli')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict'; | ||
|
||
import { platform } from 'os'; | ||
|
||
export default () => { | ||
switch (platform()) { | ||
case 'aix': | ||
case 'freebsd': | ||
case 'linux': | ||
case 'openbsd': | ||
case 'android': | ||
return 'linux'; | ||
case 'darwin': | ||
case 'sunos': | ||
return 'mac'; | ||
case 'win32': | ||
return 'win'; | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters