![]() "echo $PATH" command will tell you where ubuntu looks for commands. This puts the script to a place where ubuntu will look for it. Sudo mv war3 /usr/local/sbinThen, right click on the replay itself, go to properties, then the "open with" tab, then click add, then under "use custom command", type in "war3" or whatever you named the file and hit enter/ok. Generally, you should put your own scripts in ~/bin i think, but I don't think ubuntu recognizes that path by default, so for now, put the script below in a file using a text editor, lets call the file "war3", then from the terminal, go to the directory where you made the file, then: Judging from posts here people can just doubleclick them and it works. So can anyone explain to me in a few steps, where do I put this script and how do I start replays afterwards. When I run it Warcraft starts with an error message saying "Replay file could not be loaded" When I double click on some replay file I get the message "no application suitable has been found for opening this file" I have made the script and made it executable. I'd prefer to not have to make a copy as it's inefficient, but am not skilled enough to try to translate native linux directories to win ones. Wine /home/userdir/.wine/drive_c/Program\ Files/Warcraft\ III/war3.exe -loadfile "C:/Program Files/Warcraft III/replay/currentreplay.w3g" Thus, I have modified the script to:Ĭp "$*" /home/userdir/.wine/drive_c/Program\ Files/Warcraft\ III/replay/currentreplay.w3g I think it has to do with warcraft not knowing linux directories or somesuch thing.Ī quick fix is just to modify the script to copy the thing to a place that war3 does understand. It works when its in any directory in program files of the wine directory, but no where else. Much simpler than I thought possible for this sorta thing.Ĭhange the user dir and any thing else in the path to make it work. I can now just double click on a replay and have the game load the replay. Wine /home/userdir/.wine/drive_c/Program\ Files/Warcraft\ III/war3.exe -loadfile "$*"This should work. ![]() If [ -e "$ part of it would be the replay name itself? Would there be any way to make the folder location that leads to the replay itself dynamic, ie you can launch the replays from anywhere, have the os call on the script, and have the script know what the location of the script and that part of itself accordingly? WAR3DIR_PATH_LINUX="/home/karth/.winewar3/drive_c/Program Files/Warcraft3" WAR3DIR_PATH_WIN="C:\\Program Files\\Warcraft3" Since I'm not very familiar with bash scripting, it may not be functionnal yet, but that's the idea. Here is the code for my script (also attached). war3_replay replay.w3g " outputsĮnv WINEPREFIX="/home/whatever/.winesth" wine "C:\Program Files\Warcraft3\war3.exe" -loadfile "C:\Program Files\Warcraft3\replay\replay.w3g The you run it as "./wa3_replay replay.w3g" and it builds the wine command line with wineprefix (if any) with proper args I'm still having some trouble with it, since it seems the paths are incorrectly handled by the shell when the script is run.īasically, it's a script in which you modify the variables at the top to match your setup. So, given these news, I have written this script. I sent an email to blizzard tech support for this (not naming my OS of course), so maybe through them I can get some light shed on how the win version does this. In the windows version, I recall it not being a matter of simple file association, ie, telling windows to launch the replay with war3.exe wouldn't work, so I'm not sure exactly what the patch that enables this operation to occur in windows did to make it work right. I think it might be more complex than just putting the replay name after the command. Even after I put the replay name and path after the initial command, it still war3 still doesn't want to load the replay when it loads. The correct syntax would put the second " right after war3.exe i think, otherwise you end up getting file not found error. ![]() Mark that script executable and tell ubuntu to open the replays with that script, which hopefully will take care of everything. Wine "C:\Program Files\Warcraft3\war3.exe replay.ext"Īs for your specific problem, you might have to write a script that takes the path to your replay file, and builds a wine command line, and then runs it. All you'd have to do is to tell the shell prompt "C:\Program Files\Warcraft3\war3.exe replay.ext" (of course, it may not be the correct syntax, but that's the idea). That said, there must be a way to feed the war3.exe launch command with a replay file, Windows' way, i.e. exe files are just regular files for linux, meaning they can't be executed alone.
0 Comments
Leave a Reply. |