diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 75f0a62e3e..1cb580cb7d 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -123,8 +123,20 @@ env_logger = "0.9" serde_json = { version = "1.0", features = ["preserve_order"] } unindent = "0.1.7" -[package.metadata.bundle] -icon = ["app-icon@2x.png", "app-icon.png"] +[package.metadata.bundle-dev] +icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"] +identifier = "dev.zed.Zed-Dev" +name = "Zed Dev" +osx_minimum_system_version = "10.15.7" + +[package.metadata.bundle-preview] +icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"] +identifier = "dev.zed.Zed-Preview" +name = "Zed Preview" +osx_minimum_system_version = "10.15.7" + +[package.metadata.bundle-stable] +icon = ["resources/app-icon@2x.png", "resources/app-icon.png"] identifier = "dev.zed.Zed" name = "Zed" osx_minimum_system_version = "10.15.7" diff --git a/crates/zed/resources/app-icon-preview.png b/crates/zed/resources/app-icon-preview.png new file mode 100644 index 0000000000..a33124e4a0 Binary files /dev/null and b/crates/zed/resources/app-icon-preview.png differ diff --git a/crates/zed/resources/app-icon-preview@2x.png b/crates/zed/resources/app-icon-preview@2x.png new file mode 100644 index 0000000000..42dbeec599 Binary files /dev/null and b/crates/zed/resources/app-icon-preview@2x.png differ diff --git a/crates/zed/app-icon.png b/crates/zed/resources/app-icon.png similarity index 100% rename from crates/zed/app-icon.png rename to crates/zed/resources/app-icon.png diff --git a/crates/zed/app-icon@2x.png b/crates/zed/resources/app-icon@2x.png similarity index 100% rename from crates/zed/app-icon@2x.png rename to crates/zed/resources/app-icon@2x.png diff --git a/script/bundle b/script/bundle index e69413bf93..e4db3f83c7 100755 --- a/script/bundle +++ b/script/bundle @@ -22,7 +22,17 @@ echo "Compiling cli binary for x86_64-apple-darwin" cargo build --release --package cli --target x86_64-apple-darwin echo "Creating application bundle" -(cd crates/zed && cargo bundle --release --target x86_64-apple-darwin) +( + cd crates/zed + channel=$(cat RELEASE_CHANNEL) + cp Cargo.toml Cargo.toml.backup + sed \ + -i .backup \ + "s/package.metadata.bundle-${channel}/package.metadata.bundle/" \ + Cargo.toml + cargo bundle --release --target x86_64-apple-darwin + mv Cargo.toml.backup Cargo.toml +) echo "Creating fat binaries" lipo \