Skip to content

CommandPrompt Activation #364

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

Merged
merged 4 commits into from
Jan 7, 2020
Merged

CommandPrompt Activation #364

merged 4 commits into from
Jan 7, 2020

Conversation

FelixZacher
Copy link
Contributor

Description

I added the "AppExecutionAlias" files.exe, so the app can be launched from any command prompt.

In the folder %localappdata%\Microsoft\WindowsApps is now files.exe created, which helps #236.

I also did some testing with opening files in the current directory from the cmd, but there is currently a race condition between the app startup and the PopulateDrivesListWithLocalDisks-method, which does not populate the list fast enough. At a normal start from the cmdline, it always crashes, in the debugger with a breakpoint not. This only occurs if files wants to show the current directory.

Questions

I would love some input on the cmdline-protocoll: Which commands, ...

PS:
The code as is does not support open in a directory, but works, in that it opens files. Don't know if you want to merge this as whole or as little parts.

@FelixZacher FelixZacher marked this pull request as ready for review January 1, 2020 22:12
@yaira2 yaira2 requested a review from lukeblevins January 5, 2020 00:29
@FelixZacher FelixZacher closed this Jan 6, 2020
@FelixZacher FelixZacher reopened this Jan 6, 2020
@FelixZacher
Copy link
Contributor Author

I added a parser and implemented the command:

files.exe -Directory C:\Users

!!!The crash is not fixed!!!

@lukeblevins
Copy link
Contributor

@lampenlampen Would threading be a way out of the race condition?

@FelixZacher
Copy link
Contributor Author

I'm currently trying to convert the list to a task-based approach, so we can await them.

@lukeblevins
Copy link
Contributor

lukeblevins commented Jan 6, 2020

@lampenlampen The WIP branch for the settings view model might simplify/remove some of the list items. https://github.com/duke7553/files-uwp/tree/settings-vm

@FelixZacher
Copy link
Contributor Author

I had a look at the branch and i basically had the same idea. You can have a look at https://github.com/lampenlampen/files-uwp/commit/496a84e2c2f0efd7e3f6f4571d97bd297a13ce01.

I extracted all "drives"-related things to it's own class and added an Drives-property to the SettingsViewModel.

Please leave a short answer, if you want to refactor these yourself or i can go ahead.

@lukeblevins
Copy link
Contributor

Your implementation looks better than mine! For now, don't worry about my branch, as I can refactor those changes later

@lukeblevins
Copy link
Contributor

@lampenlampen I probably won't have the time to make any refactors myself until Friday at the earliest, so if you can that would be excellent!

Copy link
Contributor

@lukeblevins lukeblevins left a comment

Choose a reason for hiding this comment

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

Looks great. We should now work on ironing out that race condition. @lampenlampen said he would look into it.

@yaira2 yaira2 merged commit 78bef53 into files-community:v07.1-changes Jan 7, 2020
@FelixZacher
Copy link
Contributor Author

@duke7553 I saw that your are using "mvvmlight" and ViewModelBase. I had a brief look at their github repo, but docu is a bit rare there. Can you point me to something, that explains ViewModelBase.

@lukeblevins
Copy link
Contributor

lukeblevins commented Jan 7, 2020

This sounds like a question for @yaira2 😀

@yaira2
Copy link
Member

yaira2 commented Jan 9, 2020

I would check out http://www.mvvmlight.net/

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.

3 participants