move macos build files to resources, fix date for i18n

This commit is contained in:
vapormusic 2022-01-25 21:16:36 +07:00
parent 2108dd5975
commit 3e8df50847
6 changed files with 13 additions and 25 deletions

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- https://github.com/electron/electron-notarize#prerequisites -->
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<!-- https://github.cm/electron-userland/electron-builder/issues/3940 -->
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>

View file

@ -95,8 +95,8 @@
"mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
},
"appId": "cider",
"afterPack": "./build/afterPack.js",
"afterSign": "./build/notarize.js",
"afterPack": "./resources/afterPack.js",
"afterSign": "./resources/notarize.js",
"protocols": [
{
"name": "Cider",
@ -158,8 +158,8 @@
"gatekeeperAssess": false,
"icon": "./resources/icons/icon.icns",
"category": "public.app-category.music",
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"entitlements": "./resources/entitlements.mac.plist",
"entitlementsInherit": "./resources/entitlements.mac.plist",
"darkModeSupport": true,
"target": [
"dmg"

View file

@ -2,11 +2,13 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- https://github.com/electron/electron-notarize#prerequisites -->
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<!-- https://github.cm/electron-userland/electron-builder/issues/3940 -->
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<false/>
</dict>
</plist>
</plist>

View file

@ -441,11 +441,11 @@
let month, year;
try {
const releaseDate = new Date(date);
month = new Intl.DateTimeFormat('en-US', {month: 'long'}).format(releaseDate);
date = releaseDate.getDate();
year = releaseDate.getFullYear();
// month = new Intl.DateTimeFormat(this.app.cfg.general.language.replace('_','-'), {month: 'long'}).format(releaseDate);
// date = releaseDate.getDate();
// year = releaseDate.getFullYear();
return prefix + date + " " + month + " " + year;
return prefix + new Intl.DateTimeFormat(this.app.cfg.general.language?.replace('_','-') ?? 'en-US', {day:'numeric',month: 'long', year: 'numeric'}).format(releaseDate);
} catch (e) {
return ""
}