Skip to main content
Topic: foo_loader (Read 22645 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_loader

Here's a quick little loader program I wrote in Delphi after getting fed up with 0.8.3 crashes corrupting my .cfg files.

It'll automatically take your .cfg file and back it up every time you use the program to load foobar2000. It must be placed in the same folder as foobar2000 and creates another folder called 'Backup' to store the backups in.

Source is included for intrepid Delphi explorers.

Apparently 0.9 fixes these issues, so is targeted at users like me who have plugins they use that aren't updated yet.

picmixer, I stoeled one of your icons. I hope you don't mind too much.

Oh, I have one request: If you post/comment about this little program outside of the HA forums, please post the URL where you're posting about it. I'm interested to see if there's any external interest and/or where that interest is at. 

How to Use:

1. Extract foo_loader.exe to some folder.
1b.(Delete any old .ini files if they exist.)
2. Run it, and a configuration screen will appear.
2b. Enter in all the information.
2c. Click OK. This will configure it for proper use.
3. Run it again. It will launch foobar2000 from the selected folder and back up all selected files to backup in your foobar2000 folder.

To reconfigure it (which shouldn't be needed regularly at all), just delete the .ini.

foo_loader

Reply #1
Oh, another interesting usage note: If you're already running foobar2000, it'll generally create a redundant backup file. However, if you click "Save All" in the preferences then run it, it'll produce a backup of that saved foobar2000.cfg.

The practical upshot of this is:

Make changes.
Click "Save All".
Run foo_loader.

Now you've backed up your changes.

foo_loader

Reply #2
Thanks for this app Canar, will be very handy indeed but one suggestion tho. If it can backup the database.foo as well ? anyways keep up the great work.
You're talking to my guy all wrong... It's the wrong tone. Say it again, and i'll stab you in the face with a soldering iron!

foo_loader

Reply #3
That's a definite possibility. I don't care for that functionality myself, so I might need to have some sort of options thingy. Let me see what I can do.

foo_loader

Reply #4
Thanks for looking into it Canar, it's greatly appreciated 
You're talking to my guy all wrong... It's the wrong tone. Say it again, and i'll stab you in the face with a soldering iron!

foo_loader

Reply #5
Your suggestion has been integrated, Tomacco_boy, and the archive in the first post has been updated. Copy the .exe and the .ini file to make it backup both the database and the config file. If you omit the .ini, it'll only do the config by default.

If anyone has any other suggestions for things this program could do just before loading foobar2000, feel free to tell me.

foo_loader

Reply #6
Thanks for the update Canar, will report back if trouble rises. 
You're talking to my guy all wrong... It's the wrong tone. Say it again, and i'll stab you in the face with a soldering iron!


foo_loader

Reply #8
Nice app, but it's a bit buggy. When I start Foobar with foo_loader foobar doesn't open maximized. This happens too when foobar is open (maximized) and I start foo_loader. It reduces the window size.

foo_loader

Reply #9
Quote
Source is included for intrepid Delphi explorers. It uses WinExec rather than CreateProcess because I couldn't get the latter to properly display a visible window and I got tired of messing with it. It won't preserve maximization either.

Quote
Nice app, but it's a bit buggy. When I start Foobar with foo_loader foobar doesn't open maximized. This happens too when foobar is open (maximized) and I start foo_loader. It reduces the window size.

Maybe that is the secret...
Life is Real...
(But not in audio :) )

foo_loader

Reply #10
The window mode bug should be fixed with the latest release. Please delete old .ini files before using the new version.

foo_loader

Reply #11
To Canar

It is possible add restore function, when foo_loader start with parameter /restore.
In  this way loader must display list of stored files sorted by date and time. User select needed configuration files and loader rewrite current with new from backup directory.

foo_loader

Reply #12
Quote
To Canar

It is possible add restore function, when foo_loader start with parameter /restore.
In  this way loader must display list of stored files sorted by date and time. User select needed configuration files and loader rewrite current with new from backup directory.
[a href="index.php?act=findpost&pid=308054"][{POST_SNAPBACK}][/a]


That's a largish feature for a program intended to be small and light. I'll consider it, but really, it'd be nearly as easy to copy the files from \backup\ by hand in case of catastrophic failure.

What I'm saying is: I'll likely add that if I get really bored, but don't be too expectant.

foo_loader

Reply #13
Brilliant!  I've been waiting for this kind of program for a while now 

Thank you for sharing canar, definitely a must have! No more frustating corruption of my .cfg file
My English sucks... Forgive me :(

foo_loader

Reply #14
Hm. There's been a report of the .ZIP file attached to the first post behaving oddly. Apparently some decompressors are claiming that there's a .ZIP within a .ZIP. I don't get this with WinRAR 3.50 beta 1, but I was wondering if anyone else had any strange things happen while attempting to decompress?

foo_loader

Reply #15
...giving this thread a little bump, as some people seem to be running into the problem this program solves and are unaware of this solution.

foo_loader

Reply #16
Hey, nice little application you'e coded here. Though 0.8.3 hasn't crashed on me for ages now.. but it's good to be sure.

How do you get the preferences/options to show up after configuration and the first launch?

foo_loader

Reply #17
Delete the .ini file.

foo_loader

Reply #18
Nice and usefull programm. Thanks a lot!

Sometimes when my fb2k crashed, all my playlists (and their order) also crashed  Is there any possibility to include in loader backup of \foobar2000\playlists\ ?

foo_loader

Reply #19
I endorse that, backup of the playlists folder would be a nice (and absolutely needed) feature.

foo_loader

Reply #20
I can add playlist backup if you really wish, but realize that if you've got playlists that are anything like mine, this feature is going to eat up megabytes of HD space very quickly.

foo_loader

Reply #21
I second the playlists backup option.

Of course I'm talking of the playlists automatically saved by Foobar as 0000001 - name etc.

foo_loader

Reply #22
Quote
I can add playlist backup if you really wish, but realize that if you've got playlists that are anything like mine, this feature is going to eat up megabytes of HD space very quickly.
[a href="index.php?act=findpost&pid=353669"][{POST_SNAPBACK}][/a]


Thanks for quick reply! My foo_database is 18 mb, and all playlists about 20 mb. Dont think it is much for my HD. Is it possible to make backup of all playlists in one file (maybe zip or rar them in one archive with specified external programm) like database and cfg, and when needed restore them from this file? Or backup will be like: 000000000 - playlist.fpl.2006xxxx.xxxx etc.

Also it would be great if you add an option to delete old backups automatically on loader startup (for example that were made 7 days ago and before).

foo_loader

Reply #23
Hm, yeah, old backup deletion could be a handy feature, especially with xbox hueg databases and playlists...

There are two ways I could implement it:
a) Delete old backups after X days
b) Retain X old backups

I'm personally leaning towards B... Comments?

foo_loader

Reply #24
a) Delete old backups after X days
b) Retain X old backups

 

 
SimplePortal 1.0.0 RC1 © 2008-2019