Is there an official temp folder?
I think OpenOffice uses X:/temp and I think Marko said this was the "official one". Is that the case?
I just want to be sure before I use it with Griffith Portable...
New: Kanri (Oct 09, 2024), Platform 29.5.3 (Jun 27, 2024)
1,100+ portable packages, 1.1 billion downloads
Please donate today
Not sure but may be a safe move to start just using X:/PortableApps/CommonFiles/Temp? If there is no obvious issues with this file path probably would be a good location for an official location otherwise users may be surprised to find a folder in the root of their drive which they weren't previously aware of. Oh and looking forward to Griffith. Been using Personal video Database which is plenty good but would like an OSS alternative and one with the PAF setup right. Thanks Simeon = )
PortableApps.com Advocate
I'm not aware of a real standard.
For myself, I've done apps which can be waited for with $TEMP\${NAME}Temp, and apps which can't be waited for (e.g. GanttProject Portable, my copy of gVim Portable which I haven't released yet), $EXEDIR\Data\temp is what I've used, as then it doesn't need to be removed.
X:\temp would not be wise. It clutters the root and makes it too easy for the end user to see what they shouldn't and possibly break things.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Thats exactly what I thought. I wondered why my root folder got cluttered so I asked Marko. Lets hope for a final word by John.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
Can anybody enlighten me why do you want to avoid the system one?
"Those people who think they know everything are a great annoyance to those of us who do." Asimov
Some apps leave things behind, that's all. As an example, if one enables spellchecking in gVim and ignores a word, you get various temp files in TEMP (e.g. VIs1234.tmp) which are not deleted on exit. If you use TEMP, there's no way of clearing it. So the way I used to fix it was with creating a subdirectory in TEMP and removing it afterwards. Now, to overcome problems if there are other copies of gvim.exe, I store TEMP things in Data\temp.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Use GetTempFileName to generate unique subdirectory for each copy and you'll be fine.
Producing extra load on pendrives reduces their life and application performance. And still seems to me totally unnecessary.
"Those people who think they know everything are a great annoyance to those of us who do." Asimov
GetTempFileName isn't enough, as there can be more than one copy of the app running in most cases. In the case of gVim, TEMP usage is minimal (spellchecking and file downloads is all I can think of), but there's really no way to do it other than stick it on the USB drive, and that is also incidentally the most portable solution.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
And each will get own temp folder. Where's the problem?
"Those people who think they know everything are a great annoyance to those of us who do." Asimov
They need to share it. Also see how secondary launches run - for most apps, one copy of the launcher is preserved, and new instances effectively pass it over to it.
Take my word for it that the current technique is about the best it can be, and GetTempFileName just won't cut it.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Well, the best would be running a single launcher instance for each running installation. That's how I would do it, but really I'm not sure if cutting memory and pendrive usage is worth the effort.
In this case your solution seems fine for me.
"Those people who think they know everything are a great annoyance to those of us who do." Asimov
how intensively Griffith uses the temp folder.
Maybe the wear'n'tear argument has a valid point...
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
Most apps will be better off with a local TEMP folder than one on the USB drive; in some cases though you really need to be able to wait for the program but if there may be local copies coexisting with it, not using the portable settings, then you don't want to need to wait for them; that's why I changed gVim Portable.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
deletes all its temp files on exit so I think its ok to use the local temp folder.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
I would expect you to have done a proper job of testing it, but do just make sure that you try unusual things, and things which would be likely to use TEMP locations. Downloading, exporting files to non-native format, installing extensions, things like that often use TEMP things. I'm not sure, but it seems to me possible that in the future we'll be using contained TEMP directories for all apps as a safety measure if nothing else.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
I think you're mixing security with paranoia.
Seriously, does it matter that you leave a few KB in the temp folder?
Portable software will never be sneaky anyway. There's 0 security doing own stuff on someone else's computer regardless whether you clean perfectly or not at all.
And from practical standpoint, leaving a few KB once / 10000 sessions, which will be removed during the next disk cleanup anyway is totally insignificant. While durability, reliability and performance degradation is.
"Those people who think they know everything are a great annoyance to those of us who do." Asimov
Yes, it does matter. We make sure that nothing is left behind. For example, I may have to go to a lot of trouble in my Inkscape Portable launcher, to remove a meaningless file from ~\gtk-2.0\gtkfilechooser.ini, just because the Inkscape team missed the Export dialogue's Browse button when switching from the GTK file chooser to an OS-specific one. While it's a real pain, it's got to be done.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
I don't see the pain. Windows asks to to clean temp when it's needed, then you remove all unimportant temp files with 2 clicks.
"Those people who think they know everything are a great annoyance to those of us who do." Asimov
One thing that PortableApps.com does claim to do is not leave any personal data behind.
The temp files created by an application can, and often do, include fragments or complete copies of the documents that you have been working with in the application.
For example, you're working with an address book, you reindex, it stores data in the temp folder including all your contact.
I know that this specific application isn't that sensitive, and that the files left behind in this case may not contain personal data, but that isn't the point. The important thing is that data in temp should be dealt with if possible, wherever possible, not just ignored because it doesn't matter this time.
From data security standpoint there's no difference whether an app leaves something in very rare cases or never. If the owner wants your data, it's just a matter of installing some spying software, you give your data away the moment you plug your drive. Or, if it's encrypted, the moment you type your password.
"Those people who think they know everything are a great annoyance to those of us who do." Asimov
I haven't tried unusual things but I will. I haven't thought about it too much till now, but Ill test what happens if I export things or crash the programm.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate