English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   support.WinUAE (https://eab.abime.net/forumdisplay.php?f=5)
-   -   Relative files paths in a WinUAE configuration file (https://eab.abime.net/showthread.php?t=82195)

Vollldo 28 March 2016 22:50

Relative files paths in a WinUAE configuration file
 
Hello, since a time i am developping a great games launcher and working at the moment on the Amiga family machines support.

The launcher doesn't need to be installed, it can be fully used from an external hard drive. I automatized the creation of a configuration file but i have troubles with relative file paths in a .UAE file.

At the moment the launcher is run on an external drive F:\.

### An example of the directory could be :
ami
|_ emu
|_ Kickstart
| |_ Kickstart v1.3.rom
|_ Configurations
| |_ AMC.uae
|_ WinUAE.exe


### Inside AMC.UAE (the concerned lines only) :
config_host_path=./
kickstart_rom_file=./Kickstart/Kickstart v1.3.rom


### And of course the run command line, the current directory having been before set to "emu" :
WinUAE.exe -f "AMC.UAE"


The problem is that .\Configurations is seen as a directory of the Window "Shared Documents\Amiga Files\WinUAE" and NOT as the "Configurations" directory in the current directory. The "AMC.uae" file isn't found on startup so.


So a very simple question : how to set relative file paths in an .UAE configuration file, the goal is to run ANY .UAE file from ANY drive location (independently of the drive letter so) ?

To write "on the fly" the absolute file paths of the "Kickstart" and "Configurations" directories WORKS obviously, but it isn't what i want. The goal is to write an .UAE file once and be able to run it by using a "-f" command independently of the launcher drive letter and root directory.

Thanks in advance fo your help about the above trouble, hope there is a simple way to do it :).

I will open a WIP thead very soon on EAB to have your opinions and will of course upload a lot of screenshots.

DamienD 28 March 2016 23:35

Quote:

Originally Posted by Vollldo (Post 1080712)
The problem is that .\Configurations is seen as a directory of the Window "Shared Documents\Amiga Files\WinUAE" and NOT as the "Configurations" directory in the current directory. The "AMC.uae" file isn't found on startup so.

So a very simple question : how to set relative file paths in an .UAE configuration file, the goal is to run ANY .UAE file from ANY drive location (independently of the drive letter so) ?

Hey there Vollldo,

I did have a similar problem many, many moons ago but it was due to me not setting the right options in WinUAE and then also in my .UAE configurations in relation to where my the kickstarts & games (.ADFs / .IPFs files) are.

Firstly my WinUAE is located in "C:\WinUAE"; here is a screenshot of the Paths screen with relative paths set:

http://i66.tinypic.com/fa4gon.png

All games are sitting in separate folders (gamename) under "C:\WinUAE\Games".

In the configuration files this is how the kickstart and floppy lines look:

Code:

kickstart_rom_file=.\ROMs\KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k).rom
floppy0=.\Games\Aaargh!\Aaargh! (1988)(Melbourne House).ipf

Finally, when you first run WinUAE it scans for ROMs and then puts in the full path. So with my setup if you looked in the registry this would be "C:\\WinUAE\\ROMs\\KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k).rom\" for example.

I then edit each line and change to ".\\ROMs\\KS ROM v1.3 (A3000)(SK) rev 34.5 (256k).rom\"

Now WinUAE is fully relative and I can move to whatever drive or directory that I like.

I hope all of the above makes sense, if not just shout ;)

Aegis 28 March 2016 23:39

WinUAE doesn't need the .\ try this:

WinUAE (root)
->Configs
->Extras
-->ROMs

In *.uae:
kickstart_rom_file=Extras\ROMs\Kickstart_3.1.rom

For your shortcut:
WinUAE.exe -f "Configs/Config.uae"

Note: If you hit F12, WinUAE will have filled out the absolute/relative (.\) path itself but if you don't save over the config it'll retain the paths you set up.

Portable mode is nifty too - it stores all the registry info in a .ini

Vollldo 29 March 2016 00:05

Thanks for your both answers guys, i will do some tests tomorow and report the result.

To do it without editing the registry is what i'm looking for DamienD, but thanks for the tip :).

So, if i get rightly, what you say Aegis is that without the ".\" characters the "Configurations" directory (and all the others) are seen like to be into the application root directory and not be seen like subdirectories of another directory located elsewhere, right ?

Retro-Nerd 29 March 2016 00:11

Enable the portable mode with a WinUAE.ini. Then you don't get the typical registry problems. If so, delete the old WinUAE.ini and create a new one.

Vollldo 29 March 2016 00:14

Quote:

Enable the portable mode with a WinUAE.ini. Then you don't get the typical registry problems. If so, delete the old WinUAE.ini and create a new one.
It sounds good ! Damn, how could i miss there was a "portable" mode ?

I will test all tomorow by running a game on the 5 supported machines (A500, A600, A1200, CDTV and CD32) and report the result.

DamienD 29 March 2016 00:40

Quote:

Originally Posted by Vollldo (Post 1080740)
To do it without editing the registry is what i'm looking for DamienD, but thanks for the tip :).

To be honest you probably don't need to do this; it's just me being a perfectionist ;)

The kickstart location is relative and in all my configs.

Quote:

Originally Posted by Retro-Nerd (Post 1080741)
Then you don't get the typical registry problems. If so, delete the old WinUAE.ini and create a new one.

With the registry I only have to set this up correctly once. Then I export and import if I've messing around ;)

Toni Wilen 29 March 2016 08:52

Relative path mode: all paths (if possible) are converted to relative when saved to config. (of course paths to other volumes can't be converted)

Portable mode (enables also relative path mode): registry is not used, can have more than one winuae "installation" at the same time without "leaking" any config data between installations. Also useful if you want to have full winuae installation (including config files and images) on USB stick.

You probably have wrong "path mode", make sure Paths panel says "WinUAE default (exe directory)". This selects default root path.

Vollldo 29 March 2016 22:13

Quote:

You probably have wrong "path mode", make sure Paths panel says "WinUAE default (exe directory)". This selects default root path.
Indeed ! I created a "winuae.ini" empty text file and ran winuae.exe, now the GUI opens by seeing the right "Configurations" directory.

Testing at the moment the launcher with AMC :).

Vollldo 29 March 2016 23:27

It works, i just ran AMC (Quartex crack) by creating on the fly an OCS configuration supporting 3 drives disk. Seems in the good way to open a big thread soon here so as the other supported machines already work.
Thanks you to all for your quick help !


All times are GMT +2. The time now is 05:22.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.06824 seconds with 10 queries