-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Launcher improvements #1873
Launcher improvements #1873
Conversation
@daxgames @Stanzilla I need your opinion on some topics:
|
I am not a c++ dev so I can't tell you how the code should or should not be organized. At best I hack at it until I get the result I want, so have at it. I'm not sure how %cmder_root% could be wrong since it is based on the exe dir of the launcher exe. Not sure what you mean by discover and configure. I don't think there needs to be a check for update feature nor an auto update feature. Its a portable app you download, expand and copy it to the dir, it's just not necessary. This is probably the best idea of them all, while I think it's unnecessary and could be confusing since conemu already has this and it is often confused with a cmder updater users may like it. Why would you add a confirmation dialog for a command line switch the user typed, isn't that confirmation enough. No checkboxes, no registry settings, no more config files. Btw what does a 'do not as me again box' do? Is it for the proposed features like check for update? If you are storing additional config it should be in a file in %cmder_root%/config |
Actually I'd like the version file to be called |
Thanks for your input, @daxgames. Variable detection
There could be possible reasons why the content of the variable may not have a correct value:
The plan is to check the content of the variable upon startup, and display the following message when an incorrect value is detected.
BTW, one use of 'Do not ask me again' is here (the checkbox in the bottom.) Check for updates
I understand, however I do still suggest a behaviour that matches the portable downloaded apps aspect. Just running a simple check for updates (and linking users to the update page where they can download themselves.) Simply put, if there is an update on GitHub releases, a simple message could be shown, asking the use if they'd like to open the download page. As for the ConEmu feature, I think its Command-line confirmation
Hmm, you right about the user typed switches already being confirmations. The idea was to use the I think my thinking was not valid. Those confirmation pages should go in those scripts directly, and calling any switches should perform the action silently. How to store settings
Any dialog where the user may choose an action 'as always', including check for updates. Now, a follow up question: If I implement this, should I define separate flags for each routine (e.g. downloads, checks, etc), or should they all follow a single 'do not ask me again' directive?
Ouch! I mean I still agree that the location of the config should be in Just a thought though, if we are already modifying the Registry settings for the context menu, IMHO it means that it's very likely that the user is using Cmder in non-portable mode. The '
|
@DRSDavidSoft Sorry if I was harsh. It was a long day. I understand your use cases and actually like the dialog mock ups. The examples talk about the Maybe I'm old school but xml is probably overkill to store a set of binary flags to save checkbox state. Ini file would probably suffice and I would do a separate flag for each checkbox. I prefer file storage to registry storage because at its core cmder is a portable app. I don't even enable the context menu until someone complains its not working and I have to test/fix something. When I'm done I disable it. My biggest concern with your ideas is maintainability. Seems like a lot to add to an otherwise simple launcher. We barely support the launcher today because none of us are really c++ experts. You may know it but what if you get bored with the exciting world of contributing to cmder and decide your done. |
@daxgames It's okay, I actually like your counter arguments.
IMO, The one use case (moving it around when the context menu is registered) justifies the reason.
Solution: Do not ask me again :) (either ticking the checkbox, or a simple I have multiple copies of Cmder as well (I think for each branch that I'm working on, I have one) So once (or if) this PR gets merged, the annoyance will be only be setting that 'Do not ask me again' flag once.
I agree with you, XML is actually overkill just to store some flags. I also prefer a
Couldn't agree more. Portability is the #1 feature of Cmder. Now about the maintainability discussion
I completely understand your point, I wouldn't want having a lot of unmanageable code added to my repo either. However, I should say that this launcher wouldn't have been possible if @austinwagner didn't made a PR, or if he did and @samvasko didn't approve it. Many contributors to any project come and go, and they build upon the project as they come. I don't consider myself a C++ expert. As you said, I just know how to do it. But it's against my nature to toy with something and get bored with it. I might stop contributing one day, but I won't leave a ton of unfinished, unmaintained code in the repo when I do it. Furthermore, that day isn't today. I can assure you I'll have interest in maintaining the features that I introduce for many more days to come. The only issue that remains IMHO, is to decide what features to add, and which ones to drop. I won't introduce any unnecessary changes into the launcher code. So, as long as we sort out the inevitable issues that arise with each new feature, I would ask that to be added to |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contribution. |
↩️ |
@DRSDavidSoft is this still WIP and unable to merge? |
@MartiUK I'm sorry, but I have committed a lot of changes that need to be pushed before this PR is ready to be merged. I haven't had time to polish and test my changes (in addition to resolving a couple of conflicts), so please keep this on hold until I can complete everything. I'll post an update when the changes are ready to be pushed. Thanks for the patience! |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contribution(s). |
I'm temporarily closing this PR as I've been busy in the past couple of months, and don't want the bot to close it as stale. Once I finish working on it, I will reopen the PR. |
@DRSDavidSoft Okay mate, no rush Sent with GitHawk |
General Improvements to the Launcher code
[WIP] - do not merge yet.
1. ✓ Move strings to separate
strings.rc2
resource fileStrings that aren't short will be migrated to here instead of being defined in the C++ code like this:
cmder/launcher/src/CmderLauncher.cpp
Lines 300 to 303 in 49da374
2. ✓ Switch to
TaskDialog
instead ofMessageBox
for displaying messagesSince XP has been dropped (#1707), we can switch to TaskDialog to deliver a better message window, as discussed in #1726 (comment)
3. Move functions to a class – TODO
TBA – General refactoring of the code.
4. Detect and configure
%CMDER_ROOT%
variable – TODOTBA – When registering the application and the context menu, Cmder will check for and correct
%CMDER_ROOT%
if needed.5. Add switches for
/version
and/help
– TODOTBA – Useful to quickly check for the current binary version.