3

I'm running Quantal 32-bit with Wine 1.4.1 installed. I have a particular .exe file of an old game (Aliens vs Predator Gold Edition) that runs flawlessly, but it refuses to run unless I am in its exact directory.

For example, if in terminal I cd to the game's directory and run wine avp.exe, it launches with no problem. It also launches fine when I right-click and choose to run with Wine Windows Program Loader.

However, if I'm in another directory in terminal, say my home directory, and I try to launch it by calling it's absolute file path, i.e.

wine /home/USER/.wine/drive_c/AVP/avp.exe

it fails to launch and gives me an error message saying that it encountered a "serious problem and needs to close".

I have no idea why calling this program from another directory would make any difference, especially since I've successfully executed other exe files this way. Has anyone encountered this before?

4
  • Just wondering, is that the complete path to the executable? and can you quote the path to see if it works? Like wine "/home/USER/.wine/drive_c/AVP/avp.exe" I would also encourage you to upgrade wine from the 1.4.1 version to the 1.5.x version using the PPA provided for it in the winehq site. There were many bugs back then and it might fix the path issue if you upgrade. Apr 16, 2013 at 22:11
  • You just need a script or icon to run the game. Any yes, most 'older' Windows-based software needs to be in the 'home' directory for that app. to run properly.
    – david6
    Apr 16, 2013 at 23:25
  • Thanks for the replies. To answer Luis' question, I did try enclosing the complete path name to the the executable with no luck. It appears that wine finds the program but just can't run it. It also seems that it doesn't matter where the folder containing the executable is located; as long as I'm in its directory, I can launch it. I will follow your advice and upgrade wine to 1.5.x and see if that fixes the issue. Worst case scenario is that I'll just have to navigate to the directory and launch it from there whenever I want to play it.
    – Skreechbat
    Apr 17, 2013 at 0:52
  • In response to david6, how would I go about creating a script or icon to run the game? I first noticed the problem when I attempted to create a custom launcher (.desktop file) with the command "wine /path/to/game/avp.exe". Not sure if that's the same thing as a script or icon?
    – Skreechbat
    Apr 17, 2013 at 0:56

2 Answers 2

4

The program probably uses dlls which it can only find when run from its directory, where they reside. This is a common mistake Windows programmers make.

1
  • 1
    Am going to +1 because yes, this would also happen in a Windows environment. That is why so apps run a "launcher" first. Apr 16, 2013 at 22:34
1

I have the same problem awhile ago.

This is how I fix it.

  1. Create avp_wine file in your /usr/bin directory
  2. And this will be your content in your /usr/bin/avp_wine

    #!/bin/bash cd /home/USER/.wine/drive_c/AVP/ wine avp.exe

  3. And in your /usr/applications/avp.desktop change the Exec value to avp_wine

1
  • Nice solution. I'll just add that you need to "Allow executing file as a program" to be activated for the file. Also could you put this file somewhere in the /home/USER directory?
    – Pekov
    Jun 12, 2017 at 22:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .