Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Support arm64 version in Microsoft Store https://github.com/siyuan-note/siyuan/issues/15836

Daniel9d569ad37b8a
diff --git a/app/appx/AppxManifest-arm64.xml b/app/appx/AppxManifest-arm64.xml
new file mode 100644
index 0000000000..4964acbef9
--- /dev/null
+++ b/app/appx/AppxManifest-arm64.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--suppress XmlUnusedNamespaceDeclaration -->
+<Package
+ xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
+ xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
+ xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
+ xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
+ <!-- use single quotes to avoid double quotes escaping in the publisher value -->
+ <Identity Name="89C2A984.SiYuan"
+ ProcessorArchitecture="arm64"
+ Publisher="CN=087C656E-C1D9-42D8-8807-CED45A74FC0F"
+ Version="3.3.2.0"/>
+ <Properties>
+ <DisplayName>SiYuan</DisplayName>
+ <PublisherDisplayName>云南链滴科技有限公司</PublisherDisplayName>
+ <Description>Refactor your thinking</Description>
+ <Logo>assets\StoreLogo.png</Logo>
+ </Properties>
+ <Resources>
+ <Resource Language="en-US"/>
+ <Resource Language="zh-CN"/>
+ </Resources>
+ <Dependencies>
+ <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14316.0" MaxVersionTested="10.0.14316.0"/>
+ </Dependencies>
+ <Capabilities>
+ <rescap:Capability Name="runFullTrust"/>
+ </Capabilities>
+ <Applications>
+ <Application Id="SiYuan" Executable="app\SiYuan.exe" EntryPoint="Windows.FullTrustApplication">
+ <uap:VisualElements
+ BackgroundColor="transparent"
+ DisplayName="SiYuan"
+ Square150x150Logo="assets\Square150x150Logo.png"
+ Square44x44Logo="assets\Square44x44Logo.png"
+ Description="Refactor your thinking">
+
+ <uap:DefaultTile Wide310x150Logo="assets\Wide310x150Logo.png"/>
+
+ </uap:VisualElements>
+
+ <Extensions>
+ <uap:Extension Category="windows.protocol">
+ <uap:Protocol Name="siyuan"/>
+ </uap:Extension>
+ </Extensions>
+ </Application>
+ </Applications>
+</Package>
diff --git a/app/package.json b/app/package.json
index 3767b25687..0e700f1e8f 100644
--- a/app/package.json
+++ b/app/package.json
@@ -18,7 +18,6 @@
"build:export": "webpack --mode production --config webpack.export.js",
"gen:types": "tsc -d",
"start": "NODE_ENV=development electron ./electron/main.js",
- "dist-appx": "ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ electron-builder --config electron-appx-builder.yml",
"dist": "ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ electron-builder --config electron-builder.yml --publish=never",
"dist-arm64": "ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ electron-builder --arm64 --config electron-builder-arm64.yml --publish=never",
"dist-darwin": "ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ electron-builder --mac --config electron-builder-darwin.yml --publish=never",
diff --git a/scripts/win-build.bat b/scripts/win-build.bat
index 264b7f8238..9d33c19a75 100644
--- a/scripts/win-build.bat
+++ b/scripts/win-build.bat
@@ -14,9 +14,9 @@ if errorlevel 1 (
cd ..
echo 'Cleaning Builds'
-del /S /Q /F app\build 1>nul
-del /S /Q /F app\kernel 1>nul
-del /S /Q /F app\kernel-arm64 1>nul
+rmdir /S /Q app\build 1>nul
+rmdir /S /Q app\kernel 1>nul
+rmdir /S /Q app\kernel-arm64 1>nul
echo 'Building Kernel'
@REM the C compiler "gcc" is necessary https://sourceforge.net/projects/mingw-w64/files/mingw-w64/
@@ -68,4 +68,13 @@ cd ..
echo 'Building Appx'
echo 'Building Appx should be disabled if you do not need it. Not configured correctly will lead to build failures'
cd . > app\build\win-unpacked\resources\ms-store
-electron-windows-store --input-directory app\build\win-unpacked --output-directory app\build\ --package-version 1.0.0.0 --package-name SiYuan --manifest app\appx\AppxManifest.xml --assets app\appx\assets\ --make-pri true
+call electron-windows-store --input-directory app\build\win-unpacked --output-directory app\build\ --package-version 1.0.0.0 --package-name SiYuan --manifest app\appx\AppxManifest.xml --assets app\appx\assets\ --make-pri true
+
+rmdir /S /Q app\build\pre-appx 1>nul
+
+echo 'Building Appx arm64'
+echo 'Building Appx arm64 should be disabled if you do not need it. Not configured correctly will lead to build failures'
+cd . > app\build\win-arm64-unpacked\resources\ms-store
+call electron-windows-store --input-directory app\build\win-arm64-unpacked --output-directory app\build\ --package-version 1.0.0.0 --package-name SiYuan-arm64 --manifest app\appx\AppxManifest-arm64.xml --assets app\appx\assets\ --make-pri true
+
+rmdir /S /Q app\build\pre-appx 1>nul