diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 644c0d2..11f4c81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,11 +1,10 @@ name: "publish" -on: - push: - branches: - - release +on: + workflow_dispatch: + # `tauri-action` can also upload app bundles to an existing GitHub release. # This workflow uses different actions to create and publish the release. # `tauri-action` will only build and upload the app bundles to the specified release. @@ -53,12 +52,12 @@ jobs: fail-fast: false matrix: settings: - - platform: "macos-latest" # for Arm based macs (M1 and above). - args: "--target aarch64-apple-darwin" - - platform: "macos-latest" # for Intel based macs. - args: "--target x86_64-apple-darwin" - - platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04. - args: "" + #- platform: "macos-latest" # for Arm based macs (M1 and above). + # args: "--target aarch64-apple-darwin" + #- platform: "macos-latest" # for Intel based macs. + # args: "--target x86_64-apple-darwin" + #- platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04. + # args: "" - platform: "windows-latest" args: "" diff --git a/src-tauri/icons/icon.icns b/src-tauri/img/icons/icon.icns similarity index 100% rename from src-tauri/icons/icon.icns rename to src-tauri/img/icons/icon.icns diff --git a/src-tauri/icons/icon.ico b/src-tauri/img/icons/icon.ico similarity index 100% rename from src-tauri/icons/icon.ico rename to src-tauri/img/icons/icon.ico diff --git a/src-tauri/icons/icon.png b/src-tauri/img/icons/icon.png similarity index 100% rename from src-tauri/icons/icon.png rename to src-tauri/img/icons/icon.png diff --git a/src-tauri/img/nsis/header.bmp b/src-tauri/img/nsis/header.bmp new file mode 100644 index 0000000..904f649 Binary files /dev/null and b/src-tauri/img/nsis/header.bmp differ diff --git a/src-tauri/img/nsis/sidebar.bmp b/src-tauri/img/nsis/sidebar.bmp new file mode 100644 index 0000000..2ba74b4 Binary files /dev/null and b/src-tauri/img/nsis/sidebar.bmp differ diff --git a/src-tauri/img/wix/banner.png b/src-tauri/img/wix/banner.png new file mode 100644 index 0000000..dac3047 Binary files /dev/null and b/src-tauri/img/wix/banner.png differ diff --git a/src-tauri/img/wix/dialog.png b/src-tauri/img/wix/dialog.png new file mode 100644 index 0000000..8ee4525 Binary files /dev/null and b/src-tauri/img/wix/dialog.png differ diff --git a/src-tauri/pack/wix.wxs b/src-tauri/pack/wix.wxs new file mode 100644 index 0000000..058030b --- /dev/null +++ b/src-tauri/pack/wix.wxs @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + {{#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}} + + + + \ No newline at end of file diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 04d1236..fa144dd 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -11,7 +11,7 @@ }, "tauri": { "systemTray": { - "iconPath": "icons/icon.png", + "iconPath": "img/icons/icon.png", "iconAsTemplate": true }, "allowlist": { @@ -61,6 +61,7 @@ } }, "bundle": { + "targets": ["nsis"], "active": true, "category": "DeveloperTool", "copyright": "", @@ -69,9 +70,9 @@ }, "externalBin": [], "icon": [ - "icons/icon.png", - "icons/icon.icns", - "icons/icon.ico" + "img/icons/icon.png", + "img/icons/icon.icns", + "img/icons/icon.ico" ], "identifier": "com.vhbs.netmount", "longDescription": "", @@ -82,15 +83,30 @@ "providerShortName": null, "signingIdentity": null }, - "resources": [], + "resources": [ + "res/bin/**/*" + ], "shortDescription": "", - "targets": [], "windows": { + "certificateThumbprint": null, "digestAlgorithm": "sha256", "timestampUrl": "", "webviewInstallMode": { "type": "embedBootstrapper" + }, + "wix":{ + "bannerPath": "img/wix/banner.png", + "dialogImagePath":"img/wix/dialog.png", + "language": ["zh-CN","en-US"], + "template": "pack/wix.wxs" + }, + "nsis":{ + "sidebarImage":"img/nsis/sidebar.bmp", + "headerImage": "img/nsis/header.bmp", + "languages":["SimpChinese","English"], + "installerIcon": "img/icons/icon.ico" + } } },