Page 1 of 1

Path for graphics dont work (Linux)

Posted: Wed Dec 28, 2005 12:46 pm
by Dr.Zoidberg
Hi !

I have made a little program with some ButtonImageGadgets.
The graphics are stored in a folder named "graphics" that is placed in the folder where the .pb file is.
I load the graphics with"graphics/" before the filename and it works from the IDE with compile and run (with and without Debugger).
If i create an executable (in the same folder) it does not find the graphics.
If i use the complete path ("/home/zoidberg/purebasic/ownprograms/graphics") it works.

On windows it works with only "graphics/" also in the executable.

Seems that is not a known problem, because i did not find something in the forum. What can i do?

P.S.: The samples that come with Purebasic are working, so i think i have all needed things installed. I use Kanotix (Debian like) as a HD Installation.

Thank You !

Steffen

Posted: Sat Dec 31, 2005 5:20 pm
by Beach
I am able to compile the following on the command line and it executes fine. I am using Ubuntu 5.10.

Code: Select all

LoadImage(1,"test/logo.bmp")

OpenWindow(0,0,0,200,200,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Linux Image Gadget")
CreateGadgetList(WindowID())
ButtonImageGadget(0,20,20,160,160,UseImage(1))

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
I can not use the IDE for some reason - whenever I try to F5 compile, the IDE quits and then wipes my source file (different issue).