Skip to content

refactor: settings for windows - #8428

Merged
nbolton merged 6 commits into
masterfrom
windowsBetterSettings
Apr 2, 2025
Merged

refactor: settings for windows #8428
nbolton merged 6 commits into
masterfrom
windowsBetterSettings

Conversation

@sithlord48

@sithlord48 sithlord48 commented Mar 31, 2025

Copy link
Copy Markdown
Member

fixes: #8429
fixes: #8432
fixes: #8434

  • On windows use the registry to save the items normally in Deskflow.conf
  • On windows use the registry unless the portableSettings file [install-dir]/settings/Deskflow.conf if found
    • On Windows Use either ProgramData\Deskflow to save tls and other non "settings" when registry is in use
    • On Windows Use either [installdir]/settings to save tls and other non "settings" when registry is not in use
  • Set the default process Type based on the kind of settings loaded
    • InI Format (unix / mac / windows portable) the mode defaults to Desktop
    • Native Format settings (only windows installed mode) we default to Service
  • Set the default elevation mode based on type also
    • InI Format (unix / mac / windows portable) the mode defaults to Never
    • Native Format settings (only windows installed mode) we default to Always
  • Hide the service section when its not able to be used
  • Daemon log is always saved in the install dir
  • Make sure if using portable settings the a new empty file is created if settings are cleared.

Windows artifact to test with is here generated via latest build of this pr

@sithlord48
sithlord48 force-pushed the windowsBetterSettings branch from 23512b4 to b12d515 Compare March 31, 2025 17:44
@sithlord48
sithlord48 force-pushed the windowsBetterSettings branch 4 times, most recently from d57a137 to 2218596 Compare March 31, 2025 18:34
@sithlord48 sithlord48 self-assigned this Mar 31, 2025
@sithlord48
sithlord48 requested a review from nbolton March 31, 2025 18:39
@sithlord48
sithlord48 marked this pull request as ready for review March 31, 2025 18:39
@sithlord48
sithlord48 force-pushed the windowsBetterSettings branch 2 times, most recently from 40da9ee to 42d8862 Compare March 31, 2025 20:06
@sithlord48
sithlord48 marked this pull request as draft March 31, 2025 21:22
@sithlord48
sithlord48 marked this pull request as ready for review March 31, 2025 21:32
@sithlord48
sithlord48 marked this pull request as draft March 31, 2025 22:55
@sithlord48
sithlord48 force-pushed the windowsBetterSettings branch from 42d8862 to 9e2974b Compare March 31, 2025 23:55
@robot3498712

This comment was marked as resolved.

@sithlord48
sithlord48 force-pushed the windowsBetterSettings branch 2 times, most recently from 28a06e5 to 24cfc73 Compare April 1, 2025 00:11
@sithlord48
sithlord48 marked this pull request as ready for review April 1, 2025 00:17
@sithlord48

sithlord48 commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

That seams like the wrong version to me if you check click on the hash its another PR..
Edit sorry @robot3498712 it seams i linked the wrong build in that pr ill fix that comment and also link in the pr description

@robot3498712

Copy link
Copy Markdown

Thanks! That seems to have done it.
Automatic (as needed): check
Always: check

(I had to manually restart the deskflow service.)

Deskflow: 1.21.1.7 (b218535)
Qt: 6.8.2
System: Windows 10 Version 22H2

@sithlord48

Copy link
Copy Markdown
Member Author

yeah the service is a bit odd on reinstall sometimes.

@nbolton nbolton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Quick review. I will test this shortly.

Comment thread doc/configuration.md Outdated
Comment thread src/lib/common/Settings.cpp Outdated
Comment thread src/lib/common/Settings.cpp Outdated
Comment thread src/lib/gui/Diagnostic.cpp Outdated
@nbolton

This comment was marked as outdated.

@nbolton
nbolton force-pushed the windowsBetterSettings branch from 24cfc73 to f3d3784 Compare April 1, 2025 12:23
@nbolton

This comment was marked as outdated.

@sithlord48

This comment was marked as outdated.

@nbolton

This comment was marked as outdated.

@sithlord48
sithlord48 force-pushed the windowsBetterSettings branch 2 times, most recently from eaf1d1a to 03b78b1 Compare April 1, 2025 13:32
@sithlord48
sithlord48 requested a review from nbolton April 1, 2025 13:34
@sithlord48 sithlord48 added the 🩹 fix This PR fixes a reported bug label Apr 1, 2025

@nbolton nbolton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Strange. I managed to get the daemon to freeze up by setting elevate mode to 'As needed' then running an elevated process to show UAC. The client didn't re-launch and the daemon became unresponsive. I then saw an IPC error. Clicking 'Apply' in the GUI seemed to un-freeze it, but after trying a 2nd time I wasn't able to repro.

Edit: This was on a fresh VM.

I noticed you made 'Always elevate' the default which will certainly make things simpler. At this point I'm think we just need to get rid of the 'As needed' option (maybe in a separate PR).

Related:

@nbolton
nbolton force-pushed the windowsBetterSettings branch from 03b78b1 to fdcbe83 Compare April 2, 2025 10:34
@nbolton
nbolton merged commit 46c6275 into master Apr 2, 2025
@nbolton
nbolton deleted the windowsBetterSettings branch April 2, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🩹 fix This PR fixes a reported bug

Projects

None yet

3 participants