Relative path in preference menu for all files "*.pref"
- Kwai chang caine
- Always Here
- Posts: 5357
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Relative path in preference menu for all files "*.pref"
Hello,
Is it possible a day, to adding a field in a propriety of the IDE, for put the path of the file PREF.
Often i have problem, the pref i use, is in the User/Data and i believe it's the pref of the /Portable, and i loose my pref when i change of machine
Because the /Portable is not also rigourous, when for example i dblClic on a PB file, the /Portable is not used and PB take the AppData pref.
And i can't use the AppData pref, because i never works on the same machine
With a relative path like "..\Preference\", i'm sure pref are always the same for all my PB version and i'm sure to can works with my removable DD without problem .
Thanks
Is it possible a day, to adding a field in a propriety of the IDE, for put the path of the file PREF.
Often i have problem, the pref i use, is in the User/Data and i believe it's the pref of the /Portable, and i loose my pref when i change of machine
Because the /Portable is not also rigourous, when for example i dblClic on a PB file, the /Portable is not used and PB take the AppData pref.
And i can't use the AppData pref, because i never works on the same machine
With a relative path like "..\Preference\", i'm sure pref are always the same for all my PB version and i'm sure to can works with my removable DD without problem .
Thanks
Last edited by Kwai chang caine on Fri Feb 21, 2014 8:36 pm, edited 5 times in total.
The happiness is a road...
Not a destination
Not a destination
- Kwai chang caine
- Always Here
- Posts: 5357
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Relative path in preference menu for all files "*.pref"
+1
One year after
One year after
The happiness is a road...
Not a destination
Not a destination
Re: Relative path in preference menu for all files "*.pref"
Kwaï chang caïne,
Yes, I have lost my Prefs (and my Template files) in the past, so what I did was
create a procedure that locates the directory and copies it to my
PureBasic Folder.
e.g.
Here's a picture: https://www.dropbox.com/s/nf3nkhq4hgco6h3/MyPrefs.png
Yes, I have lost my Prefs (and my Template files) in the past, so what I did was
create a procedure that locates the directory and copies it to my
PureBasic Folder.
e.g.
Code: Select all
If CopyDirectory("C:\Users\Bob\AppData\Roaming\PureBasic", "C:\PureBasic\Bobs Template Backup Folder",
"", #PB_FileSystem_Recursive|#PB_FileSystem_Force)
Debug "Success! You now have a copy of your template files!"
Else
Debug "+++++++++++++++++++++++++++"
Debug " Something went wrong! Please try again!"
Debug "+++++++++++++++++++++++++++"
EndIf
Here's a picture: https://www.dropbox.com/s/nf3nkhq4hgco6h3/MyPrefs.png
- It was too lonely at the top.
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
Re: Relative path in preference menu for all files "*.pref"
@Kwaï chang caïne
A property for preferences path make no sense. How should pb read this property before found the preferences
make always a backup like blueb suggest.
A property for preferences path make no sense. How should pb read this property before found the preferences
make always a backup like blueb suggest.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
- Kwai chang caine
- Always Here
- Posts: 5357
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Relative path in preference menu for all files "*.pref"
I'm not alone to have thos poblem
It's really a big problem when you have create several template without restart the ide
Now each time i create a template i restart the ide for be sure
Thanks Blueb for your tips
@tsSoft
You have right
I have not thinking to that
In fact before with the old versions,the pref is in the source folder by default.
I don't know what idea pass in the head of FRED for change a team who win
Id it not strange to force a portable program to write in the pc ???
The better idea will be not change the old behaviour, and add /NoPortable option for some person, at my advice not the majority, who want writing in the roaming...
It's really a big problem when you have create several template without restart the ide
Now each time i create a template i restart the ide for be sure
Thanks Blueb for your tips
@tsSoft
You have right
I have not thinking to that
In fact before with the old versions,the pref is in the source folder by default.
I don't know what idea pass in the head of FRED for change a team who win
Id it not strange to force a portable program to write in the pc ???
The better idea will be not change the old behaviour, and add /NoPortable option for some person, at my advice not the majority, who want writing in the roaming...
The happiness is a road...
Not a destination
Not a destination
Re: Relative path in preference menu for all files "*.pref"
Kwaï chang caïne wrote:The better idea will be not change the old behaviour, and add /NoPortable option for some person, at my advice not the majority, who want writing in the roaming...
The old behaviour shouldn't work on actual OS with some security. The actual behaviour is right one!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Re: Relative path in preference menu for all files "*.pref"
-1Kwaï chang caïne wrote:The better idea will be not change the old behaviour, and add /NoPortable option for some person, at my advice not the majority, who want writing in the roaming...
btw - I'm interested in knowing how you determined this so-called "majority" of yours?
- Kwai chang caine
- Always Here
- Posts: 5357
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Relative path in preference menu for all files "*.pref"
I don't understand why it's a security problem ?The old behaviour shouldn't work on actual OS with some security. The actual behaviour is right one!
Perhaps when there are several users ???
And it's not an obligation to instal PB in ProgramFile if it's that the problem ....
i have say "at my advice"Rsts wrote:btw - I'm interested in knowing how you determined this so-called "majority" of yours?
I thought the portable advantage is one off the power of PB !!
It is not an adavantage ???
When you see all VStudio with the BDR inscription
Perhaps i'm wrong, for be sure just a survey can say this point...but it's not really important.
What i know, it's not normal that sometime, we can loose preference in one clic, then PB can, and be able to run portable mode
Before never this problem exist, after perhaps a problem of security is fixed, but replaced by another
The happiness is a road...
Not a destination
Not a destination
Re: Relative path in preference menu for all files "*.pref"
Most Users, over 95% uses the normal security of windows. PB-IDE can't write in ProgramFiles, no permission for this.
After this change have 95% of all PB-Users a problem. In the moment have max. 5%, but i think only you, a problem
Portable is only for using on a stick, but never on a desktop-machine!
After this change have 95% of all PB-Users a problem. In the moment have max. 5%, but i think only you, a problem
Portable is only for using on a stick, but never on a desktop-machine!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Re: Relative path in preference menu for all files "*.pref"
I've always copied the shortcut with the commandline set. Therefore If I ever want to work with PB on one of my other machines as a temporary bases, no problem.
Copy PB from media disk to Windows desktop, all I do then is simply update the shortcut target path.
For my needs, the one thing that I would like to see improved on in regards to PB Portable support.. is if I'm running off a removal media disk, PB should be with an option to detect if running off of media disk and automatically launch in Portable mode. Launching PB in Portable mode off of memory stick, thumb drive, or external hard drive .. isn't without effort.
With PB running automatically in PB Portable mode, the PB IDE titlebar be with;
PureBasic ?.?? LTS (x??) [Portable mode] ... feEl thE rEal P0wer of Portable Power!!!
Copy PB from media disk to Windows desktop, all I do then is simply update the shortcut target path.
For my needs, the one thing that I would like to see improved on in regards to PB Portable support.. is if I'm running off a removal media disk, PB should be with an option to detect if running off of media disk and automatically launch in Portable mode. Launching PB in Portable mode off of memory stick, thumb drive, or external hard drive .. isn't without effort.
With PB running automatically in PB Portable mode, the PB IDE titlebar be with;
PureBasic ?.?? LTS (x??) [Portable mode] ... feEl thE rEal P0wer of Portable Power!!!
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
- Kwai chang caine
- Always Here
- Posts: 5357
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Relative path in preference menu for all files "*.pref"
I use PB nearly always on a external DD, never on the desktop.Portable is only for using on a stick, but never on a desktop-machine
For that, i use the /portable
But sometime, i dblClic on a PB file or other manipulation, in fact i don't know always what's happened, and i'm not warned that i use the roaming pref
I just see that, the next day, when i see, i have loose all modifications of the previous day
I think it's when even annoying..
The pref is when even a very important files, find other idea to protect them, (Like Thunder93 idea for exampler) at my advice is not a light subject
So if you think the contrary, it's your right
It's also possible to test if you have the right to write, if not, writing in roaming, if yes in the root forder, or why not on the two place in the same time ...
Several idea can be used, perhaps also, some users have the problem and say nothing..
The happiness is a road...
Not a destination
Not a destination