I'm not sure if this is a Purebasic bug, Linux bug or Russ bug but here's the problem:
I have a program that I wrote in windows. When I made the desktop shortcut the "Start In" is "C:\PureBasic Projects\InfoPad" and the
"Target" is "C:\PureBasic Projects\InfoPad\InfoPad64.exe". In the code I have a line Global db$ = GetCurrentDirectory() + "InfoPad.db3"
Everything works as I expected and if I look at db$ it is "C:\PureBasic Projects\InfoPad\InfoPad.db3". So far, so good.
When I compile and run in Raspberry Pi Linux, all works well when the program is started (now called "InfoPad") in "/home/rsrole/Private/Purebasic Projects/InfoPad"
but when started from the launcher, the GetCurrentDirectory() points to "/home/rsrole/InfoPad.db3"
Here' the InfoPad.desktop file:
[Desktop Entry]
Type=Application
Comment=InfoPad
Name=InfoPad
Path="/home/rsrole/Private/Purebasic Projects/InfoPad"
Exec="/home/rsrole/Private/Purebasic Projects/InfoPad/InfoPad"
Terminal=false
#gnome-panel-launcher
Type=Application
NoDisplay=false
StartupNotify=true
Did I make the launcher incorrectly? Or is this a bug?
// Moved from "Bugs - Linux" to "Linux" (Kiffi)
Wrong Path? (was Bug? Not sure)
Re: Bug? Not sure
Hi Russ,
I think you might need to escape the space in the path with a backslash? I'm pretty sure Linux doesn't allow spaces in path names.
Exec="/home/rsrole/Private/Purebasic\ Projects/InfoPad/InfoPad"
Moulder.
I think you might need to escape the space in the path with a backslash? I'm pretty sure Linux doesn't allow spaces in path names.
Exec="/home/rsrole/Private/Purebasic\ Projects/InfoPad/InfoPad"
Moulder.
"If it ain't broke, fix it until it is!
This message is brought to you thanks to SenselessComments.com
My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
This message is brought to you thanks to SenselessComments.com
My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
Re: Bug? Not sure
Code: Select all
Global db$ = GetCurrentDirectory() + "InfoPad.db3"
If the DB is in the program directory (Windows prevents writing to the program directory)
better
Code: Select all
GetPathPart(ProgramFilename())
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Bug? Not sure
Linux does allow spaces in path name (or so I found out), but you have to enclose the full path in quotes or it will hate you
MK, your trick worked like a charm.
Thanks to both of you for your replies. Always appreciated
Russ

MK, your trick worked like a charm.
Thanks to both of you for your replies. Always appreciated
Russ
Re: Wrong Path? (was Bug? Not sure)
<OT>
Two more hints (not only for you, RSrole):
1.: If you are not sure whether it is a bug or not, do not post it in the bug forum. If it turns out to be a bug, the moderators will promptly move it to the appropriate forum.
2.: Please use meaningful subjects in future.
Thank you
</OT>
Two more hints (not only for you, RSrole):
1.: If you are not sure whether it is a bug or not, do not post it in the bug forum. If it turns out to be a bug, the moderators will promptly move it to the appropriate forum.
2.: Please use meaningful subjects in future.
Thank you
</OT>
Hygge