Ideally we only need to fix the setup.reg, so I think steps are:
Does it work if you open a cmd prompt and navigate to the directory, then type the command:
cforge.exe --create-package "C:\Users\user\Desktop\I2C mcp7941x"
If yes fix the setup.reg to put quotes around %V
If not, investigate further
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I cannot try it out any more, but in hindsight, without even trying your suggestion I'd say point 2 is valid. Whenever spaces are present in a windows path, one must open and close the entire string with surrounding quotes. So It should be: "%V".
Last edit: aliazzz 2020-01-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So we need someone to change setup.reg..
Replace:
%V
With:
\"%V\"
And then test if the problem is solved.
If still doesn't work, further investigation of how the C# program calls the python program
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think the "pull request" workflow at the moment is as follows:
create a ticket
Checkout
Make changes
Test changes
Upload the changed files to the ticket and say "dear maintainer, please accept this change because...".
It's in the documentation somewhere.
OK, I will make the change and test. Will have to wait until next week.
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I haven't seen any such postings on any PR workflow, but offcourse it sounds good.
A better way, if cforge can handle it, is to clone the project to the users home, then edit it and creat a PR to the original master. That workflow mimics GitHub. Is such a workflow and option? > Ticket idea!
see ticket request 78: Github like workflow for PR
Last edit: aliazzz 2020-01-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
more posts ...
CWD is Current Working Directory as seen by the cforge c# application.
This is where the context menu is setup for the create package
https://forge.codesys.com/tol/cforge/code/HEAD/tree/trunk/cforge/cforge/Package/CFORGE/Setup.reg#l62
So it will be calling :
cmd /C cforge.exe --create-package C:\Users\user\Desktop\I2C mcp7941x
Code for cforge.exe is here:
https://forge.codesys.com/tol/cforge/code/HEAD/tree/trunk/cforge/cforge/Program.cs
So it can be seen it then passes those two arguments to the python script here:
https://forge.codesys.com/tol/cforge/code/HEAD/tree/trunk/cforge/cforge/Package/CFORGE/Scripts/create-package.py#
Using this helper function:
https://forge.codesys.com/tol/cforge/code/HEAD/tree/trunk/cforge/cforge/Helper.cs#l251
Ideally we only need to fix the setup.reg, so I think steps are:
cforge.exe --create-package "C:\Users\user\Desktop\I2C mcp7941x"
I cannot try it out any more, but in hindsight, without even trying your suggestion I'd say point 2 is valid. Whenever spaces are present in a windows path, one must open and close the entire string with surrounding quotes. So It should be: "%V".
Last edit: aliazzz 2020-01-18
So we need someone to change setup.reg..
Replace:
%V
With:
\"%V\"
And then test if the problem is solved.
If still doesn't work, further investigation of how the C# program calls the python program
Why don't you do the change and test?
I haven't got write-access
I think the "pull request" workflow at the moment is as follows:
It's in the documentation somewhere.
OK, I will make the change and test. Will have to wait until next week.
File for testing attached
Steps to repeat:
==>IS: "can't find D:\folder\liscence.txt"
==>SHOULD: create manifest successfully
now testing! please wait
The registry patch for \"%V\" seems to work !**
Aliazzz
Last edit: aliazzz 2020-01-18
@Ingo
Please accept the change to the Setup.reg file, which puts quotes around the directory paths of shell commands to solve the problem of directories with spaces.
https://forge.codesys.com/tol/cforge/tickets/_discuss/thread/4441ef6b6f/32d9/attachment/I-Campbell.2020.01.18.19.50.Setup.reg
please see this positive tester note https://forge.codesys.com/tol/cforge/tickets/14/#32d9/4a66
@aliazzz
Thanks for the help testing and reporting!
I haven't seen any such postings on any PR workflow, but offcourse it sounds good.
A better way, if cforge can handle it, is to clone the project to the users home, then edit it and creat a PR to the original master. That workflow mimics GitHub. Is such a workflow and option? > Ticket idea!
see ticket request 78: Github like workflow for PR
Last edit: aliazzz 2020-01-18