English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 28 March 2016, 22:50   #1
Vollldo
 
Posts: n/a
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.

Last edited by Vollldo; 28 March 2016 at 23:03.
 
AdSense AdSense  
Old 28 March 2016, 23:35   #2
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,978
Quote:
Originally Posted by Vollldo View Post
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:



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
DamienD is online now  
Old 28 March 2016, 23:39   #3
Aegis
Gentleman

Aegis's Avatar
 
Join Date: Dec 2015
Location: The Fortesque Mansion
Posts: 235
Send a message via Skype™ to Aegis
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

Last edited by Aegis; 29 March 2016 at 00:17.
Aegis is offline  
Old 29 March 2016, 00:05   #4
Vollldo
 
Posts: n/a
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 ?

Last edited by Vollldo; 29 March 2016 at 00:12.
 
Old 29 March 2016, 00:11   #5
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 45
Posts: 10,626
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.
Retro-Nerd is online now  
Old 29 March 2016, 00:14   #6
Vollldo
 
Posts: n/a
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.

Last edited by Vollldo; 29 March 2016 at 00:22.
 
Old 29 March 2016, 00:40   #7
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,978
Quote:
Originally Posted by Vollldo View Post
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 View Post
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
DamienD is online now  
Old 29 March 2016, 08:52   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,518
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.
Toni Wilen is online now  
Old 29 March 2016, 22:13   #9
Vollldo
 
Posts: n/a
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 .
 
Old 29 March 2016, 23:27   #10
Vollldo
 
Posts: n/a
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 !
 
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
relative paths do not apply to new files thomas support.WinUAE 1 13 August 2013 19:10
Trying to have portable configuration, relative paths relative to C:\Public\... ? Turrican support.WinUAE 3 24 June 2011 16:33
Relative paths (WAS: Has anybody ever gotten Shiftrix to work?) rsn8887 support.WinUAE 9 27 August 2010 06:56
LFN support, relative paths in .UAE files didomusicuk request.UAE Wishlist 21 16 August 2009 16:52
Relative paths Toni Wilen request.UAE Wishlist 0 16 August 2009 16:06

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.19357 seconds with 11 queries