I know I've used it in the past, when the compiler etc. were not yet moved inside the PureBasic app but now everything is inside the PureBasic app I can't seem to get it working.

Code: Select all
; http://www.purebasic.fr/english/viewtopic.php?f=12&t=30864&start=0
; srod
; Modifications for MacOS by Shardik:
; -----------------------------------
; - Backslashes changed to slashes
; - " /commented" changed to " -c"
; - "\Compilers\pbcompiler" changed to "Compilers/pbcompiler"
; - RunProgram("notepad.exe, dir$,"") changed to RunProgram("Open", dir$, "")
file$=ProgramParameter(0)
dir$ = GetPathPart(file$)
DeleteFile(dir$+"PureBasic.asm")
If file$ And FileSize(file$)>0
Compiler = RunProgram(#PB_Compiler_Home+"Compilers/pbcompiler",
Chr(34) + file$ + Chr(34) + " -c", dir$,
#PB_Program_Hide | #PB_Program_Wait)
dir$+"PureBasic.asm"
If Compiler And FileSize(dir$)>=0
RunProgram("Open", dir$, "")
Else
MessageRequester("Error!",
"There was an error creating the assembly code file.")
EndIf
EndIf
Arguments:/{path to purebasic}/PureBasic.app/Contents/Resources/compilers/pbcompiler
Arguments (thread safe):-c "%FILE"
Arguments DyLib:-c -t "%FILE"
Arguments Dylib (thread safe):-c -dl "%file"
Tip-c -t -dl "%file"