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

Experiment: Try building with WinUI (yet again) #143

Merged
merged 42 commits into from
Aug 15, 2024
Merged

Conversation

U-C-S
Copy link
Owner

@U-C-S U-C-S commented Aug 2, 2024

I can get unpackaged, framework-dependent, no-single-file debug/release output running in WinAppSDK v1.5.5, yey!

closes #21

@U-C-S U-C-S added this to the v0.9 milestone Aug 5, 2024
@U-C-S
Copy link
Owner Author

U-C-S commented Aug 6, 2024

TODO migrated to #21 description

@U-C-S
Copy link
Owner Author

U-C-S commented Aug 7, 2024

image

@U-C-S
Copy link
Owner Author

U-C-S commented Aug 7, 2024

This is available in a Alpha here: https://github.com/U-C-S/Hurl/releases/tag/v0.9.0-alpha-3

Copy link
Contributor

@Jay-o-Way Jay-o-Way left a comment

Choose a reason for hiding this comment

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

Looking good! Nice progress 😁
Since the PR is no longer concept I thought I could give you some comments. Hope it helps!

Source/Hurl.Settings/Controls/ComingSoon.xaml Outdated Show resolved Hide resolved
Source/Hurl.Settings/Controls/NewRuleCard.xaml Outdated Show resolved Hide resolved
Source/Hurl.Settings/MainWindow.xaml Show resolved Hide resolved
Source/Hurl.Settings/MainWindow.xaml Outdated Show resolved Hide resolved
Margin="4,0"
Style="{StaticResource CaptionTextBlockStyle}"
Text="Hurl Settings" />
<ListView
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use a NavigationView?

<FontIcon Glyph="&#xE710;" />
</toolkit:SettingsCard.HeaderIcon>
<Button
Width="80"
Copy link
Contributor

@Jay-o-Way Jay-o-Way Aug 10, 2024

Choose a reason for hiding this comment

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

Advice: Be careful to hardcode sizes like this. Either let the control grow with the text, or set MinWidth to 120.
Also, you might want to think about including this button in the following SettingsExpander. It's all related. Compare: Windows Settings > Themes (the button to browse Store for more).

Copy link
Owner Author

Choose a reason for hiding this comment

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

Also, you might want to think about including this button in the following SettingsExpander. It's all related

While that sounds reasonable. I still prefer it this way since it doesn't look crowded.

<DataTemplate x:DataType="model:Ruleset">
<toolkit:SettingsCard Description="{x:Bind BrowserName}" Header="{x:Bind RulesetName}">
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource EllipsisButton}" ToolTipService.ToolTip="View Rules">
Copy link
Contributor

Choose a reason for hiding this comment

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

Idea: maybe you can combine these two Buttons into one SplitButton?

MaxWidth="300" />
</toolkit:SettingsCard>

<toolkit:SettingsCard Margin="0,8,0,0" Header="Test against Existing Rules">
Copy link
Contributor

Choose a reason for hiding this comment

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

This part isn't really a Setting. I would use only the Button here.

Copy link
Owner Author

@U-C-S U-C-S Aug 14, 2024

Choose a reason for hiding this comment

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

I think I would have to come back and tackle the Test Rules UI later on. I don't like how it looks/works right now nor want to spend time on it.

Source/Hurl.Settings/Views/RulesetPage.xaml.cs Outdated Show resolved Hide resolved
Comment on lines 45 to 47
<ComboBoxItem Content="Mica" />
<ComboBoxItem Content="Acrylic" />
<ComboBoxItem Content="Solid" />
Copy link
Contributor

Choose a reason for hiding this comment

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

For later: you could bind the UI (strings) with the BackgroundMaterial data

U-C-S and others added 2 commits August 13, 2024 20:34
Co-authored-by: Jay <65828559+Jay-o-Way@users.noreply.github.com>
@stamminator
Copy link
Contributor

stamminator commented Aug 15, 2024

Tried running v0.9.0-alpha-3, but got a Windows App Runtime dependency error. However, I already have the requisite 5001.178.1908.0 version of both Windows App Runtime Main (WinAppRuntime.Main.1.5) and Microsoft Windows App Runtime Singleton (WinAppRuntime.Singleton) installed.

hurl windows app runtime issue

Although there's new updates for both of these packages via the Microsoft Store (I'm guessing it's the 1.5.6 release), I've temporarily disabled autoupdating so I can see if I still get the same error after you attempt a fix.

Also, I wonder if there's a more elegant, integrated way to seamlessly kick off an install of the needed dependency via Microsoft Store and/or winget (after receiving the user's permission, of course) rather than opening a web browser and requesting that the user manually select the right version, download, and install.

In case it helps with troubleshooting, here are all the packages containing the word "runtime" installed on my machine, according to UniGetUI:

installed runtime packages

Kinda weird that I have both a WinAppRuntime.Main.1.5 and a WindowsAppRuntime.1.5 installed, both with the same version number and for x64, and neither of which count as a satisfied dependency to Hurl.

Note: this is a new machine that's had no prior versions of Hurl installed.

@U-C-S
Copy link
Owner Author

U-C-S commented Aug 15, 2024

Thanks for a detailed report here.

Are you sure you have .NET 8 Windows Desktop Runtime installed too ? I don't see it in the screenshot, while .NET 7 is present ?

Once the alpha phase is over, I want to include check & auto-install for Windows App Runtime directly through hurl_installer or the launcher atleast.

@stamminator
Copy link
Contributor

@U-C-S Correct, I have Windows Desktop Runtime versions 6.0.32.33814 and 7.0.20.33720 installed, but not 8.x. Should v8 be necessary?

@U-C-S
Copy link
Owner Author

U-C-S commented Aug 15, 2024

Should v8 be necessary?

Yes

@stamminator
Copy link
Contributor

Isn't WinUI compatible all the way back to .NET Desktop Runtime 5? .NET 6 being LTS seems like it would be a good target to maximize compatibility and reduce the likelihood that people will need to install another runtime.

@U-C-S
Copy link
Owner Author

U-C-S commented Aug 15, 2024

.NET 6 being LTS

6 stops being LTS in few months. .NET 8 is current LTS and supported for another 2years.

https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core

@U-C-S U-C-S merged commit 7e861f7 into main Aug 15, 2024
@stamminator
Copy link
Contributor

@U-C-S Got it, that makes sense. Would it more helpful for you if I manually download .NET Desktop Runtime 8 and try again, or if I wait for you to make another release and see how/if it handles prompting the user to install it?

@U-C-S
Copy link
Owner Author

U-C-S commented Aug 16, 2024

I manually download .NET Desktop Runtime 8 and try again

Yes, that be helpful in understanding the issue.

It seems the .NET 8 automatic installer as part of hurl_installer is not working in the first place then. I will have to test it again and fix that too.

@stamminator
Copy link
Contributor

stamminator commented Aug 16, 2024

Unfortunately that didn't solve the issue. The issue appears to be with the dependency the error message indicates, not the .NET Desktop Runtime version.

YIVPo0voCd

Even though I'm already meeting the >= 5001.178.1908.0 requirement, I updated to the new Windows App SDK 1.5.6 for good measure, but it made no difference. Here's my current list of all packages containing "appruntime":

> winget list --name "appruntime"
Name                    Id                                                                                     Version
-------------------------------------------------------------------------------------------------------------------------------
WindowsAppRuntime.1.3   MSIX\Microsoft.WindowsAppRuntime.1.3_3000.934.1904.0_x64__8wekyb3d8bbwe                3000.934.1904.0
WindowsAppRuntime.1.3   MSIX\Microsoft.WindowsAppRuntime.1.3_3000.934.1904.0_x86__8wekyb3d8bbwe                3000.934.1904.0
WindowsAppRuntime.1.4   MSIX\Microsoft.WindowsAppRuntime.1.4_4000.1227.1637.0_x86__8wekyb3d8bbwe               4000.1227.1637.0
WindowsAppRuntime.1.4   MSIX\Microsoft.WindowsAppRuntime.1.4_4000.1227.1637.0_x64__8wekyb3d8bbwe               4000.1227.1637.0
WindowsAppRuntime.1.5   MSIX\Microsoft.WindowsAppRuntime.1.5_5001.178.1908.0_x64__8wekyb3d8bbwe                5001.178.1908.0
WindowsAppRuntime.1.5   MSIX\Microsoft.WindowsAppRuntime.1.5_5001.214.1843.0_x86__8wekyb3d8bbwe                5001.214.1843.0
WindowsAppRuntime.1.5   MSIX\Microsoft.WindowsAppRuntime.1.5_5001.214.1843.0_x64__8wekyb3d8bbwe                5001.214.1843.0
WinAppRuntime.Main.1.5  MSIX\MicrosoftCorporationII.WinAppRuntime.Main.1.5_5001.214.1843.0_x64__8wekyb3d8bbwe  5001.214.1843.0
WinAppRuntime.Singleton MSIX\MicrosoftCorporationII.WinAppRuntime.Singleton_5001.214.1843.0_x64__8wekyb3d8bbwe 5001.214.1843.0

Is it possible that your app is finding the first version of WindowsAppRuntime it comes across and checks its version number (which might be 1.3 or 1.4), then considers it to be too low rather than looking at all installed instances and seeing if any of them is high enough?

@stamminator
Copy link
Contributor

stamminator commented Aug 16, 2024

@U-C-S This time, I installed the latest Windows App SDK (it would be really if they could decide if it's an SDK or just a runtime lol) from the website that Hurl's error dialog opens, and now it works. I now have two new entries. Note my winget search term is now app runtime with a space.

> winget list --name "app runtime"
Name                                        Id                                                                                      Version
---------------------------------------------------------------------------------------------------------------------------------------------------
Windows App Runtime DDLM 5001.214.1843.0-x6 MSIX\Microsoft.WinAppRuntime.DDLM.5001.214.1843.0-x6_5001.214.1843.0_x64__8wekyb3d8bbwe 5001.214.1843.0
Windows App Runtime DDLM 5001.214.1843.0-x8 MSIX\Microsoft.WinAppRuntime.DDLM.5001.214.1843.0-x8_5001.214.1843.0_x86__8wekyb3d8bbwe 5001.214.1843.0

I'm not sure what DDLM is, but I guess that version is what's looked for by Hurl. The versioning and naming for these runtimes/SDKs is a nightmare.

UPDATE: Now Hurl Settings does open, but it's blank. Clicking Home opens an empty pane, and the Rulesets and Settings options crash the app. The Browsers option does successfully open the "Soon" message.

@U-C-S U-C-S deleted the experiment/winui3 branch November 9, 2024 01:48
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.

Hurl Settings App
3 participants