Path to the temporary PB folder
-
- Addict
- Posts: 1518
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Path to the temporary PB folder
When compiling, PB unpacks the libraries and creates objects files in the temporary folder. It would be nice if could specify the path in this folder. What is it for? For example, the Raspberry Pi temporary folder on microSD and the recording on it is slow. I want to create a RAM disk and arrange the PB temporary folder in it. This will significantly speed up the compilation and reduce the wear of Flash memory.
Re: Path to the temporary PB folder
I think you should be able to do that with a config file or temporarily from a script
https://www.hellojona.com/2017/06/creat ... erry-pi-3/
For a PI 3 as root
https://www.hellojona.com/2017/06/creat ... erry-pi-3/
For a PI 3 as root
edit /etc/fstabmkdir /var/tmp
then mount and check that it workedtmpfs /var/tmp tmpfs nodev, nosuid, size=512M 0 0
mount -a
df -h
Re: Path to the temporary PB folder
+1 for User_Russian's request. I don't like to compile to the source folder, and I hate compiling to %TEMP% because I have to white-list PureBasic's temp exe in there. It should be a 5-minute job to add a setting where we specify the temp path.
-
- Addict
- Posts: 1518
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Path to the temporary PB folder
This makes sense when there is a lot of RAM. If the board only has 512MB of RAM, there is no memory for the entire tmp folder. For PB, 80 MB disk frames are sufficient. This is not enough for tmp.idle wrote: Tue Dec 14, 2021 10:14 pm I think you should be able to do that with a config file or temporarily from a script
Re: Path to the temporary PB folder
If that's no good, surely it can be done via a script that overrides the environment path for tmp when you launch pb?
-
- Addict
- Posts: 1518
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Path to the temporary PB folder
How to override the path for PB?
If you override the TMP system folder, that is, not an option. PB can be launched a lot of time (for example, 10 hours), and periodically compile. During this time, other programs and OS will also use the TMP folder. Memory is not enough.
If you override the TMP system folder, that is, not an option. PB can be launched a lot of time (for example, 10 hours), and periodically compile. During this time, other programs and OS will also use the TMP folder. Memory is not enough.
Re: Path to the temporary PB folder
Ive tried it with tmpfs of 256kb on a PI 3 with 1 gb ram and it seems to work ok
Re: Path to the temporary PB folder
This is an old request and I would appreciate it.
Whitelisting %temp% is not allowed or recommended.
Whitelisting %temp% is not allowed or recommended.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: Path to the temporary PB folder
PB uses the path "/tmp" and not "/var/tmp".
So you have to change the path in fstab
After the start only 1% of it is filled with the "/tmp" path
Much then occupied by the path "/tmp", you can then also see file manager
So you have to change the path in fstab
I hope that the size is enough because also other programs use the path "/tmp"."tmpfs /tmp tmpfs nodev,nosuid,size=512M 0 0"
After the start only 1% of it is filled with the "/tmp" path
Much then occupied by the path "/tmp", you can then also see file manager
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: Path to the temporary PB folder
Thanks mk-soft and PB ignores $TMPDIR too.