refactor: split platform specific config out of tauri.conf.json
Allows for better per platform default config. Currently the default serves windows/macos fine while it has to be tweaked in order to build for linux make build-tauri now successfully runs where it errored out before. Appimages made with make alone however is incomplete as there are still post processing steps in the github release workflow to bundle additional resources. - split platform specific config out of tauri.conf.json into auxiliary platform specific config files, natively supported by tauri - pull improved defaults out of template-tauri-build-linux-x64.yml into new tauri.linux.conf.json - fix tauri-build-linx-x64.yml to utilize new tauri.linux.conf.json
This commit is contained in:
parent
61cd33284d
commit
4134917a45
@ -104,20 +104,15 @@ jobs:
|
||||
run: |
|
||||
echo "Version: ${{ inputs.new_version }}"
|
||||
# Update tauri.conf.json
|
||||
jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true | .bundle.resources = ["resources/pre-install/**/*"] | .bundle.externalBin = ["binaries/cortex-server", "resources/bin/uv"]' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
|
||||
jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
|
||||
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
|
||||
if [ "${{ inputs.channel }}" != "stable" ]; then
|
||||
jq '.bundle.linux.deb.files = {"usr/bin/bun": "resources/bin/bun",
|
||||
"usr/lib/Jan-${{ inputs.channel }}/binaries": "binaries/deps",
|
||||
"usr/lib/Jan-${{ inputs.channel }}/binaries/engines": "binaries/engines",
|
||||
"usr/lib/Jan-${{ inputs.channel }}/binaries/libvulkan.so": "binaries/libvulkan.so"}' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
|
||||
else
|
||||
jq '.bundle.linux.deb.files = {"usr/bin/bun": "resources/bin/bun",
|
||||
"usr/lib/Jan/binaries": "binaries/deps",
|
||||
"usr/lib/Jan/binaries/engines": "binaries/engines",
|
||||
"usr/lib/Jan/binaries/libvulkan.so": "binaries/libvulkan.so"}' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
|
||||
"usr/lib/Jan-${{ inputs.channel }}/binaries/libvulkan.so": "binaries/libvulkan.so"}' ./src-tauri/tauri.linux.conf.json > /tmp/tauri.linux.conf.json
|
||||
mv /tmp/tauri.linux.conf.json ./src-tauri/tauri.linux.conf.json
|
||||
fi
|
||||
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
|
||||
jq --arg version "${{ inputs.new_version }}" '.version = $version' web-app/package.json > /tmp/package.json
|
||||
mv /tmp/package.json web-app/package.json
|
||||
|
||||
|
||||
@ -76,7 +76,6 @@
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": ["nsis", "app", "dmg", "deb", "appimage"],
|
||||
"createUpdaterArtifacts": false,
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
@ -84,32 +83,6 @@
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"resources": [
|
||||
"resources/pre-install/**/*",
|
||||
"resources/lib/",
|
||||
"binaries/**/*"
|
||||
],
|
||||
"externalBin": [
|
||||
"binaries/cortex-server",
|
||||
"resources/bin/bun",
|
||||
"resources/bin/uv"
|
||||
],
|
||||
"linux": {
|
||||
"appimage": {
|
||||
"bundleMediaFramework": false,
|
||||
"files": {}
|
||||
},
|
||||
"deb": {
|
||||
"files": {
|
||||
"usr/bin/bun": "resources/bin/bun",
|
||||
"usr/lib/Jan/binaries": "binaries/deps",
|
||||
"usr/lib/Jan/binaries/engines": "binaries/engines"
|
||||
}
|
||||
}
|
||||
},
|
||||
"windows": {
|
||||
"signCommand": "powershell -ExecutionPolicy Bypass -File ./sign.ps1 %1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
26
src-tauri/tauri.linux.conf.json
Normal file
26
src-tauri/tauri.linux.conf.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"bundle": {
|
||||
"targets": ["deb", "appimage"],
|
||||
"resources": [
|
||||
"resources/pre-install/**/*"
|
||||
],
|
||||
"externalBin": [
|
||||
"binaries/cortex-server",
|
||||
"resources/bin/uv"
|
||||
],
|
||||
"linux": {
|
||||
"appimage": {
|
||||
"bundleMediaFramework": false,
|
||||
"files": {}
|
||||
},
|
||||
"deb": {
|
||||
"files": {
|
||||
"usr/bin/bun": "resources/bin/bun",
|
||||
"usr/lib/Jan/binaries": "binaries/deps",
|
||||
"usr/lib/Jan/binaries/engines": "binaries/engines",
|
||||
"usr/lib/Jan/binaries/libvulkan.so": "binaries/libvulkan.so"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
src-tauri/tauri.macos.conf.json
Normal file
15
src-tauri/tauri.macos.conf.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"bundle": {
|
||||
"targets": ["app", "dmg"],
|
||||
"resources": [
|
||||
"resources/pre-install/**/*",
|
||||
"resources/lib/",
|
||||
"binaries/**/*"
|
||||
],
|
||||
"externalBin": [
|
||||
"binaries/cortex-server",
|
||||
"resources/bin/bun",
|
||||
"resources/bin/uv"
|
||||
]
|
||||
}
|
||||
}
|
||||
18
src-tauri/tauri.windows.conf.json
Normal file
18
src-tauri/tauri.windows.conf.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"bundle": {
|
||||
"targets": ["nsis"],
|
||||
"resources": [
|
||||
"resources/pre-install/**/*",
|
||||
"resources/lib/",
|
||||
"binaries/**/*"
|
||||
],
|
||||
"externalBin": [
|
||||
"binaries/cortex-server",
|
||||
"resources/bin/bun",
|
||||
"resources/bin/uv"
|
||||
],
|
||||
"windows": {
|
||||
"signCommand": "powershell -ExecutionPolicy Bypass -File ./sign.ps1 %1"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user