Author Topic: RELEASE: Knossos.NET v1.0.0: Making a multiplatform C# launcher with AvaloniaUI  (Read 5756 times)

0 Members and 1 Guest are viewing this topic.

Offline ShivanSpS

  • 210
RELEASE: Knossos.NET v1.0.0: Making a multiplatform C# launcher with AvaloniaUI

If anyone has been paying attention to the Discord, i started working on it on December 25th 2022, i originally started this project to learn how to use the Avalonia UI SDK as im transitioning from Winforms to Avalonia at work in order to make Linux apps. So as im learning the UI SDK as i go here things will be rough around the edges until i get more experience.

Github repo
https://github.com/KnossosNET/Knossos.NET

Download:
https://github.com/KnossosNET/Knossos.NET/releases

Dev Enviroment:
-MSVC 2022
-.NET 6.0.406 SDK https://dotnet.microsoft.com/en-us/download/dotnet/6.0
-Avalonia Extension for Visual Studio https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaVS

Tool Repo:
If you want to add your modding tool to Knet tool repo you need to make a PR here
https://github.com/KnossosNET/Knet-Tool-Repo
You can also ask here or in Discord Knossos channel.

Requirements for the tool:
-File compressed in zip or tar.gz
-The application must be portable, no installer is supported
-A direct download link must be provided.
« Last Edit: February 19, 2024, 09:41:08 am by ShivanSpS »

 
Re: BETA: Knossos.NET v0.0.2: Making a multiplatform C# launcher with AvaloniaUI
Minor niggle... nothing important... but the green borders are kinda ugly to me. Would look better with no borders around the tiles imo... but a grey or black would be okay.

But like I said, that's minor. I'm super stoked about this. Tell me, will this mirror knossos' mod handling implementation or might it include any of the planned improvements from nuknossos. I ask cause nuknossos was going to keep each module of a mod in its own folder (like knossos' "dev mode" mod installation) instead of combining them into one folder. There are technical reasons I prefer the nuknossos approach but I can see the benefits of keeping things as similar as possible to knossos.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: BETA: Knossos.NET v0.0.2: Making a multiplatform C# launcher with AvaloniaUI
Overall:
Have been using v2 yesterday and this morning, really terrific work! Boots up much faster and smoother then even current community edition Knossos, checks the mod repo faster and does it all automatically!

I also really like how it shows the PXO list and has a separate engine tab.


Few things I've noticed that you are probably already aware of:

The arrows that show up when hovering over a mod are clever. I'm realized though that if I click on the arrow to go down to the bottom 3 options then it stays there and if I was a new user it might be confusing where the play buttons and others went (maybe I'm over thinking this). What are your thoughts on this?

The clear button at the top continues to show up even when there is nothing left to clear?

When clicking on a mod it might be good to make the popup window slightly smaller or have some way to easily show it's a seperate popup window? Or a button that says close. (might just be me, but it took me a hot second to figure out that it was a new window that I could just close without closing the whole program).

Also the mod window has a Play and Stop button. Would it be possible for the stop button to only be clickable or show if the game is actually running?

It would be really cool if the mod window supported animated PNGs for the banner image and if the text section supported formatting (both similar to old Knossos).



Again just wanted to say how awesome and impressive this is, thank you for taking all this on!!

 

Offline ShivanSpS

  • 210
Re: BETA: Knossos.NET v0.0.2: Making a multiplatform C# launcher with AvaloniaUI
The borders are also a status indicator, its suppoused to be Green = ok, Gray = dev mode, Blue = update is avalible,  Red = missing depedencies. But im yet to find a proper way to do that last part, if i dont end up implementing the red border i will replace green with a black border for as green would have no purpose.

Regarding mod and dev mode, i havent planned anything about it yet, and the reason is simple, i dont know anything about how it works when uploading a mod, log in to nebula, etc. So im going to focus first on everything is that is play only, dev mode will be the icing on the cake.

Buuut one thing for sure, the whole folder structure may be changed, right now im following how Knossos does stuff as this is intended to be a drop-in replacement, but in the future i may have a new folder structure that gets rid of the root pack concept as a whole, intended for clean installs. As the root packs, at least to me, makes little sense and just complicates things or make them more confusing.

---

I do agree about the arrows, but for a diferent reason, like going to mod settings, you probably want to go to play after doing that by staying it justs adds an additional button to click.

Mod details is very limited right now, but here ive been actually being limited by the UI framework, it dosent even have a rich text box control yet.

 
Re: BETA: Knossos.NET v0.0.2: Making a multiplatform C# launcher with AvaloniaUI
I don't have any comments except that this is incredibly cool.

 
Re: BETA: Knossos.NET v0.0.2: Making a multiplatform C# launcher with AvaloniaUI
oh wow, I wasn't expecting this to just seamlessly take over all my knossos settings, but it does! Does this mean I can just use the client interchange-ably with the other one(s)?

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: BETA: Knossos.NET v0.0.2: Making a multiplatform C# launcher with AvaloniaUI
If I may... small UI suggestion. The borders being a status indicator is a good idea. The borders are very noticeable; they tend to overpower the overall design and the green can clash with mod icons. Since that's the most common border (the ideal border, even), I think it should be neutralized. Grey should mean OK. Grey can be thought of as "no border" because it's not really noticeable. So no border/grey means no action needs to be taken.

Blue means it needs an update. Red means it needs intervention to fix dependencies. Those will stand out better once all the green is gone, too. Then do something like purple for mods in dev mode.

EDIT: quick mock-up to show what I mean about visibility.
« Last Edit: March 19, 2023, 06:26:08 pm by mjn.mixael »
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline ShivanSpS

  • 210
Re: BETA: Knossos.NET v0.0.2: Making a multiplatform C# launcher with AvaloniaUI
oh wow, I wasn't expecting this to just seamlessly take over all my knossos settings, but it does! Does this mean I can just use the client interchange-ably with the other one(s)?
Well, tbh it is only reading the location of your knossos lib, thats it. And yeah the intention is to be a drop in replacement, so both should work.
But not with 0.0.2, due to a oversight on my part with json encoding, i saw that knossos was using UTF-8 so i set UTF-8 for file writting, but in net 6 UTF-8 uses UTF-8-BOM by default i did not know that it was so diferent that the old Knossos fail to read those files, so any mod installed or modified with 0.0.2 will not be visible on the old Knossos, unless you open the mod.json with notepad++ and change the coding to UTF-8 without BOM.

This will be fixed for 0.0.3.


If I may... small UI suggestion. The borders being a status indicator is a good idea. The borders are very noticeable; they tend to overpower the overall design and the green can clash with mod icons. Since that's the most common border (the ideal border, even), I think it should be neutralized. Grey should mean OK. Grey can be thought of as "no border" because it's not really noticeable. So no border/grey means no action needs to be taken.

Blue means it needs an update. Red means it needs intervention to fix dependencies. Those will stand out better once all the green is gone, too. Then do something like purple for mods in dev mode.

EDIT: quick mock-up to show what I mean about visibility.


Something like this?


i dont like the purple borders, maybe black borders there?


mmmmm, maybe invert?


I think i like that last one, opinions?
« Last Edit: March 20, 2023, 05:42:09 pm by ShivanSpS »

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: BETA: Knossos.NET v0.0.2: Making a multiplatform C# launcher with AvaloniaUI
That last one looks the best IMO. It really highlights which mods have updates or errors and keeps the majority of the mods looking good without distracting borders.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: BETA: Knossos.NET v0.0.2: Making a multiplatform C# launcher with AvaloniaUI
:yes:
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: BETA: Knossos.NET v0.0.3: Making a multiplatform C# launcher with AvaloniaUI
I really like all the updated UI aspects. Colors look really nice, and the search and status bar work great.

On hovering over a mod, I wonder if the order could be Play, Details, Settings, FRED2, then on the next page FSO Debug and QTFRED (since those are much less used). Though I'm also guessing you have thought about this ordering a lot already :)


On the PXO tab, I really like how the games are auto shown now. You also mention text at the bottom of the screen about how to `input the PXO account long number and password in the multiplayer configuration in-game.` May or may not be useful to stated that keyboard short cuts for copy and paste work with those credentials, too?


On the Mod detail page:
I click the 'Play' button, then it changes to 'Stop' button but then immediately changes back to 'Play' button. Also, maybe instead of 'Play' it could be Read Text? Play kind of makes it sound like that button will play the mod, and not simply read the text (or maybe that's just me :D ).

I really like how that window is a bit smaller than the main one, so it's super obvious I can just exit out.

Overall a really terrific update and super impressive amount of work in a short time!

EDIT: It also appears that my changes to TTS options do not save. I can successfully save other settings options, but if I uncheck all TTS options, save, then try to recheck any and save, then the next time I come back to the settings none are checked. Oh I think I found the cause, I'll make a PR.
« Last Edit: March 26, 2023, 02:34:40 pm by wookieejedi »

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: BETA: Knossos.NET v0.0.4: Making a multiplatform C# launcher with AvaloniaUI
Dammit. I was ready to retire from SCP/FSO ecosystem, and then this comes along. :P

But really, this looks very cool. :yes:

Might you be interested in some help?

I can't promise how much I'll be able to contribute (RL is busy) and it'll be at least a month away, but I worked in .NET development (perf monitoring) for 3 years, so I know a thing or two about C#/.NET. :)

[Despite the timing, no April Fool's. ;)]

  

Offline ShivanSpS

  • 210
Re: BETA: Knossos.NET v0.0.4: Making a multiplatform C# launcher with AvaloniaUI
Right now, now that ngld is back ill take this opportunity to work on the dev tab. Well see how things are once this is done.

 

Offline ShivanSpS

  • 210
Re: BETA: Knossos.NET v0.0.9: Making a multiplatform C# launcher with AvaloniaUI
i just updated the roadmap... now that Avalonia V11 was release to stable ill start working on it again.

 
Re: BETA: Knossos.NET v0.0.9: Making a multiplatform C# launcher with AvaloniaUI
Stumbled upon this a little over a week ago and been using it over the other app ever since. Is this considered nuknossos? If so I quite like it!

 

Offline ShivanSpS

  • 210
Re: BETA: Knossos.NET v0.0.9: Making a multiplatform C# launcher with AvaloniaUI
Stumbled upon this a little over a week ago and been using it over the other app ever since. Is this considered nuknossos? If so I quite like it!
No, Nuknossos is an enterely new system, once it is done will have to make a NuKnossos.NET for it.

 
Re: BETA: Knossos.NET v0.1.0: Making a multiplatform C# launcher with AvaloniaUI
This is probably me being exceptionally stupid, but could someone explain to me how to get Avalonia UI installed in Linux?  I could not find any packages for it.

I also don't understand the instructions in the Readme.rm regarding:
Code: [Select]
-Right click on the project -> Publish
-Export to folder
-From there you can pick the dest enviroment on the list

What exactly am I supposed to right click on?  I am also not seeing a "publish" option from my right click drop down menu no matter what file or folder I click on.

Sorry if these are stupid questions.  I am very much past my prime in trying to learn the guts of compiling.  I learned to program Fortran and Visual Basic within Excel.  Compiling wasn't a thing for me.  And I've done barely any coding in the 20+ years since then.
"Wouldn't it be so wonderful if everything were meaningless?
But everything is so meaningful, and most everything turns to ****.
Rejoice."
-David Bazan

 

Offline ShivanSpS

  • 210
Re: BETA: Knossos.NET v0.2.0: Making a multiplatform C# launcher with AvaloniaUI
KnossosNET repo has been moved to an organization, so i updated the links.

This is probably me being exceptionally stupid, but could someone explain to me how to get Avalonia UI installed in Linux?  I could not find any packages for it.

I also don't understand the instructions in the Readme.rm regarding:
Code: [Select]
-Right click on the project -> Publish
-Export to folder
-From there you can pick the dest enviroment on the list

What exactly am I supposed to right click on?  I am also not seeing a "publish" option from my right click drop down menu no matter what file or folder I click on.

Sorry if these are stupid questions.  I am very much past my prime in trying to learn the guts of compiling.  I learned to program Fortran and Visual Basic within Excel.  Compiling wasn't a thing for me.  And I've done barely any coding in the 20+ years since then.
To be honest i have no idea on how to do anything on Mac or Linux as my dev enviroment is on Windows, and you can easily compile for Linux or Mac from Windows for C# .Net 5/6/7/8

In Windows it would be to right click the "Knossos.NET" project, project, not the solution, click public, then publish to folder, set the path, then select the OS/ARCH (do not use portable), enable build single file, and thats petty much it.

 
Re: BETA: Knossos.NET v0.2.0: Making a multiplatform C# launcher with AvaloniaUI
Ah.  Well, I'm afraid that puts Knossos.NET out of my reach until someone makes available as a package or something similar.  I'm just too far out of my element to figure this out on my own, and I finally bit the bullet and removed Windows from my machine during the COVID shutdown.  In theory, there's my work computer, but I definitely don't need to get in trouble with IT!

From what I can see on the screen shots, it looks like a nice bit of kit you're working on!  Best of luck.
"Wouldn't it be so wonderful if everything were meaningless?
But everything is so meaningful, and most everything turns to ****.
Rejoice."
-David Bazan

 

Offline taylor

  • Super SCP/Linux Guru
  • 212
    • http://www.icculus.org/~taylor
Re: BETA: Knossos.NET v0.2.0: Making a multiplatform C# launcher with AvaloniaUI
If you don't actually want to mess with the code I'd recommend just using a precompiled build from https://github.com/KnossosNET/Knossos.NET/releases where you can get x86_64 and aarch64 Linux builds. I believe you still need to have .NET installed to run those however. The next release should not require installing .NET first as well as having AppImage builds available. Also a flatpak version should hopefully be available next month.

If you'd like an AppImage build of the current release, instead of waiting for the next one, let me know what architecture you need and I'll send you a download link. Then all you'll need to do is download the file, make it executable, and run it. That's about as non-technical as we can make it at the moment.


Otherwise, if you do want to mess with the code, this should get you going:

You don't have to install Avalonia UI yourself, just the .NET SDK. Then when you publish (build/compile) the app it will pull in all of the dependencies for you. Install the .NET SDK using the instructions from here if you don't have it installed already. After that I recommend getting Visual Studio Code for editing and building the code. It should detect Knossos.NET as a C# project and setup the basics for you.

Generally though, it's easier to get builds via the command line. From inside the project directory, assuming the .NET SDK is installed and that you want a x86_64 binary, just run:

Code: [Select]
dotnet publish Knossos.NET/Knossos.NET.csproj -r linux-x64 -c Release --self-contained -p:PublishSingleFile=true
It might appear to hang for a while the first time you run it as it downloads all of the dependencies, but once it's done you should have a working binary available in Knossos.NET/bin/Release/net6.0/linux-x64/publish