Skip to content
Merged
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
43 changes: 38 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,16 @@ jobs:
- name: Package Linux Binary
run: mv zig-out/linux/spacecap zig-out/linux/spacecap-linux-x86_64

# - name: Package Windows
# run: zip -r spacecap-windows-x86_64.zip zig-out/windows

- name: Generate Checksums
run: |
sha256sum zig-out/linux/spacecap-linux-x86_64 > SHA256SUMS.txt
# sha256sum spacecap-windows-x86_64.zip >> SHA256SUMS.txt
sha256sum zig-out/linux/spacecap-linux-x86_64.AppImage >> SHA256SUMS.txt

- name: Upload Workflow Artifacts
uses: actions/upload-artifact@v4
with:
name: spacecap-release-assets
# spacecap-windows-x86_64.zip is currently disabled.
path: |
zig-out/linux/spacecap-linux-x86_64
zig-out/linux/spacecap-linux-x86_64.AppImage
Expand Down Expand Up @@ -139,8 +135,45 @@ jobs:
prerelease: ${{ steps.version.outputs.prerelease }}
generate_release_notes: ${{ github.ref_type != 'tag' || steps.existing_release.outputs.exists != 'true' }}
append_body: false
# spacecap-windows-x86_64.zip is currently disabled.
files: |
zig-out/linux/spacecap-linux-x86_64
zig-out/linux/spacecap-linux-x86_64.AppImage
SHA256SUMS.txt

- name: Test Install Script
env:
EXPECTED_VERSION: ${{ steps.built_version.outputs.release_version }}
run: |
set -euo pipefail

install_home="$(mktemp -d)"
trap 'rm -rf "$install_home"' EXIT

install_args=""
if [ "${GITHUB_REF_TYPE}" != "tag" ]; then
install_args="--nightly"
fi

for attempt in 1 2 3 4 5; do
rm -rf "$install_home"
mkdir -p "$install_home"
install_path="$install_home/.local/bin/spacecap"

if install_output="$(HOME="$install_home" APPIMAGE_EXTRACT_AND_RUN=1 sh ./install.sh $install_args)"; then
echo "$install_output"
expected_install_output="Installed spacecap version $EXPECTED_VERSION to $install_path."
if ! printf '%s\n' "$install_output" | grep -Fqx "$expected_install_output"; then
echo "Install output mismatch on attempt $attempt. Expected line: $expected_install_output" >&2
continue
fi

exit 0
fi

if [ "$attempt" -eq 5 ]; then
echo "install.sh did not install the expected version after $attempt attempts" >&2
exit 1
fi

sleep 10
done
11 changes: 10 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ DESKTOP_DIR="$DATA_DIR/applications"
DESKTOP_PATH="$DESKTOP_DIR/$APP_NAME.desktop"
ICON_DIR="$DATA_DIR/icons/hicolor/scalable/apps"
ICON_PATH="$ICON_DIR/$APP_NAME.svg"
WAS_INSTALLED=0
if [ -e "$INSTALL_PATH" ] || [ -L "$INSTALL_PATH" ]; then
WAS_INSTALLED=1
fi

if [ "$MODE" = "uninstall" ]; then
REMOVED=0
Expand Down Expand Up @@ -137,7 +141,12 @@ mv "$APPIMAGE_TMP" "$INSTALL_PATH"
mv "$DESKTOP_TMP" "$DESKTOP_PATH"
mv "$ICON_TMP" "$ICON_PATH"

echo "Installed $APP_NAME to $INSTALL_PATH."
VERSION="$("$INSTALL_PATH" --version)"
if [ "$WAS_INSTALLED" -eq 1 ]; then
echo "Updated $APP_NAME to version $VERSION at $INSTALL_PATH."
else
echo "Installed $APP_NAME version $VERSION to $INSTALL_PATH."
fi
echo "Installed the desktop entry to $DESKTOP_PATH."
echo "Installed the app icon to $ICON_PATH."

Expand Down
2 changes: 2 additions & 0 deletions src/ui/draw_bottom_panel.zig
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ pub fn draw_bottom_panel(allocator: Allocator, store: *Store, state: *Store.Stat
c.ImGui_TableNextRow();
_ = c.ImGui_TableNextColumn();
const video_source_button_label = if (state.capture.video_capture_active) "󰦳 New Source" else "󰦳 Select Source";
c.ImGui_BeginDisabled(!state.capture.is_video_capture_supprted);
if (c.ImGui_ButtonEx(video_source_button_label, .{ .x = c.ImGui_GetContentRegionAvail().x, .y = 0 })) {
store.dispatch(.{ .capture = .{ .select_video_source = .{ .source_type = .all } } });
}
c.ImGui_EndDisabled();

const video_capture_ready = state.capture.is_video_capture_supprted and state.capture.video_capture_active;

Expand Down
2 changes: 1 addition & 1 deletion src/ui/draw_video_preview.zig
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn draw_video_preview(
c.ImGui_Image(capture_preview.capture_preview_buffer.im_texture_ref, .{ .x = render_width, .y = render_height });
},
.vulkan_video_not_supported => {
const message = "Vulkan video is not supported on your current hardware. Video recording will be disabled.";
const message = "Video capture is disabled. Vulkan video is not supported on your current hardware, or your video drivers may be out of date.";
const wrap_width = container_width * 0.8;
const text_size = c.ImGui_CalcTextSizeEx(message, null, false, wrap_width);
const cursor_x = (container_width - text_size.x) / 2;
Expand Down
Loading