From dd20413c30aaf83bbecaa606fa79956a8950119f Mon Sep 17 00:00:00 2001 From: Jai A Date: Tue, 1 Oct 2024 22:59:28 -0700 Subject: [PATCH] Fix linux appimage --- apps/app/msi/main.wxs | 346 ---------------------- apps/app/tauri.conf.json | 3 - apps/app/tauri.linux.conf.json | 3 + apps/frontend/src/public/promo-frame.html | 11 +- 4 files changed, 9 insertions(+), 354 deletions(-) delete mode 100644 apps/app/msi/main.wxs create mode 100644 apps/app/tauri.linux.conf.json diff --git a/apps/app/msi/main.wxs b/apps/app/msi/main.wxs deleted file mode 100644 index 8137976d3..000000000 --- a/apps/app/msi/main.wxs +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - - - - - - - - - - - - - - {{#if allow_downgrades}} - - {{else}} - - {{/if}} - - - Installed AND NOT UPGRADINGPRODUCTCODE - - - - - {{#if banner_path}} - - {{/if}} - {{#if dialog_image_path}} - - {{/if}} - {{#if license}} - - {{/if}} - - - - - - - - - - - - - - - - - - - - WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed - - - - {{#unless license}} - - 1 - 1 - {{/unless}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{#each binaries as |bin| ~}} - - - - {{/each~}} - {{#if enable_elevated_update_task}} - - - - - - - - - - {{/if}} - {{resources}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{#each merge_modules as |msm| ~}} - - - - - - - - {{/each~}} - - - - - - - - - - {{#each resource_file_ids as |resource_file_id| ~}} - - {{/each~}} - - {{#if enable_elevated_update_task}} - - - - {{/if}} - - - - - - - - - - - {{#each binaries as |bin| ~}} - - {{/each~}} - - - - - {{#each component_group_refs as |id| ~}} - - {{/each~}} - {{#each component_refs as |id| ~}} - - {{/each~}} - {{#each feature_group_refs as |id| ~}} - - {{/each~}} - {{#each feature_refs as |id| ~}} - - {{/each~}} - {{#each merge_refs as |id| ~}} - - {{/each~}} - - - {{#if install_webview}} - - - - - - - {{#if download_bootstrapper}} - - - - - - - {{/if}} - - - {{#if webview2_bootstrapper_path}} - - - - - - - - {{/if}} - - - {{#if webview2_installer_path}} - - - - - - - - {{/if}} - - {{/if}} - - {{#if enable_elevated_update_task}} - - - - - NOT(REMOVE) - - - - - - - (REMOVE = "ALL") AND NOT UPGRADINGPRODUCTCODE - - - {{/if}} - - - - diff --git a/apps/app/tauri.conf.json b/apps/app/tauri.conf.json index 192f03190..8310598d8 100644 --- a/apps/app/tauri.conf.json +++ b/apps/app/tauri.conf.json @@ -21,9 +21,6 @@ "certificateThumbprint": null, "digestAlgorithm": "sha256", "timestampUrl": "http://timestamp.digicert.com", - "wix": { - "template": "./msi/main.wxs" - }, "nsis": { "installMode": "perMachine", "installerHooks": "./nsis/hooks.nsi" diff --git a/apps/app/tauri.linux.conf.json b/apps/app/tauri.linux.conf.json new file mode 100644 index 000000000..2dfc6edd7 --- /dev/null +++ b/apps/app/tauri.linux.conf.json @@ -0,0 +1,3 @@ +{ + "mainBinaryName": "ModrinthApp" +} diff --git a/apps/frontend/src/public/promo-frame.html b/apps/frontend/src/public/promo-frame.html index 41ddf4fa5..1116ca2ba 100644 --- a/apps/frontend/src/public/promo-frame.html +++ b/apps/frontend/src/public/promo-frame.html @@ -61,11 +61,12 @@ tude.setPrivacySettings({ personalizedAds: personalized ?? true, - }) + }); }); } - window.__TAURI_INTERNALS__.invoke("plugin:ads|get_ads_personalization", {}) + window.__TAURI_INTERNALS__ + .invoke("plugin:ads|get_ads_personalization", {}) .then(initAds) .catch(() => initAds(true)); @@ -97,11 +98,11 @@ document.addEventListener("contextmenu", (event) => event.preventDefault()); const plusLink = document.getElementById("plus-link"); - plusLink.addEventListener('click', function() { + plusLink.addEventListener("click", function () { window.__TAURI_INTERNALS__.invoke("plugin:ads|record_ads_click", {}); window.__TAURI_INTERNALS__.invoke("plugin:ads|open_link", { - path: 'https://modrinth.com/plus', - origin: 'https://modrinth.com', + path: "https://modrinth.com/plus", + origin: "https://modrinth.com", }); });