mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-11 18:10:32 +08:00
📦 Chore(custom): modify asarunpack setting
This commit is contained in:
@@ -29,11 +29,11 @@ import { isMacOSVersionGreaterThanOrEqualTo } from '~/utils/getMacOSVersion'
|
||||
import pasteTemplate from '~/utils/pasteTemplate'
|
||||
import { hideMiniWindow, openMainWindow, openMiniWindow } from '~/utils/windowHelper'
|
||||
|
||||
import menubarPng from '../../../../../resources/menubar.png?asset'
|
||||
import menubarNewDarwinTemplate from '../../../../../resources/menubar-newdarwinTemplate.png?asset'
|
||||
import menubarNodarwin from '../../../../../resources/menubar-nodarwin.png?asset'
|
||||
import uploadPng from '../../../../../resources/upload.png?asset'
|
||||
import uploadDarkPng from '../../../../../resources/upload-dark.png?asset'
|
||||
import menubarPng from '../../../../../resources/menubar.png?asset&asarUnpack'
|
||||
import menubarNewDarwinTemplate from '../../../../../resources/menubar-newdarwinTemplate.png?asset&asarUnpack'
|
||||
import menubarNodarwin from '../../../../../resources/menubar-nodarwin.png?asset&asarUnpack'
|
||||
import uploadPng from '../../../../../resources/upload.png?asset&asarUnpack'
|
||||
import uploadDarkPng from '../../../../../resources/upload-dark.png?asset&asarUnpack'
|
||||
let contextMenu: Menu | null
|
||||
|
||||
export function setDockMenu () {
|
||||
|
||||
@@ -13,7 +13,7 @@ import { T as $t } from '~/i18n'
|
||||
import { configPaths } from '~/utils/configPaths'
|
||||
import { IWindowList } from '~/utils/enum'
|
||||
|
||||
import logo from '../../../../../resources/logo.png?asset'
|
||||
import logo from '../../../../../resources/logo.png?asset&asarUnpack'
|
||||
|
||||
const windowList = new Map<string, IWindowListItem>()
|
||||
|
||||
@@ -94,7 +94,7 @@ const settingWindowOptions = {
|
||||
|
||||
if (process.platform !== 'darwin') {
|
||||
settingWindowOptions.frame = false
|
||||
settingWindowOptions.icon = '../../../../../resources/logo.png'
|
||||
settingWindowOptions.icon = logo
|
||||
}
|
||||
|
||||
const miniWindowOptions = {
|
||||
|
||||
@@ -26,7 +26,7 @@ const builtinI18nList: II18nItem[] = [
|
||||
]
|
||||
class I18nManager {
|
||||
private i18n: I18n | null = null
|
||||
private builtinI18nFolder = path.join(__dirname, '../../resources', 'i18n')
|
||||
private builtinI18nFolder = path.join(__dirname, '../../resources', 'i18n').replace('app.asar', 'app.asar.unpacked')
|
||||
private outterI18nFolder = ''
|
||||
private localesMap: Map<string, ILocales> = new Map()
|
||||
private currentLanguage: string = 'zh-CN'
|
||||
|
||||
@@ -48,7 +48,7 @@ function copyFileOutsideOfElectronAsar (sourceInAsarArchive: string, destOutside
|
||||
function resolveMacWorkFlow () {
|
||||
const dest = `${os.homedir()}/Library/Services/Upload pictures with PicList.workflow`
|
||||
try {
|
||||
copyFileOutsideOfElectronAsar(path.join(__dirname, '../../resources', 'Upload pictures with PicList.workflow'), dest)
|
||||
copyFileOutsideOfElectronAsar(path.join(__dirname, '../../resources', 'Upload pictures with PicList.workflow').replace('app.asar', 'app.asar.unpacked'), dest)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
@@ -79,6 +79,7 @@ function resolveClipboardImageGenerator () {
|
||||
})
|
||||
} else {
|
||||
clipboardFiles.forEach(item => {
|
||||
console.log(`Updating ${item.origin} to ${item.dest}`)
|
||||
diffFilesAndUpdate(item.origin, item.dest)
|
||||
})
|
||||
}
|
||||
@@ -88,7 +89,7 @@ function resolveClipboardImageGenerator () {
|
||||
|
||||
return files.map(item => {
|
||||
return {
|
||||
origin: path.join(__dirname, '../../resources', item),
|
||||
origin: path.join(__dirname, '../../resources', item).replace('app.asar', 'app.asar.unpacked'),
|
||||
dest: path.join(CONFIG_DIR, item)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IStringKeyMap } from 'root/src/universal/types/types'
|
||||
import type { IStringKeyMap } from '#/types/types'
|
||||
|
||||
export const RELEASE_URL = 'https://api.github.com/repos/Kuingsmile/PicList/releases'
|
||||
export const RELEASE_URL_BACKUP = 'https://release.piclist.cn'
|
||||
|
||||
Reference in New Issue
Block a user