Skip to content

attempt to build mac app bundle - #232

Open
LeftofZen wants to merge 12 commits into
masterfrom
fixmacbuild
Open

LeftofZen wants to merge 12 commits into
masterfrom
fixmacbuild

Conversation

@LeftofZen

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 4, 2026 08:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the build.sh packaging pipeline to produce platform-specific build artifacts and adds an initial macOS .app bundle packaging step.

Changes:

  • Refactors the build steps into per-platform functions (Windows/Linux/macOS).
  • Adds macOS .app bundle creation with an inline Info.plist and zips the bundle.
  • Adds explicit dotnet restore steps prior to building.

Comment thread build.sh Resolved
Comment thread build.sh Resolved
Comment thread build.sh Resolved
Comment thread build.sh Resolved
@LeftofZen

Copy link
Copy Markdown
Collaborator Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copilot AI commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

@LeftofZen I've opened a new pull request, #236, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 15, 2026 22:55
* Initial plan

* Fix build.sh issues from code review

Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread build.sh Resolved
Comment thread build.sh Resolved
Comment thread build.sh Resolved
LeftofZen and others added 8 commits November 24, 2026 10:45
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
build.sh could not run at all: the review bot's --no-restore flags broke RID
publishes because the top-level restore had no runtime identifier
(NETSDK1047). Rewrite the script around a per-RID publish helper that lets
publish restore, drop the dead variables and the false 'parallel' claim, and
restore master's .pdb cleanup.

macOS now gets a proper bundle per architecture (osx-x64, osx-arm64) assembled
outside the publish folder, with a valid Info.plist (LSMinimumSystemVersion 15.0,
icon without extension), PkgInfo, an ad-hoc signature and a real .icns generated
from the existing PNG. Linux artifacts become .tar.gz so the updater can extract
them with System.Formats.Tar, and the tar records exec bits even when built on
Windows.

The updater is now cross-platform: archive names are arch-aware, the updater
binary name is per-platform, zip/tar.gz extraction is chosen by extension,
extraction targets the install root (the folder above the .app on macOS), exec
bits are restored after a zip update, and the editor relaunches via 'open -n'.
AssemblyVersion is no longer set from the Version property, which broke
prerelease builds, and GetCurrentAppVersion prefers the assembly informational
version so build.sh need not rewrite version.txt.

Also replace the stale .NET 8 workflow with a Windows/macOS/Linux packaging
workflow, fix folder-open arguments on macOS/Linux, stop NAudio from crashing on
macOS, and force LF for shell scripts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Master independently fixed several of the same issues (updater binary name on
Unix, FileMode.Create log truncation, async version check, caching), and also
moved version.txt into Definitions and migrated to .slnx/Directory.Build.props.
Resolve the three conflicts so both sets of fixes survive:

- build.sh: keep the per-RID publish rewrite and fold in master's
  Definitions/version.txt path.
- Common/VersionHelpers.cs: keep master's logging/async/caching, and add the
  entry-assembly informational version preference plus bundle-aware updater
  path resolution. The embedded-resource fallback now looks for
  Definitions.version.txt first.
- GuiUpdater/Program.cs: keep master's latest-version-first ordering and log
  truncation fix on top of the cross-platform extraction.

Verified: solution builds, 2724 tests pass, and build.sh produces all four
artifacts with correct versions, modes and bundle layout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The version now comes from the assembly informational version set by
-p:Version, with Definitions/version.txt only as a fallback, so build.sh no
longer needs to rewrite it. tag.sh still owns that file for release commits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The half-migrated state meant development builds reported the 1.2.3 placeholder
instead of a real version. Remove the duplicate scheme entirely and use the
standard .NET approach instead: MinVer derives the version from git tags.

- Add MinVer to Directory.Build.props. A commit tagged 5.14.0 builds as 5.14.0;
  otherwise the version is the next patch pre-release plus the commit height
  (eg 5.13.2-alpha.0.19). MinVer sets AssemblyVersion, FileVersion,
  InformationalVersion and Version for every project.
- Delete Gui/version.txt and Definitions/version.txt, the embedded resource
  reference, and the runtime fallback. GetCurrentAppVersion now reads the
  assembly informational version and nothing else.
- Remove the hard-coded <Version>1.2.3</Version> placeholders from Gui and
  GuiUpdater.
- build.sh takes the version from MinVer and only accepts an argument as an
  override (passed as MinVerVersionOverride), so artifact names and the version
  the app reports cannot diverge.
- tag.sh only tags and pushes now; there is no version file to commit.
- CI checks out full history and tags so MinVer can compute the version.
- Add a test asserting the reported version matches the assembly's.

Verified: solution builds, 2725 tests pass, and builds with and without a
version override produce correctly versioned artifacts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Asking whether tag.sh produces a draft release surfaced several real defects:

- build.sh queried the MinVer target before restoring, but the target comes from
  a NuGet package, so on a clean checkout (ie CI) it failed with MSB4057.
  Restore first.
- A checkout with no reachable version tag makes MinVer fall back to
  0.0.0-alpha.0. build.sh now refuses to build in that case instead of
  silently producing meaninglessly-versioned artifacts, and the test job
  checks out full history and tags so it computes a real version.
- The tag filter "[0-9]+.[0-9]+.[0-9]+" silently ignored pre-release tags such
  as 5.14.0-beta.1, so those releases would never have been built. Appended *
  to match them.
- The test job still excluded the ObjectService integration fixtures as
  "pre-existing failures", but master has since fixed them (they pass). Removed
  the stale filter.
- The version test asserted a non-zero major version, which would fail in any
  tagless clone; it now compares against the assembly and only rejects
  MinVer's no-tag fallback when a tag is actually reachable.

Verified on a clean shallow clone: build.sh fails with a clear error rather
than shipping 0.0.0-alpha.0; on the real repo it resolves 5.13.2-alpha.0.20 and
builds all four artifacts. Full suite: 2725 passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CI builds the tag from a fresh checkout, so if the tagged commit has not been
pushed the workflow either fails or builds something the remote does not have.
tag.sh now ensures the commit is on the remote first.

- Resolve the remote and branch from the upstream, falling back to origin and
  the current branch name (and saying so) when no upstream is configured.
- If the remote branch does not exist, push it and set upstream.
- If the commit is already an ancestor of the remote branch, do nothing.
- If the remote branch is an ancestor of HEAD, push the commit.
- If they have diverged, stop and explain rather than force-pushing or tagging
  something unbuildable.
- Reject detached HEAD, and reject a tag that already exists on the remote
  (previously only checked locally, which would fail at the push step).

Verified against a sandbox remote: unpushed branch, already-pushed commit,
ahead-of-remote, diverged, remote-only tag, pre-release version, dirty tree and
invalid version all behave correctly. No tag was created on the real repo.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants