mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-07 05:52:45 +08:00
📦 Chore(custom): modify asarunpack setting
This commit is contained in:
@@ -6,15 +6,13 @@
|
|||||||
"output": "dist_electron",
|
"output": "dist_electron",
|
||||||
"buildResources": "build"
|
"buildResources": "build"
|
||||||
},
|
},
|
||||||
"asarUnpack": ["**/node_modules/sharp/**", "**/node_modules/ssh2-no-cpu-features/**", "**/node_modules/@img/**"],
|
"asarUnpack": [
|
||||||
"files": ["out/**/*", "dist/**/*", "resources/**/*", "package.json"],
|
"**/node_modules/sharp/**",
|
||||||
"extraResources": [
|
"**/node_modules/ssh2-no-cpu-features/**",
|
||||||
{
|
"**/node_modules/@img/**",
|
||||||
"from": "resources",
|
"resources/**"
|
||||||
"to": ".",
|
|
||||||
"filter": ["**/*"]
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
|
"files": ["out/**/*", "resources/**", "package.json"],
|
||||||
"publish": [
|
"publish": [
|
||||||
{
|
{
|
||||||
"provider": "s3",
|
"provider": "s3",
|
||||||
@@ -78,8 +76,7 @@
|
|||||||
"include": "build/installer.nsh"
|
"include": "build/installer.nsh"
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"icon": "resources/",
|
"icon": "resources/"
|
||||||
"asarUnpack": ["**/node_modules/sharp/**", "**/node_modules/ssh2-no-cpu-features/**", "**/node_modules/@img/**"]
|
|
||||||
},
|
},
|
||||||
"snap": {
|
"snap": {
|
||||||
"publish": ["github"]
|
"publish": ["github"]
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ import { isMacOSVersionGreaterThanOrEqualTo } from '~/utils/getMacOSVersion'
|
|||||||
import pasteTemplate from '~/utils/pasteTemplate'
|
import pasteTemplate from '~/utils/pasteTemplate'
|
||||||
import { hideMiniWindow, openMainWindow, openMiniWindow } from '~/utils/windowHelper'
|
import { hideMiniWindow, openMainWindow, openMiniWindow } from '~/utils/windowHelper'
|
||||||
|
|
||||||
import menubarPng from '../../../../../resources/menubar.png?asset'
|
import menubarPng from '../../../../../resources/menubar.png?asset&asarUnpack'
|
||||||
import menubarNewDarwinTemplate from '../../../../../resources/menubar-newdarwinTemplate.png?asset'
|
import menubarNewDarwinTemplate from '../../../../../resources/menubar-newdarwinTemplate.png?asset&asarUnpack'
|
||||||
import menubarNodarwin from '../../../../../resources/menubar-nodarwin.png?asset'
|
import menubarNodarwin from '../../../../../resources/menubar-nodarwin.png?asset&asarUnpack'
|
||||||
import uploadPng from '../../../../../resources/upload.png?asset'
|
import uploadPng from '../../../../../resources/upload.png?asset&asarUnpack'
|
||||||
import uploadDarkPng from '../../../../../resources/upload-dark.png?asset'
|
import uploadDarkPng from '../../../../../resources/upload-dark.png?asset&asarUnpack'
|
||||||
let contextMenu: Menu | null
|
let contextMenu: Menu | null
|
||||||
|
|
||||||
export function setDockMenu () {
|
export function setDockMenu () {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { T as $t } from '~/i18n'
|
|||||||
import { configPaths } from '~/utils/configPaths'
|
import { configPaths } from '~/utils/configPaths'
|
||||||
import { IWindowList } from '~/utils/enum'
|
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>()
|
const windowList = new Map<string, IWindowListItem>()
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ const settingWindowOptions = {
|
|||||||
|
|
||||||
if (process.platform !== 'darwin') {
|
if (process.platform !== 'darwin') {
|
||||||
settingWindowOptions.frame = false
|
settingWindowOptions.frame = false
|
||||||
settingWindowOptions.icon = '../../../../../resources/logo.png'
|
settingWindowOptions.icon = logo
|
||||||
}
|
}
|
||||||
|
|
||||||
const miniWindowOptions = {
|
const miniWindowOptions = {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const builtinI18nList: II18nItem[] = [
|
|||||||
]
|
]
|
||||||
class I18nManager {
|
class I18nManager {
|
||||||
private i18n: I18n | null = null
|
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 outterI18nFolder = ''
|
||||||
private localesMap: Map<string, ILocales> = new Map()
|
private localesMap: Map<string, ILocales> = new Map()
|
||||||
private currentLanguage: string = 'zh-CN'
|
private currentLanguage: string = 'zh-CN'
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ function copyFileOutsideOfElectronAsar (sourceInAsarArchive: string, destOutside
|
|||||||
function resolveMacWorkFlow () {
|
function resolveMacWorkFlow () {
|
||||||
const dest = `${os.homedir()}/Library/Services/Upload pictures with PicList.workflow`
|
const dest = `${os.homedir()}/Library/Services/Upload pictures with PicList.workflow`
|
||||||
try {
|
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) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
@@ -79,6 +79,7 @@ function resolveClipboardImageGenerator () {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
clipboardFiles.forEach(item => {
|
clipboardFiles.forEach(item => {
|
||||||
|
console.log(`Updating ${item.origin} to ${item.dest}`)
|
||||||
diffFilesAndUpdate(item.origin, item.dest)
|
diffFilesAndUpdate(item.origin, item.dest)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -88,7 +89,7 @@ function resolveClipboardImageGenerator () {
|
|||||||
|
|
||||||
return files.map(item => {
|
return files.map(item => {
|
||||||
return {
|
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)
|
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 = 'https://api.github.com/repos/Kuingsmile/PicList/releases'
|
||||||
export const RELEASE_URL_BACKUP = 'https://release.piclist.cn'
|
export const RELEASE_URL_BACKUP = 'https://release.piclist.cn'
|
||||||
|
|||||||
Reference in New Issue
Block a user