Splitwirez / avalonia-aero-theme

https://github.com/Splitwirez/avalonia-aero-theme
110 stars 8 forks source link

support for .net8? #4

Open Neurofibromin opened 4 weeks ago

Neurofibromin commented 4 weeks ago

Hey, great project!

I was wondering if .net8.0 is supported, as I am getting a quite a few errors in the demo project.

Also a guide on how to add this theme to a project/solution would be appreciated (startup guide or something like that).

Cheers

Splitwirez commented 4 weeks ago

Hey, great project!

Aw, thank you :D


I was wondering if .net8.0 is supported, as I am getting a quite a few errors in the demo project.

Odd...I just tried building the demo project for .NET 8, to see if I could replicate your problem, but it built without issue. Could you explain how you attempted to build for .NET 8, and show the errors in question?


Also a guide on how to add this theme to a project/solution would be appreciated (startup guide or something like that).

Yes, I'd planned on doing something like that, in due time, but...truth be told, this theme is far from complete, and thus I can't really encourage its use yet. In fact, this has created a bit of a motivational chicken-and-egg problem:

So, with all that in mind...are you implying that you're interested in actually using this theme in something, by any chance...? If so, please do elaborate :eyes:


(The same motivation problem applies to my other Avalonia theme projects and such:

...though I doubt that means much of anything to you)

Neurofibromin commented 4 weeks ago

Hey, thank you for the answer!

Odd...I just tried building the demo project for .NET 8, to see if I could replicate your problem, but it built without issue. Could you explain how you attempted to build for .NET 8, and show the errors in question?

I have just edited the csproj files to have <TargetFrameworks>$(ExtraTargetFrameworks)net8.0</TargetFrameworks> I am getting quite a few errors, so the problem is probably on my end - just wanted to check net8.0 support before getting into the error uncovering adventure. (just in case I attached a screenshot of the errors - maybe it is something obvious to you)

errors

Progress is often...glacial, at best, due to low motivation

Isn't that the way all small passion projects work? :D Yes, in fact I would like to use your theme in two of my not-yet-working projects. I would hesitate to say in production, because no one actually uses my projects (apart from me). If you are interested: this and this ((shameless self-plug over))

I personally would like to see your theme in avalonia programs - sorry I cannot help with actual code contribution to your projects, I am a beginner to styling and to avalonia as well.

Splitwirez commented 4 weeks ago

Hey, thank you for the answer!

No need to thank me - in fact, thank you for taking the time to reach out :D


I have just edited the csproj files to have <TargetFrameworks>$(ExtraTargetFrameworks)net8.0</TargetFrameworks> I am getting quite a few errors, so the problem is probably on my end - just wanted to check net8.0 support before getting into the error uncovering adventure. (just in case I attached a screenshot of the errors - maybe it is something obvious to you)

errors

Right...uh, well for now, to run the sample app targeting .NET 8, you can either...

  1. Navigate to samples/AvaloniaAero.Demo.Desktop/ and do dotnet run -p:AdditionalTargetFrameworks=net8.0 --framework net8.0
  2. Remove the entire TargetFrameworks line from samples/AvaloniaAero.Demo.Desktop/AvaloniaAero.Demo.Desktop.csproj and add <TargetFramework>net8.0</TargetFramework> instead

Hope this helps. Let me know if you run into trouble with either method.

I know it's kind of ugly, especially since you use Visual Studio. I'd like to fix that...I've elaborated on the obstacles at the end of this reply.


Isn't that the way all small passion projects work? :D

Heh yeah, I suppose so. I just brought it up here on the off change you might unknowingly have a solution for this particular case...and it seems luck was on my side.


Yes, in fact I would like to use your theme in two of my not-yet-working projects. I would hesitate to say in production, because no one actually uses my projects (apart from me). If you are interested: this and this ((shameless self-plug over))

Fair. There's no need to qualify it as "shameless" - I literally asked, after all.


I personally would like to see your theme in avalonia programs - sorry I cannot help with actual code contribution to your projects, I am a beginner to styling and to avalonia as well.

No need to apologize. Giving me an actual sense of purpose is already a huge help for this project.

I'll try to get a pre-release nuget package and some kind of "how to use" info up soon :+1:


Not sure how to hook that up to Visual Studio though - truth be told, as a Linux main (ironic, I know), I kind of...lost sight of needing to consider Visual Studio entirely. I guess I'll have to look into that.

I would just add net8.0 to the TargetFrameworks and call it done, but that's a bit problematic for several reasons:

Guess there's no harm in trying my luck again...would you happen to know how to include net8.0 in TargetFrameworks if using Visual Studio 2022 or later or not using Visual Studio at all, but not when using an older version of Visual Studio?

Neurofibromin commented 3 weeks ago

Hey,

I have tried your first suggestion, it did not work, unfortunately:


### ~/R/a/s/AvaloniaAero.Demo.Desktop (main) [1]> dotnet restore
  Determining projects to restore...
/usr/lib64/dotnet/sdk/8.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.EolTargetFrameworks.targets(32,5): warning NETSDK1138: The target framework 'net5.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [/home/user/RiderProjects/avalonia-aero-theme/samples/AvaloniaAero.Demo.Desktop/AvaloniaAero.Demo.Desktop.csproj::TargetFramework=net5.0]
  All projects are up-to-date for restore.
### ~/R/a/s/AvaloniaAero.Demo.Desktop (main)> dotnet run -p:AdditionalTargetFrameworks=net8.0 --framework net8.0
/usr/lib64/dotnet/sdk/8.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.EolTargetFrameworks.targets(32,5): warning NETSDK1138: The target framework 'net5.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [/home/user/RiderProjects/avalonia-aero-theme/samples/AvaloniaAero.Demo.Desktop/AvaloniaAero.Demo.Desktop.csproj::TargetFramework=net5.0]
/usr/lib64/dotnet/sdk/8.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file '/home/user/RiderProjects/avalonia-aero-theme/samples/AvaloniaAero.Demo.Desktop/obj/project.assets.json' doesn't have a target for 'net8.0'. Ensure that restore has run and that you have included 'net8.0' in the TargetFrameworks for your project. [/home/user/RiderProjects/avalonia-aero-theme/samples/AvaloniaAero.Demo.Desktop/AvaloniaAero.Demo.Desktop.csproj::TargetFramework=net8.0]

The build failed. Fix the build errors and run again.

But the second suggestion did! But it was not so straightforward. :) Changing the csproj files: The solution is a bit weird, neither Jetbrains Rider nor Visual Studio recognises all the projects correctly:

To solve this I changed AvaloniaAero.csproj, AvaloniaAero.Demo.csproj, AvaloniaAero.Demo.Desktop.csproj to have <TargetFramework>net8.0</TargetFramework> and removed <LangVersion>8.0</LangVersion> from all the project files. After that I edited the solution file (.sln) to include all the projects. Press debug and it just works! Great stuff. I will open a pull request with the new solution file shortly.


I'll try to get a pre-release nuget package and some kind of "how to use" info up soon 👍

Looking forward to that

as a Linux main

and yet writing code for dotnet 💀 xd

would you happen to know how to ...

Not yet, but I will have a look at it.

Neurofibromin commented 3 weeks ago

Hey, Had a look at including net8.0 in TargetFrameworks if using Visual Studio 2022 or later, added the new commit to the pull request. It works perfect for me, tested on windows & VS2022 (v17)

Pannoniae commented 2 weeks ago

I'm also planning to use your theme;) fuck flat design, all the other themes (even the default) are mobile flat soulless boring unreadable slop

My usecase (currently) is a crashlog for a cross-platform block game. When the game crashes, I want to pop up a window with the stacktrace + system details which can be either copied out or sent to the developer (me).

And since I'm developing on Linux + want the game to be cross-platform, using WPF themes isn't exactly an option:P

Splitwirez commented 2 weeks ago

Hey, Had a look at including net8.0 in TargetFrameworks if using Visual Studio 2022 or later, added the new commit to the pull request. It works perfect for me, tested on windows & VS2022 (v17)

@Neurofibromin Thanks, and as stated at https://github.com/Splitwirez/avalonia-aero-theme/pull/5#issuecomment-2182817734 , sorry for the late reply.

Splitwirez commented 2 weeks ago

I'm also planning to use your theme;)

@Pannoniae Thank you so much for reaching out to let me know :DDD


fuck flat design, all the other themes (even the default) are mobile flat soulless boring unreadable slop

Heh...I uh, wouldn't have put it in those words, but I do feel that sentiment. Some flat(/uh..."post-flat"?) design is created out of a genuine passion for a sort of...extreme "less is more" ideology, and although it's certainly not my cup of tea, I can respect that for what it is, and can see why some people genuinely like that sort of thing.

Folks like us are a minority of a sort, but I think it's important that we try to not become bitter as a result - otherwise, we run the risk of coming off as belligerent, dogmatic "OLD = GOOD, NEW = BAD" elitists. I don't know about you, but I don't like the sound of that. (this is 100% NOT an accusation, to clarify...just my perspective on...well, not my perspective)

To this end, I feel it's good to try to appreciate the reasoning and desires of that crowd, as demonstrated above.

But yes, a lot of it is just soulless, corporate...uh, corporate-ness? Frustrating indeed.


My usecase (currently) is a crashlog for a cross-platform block game. When the game crashes, I want to pop up a window with the stacktrace + system details which can be either copied out or sent to the developer (me).

Huh...so I take it the game itself is yours too? Or is this some kind of modding tool or something like that?

And since I'm developing on Linux + want the game to be cross-platform, using WPF themes isn't exactly an option:P

Well...technically it is - you have two options to do exactly that:

  1. Apply for an Avalonia XPF license
  2. Become a code alcoholic

Neither seems like a very good strategy for what you're doing though, if you ask me. (granted, I have very little information upon which to comment, but still...)

Splitwirez commented 2 weeks ago

Also, @Neurofibromin @Pannoniae to both of you:

What Controls do you need re-styled?

Are there any controls I've not yet gotten around to, which your respective projects use? Please do let me know, so I can try to prioritize accordingly. (within reason, of course)

Pannoniae commented 2 weeks ago

To answer your questions (roughly in order):

I can respect that for what it is, and can see why some people genuinely like that sort of thing.

Well I can definitely understand it from the perspective of a UI designer - way less work, it scales automatically and you can't be criticised for any design choices you made because you didn't make any:P

It's more problematic when it's users defending that sort of thing - it isn't even beneficial to them at all, it's just brainless simping.

Folks like us are a minority of a sort, but I think it's important that we try to not become bitter as a result - otherwise, we run the risk of coming off as belligerent, dogmatic "OLD = GOOD, NEW = BAD" elitists. I don't know about you, but I don't like the sound of that. (this is 100% NOT an accusation, to clarify...just my perspective on...well, not my perspective)

If I was looking only into the past, I would just go use some retro operating system with retro software and stop worrying about the whole thing. I do not, and I am looking into the future to do things better. And it isn't really possible to do better without challenging the assumptions of the status quo in the software field. Now of course, many "old" things shouldn't be copied at all - there's a reason why FTP clients aren't bundled with browsers and operating systems anymore;)

Also, I would say, the flat design advocates are much more dogmatic than me - I'm happy with any UI design which is readable and prioritises human interface guidelines over design identity. Dark gray text on a white gray background with invisible buttons is not really that :P

To this end, I feel it's good to try to appreciate the reasoning and desires of that crowd, as demonstrated above.

The paradox of tolerance..... sadly, accommodating people who do not even try to accommodate you is not a good survival strategy for your beliefs. The users mostly "prefer" flat design because there is nothing else available in most places, so that part is not really surprising.

Huh...so I take it the game itself is yours too? Or is this some kind of modding tool or something like that?

Yes, I'm writing a sandbox block game where you can mine and craft;) I got fed up with the existing offerings on the market. The biggest game in the genre has lost its sandbox roots and is currently being morphed into some pseudo-MMORPG collect-them-all simulator, which I find quite sad. Sadly, the other offerings are also kind of missing the point - the most popular one is Minetest which is basically an engine and the user experience is horrible - it's truly a "game by programmers for programmers", not something fun to play.

Inside the mining and crafting community, there are many people who think the earlier versions were better. They aren't wrong, but they suffer from the issue you mentioned - the excessive focus on nostalgia and not much of a forward-looking outlook. Preserving a time capsule of a game is nice when you are at the Internet Archive or Anna's Archive but building something for the future is not that. And obviously, without a forward-facing outlook, the whole nostalgia project is really stale and can never get outsiders to join their community due to the lack of new and interesting things. There are plenty of YouTube videos which are about that - and many people download those old versions as a result, play for a bit then realise that they've seen it all and those versions will never be updated with cool new stuff, so they usually stop playing.

There is much potential in the genre but without looking forward, the potential remains unrealised :)

What Controls do you need re-styled?

Sadly I do not have an answer for you, I was only in the research stage for the crash reporter. Currently the program just dumps the diagnostic output into stdout. In terms of the design, roughly I'm looking for a label saying the game crashed and a huge textbox with monospaced font which can be selected, which has the stacktrace/glinfo/other diagnostic data. There would be two or three buttons below that. (something like send/copy/don't send)

Apologies in advance, this text probably contains many typos and errors.