English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 23 January 2019, 20:42   #1
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,548
Query about file paths in configurations - can they be relative?

I have paths in all my configurations pointing to hard drive folders, archives acting as hard drives, ROMs, floppy disks, etc, etc. All of them are what I call "absolute", like this:

Code:
C:\Users\Foebane\Amiga\Games\[Game example].lha
What I would like to know is if WinUAE can point to this path, so that all but the [Game example].lha can be omitted in the configuration? So:

Code:
WinUAE config path = "C:\Users\Foebane\Amiga\Games"
and the config only mentions the [Game example].lha file?

The reason I have is that for example, all my configs work fine if the Windows User Account is Foebane, but if that changed on a re-install of Windows, I'd have to change all of my configurations to the new name.

So is a relative path possible in configs?
Foebane is offline  
Old 23 January 2019, 20:50   #2
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 42
Posts: 13,459
Quote:
Originally Posted by Foebane View Post
So is a relative path possible in configs?
Of course it is; that's what I use in settings and configuration files

My WinUAE setup is sitting in "C:\WinUAE" but I can move it anywhere i.e. "D:\Rubbish" or whatever due to using relative paths.



For example, the settings stored in the registry (am only listing a few settings):

Quote:
[HKEY_CURRENT_USER\Software\Arabuusimiehet\WinUAE]
ConfigurationPath=".\\Configurations"
FloppyPath=".\\Games"
hdfPath=".\\Hdf"
InputPath=".\\InputRecordings"
KickstartPath=".\\ROMs"
LuaPath=".\\Lua"
RipperPath=".\\Rips"
SaveimagePath=".\\SaveImages"
ScreenshotPath=".\\Screenshots"
StatefilePath=".\\SaveStates"
VideoPath=".\\Videos"

[HKEY_CURRENT_USER\Software\Arabuusimiehet\WinUAE\DetectedROMs]
ROM_001="KS ROM v1.0 (A1000)(NTSC) (256k) / ".\\ROMs\\KS ROM v1.0 (A1000)(NTSC) (256k).rom""
ROM_002="KS ROM v1.1 (A1000)(NTSC) rev 31.34 (256k) / ".\\ROMs\\KS ROM v1.1 (A1000)(NTSC) rev 31.34 (256k).rom""
ROM_003="KS ROM v1.1 (A1000)(PAL) rev 31.34 (256k) / ".\\ROMs\\KS ROM v1.1 (A1000)(PAL) rev 31.34 (256k).rom""
ROM_004="KS ROM v1.2 (A1000) rev 33.166 (256k) / ".\\ROMs\\KS ROM v1.2 (A1000) rev 33.166 (256k).rom""
ROM_005="KS ROM v1.2 (A500,A1000,A2000) rev 33.180 (256k) [315093-01] / ".\\ROMs\\KS ROM v1.2 (A500,A1000,A2000) rev 33.180 (256k).rom""
ROM_006="KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k) [315093-02] / ".\\ROMs\\KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k).rom""
ROM_007="KS ROM v2.04 (A500+) rev 37.175 (512k) [390979-01] / ".\\ROMs\\KS ROM v2.04 (A500+) rev 37.175 (512k).rom""
ROM_008="KS ROM v2.05 (A600) rev 37.299 (512k) [391388-01] / ".\\ROMs\\KS ROM v2.05 (A600) rev 37.299 (512k).rom""
ROM_009="KS ROM v2.05 (A600HD) rev 37.300 (512k) [391304-01] / ".\\ROMs\\KS ROM v2.05 (A600HD) rev 37.300 (512k).rom""
ROM_010="KS ROM v2.05 (A600HD) rev 37.350 (512k) [391304-02] / ".\\ROMs\\KS ROM v2.05 (A600HD) rev 37.350 (512k).rom""
ROM_011="KS ROM v3.0 (A1200) rev 39.106 (512k) [391523-01/391524-01] / ".\\ROMs\\KS ROM v3.0 (A1200) rev 39.106 (512k).rom""
ROM_012="KS ROM v3.0 (A4000) rev 39.106 (512k) [391513-02/391514-02] / ".\\ROMs\\KS ROM v3.0 (A4000) rev 39.106 (512k).rom""
ROM_013="KS ROM v3.1 (A4000) rev 40.70 (512k) / ".\\ROMs\\KS ROM v3.1 (A4000) rev 40.70 (512k).rom""
ROM_014="KS ROM v3.1 (A500,A600,A2000) rev 40.63 (512k) / ".\\ROMs\\KS ROM v3.1 (A500,A600,A2000) rev 40.63 (512k).rom""
ROM_015="KS ROM v3.1 (A1200) rev 40.68 (512k) [391773-01/391774-01] / ".\\ROMs\\KS ROM v3.1 (A1200) rev 40.68 (512k).rom""
ROM_016="KS ROM v3.1 (A4000) rev 40.68 (512k) / ".\\ROMs\\KS ROM v3.1 (A4000) rev 40.68 (512k).rom""
ROM_017="KS ROM v3.1 (A4000T) rev 40.70 (512k) [391657-01/391658-01] / ".\\ROMs\\KS ROM v3.1 (A4000T) rev 40.70 (512k).rom""
ROM_018="CD32 KS ROM v3.1 rev 40.60 (512k) / ".\\ROMs\\CD32 KS ROM v3.1 rev 40.60 (512k).rom""
ROM_019="CD32 extended ROM rev 40.60 (512k) / ".\\ROMs\\CD32 extended ROM rev 40.60 (512k).rom""
ROM_020="CDTV extended ROM v1.00 (256k) [252606-01/252607-01] / ".\\ROMs\\CDTV extended ROM v1.00 (256k).rom""
ROM_021="CDTV/A570 extended ROM v2.30 (256k) [391298-01] / ".\\ROMs\\CDTV-A570 extended ROM v2.30 (256k).rom""
ROM_022="CDTV extended ROM v2.07 (256k) / ".\\ROMs\\CDTV extended ROM v2.07 (256k).rom""
ROM_023="CD32 Full Motion Video Cartridge ROM rev 40.30 (256k) / ".\\ROMs\\CD32 Full Motion Video Cartridge ROM rev 40.30 (256k).rom""
In the actual configuration files (again only listing a few settings):

Quote:
kickstart_rom_file=.\ROMs\KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k).rom
floppy0=.\Games\3D Galax\3D Galax (1989)(Gremlin)[cr Codetapper][f AGA Codetapper].adf
hardfile2=rw,DH0:.\Games\AlarCity AGA\AlarCity AGA.hdf,32,1,2,512,0,,uae
uaehf0=hdf,rw,DH0:.\\Games\\AlarCity AGA\\AlarCity AGA.hdf,32,1,2,512,0,,uae

Last edited by DamienD; 24 January 2019 at 01:57.
DamienD is offline  
Old 23 January 2019, 21:22   #3
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 42
Posts: 13,459
With storing stuff in "C:\Users\<username>", it can become a bit tricky, but you could do something like:

This:

Quote:
floppy0=.\Games\3D Galax\3D Galax (1989)(Gremlin)[cr Codetapper][f AGA Codetapper].adf
Becomes:

Quote:
floppy0=%SYSTEMDRIVE%\Users\%USERNAME%\Games\3D Galax\3D Galax (1989)(Gremlin)[cr Codetapper][f AGA Codetapper].adf
or even better:

Quote:
floppy0=%USERPROFILE%\Games\3D Galax\3D Galax (1989)(Gremlin)[cr Codetapper][f AGA Codetapper].adf
...but personally I'd avoid storing anything under "C:\Users\<username>" and then everything can become fully relative quite easily; as I've shown you in post #2

Last edited by DamienD; 23 January 2019 at 21:29.
DamienD is offline  
Old 23 January 2019, 22:13   #4
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,548
Quote:
Originally Posted by DamienD View Post
...but personally I'd avoid storing anything under "C:\Users\<username>" and then everything can become fully relative quite easily; as I've shown you in post #2
The way I've set things up, WinUAE zip is extracted to Program Files (x86) and all of my ROMs, configurations, demo and game files are all in C:\Users\Foebane\Amiga. I have pinned WinUAE to the taskbar, so that makes things easy. I do it this way as it's easier for me to access the Foebane account in Windows Explorer, or File Explorer as it's known in Win10. Basically, FE/WE is less user-friendly in Win10 than Win7

I'd love to put the Amiga folder in the C:\ root. I think I'll try it tomorrow. Technically, if all my files are accessible from the WinUAE icon, I don't need to worry so much about accessing them in Explorer.
Foebane is offline  
Old 23 January 2019, 22:18   #5
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 42
Posts: 13,459
Quote:
Originally Posted by Foebane View Post
The way I've set things up, WinUAE zip is extracted to Program Files (x86) and all of my ROMs, configurations, demo and game files are all in C:\Users\Foebane\Amiga. I have pinned WinUAE to the taskbar, so that makes things easy. I do it this way as it's easier for me to access the Foebane account in Windows Explorer, or File Explorer as it's known in Win10. Basically, FE/WE is less user-friendly in Win10 than Win7
Messy

So you have:
  • WinUAE extracted to a directory under "C:\Program Files (x86)".
  • Everything else under "C:\Users\Foebane\Amiga" i.e. ROMs, configurations, demo and game files.
...obviously run things how you like but not very portable or tidy

What happens if you wanted to run everything from say a USB stick without having to change settings / lines in configuration files?

Anyway, enough from me in this thread... I've given you good suggestions to think about
DamienD is offline  
Old 23 January 2019, 22:33   #6
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,548
Quote:
Originally Posted by DamienD View Post
...obviously run things how you like but not very portable or tidy

What happens if you wanted to run everything from say a USB stick without having to change settings / lines in configuration files?
Portability isn't important to me, especially not on a USB stick.

However, the %USERPROFILE% tip I will be implementing tomorrow, that's so useful.
Foebane is offline  
Old 23 January 2019, 22:37   #7
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 42
Posts: 13,459
Quote:
Originally Posted by Foebane View Post
Portability isn't important to me
...then why do you care if everything isn't using relative paths?

That's the main reason for making things relative i.e. portability

A USB stick was just an example... I mean portability to anywhere i.e. a different base directory name / location, a totally different drive etc.
DamienD is offline  
Old 23 January 2019, 23:00   #8
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,548
Quote:
Originally Posted by DamienD View Post
...then why do you care if everything isn't using relative paths?

That's the main reason for making things relative i.e. portability

A USB stick was just an example... I mean portability to anywhere i.e. a different base directory name / location, a totally different drive etc.
Hmm, I didn't think of that. And to be honest, I have been able to easily change the paths in all of my configs with Notepad++, so I guess I was just wondering about the possibility and asked, hence this thread.

But your advice about the % stuff was useful.
Foebane is offline  
Old 24 January 2019, 18:18   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,354
It can only work if you have win32.hardfile_path=<base path> in same config file which probably isn't what you wanted..

win32.rom_path, win32.floppy_path, win32.hardfile_path and win32.cd_path can be listed more than one time in config file and if matching rom/floppy/hdf/directory/cd config entry isn't found in current directory, path is prefixed with _path file until valid path is found (or no path found).

It is much easier to make all configs relative to winuae path. It does not need to be inside winuae directory, for example something like ..\..\directory_2_levels_outside_of_winuae_path\path\to\game.lha should work.

Actually path does not need to be relative to winuae.exe, you can use -datapath command line to set winuae's "current directory". This probably is easiest solution.
Toni Wilen is offline  
Old 24 January 2019, 18:50   #10
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,548
I've moved my main Foebane data folder from C:\Users\Foebane\Foebane to C:\Foebane, makes things easier. What I like is that essentially, my Amiga folder is on the same level as WinUAE, but on different paths, namely:

C:\Foebane\Amiga
C:\Program Files (x86)\WinUAE

I have put things this way as it will at least lead to a shorter path, and it's independent of the User accounts on Windows. And if down the road, even the C: drive isn't the same on a different computer, I can change to the % variable DamienD suggested.

My only issue is that I wonder if I should be storing files in the C: root together with the main Windows system folder etc, but I think they tell PC newbies to avoid that. But I'm an experienced Windowsphile.
Foebane is offline  
Old 24 January 2019, 19:36   #11
Mclane
Old fart!

Mclane's Avatar
 
Join Date: Apr 2002
Location: Northolt, West London
Age: 57
Posts: 585
I never separate an Emulator from its roms/ disks/ images / etc, Always one folder with all inside in various sub folders..

Way too easy to lose stuff which is why I don't like emulators using the USER area to store configs, saves etc as you can so easily forget to move those if you install a new disks or as I like to do, refresh Windows from time to time to remove the unwanted junk I've played around with and deleted mostly.

Nothing worse than firing up your new cleaned out Win install and go play a game only to find you forgot the users dirs etc for saves etc and you now have to start again or just sob

Technically its always been deemed safer to use a separate drive for Windows and your programs but its not really an issue as from day one PC wise a C:\ was the source for all your stuff as disks drives back then were pretty damn expensive. The only annoyance I have with Win7 is that bloody always expanding Winsxs folder in the windows dir, if you have a small drive it starts to be a pain but although I have bigger drives I don't have any other SSD drives as yet and I love those speedy little buggers.

Last edited by Mclane; 24 January 2019 at 19:43.
Mclane is offline  
Old 24 January 2019, 19:55   #12
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,548
Quote:
Originally Posted by Mclane View Post
I never separate an Emulator from its roms/ disks/ images / etc, Always one folder with all inside in various sub folders..
My Amiga folder in C:\Foebane contains all of my ROMs, disks, images, all the configurations, even the System.hdf file itself, with backup zips of the System.hdf file that I can easily extract to revert to a "fresh install" of ClassicWB if something goes wrong. Everything Amiga-related is in this folder.

I keep WinUAE in C:\Program Files (x86) simply so I can update it when a new version comes out, none of the information I mentioned above is kept there. Then, when WinUAE is extracted to its folder, with nothing else added, I simply pin the exe to the taskbar and point WinUAE to my Amiga folder for configurations, etc in Paths. It's really quite straightforward.
Foebane is offline  
Old 24 January 2019, 21:11   #13
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 42
Posts: 13,459
Quote:
Originally Posted by Foebane View Post
I keep WinUAE in C:\Program Files (x86) simply so I can update it when a new version comes out, none of the information I mentioned above is kept there. Then, when WinUAE is extracted to its folder, with nothing else added, I simply pin the exe to the taskbar and point WinUAE to my Amiga folder for configurations, etc in Paths. It's really quite straightforward.
You don't need to install WinUAE to use or update it; just extract the .ZIP file.

You can extract into "C:\Foebane" so it's all in the same folder.

...but having all your collection i.e. "ROMs, disks, images, all the configurations, System.hdf" in one folder without sub-directories to organise things must be a real nightmare to manage...
DamienD is offline  
Old 24 January 2019, 21:25   #14
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,548
Quote:
Originally Posted by DamienD View Post
You don't need to install WinUAE to use or update it; just extract the .ZIP file.

You can extract into "C:\Foebane" so it's all in the same folder.

...but having all your collection i.e. "ROMs, disks, images, all the configurations, System.hdf" in one folder without sub-directories to organise things must be a real nightmare to manage...
I don't install WinUAE, I extract the zip. I'm sure I said that.

Sorry, I didn't mention that the Amiga folder is the root, and I do have several subdirectories:

Code:
C:
| Foebane
| | Amiga
| | | Demos
| | | Games
| | | Kickstart
| | | System
| | | Workbench
The Demos folder is broken up into subfolders for each of the eight configs I use and contain the demos that work best on them, including one for WHDLoad.

Games contains a WHDLoad subfolder with room for a second subfolder for ADFs if I wish.

Kickstart is where the ROMs are, and WinUAE points directly to it.

System is where the System.hdf (ClassicWB Lite) goes.

Workbench is simply the Workbench 3.1 ADFs I use when setting up ClassicWB Lite.

Foebane is offline  
Old 24 January 2019, 23:11   #15
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 46
Posts: 1,548
Quote:
Originally Posted by Toni Wilen View Post
Actually path does not need to be relative to winuae.exe, you can use -datapath command line to set winuae's "current directory". This probably is easiest solution.
Thanks, Toni, I implemented this via shortcuts and they work a treat!

This tip certainly solves a problem that (as far as I know) couldn't be solved with configurations such as A500 quickstart and so forth, so when I used these ones before, I always had to manually set the path in the file requester. But now these shortcuts with this parameter do what I always wanted with these particular configs.
Foebane is offline  
 


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 in FS-UAE / CD32 config file not working zardoz support.FS-UAE 1 26 May 2018 22:23
Relative files paths in a WinUAE configuration file Vollldo support.WinUAE 9 30 March 2016 00:27
Trying to have portable configuration, relative paths relative to C:\Public\... ? Turrican support.WinUAE 3 24 June 2011 17:33
Relative paths (WAS: Has anybody ever gotten Shiftrix to work?) rsn8887 support.WinUAE 9 27 August 2010 07:56
Relative paths Toni Wilen request.UAE Wishlist 0 16 August 2009 17: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 11:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.08337 seconds with 13 queries