Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
- 'scripts/build-linux-packages.mjs'
- 'scripts/build-macos-packages*'
- 'scripts/bundle-gpui*'
- 'scripts/build-macos-bundles*'
- 'scripts/build-macos-icon*'
- 'apps/macos-bundles/**'
- 'scripts/finalize-linux-*'
- 'scripts/finalize-macos-*'
- 'scripts/linux-bundle-config*'
Expand Down Expand Up @@ -364,7 +367,11 @@ jobs:
uses: actions/checkout@v4

- name: Test desktop build preparation
run: node --test scripts/prepare-gpui-dependency.test.mjs scripts/build-macos-packages.test.mjs scripts/bundle-gpui.test.mjs scripts/finalize-macos-packages.test.mjs
run: node --test scripts/prepare-gpui-dependency.test.mjs scripts/build-macos-packages.test.mjs scripts/bundle-gpui.test.mjs scripts/build-macos-bundles.test.mjs scripts/build-macos-icon.test.mjs scripts/finalize-macos-packages.test.mjs

- name: Compile macOS Quick Look bundles
if: ${{ runner.os == 'macOS' }}
run: swift build -c release --package-path apps/macos-bundles

- name: Test Linux packaging
if: ${{ runner.os == 'Linux' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/desktop-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ jobs:
run: node --test scripts/prepare-gpui-dependency.test.mjs

- name: Test desktop packaging scripts
run: node --test scripts/build-macos-packages.test.mjs scripts/bundle-gpui.test.mjs scripts/finalize-macos-packages.test.mjs
run: node --test scripts/build-macos-packages.test.mjs scripts/bundle-gpui.test.mjs scripts/build-macos-bundles.test.mjs scripts/build-macos-icon.test.mjs scripts/finalize-macos-packages.test.mjs

- name: Install Linux desktop dependencies
if: ${{ runner.os == 'Linux' }}
Expand Down
26 changes: 26 additions & 0 deletions apps/desktop-gpui/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,31 @@
<string>Cap captures your screen as part of recording your Caps</string>
<key>NSCameraUseContinuityCameraDeviceType</key>
<true/>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>so.cap.desktop.project</string>
<key>UTTypeDescription</key>
<string>Cap Project</string>
<key>UTTypeConformsTo</key>
<array>
<string>com.apple.package</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>cap</string>
</array>
</dict>
</dict>
</array>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleIconName</key>
<string>cap-solarium</string>
<key>NSAccentColorName</key>
<string>AccentColor</string>
</dict>
</plist>
Binary file added apps/desktop-gpui/assets/app-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/desktop-gpui/assets/cap-debug-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/desktop-gpui/assets/dock-icon.png
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/desktop-gpui/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn main() {
println!("cargo:rustc-link-arg-bin=cap-gpui=/STACK:16777216");
}

let icon = "../desktop/src-tauri/icons/icon.ico";
let icon = "icons/icon.ico";
println!("cargo:rerun-if-changed={icon}");
tauri_winres::WindowsResource::new()
.set_icon_with_id(icon, "1")
Expand Down
Binary file added apps/desktop-gpui/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/desktop-gpui/icons/128x128@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/desktop-gpui/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors": [
{
"color": {
"color-space": "srgb",
"components": {
"alpha": "1.000",
"blue": "0xFF",
"green": "0x7A",
"red": "0x00"
}
},
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"color": {
"color-space": "srgb",
"components": {
"alpha": "1.000",
"blue": "0xFF",
"green": "0x84",
"red": "0x0A"
}
},
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
}
}
6 changes: 6 additions & 0 deletions apps/desktop-gpui/icons/Cap.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info": {
"author": "xcode",
"version": 1
}
}
4 changes: 4 additions & 0 deletions apps/desktop-gpui/icons/cap-solarium.icon/Assets/FullRing.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
251 changes: 251 additions & 0 deletions apps/desktop-gpui/icons/cap-solarium.icon/icon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
{
"features" : [
"refractivity",
"specular-location"
],
"fill-specializations" : [
{
"value" : "automatic"
},
{
"appearance" : "dark",
"value" : "automatic"
}
],
"groups" : [
{
"blend-mode-specializations" : [
{
"appearance" : "dark",
"value" : "normal"
}
],
"blur-material" : null,
"hidden-specializations" : [
{
"value" : false
},
{
"idiom" : "square",
"value" : false
}
],
"layers" : [
{
"blend-mode" : "normal",
"fill-specializations" : [
{
"value" : "automatic"
},
{
"appearance" : "dark",
"value" : "none"
}
],
"glass" : true,
"hidden" : true,
"image-name" : "FullRing.svg",
"name" : "FullRing",
"position" : {
"scale" : 9.35,
"translation-in-points" : [
0,
0
]
}
}
],
"lighting" : "individual",
"position" : {
"scale" : 1,
"translation-in-points" : [
0,
0
]
},
"refractivity" : {
"depth" : 0.6013671875,
"enabled" : true,
"strength" : 0.1844921875
},
"shadow" : {
"kind" : "layer-color",
"opacity" : 0.6
},
"specular" : true,
"translucency" : {
"enabled" : true,
"value" : 0.4
}
},
{
"blur-material" : null,
"layers" : [
{
"image-name" : "FullRingsSeaGlass2.png",
"name" : "FullRingsSeaGlass2",
"position-specializations" : [
{
"idiom" : "square",
"value" : {
"scale" : 0.65,
"translation-in-points" : [
0,
0
]
}
}
]
}
],
"lighting" : "individual",
"refractivity-specializations" : [
{
"value" : {
"depth" : 0.5054296875,
"enabled" : true,
"strength" : 0.34328125
}
},
{
"appearance" : "dark",
"value" : {
"depth" : 0.511875,
"enabled" : true,
"strength" : 0.4355078125
}
}
],
"shadow-specializations" : [
{
"value" : {
"kind" : "layer-color",
"opacity" : 0.5
}
},
{
"appearance" : "dark",
"value" : {
"kind" : "layer-color",
"opacity" : 0.5
}
}
],
"specular-specializations" : [
{
"value" : "inside"
},
{
"appearance" : "dark",
"value" : "inside"
}
],
"translucency" : {
"enabled" : true,
"value" : 0.25
}
},
{
"blur-material" : null,
"layers" : [
{
"blend-mode-specializations" : [
{
"appearance" : "dark",
"value" : "normal"
}
],
"fill-specializations" : [
{
"appearance" : "dark",
"value" : "none"
}
],
"glass" : false,
"hidden-specializations" : [
{
"idiom" : "square",
"value" : false
}
],
"image-name" : "FullRingsSeaGlass-Shadow.png",
"name" : "FullRingsSeaGlass-Shadow",
"opacity-specializations" : [
{
"appearance" : "dark",
"value" : 0
},
{
"appearance" : "tinted",
"value" : 0
}
],
"position-specializations" : [
{
"idiom" : "square",
"value" : {
"scale" : 0.65,
"translation-in-points" : [
0,
0
]
}
}
]
}
],
"lighting" : "individual",
"refractivity-specializations" : [
{
"value" : {
"depth" : 0.5054296875,
"enabled" : true,
"strength" : 0.34328125
}
},
{
"appearance" : "dark",
"value" : {
"depth" : 0.511875,
"enabled" : true,
"strength" : 0.4355078125
}
}
],
"shadow-specializations" : [
{
"value" : {
"kind" : "layer-color",
"opacity" : 0.5
}
},
{
"appearance" : "dark",
"value" : {
"kind" : "layer-color",
"opacity" : 0.5
}
}
],
"specular-specializations" : [
{
"value" : "outside"
},
{
"appearance" : "dark",
"value" : "inside"
}
],
"translucency" : {
"enabled" : true,
"value" : 0.3
}
}
],
"supported-platforms" : {
"circles" : [
"watchOS"
],
"squares" : "shared"
}
}
Binary file added apps/desktop-gpui/icons/icon.icns
Binary file not shown.
Binary file added apps/desktop-gpui/icons/icon.ico
Binary file not shown.
Binary file added apps/desktop-gpui/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions apps/desktop-gpui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,12 @@ fn main() {
app.run(move |cx: &mut App| {
gpui_tokio::init_from_handle(cx, runtime_handle);
gpui_tokio::Tokio::spawn(cx, cap_utils::operation_diagnostics::run_checkpoints()).detach();
// The dock icon: an unbundled dev binary shows the generic terminal
// document without it. The bytes are the shipping app's icon.png.
platform::set_dock_icon(include_bytes!("../assets/dock-icon.png"));
#[cfg(all(debug_assertions, target_os = "macos"))]
platform::set_dock_icon(if objc2::available!(macos = 26.0) {
include_bytes!("../assets/cap-debug-icon.png")
} else {
include_bytes!("../assets/cap-debug-icon-legacy.png")
});

if let Err(error) = Assets.load_fonts(cx) {
tracing::error!("failed to load embedded fonts: {error:#}");
Expand Down
Loading
Loading