mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-23 23:21:05 +01:00
Update mas
This commit is contained in:
parent
9d22935f6a
commit
84c0d50222
@ -26,20 +26,6 @@ log.initialize({ preload: true });
|
||||
sharp.cache(false);
|
||||
logit("🚃 App Path: ", app.getAppPath());
|
||||
|
||||
// SECURITY SCOPED BOOKMARKS
|
||||
const fileBookmarks = settings.get("file-bookmarks", true);
|
||||
const folderBookmarks = settings.get("folder-bookmarks", true);
|
||||
const customModelsBookmarks = settings.get("custom-models-bookmarks", true);
|
||||
if (fileBookmarks) {
|
||||
app.startAccessingSecurityScopedResource(fileBookmarks);
|
||||
}
|
||||
if (folderBookmarks) {
|
||||
app.startAccessingSecurityScopedResource(folderBookmarks as string);
|
||||
}
|
||||
if (customModelsBookmarks) {
|
||||
app.startAccessingSecurityScopedResource(customModelsBookmarks as string);
|
||||
}
|
||||
|
||||
app.on("ready", async () => {
|
||||
await prepareNext("./renderer");
|
||||
|
||||
@ -58,6 +44,23 @@ app.on("ready", async () => {
|
||||
|
||||
log.info("🚀 UPSCAYL EXEC PATH: ", execPath("bin"));
|
||||
log.info("🚀 MODELS PATH: ", modelsPath);
|
||||
|
||||
// SECURITY SCOPED BOOKMARKS
|
||||
const fileBookmarks = settings.get("file-bookmarks", true);
|
||||
const folderBookmarks = settings.get("folder-bookmarks", true);
|
||||
const customModelsBookmarks = settings.get("custom-models-bookmarks", true);
|
||||
if (fileBookmarks) {
|
||||
log.info("📁 File Bookmarks: ", fileBookmarks);
|
||||
app.startAccessingSecurityScopedResource(fileBookmarks);
|
||||
}
|
||||
if (folderBookmarks) {
|
||||
log.info("📁 Folder Bookmarks: ", folderBookmarks);
|
||||
app.startAccessingSecurityScopedResource(folderBookmarks);
|
||||
}
|
||||
if (customModelsBookmarks) {
|
||||
log.info("📁 Custom Models Bookmarks: ", customModelsBookmarks);
|
||||
app.startAccessingSecurityScopedResource(customModelsBookmarks);
|
||||
}
|
||||
});
|
||||
|
||||
// Quit the app once all windows are closed
|
||||
|
@ -12,9 +12,9 @@ import { getMainWindow } from "../main-window";
|
||||
* settings.set("key", value);
|
||||
*/
|
||||
export const settings = {
|
||||
get: (key: string, parse: boolean = false) => {
|
||||
get: (key: string, parse: boolean = false): any => {
|
||||
const mainWindow = getMainWindow();
|
||||
if (!mainWindow) return;
|
||||
if (!mainWindow) return null;
|
||||
let result = null;
|
||||
mainWindow.webContents
|
||||
.executeJavaScript(`localStorage.getItem("${key}");`, true)
|
||||
|
27
mas-dev.json
27
mas-dev.json
@ -1,5 +1,9 @@
|
||||
{
|
||||
"appId": "org.upscayl.Upscayl",
|
||||
"afterSign": "./notarize.js",
|
||||
"asar": true,
|
||||
"artifactName": "${name}-${version}-${os}.${ext}",
|
||||
"asarUnpack": ["**/node_modules/sharp/**/*"],
|
||||
"extraFiles": [
|
||||
{
|
||||
"from": "resources/${os}/bin",
|
||||
@ -14,16 +18,29 @@
|
||||
],
|
||||
"mac": {
|
||||
"type": "development",
|
||||
"identity": null,
|
||||
"hardenedRuntime": true,
|
||||
"gatekeeperAssess": false,
|
||||
"entitlements": "resources/entitlements.mac.plist",
|
||||
"entitlementsInherit": "resources/entitlements.mac.plist",
|
||||
"provisioningProfile": "dev.provisionprofile",
|
||||
"mergeASARs": false,
|
||||
"x64ArchFiles": "*"
|
||||
},
|
||||
"masDev": {
|
||||
"type": "development",
|
||||
"artifactName": "${name}_${version}_macos.${ext}",
|
||||
"category": "public.app-category.photography",
|
||||
"hardenedRuntime": false,
|
||||
"entitlements": "resources/entitlements.mas.plist",
|
||||
"entitlementsInherit": "resources/entitlements.mas.plist"
|
||||
"gatekeeperAssess": false,
|
||||
"electronLanguages": ["en"],
|
||||
"category": "public.app-category.photography",
|
||||
"entitlements": "resources/entitlements.mas-dev.plist",
|
||||
"provisioningProfile": "dev.provisionprofile",
|
||||
"entitlementsInherit": "resources/entitlements.mas.inherit.plist",
|
||||
"icon": "build/icon.icns",
|
||||
"target": [
|
||||
{
|
||||
"target": "mas",
|
||||
"arch": ["universal"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@
|
||||
"artifactName": "${name}-${version}-${os}.${ext}",
|
||||
"afterSign": "./notarize.js",
|
||||
"asar": true,
|
||||
"buildVersion": "23.11.3",
|
||||
"buildVersion": "23.11.4",
|
||||
"asarUnpack": [
|
||||
"**/node_modules/sharp/**/*"
|
||||
],
|
||||
|
36
resources/entitlements.mas-dev.plist
Normal file
36
resources/entitlements.mas-dev.plist
Normal file
@ -0,0 +1,36 @@
|
||||
<?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>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.inherit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.bookmarks.document-scope</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.bookmarks.app-scope</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>W2T4W74X87.org.upscayl.Upscayl</string>
|
||||
</array>
|
||||
<key>com.apple.application-identifier</key>
|
||||
<string>W2T4W74X87.org.upscayl.Upscayl</string>
|
||||
<key>com.apple.developer.team-identifier</key>
|
||||
<string>W2T4W74X87</string>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue
Block a user