mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-21 08:11:25 +08:00
✨ Feature: add global value for PicGo get GUI_VERSION & CORE_VERSION
This commit is contained in:
@@ -2,11 +2,18 @@ import fs from 'fs-extra'
|
||||
import path from 'path'
|
||||
import os from 'os'
|
||||
import { remote, app } from 'electron'
|
||||
import pkg from 'root/package.json'
|
||||
|
||||
const APP = process.type === 'renderer' ? remote.app : app
|
||||
const STORE_PATH = APP.getPath('userData')
|
||||
|
||||
function injectPicGoVersion () {
|
||||
global.PICGO_GUI_VERSION = pkg.version
|
||||
global.PICGO_CORE_VERSION = pkg.dependencies.picgo.replace('^', '')
|
||||
}
|
||||
|
||||
function beforeOpen () {
|
||||
injectPicGoVersion()
|
||||
if (process.platform === 'darwin') {
|
||||
resolveMacWorkFlow()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user