jensroth-git/WinLaunch

Relative Paths

Opened this issue · 3 comments

I am using WinLaunch in portable form so that data is saved in Data/Items.xml relative to the project's directory. I have difference instances of WinLaunch running relative to where it is executing, so that other locations are backups or redundancies.

When I add applications using the GUI the applications are added to Items.xml using absolute paths. When I open that file in a code editor and change the absolute paths to relative paths the application icons continue to display perfectly, but nothing executes when clicking on the application icons.

  • Absolute path example: \\network\games\windows\doom\doom.exe
  • Relative path example ..\..\windows\doom\doom.exe

In the case of the relative path I am running WinLaunch from a directory at \\network\games\tools\WinLaunch

Why would you want relative paths?
When you are running it from a different directory it wouldn't work at all anymore?

Why I want relative paths.

I backed up a variety of personal media and applications to various different storage devices so that I may access it across the network at my house or on an external hard disk I can travel with. I store and run WinLaunch as part of that backed up data. It would be nice to allow relative paths, so that if WinLaunch is executed from an external hard disk it is only referencing applications stored on that hard disk relative to the location of WinLaunch's Items.xml file.

What happens

  1. I manually convert the pasts in Items.xml to relative paths I launch WinLaunch by opening the file in a code editor and using a find and replace all feature to convert \\network\games\ to ..\..\.
  2. WinLaunch loads up and presents the application icons perfectly fine from the specified relative path.
  3. I attempt to load one of the applications by clicking one of the application icons the respective application fails to open. This failure only occurs for some application icons. As far as I can tell the only difference between success and failure is directory name of the given application.

Examples of success and failure paths

Success

  • ..\..\Windows\Binding of Isaac Rebirth\isaac-ng.exe
  • ..\..\Windows\Bloons TD6\BloonsTD6.exe
  • ..\..\Windows\Dear Esther Landmark Edition\DearEsther.exe
  • ..\..\Windows\Donut County\DonutCounty.exe
  • ..\..\Windows\GZDOOM\gzdoom.exe
  • ..\..\Windows\OpenRA\Dune2000.exe
  • ..\..\Windows\Enter the Gungeon\EtG.exe
  • ..\..\Windows\EverQuest 2\EverQuest2.exe
  • ..\..\Windows\Firewatch\Firewatch.exe
  • ..\..\Windows\Forest\TheForest.exe
  • ..\..\Windows\Forgotten City\ModernStoryteller01.exe
  • ..\..\Windows\Gorogoa\Gorogoa.exe
  • ..\..\Windows\Half Life 2\hl2.exe
  • ..\..\Windows\Maquette\Maquette.exe
  • ..\..\Nintendo\emulator_fceux\fceux.exe
  • ..\..\Nintendo\emulator_nestopia\nestopia.exe
  • ..\..\Windows\Stanley Parable\stanley-start.exe
  • ..\..\Windows\Witness\witness64_d3d11.exe

Failure

  • ..\..\Windows\Alien Cube\bin\win_x64\TheAlienCube.exe
  • ..\..\Mame (Arcade)\mame.exe
  • ..\..\Windows\Series - Baldurs Gate\Baldur's Gate 1\Baldur.exe
  • ..\..\Windows\Series - Baldurs Gate\Baldur's Gate 2\Baldur.exe
  • ..\..\Windows\Series - Civilization\Civilization 3\Civ3Launcher.exe
  • ..\..\Windows\Series - Civilization\Civilization 4\Civilization4.exe
  • ..\..\Windows\Series - Civilization\Civilization 5\CivilizationV.exe
  • ..\..\Windows\Series - Civilization\Civilization 6\Base\Binaries\Win64Steam\CivilizationVI_DX12.exe
  • ..\..\Windows\Dont Starve\bin\dontstarve_steam.exe
  • ..\..\eXoDOS\LaunchBox.exe
  • ..\..\Windows\Series - Elder Scrolls\Elder Scrolls 1 - Arena\DOSBOX\arena.exe
  • ..\..\Windows\Series - Elder Scrolls\Elder Scrolls 2 - Daggerfall\DOSBOX\daggerfall.exe
  • ..\..\Windows\Series - Elder Scrolls\Elder Scrolls 3 - Morrowind\openmw.exe
  • ..\..\Windows\Series - Elder Scrolls\Elder Scrolls 4 - Oblivion\Oblivion.exe
  • ..\..\Windows\Series - Elder Scrolls\Elder Scrolls 5 - Skyrim\SkyrimSE.exe
  • ..\..\Windows\Everybodys Gone To The Rapture\Bin64\Rapture_Release..exe
  • ..\..\Windows\Fallout Shelter\FalloutShelter.exe
  • ..\..\Genesis\gens.exe
  • ..\..\Windows\Series - Quake\Quake1\darkplaces\darkplaces-sdl.exe
  • ..\..\Windows\Series - Quake\Quake1\quakespasm\quakespasm-sdl12.exe
  • ..\..\Windows\Series - Quake\Quake2\yquake2.exe
  • ..\..\Windows\Series - Quake\Quake3\ioquake3.x86_64.exe
  • ..\..\Playstation1\ePSXe.exe
  • ..\..\Playstation2\pcsx2-1.6.0-setup.exe

Summary

It looks like relative paths are already unintentionally working, aside from what appears to be an edge case defect. I have no idea why some paths fail and others work. Everything works when the paths are absolute.

Update

I have added some additional items to the example lists. I have verified its not permissions related and these success and failure lists behave identically in different locations (data backup repositories).

I have also noticed when I attempt to open an application for the first time at a given location Windows throws up a window about granting firewall (Windows Defender) access. I am not sure if this could be a factor. I have tried disabling the firewall and there is no change in behavior.

I have confirmed at least part of the problem is depth. When I changed:

  • ..\..\Windows\Series - Civilization\Civilization 3\Civ3Launcher.exe

To:

  • ..\..\Windows\Series - Civilization 3\Civ3Launcher.exe

It then worked. I did duplicate that directory and modify its path to the new path. I am not sure why the others, such as ..\..\Playstation1\ePSXe.exe are not working. I did validate the relative path was used in the UI via the edit menu both times. The proper icon displayed on load of WinLaunch with both paths. I cannot edit to a relative path in the UI so I am closing out of WinLaunch entirely, manually altering Items.xml in a code editor, and then launching WinLaunch again.