You are here

Problem with [FilesMove] and DirectoriesMove]

16 posts / 0 new
Last post
tapsklaps
Offline
Last seen: 6 years 2 months ago
Developer
Joined: 2010-10-17 08:11
Problem with [FilesMove] and DirectoriesMove]

Yesterday is appeared the app System Explorer Portable. For more details I looked in the file SystemExplorerPortable.ini and in the Data folder. Before the start of the app I find two things inside of the Data folder:

  • a folder named "snapshots"
  • a file named "config.ini"

In the file SystemExplorerPortable.ini I find the following lines of code

[DirectoriesMove]
snapshots=%PAL:AppDir%\System Explorer\snapshots

[FilesMove]
config.ini=%PAL:AppDir%\System Explorer

Due to these lines of code after the start of the app the folder "snapshots" as well as the file "SystemExplorerPortable.ini" moves from the Data directory to the "System Explorer" directory. As far as all these transactions clear and traceable.

But now I try the same in my own project streamWriter Portable 1.4.0.1 Development Test 1.
I put the following files in the Data folder:

  • streamwriter_settings.ini
  • streamwriter_data.dat

Afterwards I create the following lines of code in the file streamWriterPortable.ini:

[FilesMove]
streamwriter_data.dat=%PAL:AppDir%\streamWriter
streamwriter_settings.ini=%PAL:AppDir%\streamWriter

But neither the file streamwriter_data.dat nor the file streamwriter_settings.ini moved from the Data folder to the streamWriter folder after the start of the app. Instead both files are disappeared after the start of the app.

Now I attempted to solve this problem as follows. I create the subfolder "DefaultData" inside of the folder "App". Afterwards I put the both files streamwriter_data.dat and streamwriter_settings.ini in the DefaultData directory. And now it works with the same lines of code in the section [FilesMove].

But why must I create a subfolder DefaultData, whereas in the app System Explorer Portable this isn't necessary (as I described above)?

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 7 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
File Origin

The files are just moved by PAL. They are not created. System Explorer creates those files itself. Your app probably does not.

Sometimes, the impossible can become possible, if you're awesome!

tapsklaps
Offline
Last seen: 6 years 2 months ago
Developer
Joined: 2010-10-17 08:11
probably as in System Explorer

After I extraxt the file streamwriter.zip, there reside 2 files inside the extracted folder streamwriter:

  • streamwriter.exe
  • bass.dll

Then I start streamwriter.exe. Afterwards I was prompted to conduct some preferences. Among other things I decide to use the portable mode. Due to this portable mode all application data are stored in the program folder streamwriter. After I realized all these preferences, now appeared the file streamwriter_settings.ini inside the program folder streamwriter. As I afterwards start a radiostation, now also the file streamwriter_data.dat was created inside the streamwriter directory.

Therefore I think, that streamWriter creates those files itself.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 7 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
No

It only creates them after you set portable mode, etc. If they are not there it stores them locally. So you *HAVE* to create default ones and have them put in the App folder on first run. You do this by using DefaultData.

Sometimes, the impossible can become possible, if you're awesome!

tapsklaps
Offline
Last seen: 6 years 2 months ago
Developer
Joined: 2010-10-17 08:11
Aha

I understand. Due to the possibilty of storage the application data locally, I must in such cases always apply the variant of usage of DefaultData, how I do it in my special case. Thanks for this information.

But I have another problem. My intention was to point the app to a predefined output folder, where the user can sore the songs. But I can't find a solution for this problem. Have you a idea?

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 7 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Nothing Special

There is nothing special in this case. You fire up the app, create a default set of data in the App directory from the app and copy that to the DefaultData for use by PAL to move in and out of App. We have dozens of apps that work this way.

Sometimes, the impossible can become possible, if you're awesome!

tapsklaps
Offline
Last seen: 6 years 2 months ago
Developer
Joined: 2010-10-17 08:11
Problem with outout folder

Ok I understand this now.

But in my last post I described another problem with an output folder. Exist here also a solution?

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 7 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Per App

This is defined per-app. Some apps support it, some do not. There's no universal way to tell an app where to put something. Check its settings.

Sometimes, the impossible can become possible, if you're awesome!

tapsklaps
Offline
Last seen: 6 years 2 months ago
Developer
Joined: 2010-10-17 08:11
All clear now

Therefore in my special case the file streamwriter_settings.ini is the reason for the impossibility to create such a predefined output folder.

Nevertheless this is no more meaningful. Therefore the user must arrange such an output folder one-time at the first start of the app. Accordingly I assume, that my project is now ok.

Once again great thank for all your helpful informations.

At last I have one question. I like to portabilize the app foobar2000. But I find out, that the developer prapper already work on this project. What can I do in such a case?

vf2nsr
vf2nsr's picture
Offline
Last seen: 8 years 2 months ago
Developer
Joined: 2010-02-13 17:10
use

his version? Why spend thetime making a PA format version if there is already one available?

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 7 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Reasons

There are lots of reasons: https://portableapps.com/about/what_is_a_portable_app#whypaf

Plus, once PAFed and released, it'll be automatically updated with the PA.c Platform.

Sometimes, the impossible can become possible, if you're awesome!

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 day 1 hour ago
DeveloperModerator
Joined: 2008-07-24 18:46
Already done by prapper

Vf2nsr was referring to the fact that since oralist has already made a PAF version of foobar2000, that there is no reason to develop the same app.

tapsklaps
Offline
Last seen: 6 years 2 months ago
Developer
Joined: 2010-10-17 08:11
persuasive arguments

I have read the article regarding Why PortableApps.com Format and a PortableApps.com Installer. And there are mentioned obviously a lot of facts, which justify also the portabilization of already "portable" apps. Therefore I want to make the app foobar2000 portable.

But can I start such a project in a case, if already a developer (here in particular the developer prapper) work at the same project?

Ok I have read the post of Gord Caswell. Therefore it seems to be the best, the prapper works alone at this project.

3D1T0R
3D1T0R's picture
Offline
Last seen: 3 years 5 months ago
Developer
Joined: 2006-12-29 23:48
Help him.

It would probably work better to use his version and report any portable specific issues (like Files/RegKeys left behind on host system, or unportablized settings/MRU List entries). There is no reason to have people duplicating other's work when they could be working together.

~3D1T0R

tapsklaps
Offline
Last seen: 6 years 2 months ago
Developer
Joined: 2010-10-17 08:11
Ok

Your suggestion seems to be the best way.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 day 1 hour ago
DeveloperModerator
Joined: 2008-07-24 18:46
Work together

Prapper might be open to having you work with him

Log in or register to post comments