-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
make copying of files windows localization agnostic #741
Conversation
This will fix #507 |
Wait I just discovered there is a little more stuff needed, since copy does not create directories. I will rename the PR to WIP. |
I just tried it with robocopy, which can't rename a file when copying, so the best way I found to solve this is to use xcopy with a workaround I found on stackoverflow: https://stackoverflow.com/a/14022309/5899174 Since I don't know what the best way to share my solution is, I just pushed the commit to my fork and paste the link here. |
Since it's difficult to get I realize this won't help the batch files. 😄 |
Since none of the copy lines modify the filename, my next approach would be to switch back to xcopy with directories as targets and backslash at the end. IIRC that should suppress the folder question. I was not able to test that properly yet, so I did not update the PR yet. Will take a couple hours for me to get back to this though. Getting rid of |
There are copy lines that modify the filename (e.g. (copy /Y %_last_build%\OpenConsole.exe %TEMP%%copy_dir%\conhost.exe) > nul) |
The |
On a german Windows when building I get the following error: (D = Datei, V = Verzeichnis)? Ist das Ziel ...\Terminal\x64\Debug\TerminalSettings.pdb ein Dateiname oder ein Verzeichnisname (D = Datei, V = Verzeichnis)? f The trick with piping 'f' for file into stdin does not work here, since in german file is called 'Datei'. Due to the fact that the UI is translated a 'd' is expected. Lets use '*' at the end of the target filename which is a hack to trick 'xcopy' into assuming it is a filename her a target is a folder, if the target does not exist.
Sorry I was not able to look into this until now. I just pushed an updated version. For me the I could not test two commands:
It seems their targets (CascadiaWin32.exe, cascadia.exe) are not build as part of Since there is no testsuite for this. Please also test on other systems. |
Ah, you're okay not testing those. I didn't realize |
How about I add a cleanup commit before mine to fix that? Will remove opencas.cmd and fix the filename. How are you running the terminal usually just through Visual Studio? |
BTW, what about these CI failures? I am not changing anything related to them am I? Are those also failing on master? |
@hvoigt sure, that's fine with me. I'm just using VS now. We used to support unpackaged activation of the app, so I did everything with As far as the CI failures - that happens really rarely with a couple of our tests, I think you just got unlucky. @miniksa should take a look and confirm, I think that's one of his tests. |
* opencas should do the same as openterm. * correct the filename in openterm openterm is able to start the terminal again, but it does not start properly because of a missing dependency.
What does "unpackaged activation" mean? Can we include the "packaging" using the cmd file? I changed the cmd file so now it will run the right executeable again, but as you mentioned the terminal does error out early. If we can not fix this the maybe the file should also be removed.
Lets see what this run does. |
There is currently no plan on fixing this, because WindowsTerminal.exe does not support unpackaged activation. Let's remove them for now.
Just reread this. To get this PR done: Removed the openterm command in another commit. This way the "fixed" state is in the history in case anyone wants to revive them. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@hvoigt "Unpackaged Activation" means running the app from outside the context of a application package. That means launching However, since that broke, you need to build the appx/msix package and install that instead. |
Since it should be ready. |
Hello @miniksa! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me and give me an instruction to get started! Learn more here. |
@msftbot make sure @DHowett-MSFT signs off |
Hello @miniksa! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
On a german Windows when building I get the following error:
(D = Datei, V = Verzeichnis)? Ist das Ziel ...\Terminal\x64\Debug\TerminalSettings.pdb ein Dateiname
oder ein Verzeichnisname
(D = Datei, V = Verzeichnis)? f
The trick with piping 'f' for folder into stdin does not work here, since in
german folder is called 'Verzeichnis'. Due to the fact that the UI is
translated a 'v' is expected.
Lets use plain 'copy' which does not have the problem of asking whether a
target is a folder, if the target does not exist.
NOTE: I discovered this because the xcopy in
src/cppwinrt.build.post.props
failed for x64. The other locations I just applied the same pattern and did not test, since I do not know the code base that thoroughly. But if one location works the others should be fine, right? ;) Please test if this also works for others.