Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] One of the reasons why wndows support is not so great.

Rereading this I see an error.

"will not expand ConfigName" should say

will not expand ConfigName and remove the \

Op 20/02/2020 om 15:22 schreef Jan Baeyens:

Hi all

I have created a bug report https://bugs.eclipse.org/bugs/show_bug.cgi?id=560330 that creates some unlikely to happen and  hard to understand behaviour that is most likely to happen on windows os.

When working with environment variables \ is used to avoid macro expansion.

Because of that something like

${ProjDirPath}\${ConfigName}
will not expand ConfigName
also
${ProjDirPath}${DirectoryDelimiter}${ConfigName}
will not expand correctly on windows because DirectoryDelimiter will expand to \ before ConfigName is handled.

Though I think the code could be improved so that at least ${ProjDirPath}${DirectoryDelimiter}${ConfigName} works properly the real issue is that the use of \ as escape key is a bad choice in windows environment variables.

As to the impact of (not) changing the escape key. I fear the key is at least used by CDT gnu managed build. But more importantly, replacing \ by another key will cause compatibility issues. Keeping it will mean: "remaining with occasional weird windows problems"

Jantje

PS Don't get me wrong, I do not think this is a urgent issue. It is however important to understand windows specific issues.
I worked around it by doing the expansion myself
        //work around needed because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=560330
        //it should have been
        //A.BUILD.PATH={ProjDirPath}{DirectoryDelimiter}{ConfigName}
        // in pre_processing_platform_default.txt
        String buildPath=confDesc.getProjectDescription().getProject().getLocation().append(confDesc.getName()).toOSString();
        setBuildEnvironmentVariable(contribEnv, confDesc, "A.BUILD.PATH", buildPath);
        //end of workaround


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top