update name publisher

This commit is contained in:
nkhangg 2025-05-28 23:35:43 +07:00
parent d22267e3f8
commit f8354882a7
4 changed files with 53 additions and 36 deletions

View File

@ -1,43 +1,59 @@
appId: com.electron.app
productName: New Item
directories:
buildResources: build
buildResources: build
files:
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintcache,eslint.config.mjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintcache,eslint.config.mjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
asarUnpack:
- resources/**
- resources/**
win:
executableName: New-item
nsis:
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
target: portable
executableName: New-item,
publisherName: apactech
portable:
artifactName: ${name}-${version}.exe
nsis: # vẫn giữ để dùng nếu muốn cài đặt, nhưng sẽ không tạo nếu chỉ chọn portable
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
mac:
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
- NSCameraUsageDescription: Application requests access to the device's camera.
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
- NSCameraUsageDescription: Application requests access to the device's camera.
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
dmg:
artifactName: ${name}-${version}.${ext}
artifactName: ${name}-${version}.${ext}
linux:
target:
- AppImage
- snap
- deb
maintainer: electronjs.org
category: Utility
target:
- AppImage
- snap
- deb
maintainer: electronjs.org
category: Utility
appImage:
artifactName: ${name}-${version}.${ext}
artifactName: ${name}-${version}.${ext}
npmRebuild: false
publish:
provider: generic
url: https://example.com/auto-updates
provider: generic
url: https://apactech.io/auto-updates

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "new-item-app",
"version": "1.0.0",
"version": "1.0.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "new-item-app",
"version": "1.0.0",
"version": "1.0.3",
"hasInstallScript": true,
"dependencies": {
"@electron-toolkit/preload": "^3.0.1",

View File

@ -1,9 +1,9 @@
{
"name": "new-item-app",
"version": "1.0.3",
"description": "An Electron application with React and TypeScript",
"description": "new item application is active",
"main": "./out/main/index.js",
"author": "example.com",
"author": "apactech.io",
"homepage": "https://electron-vite.org",
"scripts": {
"format": "prettier --write .",

View File

@ -8,7 +8,6 @@ import icon from '../../resources/icon.png?asset'
let mainWindow: null | BrowserWindow = null
let isQuiting = false
const startupFlagFile = path.join(app.getPath('userData'), 'startup-set.flag')
function createWindow(): void {
// Get Screen width, height
@ -112,6 +111,8 @@ function createTray() {
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.whenReady().then(() => {
const startupFlagFile = path.join(app.getPath('userData'), 'startup-set.flag')
if (!fs.existsSync(startupFlagFile)) {
app.setLoginItemSettings({
openAtLogin: true,