Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Onova cross-platform #51

Merged
merged 2 commits into from
Jan 18, 2023
Merged

Make Onova cross-platform #51

merged 2 commits into from
Jan 18, 2023

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented Jan 18, 2023

Running the updater through mono on non-Windows operating systems works fine.

Running the updater through mono on non-Windows operating systems works fine.
@0xced
Copy link
Contributor Author

0xced commented Jan 18, 2023

The cause of the test failures is actually the GitHub rate limit. When the limit is not reached, all 19 tests pass on Linux + macOS + Windows.

@0xced
Copy link
Contributor Author

0xced commented Jan 18, 2023

Note that I submitted this pull request because I tried to run the tests on macOS and they were not all passing. I don't actually need Onova to work on Linux or macOS, I just like to have all tests green. ✔️

The fix was easy to implement but I'd totally understand if you don't want to merge this because of the support burden it could bring.

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jan 18, 2023

Thanks. I think it's small and simple enough that we can merge this. I'd still not advertise Onova as a cross-platform solution though (especially now that I'm not planning any major improvements to it).

Onova/UpdateManager.cs Outdated Show resolved Hide resolved
@Tyrrrz Tyrrrz added the enhancement New feature or request label Jan 18, 2023
@Tyrrrz Tyrrrz merged commit 07c5c6b into Tyrrrz:master Jan 18, 2023
@0xced 0xced deleted the cross-platform branch January 18, 2023 14:13
@Mrxx99
Copy link

Mrxx99 commented Jan 27, 2023

I tried it on Ubuntu and got an exception:

System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'mono' with working directory '/home/alex/Code/Onova/OnovaAvaloniaTest/AvaloniaApp/bin/Debug/net6.0'. No such file or directory
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Onova.UpdateManager.LaunchUpdater(Version version, Boolean restart, String restartArguments) in /home/alex/Code/Onova/Onova/Onova/UpdateManager.cs:line 265
at Onova.Extensions.LaunchUpdater(IUpdateManager manager, Version version, Boolean restart) in /home/alex/Code/Onova/Onova/Onova/Extensions.cs:line 19
at AvaloniaApp.ViewModels.MainWindowViewModel.CheckForUpdates() in /home/alex/Code/Onova/OnovaAvaloniaTest/AvaloniaApp/ViewModels/MainWindowViewModel.cs:line 37

@0xced
Copy link
Contributor Author

0xced commented Jan 27, 2023

Is mono installed and available in your PATH? What does happen if you type this in a terminal?

mono --version

@Mrxx99
Copy link

Mrxx99 commented Jan 27, 2023

I did not have mono installed, I installed it and now get

WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319

in the console and the app closes but no update is applied.

Also how would you deliver that to the user, require them to install mono or is there a better way?

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jan 27, 2023

I did not have mono installed, I installed it and now get

WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319

in the console and the app closes but no update is applied.

Also how would you deliver that to the user, require them to install mono or is there a better way?

This is mainly just to be able to develop Onova on non-Windows OS, but the library itself is still primarily Windows-only. It would have to be significantly redesigned to properly be cross-platform, which is not something I expect to have the capacity for anytime soon.

@Mrxx99
Copy link

Mrxx99 commented Jan 27, 2023

Ok, understand, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants