Page 1 of 1

Hollywood 10 : GetProgramDirectory() returns a non-compliant line on mac OSX x64 intel

Posted: Tue Jul 23, 2024 6:59 pm
by P_B
Hello,

My mac mini 2012 on mojave returns a non-compliant line, with Hollywood 10.

Code: Select all

@DISPLAY {Width = 1000, Height = 600, Sizeable = True}

directory$=GetProgramDirectory()

NPrint(directory$)

WaitLeftMouse()
Could you check, please.

Thank you.

Re: Hollywood 10 : GetProgramDirectory() returns a non-compliant line on mac OSX x64 intel

Posted: Wed Jul 24, 2024 9:41 pm
by airsoftsoftwair
What do you mean by "non-compliant line"? What exactly do you get? I've tested it on my Mac Mini and it works correctly.

Re: Hollywood 10 : GetProgramDirectory() returns a non-compliant line on mac OSX x64 intel

Posted: Thu Jul 25, 2024 8:05 pm
by P_B
Thank you for your help.

GetProgramDirectory() ultimately works fine, but is misleading depending on how osx works.

I run MY_PRG.APP and get the path to the real executive program hidden in mac os

/PRG/MY DIR/MY_PRG.app/Contents/MacOS

I rather expected to obtain "/PRG/MY DIR" to obtain standard operation with Windows, ...

I think that for this function, it will be necessary to add standardization parameters.

An option to get a slash at the end would be a big plus.

"/PRG/MY DIR" -> "/PRG/MY DIR/"

Thank you.

Re: Hollywood 10 : GetProgramDirectory() returns a non-compliant line on mac OSX x64 intel

Posted: Thu Jul 25, 2024 10:48 pm
by airsoftsoftwair
P_B wrote: Thu Jul 25, 2024 8:05 pm I rather expected to obtain "/PRG/MY DIR" to obtain standard operation with Windows, ...
Ok, that's the app bundle directory then. If you want that, just use GetSystemInfo() and take a look at the "AppBundle" item in the return table. This allows you to get the location of the app bundle.

Re: Hollywood 10 : GetProgramDirectory() returns a non-compliant line on mac OSX x64 intel

Posted: Fri Jul 26, 2024 4:47 pm
by P_B
Thank you for your help.

I will use this.

Code: Select all

@IF #HW_AMIGA
    
@ELSEIF #HW_MACOS

@ELSEIF #HW_LINUX

@ELSEIF #HW_WINDOWS

@ELSE

@ENDIF