mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-06-11 17:27:54 +02:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 77d53c7f32 | |||
| a21f22a916 | |||
| 93eae1d77f | |||
| 82615c24bd | |||
| 0769106a51 | |||
| 18aa3cb87b | |||
| f066105c0f | |||
| 9d8b3629f6 | |||
| 353e149886 |
@@ -5,7 +5,7 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
day: "saturday"
|
||||
time: "09:00"
|
||||
allow:
|
||||
- dependency-type: "all"
|
||||
@@ -25,7 +25,7 @@ updates:
|
||||
directory: "/nodecar"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
day: "saturday"
|
||||
time: "09:00"
|
||||
allow:
|
||||
- dependency-type: "all"
|
||||
@@ -42,7 +42,7 @@ updates:
|
||||
directory: "/src-tauri"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
day: "saturday"
|
||||
time: "09:00"
|
||||
allow:
|
||||
- dependency-type: "all"
|
||||
@@ -59,7 +59,7 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
day: "saturday"
|
||||
time: "09:00"
|
||||
groups:
|
||||
github-actions:
|
||||
|
||||
@@ -57,19 +57,13 @@ jobs:
|
||||
target: "x86_64-apple-darwin"
|
||||
pkg_target: "latest-macos-x64"
|
||||
nodecar_script: "build:mac-x86_64"
|
||||
- platform: "macos-latest"
|
||||
args: "--target universal-apple-darwin"
|
||||
arch: "aarch64"
|
||||
target: "aarch64-apple-darwin"
|
||||
pkg_target: "universal"
|
||||
nodecar_script: "build:mac-universal"
|
||||
- platform: "ubuntu-20.04"
|
||||
- platform: "ubuntu-22.04"
|
||||
args: "--target x86_64-unknown-linux-gnu"
|
||||
arch: "x86_64"
|
||||
target: "x86_64-unknown-linux-gnu"
|
||||
pkg_target: "latest-linux-x64"
|
||||
nodecar_script: "build:linux-x64"
|
||||
- platform: "ubuntu-20.04"
|
||||
- platform: "ubuntu-22.04"
|
||||
args: "--target aarch64-unknown-linux-gnu"
|
||||
arch: "aarch64"
|
||||
target: "aarch64-unknown-linux-gnu"
|
||||
@@ -107,15 +101,26 @@ jobs:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install dependencies (Ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev pkg-config
|
||||
# Install cross-compilation tools for ARM64
|
||||
if [[ "${{ matrix.arch }}" == "aarch64" ]]; then
|
||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
||||
fi
|
||||
|
||||
- name: Setup cross-compilation environment (Ubuntu ARM64 only)
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.arch == 'aarch64'
|
||||
run: |
|
||||
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> $GITHUB_ENV
|
||||
echo "AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar" >> $GITHUB_ENV
|
||||
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
echo "PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu" >> $GITHUB_ENV
|
||||
echo "PKG_CONFIG_PATH=/usr/aarch64-linux-gnu/lib/pkgconfig:/usr/lib/aarch64-linux-gnu/pkgconfig" >> $GITHUB_ENV
|
||||
echo "PKG_CONFIG=aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV
|
||||
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
|
||||
@@ -56,19 +56,13 @@ jobs:
|
||||
target: "x86_64-apple-darwin"
|
||||
pkg_target: "latest-macos-x64"
|
||||
nodecar_script: "build:mac-x86_64"
|
||||
- platform: "macos-latest"
|
||||
args: "--target universal-apple-darwin"
|
||||
arch: "aarch64"
|
||||
target: "aarch64-apple-darwin,x86_64-apple-darwin"
|
||||
pkg_target: "universal"
|
||||
nodecar_script: "build:mac-universal"
|
||||
- platform: "ubuntu-20.04"
|
||||
- platform: "ubuntu-22.04"
|
||||
args: "--target x86_64-unknown-linux-gnu"
|
||||
arch: "x86_64"
|
||||
target: "x86_64-unknown-linux-gnu"
|
||||
pkg_target: "latest-linux-x64"
|
||||
nodecar_script: "build:linux-x64"
|
||||
- platform: "ubuntu-20.04"
|
||||
- platform: "ubuntu-22.04"
|
||||
args: "--target aarch64-unknown-linux-gnu"
|
||||
arch: "aarch64"
|
||||
target: "aarch64-unknown-linux-gnu"
|
||||
@@ -93,15 +87,26 @@ jobs:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install dependencies (Ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev pkg-config
|
||||
# Install cross-compilation tools for ARM64
|
||||
if [[ "${{ matrix.arch }}" == "aarch64" ]]; then
|
||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
||||
fi
|
||||
|
||||
- name: Setup cross-compilation environment (Ubuntu ARM64 only)
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.arch == 'aarch64'
|
||||
run: |
|
||||
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> $GITHUB_ENV
|
||||
echo "AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar" >> $GITHUB_ENV
|
||||
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
echo "PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu" >> $GITHUB_ENV
|
||||
echo "PKG_CONFIG_PATH=/usr/aarch64-linux-gnu/lib/pkgconfig:/usr/lib/aarch64-linux-gnu/pkgconfig" >> $GITHUB_ENV
|
||||
echo "PKG_CONFIG=aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV
|
||||
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
|
||||
@@ -2,15 +2,13 @@
|
||||
|
||||

|
||||
|
||||
## **A powerful browser orchestrator that puts you in control of your browsing experience. 🍩**
|
||||
> **A powerful browser orchestrator that puts you in control of your browsing experience. 🍩**
|
||||
|
||||
[](https://github.com/zhom/donutbrowser/releases/latest)
|
||||
[](https://github.com/zhom/donutbrowser/issues)
|
||||
[](https://github.com/zhom/donutbrowser/blob/main/LICENSE)
|
||||
[](https://github.com/zhom/donutbrowser/stargazers)
|
||||
|
||||
> A free and open source browser orchestrator built with [Tauri](https://v2.tauri.app/).
|
||||
|
||||

|
||||
|
||||
## Download
|
||||
@@ -30,6 +28,8 @@ The app can be downloaded from the [releases page](https://github.com/zhom/donut
|
||||
|
||||
### Contributing
|
||||
|
||||
> Donut Browser is built with [Tauri](https://v2.tauri.app/).
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
## Issues
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
"build": "tsc && pkg ./dist/index.js --targets latest-macos-arm64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:mac-aarch64": "tsc && pkg ./dist/index.js --targets latest-macos-arm64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:mac-x86_64": "tsc && pkg ./dist/index.js --targets latest-macos-x64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:mac-universal": "pnpm build:mac-aarch64 && pnpm rename-binary && pnpm build:mac-x86_64 && pnpm rename-binary x86_64-apple-darwin",
|
||||
"build:linux-x64": "tsc && pkg ./dist/index.js --targets latest-linux-x64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:linux-arm64": "tsc && pkg ./dist/index.js --targets latest-linux-arm64 --output dist/nodecar && pnpm rename-binary",
|
||||
"build:win-x64": "tsc && pkg ./dist/index.js --targets latest-win-x64 --output dist/nodecar && pnpm rename-binary",
|
||||
|
||||
@@ -227,45 +227,7 @@ impl AppAutoUpdater {
|
||||
|
||||
/// Get the appropriate download URL for the current platform
|
||||
fn get_download_url_for_platform(&self, assets: &[AppReleaseAsset]) -> Option<String> {
|
||||
println!("Looking for macOS universal binary assets");
|
||||
for asset in assets {
|
||||
println!("Found asset: {}", asset.name);
|
||||
}
|
||||
|
||||
// Priority 1: Look for universal macOS DMG (preferred)
|
||||
for asset in assets {
|
||||
if asset.name.contains(".dmg")
|
||||
&& (asset.name.contains("universal")
|
||||
|| asset.name.contains("Universal")
|
||||
|| asset.name.contains("_universal.dmg")
|
||||
|| asset.name.contains("-universal.dmg")
|
||||
|| asset.name.contains("_universal_")
|
||||
|| asset.name.contains("-universal-"))
|
||||
{
|
||||
println!("Found universal binary: {}", asset.name);
|
||||
return Some(asset.browser_download_url.clone());
|
||||
}
|
||||
}
|
||||
|
||||
// Priority 2: Look for generic macOS DMG without architecture specification
|
||||
// This would be the case for universal binaries that don't explicitly mention "universal"
|
||||
for asset in assets {
|
||||
if asset.name.contains(".dmg")
|
||||
&& (asset.name.to_lowercase().contains("macos")
|
||||
|| asset.name.to_lowercase().contains("darwin"))
|
||||
&& !asset.name.contains("x64")
|
||||
&& !asset.name.contains("x86_64")
|
||||
&& !asset.name.contains("x86-64")
|
||||
&& !asset.name.contains("aarch64")
|
||||
&& !asset.name.contains("arm64")
|
||||
&& !asset.name.contains(".app.tar.gz")
|
||||
{
|
||||
println!("Found generic macOS DMG (likely universal): {}", asset.name);
|
||||
return Some(asset.browser_download_url.clone());
|
||||
}
|
||||
}
|
||||
|
||||
// Priority 3: Fallback to current architecture-specific binary for backward compatibility
|
||||
// Priority 1: Get architecture-specific binary for backward compatibility
|
||||
let arch = if cfg!(target_arch = "aarch64") {
|
||||
"aarch64"
|
||||
} else if cfg!(target_arch = "x86_64") {
|
||||
@@ -313,7 +275,7 @@ impl AppAutoUpdater {
|
||||
}
|
||||
}
|
||||
|
||||
// Priority 4: Final fallback to any macOS DMG
|
||||
// Priority 2: Fallback to any macOS DMG
|
||||
for asset in assets {
|
||||
if asset.name.contains(".dmg")
|
||||
&& (asset.name.to_lowercase().contains("macos")
|
||||
@@ -688,20 +650,11 @@ mod tests {
|
||||
browser_download_url: "https://example.com/aarch64.dmg".to_string(),
|
||||
size: 12345,
|
||||
},
|
||||
AppReleaseAsset {
|
||||
name: "Donut.Browser_0.1.0_universal.dmg".to_string(),
|
||||
browser_download_url: "https://example.com/universal.dmg".to_string(),
|
||||
size: 12345,
|
||||
},
|
||||
];
|
||||
|
||||
let url = updater.get_download_url_for_platform(&assets);
|
||||
assert!(url.is_some());
|
||||
|
||||
// Should prefer universal binary over architecture-specific ones
|
||||
let url = url.unwrap();
|
||||
assert_eq!(url, "https://example.com/universal.dmg");
|
||||
|
||||
// Test with generic macOS DMG (no architecture specified)
|
||||
let generic_assets = vec![AppReleaseAsset {
|
||||
name: "Donut.Browser_0.1.0_macos.dmg".to_string(),
|
||||
@@ -713,7 +666,7 @@ mod tests {
|
||||
assert!(generic_url.is_some());
|
||||
assert_eq!(generic_url.unwrap(), "https://example.com/macos.dmg");
|
||||
|
||||
// Test fallback to architecture-specific when no universal is available
|
||||
// Test architecture-specific DMG
|
||||
let arch_specific_assets = vec![
|
||||
AppReleaseAsset {
|
||||
name: "Donut.Browser_0.1.0_x64.dmg".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user