- This topic has 8 replies, 3 voices, and was last updated 5 years, 8 months ago by wigginjs.
-
AuthorPosts
-
15. January 2019 at 23:22 #6849wigginjsParticipant
Hi,
I’m trying to generate profiles for all of my Dos games from a list of file names. I’ve written a Python program that takes a list of filenames like this:
./10th Frame/bowl.exe
./11THHOUR/#STARTME.BAT
./1869/1869.EXE
./1942 pacific/1942.exe
./3SISTERS/#startme.BAT
./4×4 Offroad Racing/4×4.exeAnd generates the following:
* a collection.xml with a <game> statement like this:
<game>
<id>f91c853e-672e-4af7-af19-5aa58cf0375f</id>
<type>item</type>
<avatar>avatar.png</avatar>
<description>10th Frame</description>
</game>* a directory under .MagicBox/Games/Data/(guid)/ that contains:
avatar.png (with no modifications)
config.xml pointing to the correct directory and executable
Temp/dosbox.config with a correct autoexec.bat
layouts.xml (with no modifications)
loopers.xml (with no modifications)
mapper.xml (with no modifications)My problem is, it doesn’t work. When I overwrite my .MagicBox directory on my Android device and I open Magic Dosbox I have a blank collection. I think I’ve handled all of the text parsing and XML tagging correctly. Are there other files I need to modify to get these profiles to appear?
16. January 2019 at 14:45 #6851Al exKeymasterI know things like this are more for fun, and you probably don’t care about the extra amount of time it it takes to code it, but wouldn’t it be quicker and easier to simply import the games one by one? I mean, even if it’s 100 games, after an automated import, you’ll still have to edit each game profile to set up cycle options, game cover icon, touch control screen layout, etc.
16. January 2019 at 15:41 #6852wigginjsParticipantHi Alex,
Interesting point, but I actually think it was much faster for me to write this code than it would have been to manually define each game. You are right though, I will still need to edit the details of each game by hand, but one they are all in the interface I think that will be much easier. To answer your question though, this is a time saving technique for me.
Do you know if the files I listed are sufficient or if there are other places I have to define game profiles for them to show up in the UI?
16. January 2019 at 17:38 #6853Al exKeymasterFor in-depth technical stuff, it’s best to ask Tony (the Magic Dosbox dev). He checks the forum very frequently, so he should respond to your question soon.
17. January 2019 at 11:51 #6854Al exKeymasterJust a thought – are you using the free version? Because it only allows one profile. I can’t tell for sure, but that might be a possible reason why the list is empty after a batch import of multiple games.
17. January 2019 at 15:35 #6855wigginjsParticipantNope, I have the paid version.
18. January 2019 at 12:42 #6856adminKeymasterIt looks good to me…maybe wrong xml locale? But maybe I can add to next version this feature. I can create game profile from each exe, com, bat on picked path
18. January 2019 at 21:25 #6857wigginjsParticipantHi,
Happy to share this code and how I generated the list if that’s helpful. I don’t see a locale or language definition in the existing XML? Where would I define or validate that?
18. January 2019 at 22:02 #6858wigginjsParticipantAlso, does the <id></id> tag need to be anything specific, or does it just need to match the directory name in .MagicBox/Games/Data/ ?
-
AuthorPosts
- You must be logged in to reply to this topic.