Make file Path $(_MakeFilePath)

Hello ,

I have been trying to drag my MDL application forward. I ran into an issue with the path to my Application. I was using the _MakeFilePath symbol and noticed since I had long directory name it was causing an issue. Is there a different symbol which uses the mangled directory names? From looking at the MicroStation Connect examples I believe that the issue was addressed. Any suggestions?

Regards

Peter

  • Hi Peter,

    spaces etc. are a nightmare for working in a shell.

    Bob  showed me on a DevCon some batch trick: “FOR %%A IN (%1) DO ECHO %%~sA”. You will find variants of this in all the batches for the developer shell.

    Another trick is quoting. But be careful. This is also tricky.

    cd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\"

    but

    start C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Professional\Common7\IDE\devenv.exe

    Hopefuly there is a flag or macro in bmake world I do not know about. But we found some simple solution. It is simply forbidden in our company to use spaces etc. in path and name in our source-files.

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • I was using the _MakeFilePath symbol and noticed since I had long directory name it was causing an issue

    In what environment to you start bmake YourMke.mke?  From a Windows command prompt?  Some other way?

    Here's my Windows environment.  The important variables are MS and MSMDE.  I've defined both using DOS convention. The paths are mangled but that eliminates the antediluvian problem where bmake misinterprets long path names.

    MS=G:\PROGRA~1\Bentley\MICROS~2\MICROS~1\
    MSCEMdlappsPath=G:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdlapps\
    MSCEPath=G:\PROGRA~1\Bentley\MICROS~2\MICROS~1\
    MSCESDKShortPath=G:\PROGRA~1\Bentley\MICROS~2\SDK\
    MSMDE=G:\PROGRA~1\Bentley\MICROS~2\SDK\
    MSMDE_Long=G:\Program Files\Bentley\MicroStation CONNECT Edition\SDK\

     
    Regards, Jon Summers
    LA Solutions

  • Hi and - as always, thank you for your very helpful and appropriate replys.  Hope you both have a happy holiday weekend.

    Hi ,

    I suspect you may not have full Microsoft 8dot3name support enabled on one or more drives on your computer.  Most make file projects to date (.mke and .mki) files are/were written in a way that likely does not take well to paths having spaces in them.  FWIW. This is a project that I am in the very early stages of moving along (update sample make projects and a wiki outlining what changes are required to existing make files).

    Microsoft provides a tool shipped with the operating system (fsutil) that allows you to enable/set Microsoft 8dot3name support for: Registry (new file creation), and Files and Folders. I am not certain, but I think there may also be an fsutil command to create 8dot3names for "already existing files/folders" adding the 8dot3name entries in the FAT. Sorry, don't seem to have a reference handy at the moment.

    Here are a couple tests I have handy and can provide to get you started with the articles above.

    • Query "registry" 8dot3name support state:   fsutil 8dot3name query
    • Enable "registry" creation support for 8dot3name files:   fsutil behavior set disable8dot3 0

    As mentioned, a full verbose (sequential) build log (and full system environment variables) often proves to be what is needed to resolve most issues.

    HTH,
    Bob