Repository navigation
feat(ui): add macOS version with Avalonia UI - #174
ertugrulkutluer wants to merge 1 commit into
Conversation
Add AvaloniaUI, a cross-platform port of WPFUI that reuses the MainCore view models, so TBS can run on macOS. - AvaloniaUI: every WPFUI view ported to Avalonia 12 + ReactiveUI. The UI runs on the process main thread, which macOS requires. - MainCore: detect Chrome on macOS, keep Windows-only build settings conditional, and store data in ~/Library/Application Support on macOS. Windows behaviour is unchanged. - build-mac.sh: builds a self-contained TravianBotSharp.app. - release.yml: build the macOS app on macos-latest and attach TBS-<version>-macOS.zip to the release. The Windows zip is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
first of all, thank for your PR. Last time I checked, it was necessary to pay for a sign from Apple to run application on their machine, |
|
Thanks! No, the policy hasn't changed, but paying is only needed to avoid the warning, not to run the app.
The $99/year signing + notarization would only remove that one-time prompt. It's optional; I described both options in the README. |
There was a problem hiding this comment.
we will need update on other 2 workflows
There was a problem hiding this comment.
we use https://github.com/reactivemarbles/Extensions.Hosting on WPF project, and there is Avalonia support
There was a problem hiding this comment.
last time without <PlaywrightPlatform> it didn't filter driver and put all platform into the driver folder, do we need to specific macos to help that ?
There was a problem hiding this comment.
need to update the guide, macOS doesn't run .exe right ?
vinaghost
left a comment
There was a problem hiding this comment.
leave some comment please check
Summary
This adds a macOS version of TBS.
WPFUIonly runs on Windows, so this PR addsAvaloniaUI, a port of the same views to Avalonia 12 + ReactiveUI. It reuses the existingMainCoreview models unchanged, so bot logic stays shared between both UIs.Changes
AvaloniaUI/(new): every WPFUI view, user control and converter ported 1:1, with the same ReactiveUI bindings in code-behind.MessageBox/ file dialogs are replaced with Avalonia equivalents.MainCore(Windows behaviour unchanged):MainViewModel.CheckDriver: still uses the registry on Windows; on macOS it reads the Chrome version from/Applications/Google Chrome.app.MainCore.csproj:RuntimeIdentifier,SelfContainedandPlaywrightPlatformare now only set on Windows, so the project restores on macOS (Patchright then picksosx-arm64itself).AppPaths: data root is stillAppContext.BaseDirectoryon Windows; on macOS it is~/Library/Application Support/TravianBotSharp(an app bundle is not a good place for the DB, logs and Chrome profiles).build-mac.sh: builds a self-containedpublish/TravianBotSharp.app.release.yml: newBuildMacjob onmacos-latestthat attachesTBS-<version>-macOS.zipto the release. The Windows build and its zip name are unchanged.Testing
Tested on macOS 26 (Apple Silicon), Chrome 155:
VERSION=1.2.3 ./build-mac.sh+dittozip).Not tested: building on Windows. All changes are meant to keep WPFUI behaviour identical, but a Windows build check would be appreciated. The new release job has not run on GitHub Actions yet.
Notes
xattr -dr com.apple.quarantine TravianBotSharp.apponce (documented in the README). Notarization would need an Apple Developer account.