idle wrote: Mon Jan 13, 2025 1:09 am
Code: Select all
RunProgram(#PB_Compiler_Home + "purebasic.exe",GetGadgetText(#Gadget_file),"")
1. All paths that are in the second parameter must be escaped with quotes, since on the command line a space is a parameter separator, and quotes correct this.
2. #PB_Compiler_Home - this is the path for your OS, on other computers it is different. This is correct only if the source is used, then on another computer its own path will be obtained.
Code: Select all
path$ = GetEnvironmentVariable("PB_TOOL_IDE")
If Asc(path$) And FileSize(path$) > 0
RunProgram(path$, #DQUOTE$ + GetGadgetText(#Gadget_file) + #DQUOTE$,"")
EndIf
If two IDEs of different versions are open, then PB_TOOL_IDE uses the path from the instance in which the tool is running.