Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » [Bug+Patch] when there is a space in Upp path (gdb does not find exefile, && problem using windres)
Re: [Bug+Patch] when there is a space in Upp path [message #47776 is a reply to message #47770] |
Fri, 24 March 2017 23:46   |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
Hi,
in the proposed patch:
GetHostPathShort( FindInDirs(((LocalHost*)host)->exedirs, "windres.exe"))
the cast (LocalHost*)host, does not work properly.
i have tested with LocalHost*h = dynamic_cast<LocalHost*>(host)
host is not NULL, but after the execution of this line, h is equal to NULL !
to avoid this, we can extract the PATH from Host.GetEnvironnement() instead of Localhost.exedirs
here the new patch :
if(rc) {
String windres = "windres";
String env = host->GetEnvironment();
const char* path = (const char*) env.begin();
while(*path)
{
if(path[0] == 'P' && path[1] == 'A' && path[2] == 'T' && path[3] == 'H' && path[4] == '=')
{
path+=5;
Vector<String> dirs = Split(path, ";") ;
String fullpath = FindInDirs(dirs, "windres.exe");
windres = GetHostPathShort( fullpath);
break;
}
while(*path)++path;
++path;
}
String exec;
exec << windres << " -i " << GetHostPathQ(fn);
....
regards
omari.
|
|
|
 |
|
[Bug+Patch] when there is a space in Upp path
By: omari on Fri, 17 March 2017 16:55
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: Klugier on Sat, 18 March 2017 20:54
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: omari on Sun, 19 March 2017 10:14
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: Klugier on Sun, 19 March 2017 21:06
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: omari on Sun, 19 March 2017 23:04
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: Klugier on Sun, 19 March 2017 23:22
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: omari on Mon, 20 March 2017 23:33
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: Klugier on Wed, 22 March 2017 22:35
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: omari on Fri, 24 March 2017 23:46
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: Klugier on Sat, 25 March 2017 23:16
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: omari on Sat, 25 March 2017 23:55
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: Klugier on Sun, 26 March 2017 00:29
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: omari on Sun, 26 March 2017 00:53
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: omari on Sun, 26 March 2017 12:54
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: Klugier on Sun, 26 March 2017 14:04
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: Klugier on Sun, 26 March 2017 15:35
|
 |
|
Re: [Bug+Patch] when there is a space in Upp path
By: omari on Sun, 26 March 2017 23:22
|
Goto Forum:
Current Time: Tue Apr 29 17:08:15 CEST 2025
Total time taken to generate the page: 0.03273 seconds
|