HowTo: Run AGSEditor on Linux with wine

Started by Ogon, Mon 17/08/2009 01:05:17

Previous topic - Next topic

Ogon

The things below are now revamped in a more complete guide! It is a bit longer and involves compiling a custom wine, but yields much better results (= a complete working AGS installation).


----


This is only how it worked for me, but I thought I'd share this with others as it doesn't even seem that hard to do once you figured it out. It makes use of wine, and winetricks (a useful script). So use at your own risk, but feel free to comment on this.

Installation in short: Simply install .NET 2.0 and vcrun2008sp1 in wine. Then AGS should work (you need some native dlls though, scroll down for some hints how to improve AGS in wine)

Quote
And that's how well it works:
AGS mostly works (some minor issues are described in the hints section below) with wine 1.2. Only compiling and exporting the EXE does not. If you want that to work aswell, look here for a solution.

INSTALLATION
Ok, this is how it worked for me:

Step 1:
Install wine and winetricks. Either install through package manager or get it from here (save to a file and set chmod +x so you can execute it)

Step 2:
Set a wine prefix.
For all your further actions, you want to use a new clean wine prefix which is specifically used for your AGS installation so nothing's messed up or influenced by other installed things.

For that, do "export WINEPREFIX=/home/blah/.wineags", whereas "/home/blah/" is your $HOME folder (print it out with "echo $HOME" if you don't know where that is). Please note a full path is required ("./" doesn't work).

Everything you do from your current terminal is now executed in that separate wine prefix. Please note if you open a new terminal, you need to execute this again to install or use things from your AGS installation.

Step 3:
Install .NET 2.0. Either just download it from Microsoft or use "winetricks dotnet20".

Step 4:
Install VC2008 runtime. Either again from Microsoft, or "winetricks vcrun2008sp1". You could also use the "normal" vcrun2008 instead of the service pack, but service pack are generally useful (because they contain bugfixes and such)

Step 5:
Start AGS
If you're in a new terminal, do the WINEPREFIX export from Step 2 first.
Then dive into the program files folder using cd "$HOME/.wineags/drive_c/Program Files/" (don't forget the quotes!) and type "ls". You should get an entry that looks e.g. like "Adventure Game Studio 3.1.2 SP1".
Simply type cd "Adventure Game Studio 3.1.2 SP1" (with quotes!) and then "wine AGSEditor.exe"

Done!

---
HINTS (troubleshooting):
- Editor startup issues due to some font error: For me, the AGS Editor only works properly if you get a native gdiplus.dll from Windows. Place it into your wine's system32 (at $HOME/.wineags/drive_c/windows/system32) and then run winecfg (with your WINEPREFIX set) and under "Libraries", add gdiplus.dll as "Native, builtin" or just "Native". For me, this was necessary to get the editor to startup at all

- Double-click in category navigation (top-right) doesn't work: Simply click once on a category there, then press the Return key (yes that's a bit inconvenient, but works). Alternatively, a double-click with the right mouse key worked for me (a bit strange but huh)

- In the game settings, the arrow for options with multiple entries to choose from to open the list is missing This worked for me after using another dll natively (see above with gdiplus.dll), which is "comctl32.dll"

- Compilation error: "Unable to register for Vista Game Explorer" See here for a fix (requires a custom wine compiled from source)

Ogon

#1
Some usage hints in case you run into the same functionality problems as me:

- If the category box at the top right (the one giving you access to all the different sub editors) doesn't contain all items (it missed some, e.g. "General Settings" and others for me on the first startup), just starting up the editor again seems to have fixed this for me - OR: it just happened to me again -> just resizing that box also helped refreshing and repairing its content

Edit: for other hints, see troubleshooting in the first post above

Pumaman

Thanks for the tips. Obviously the AGS Editor is not supported when running on Linux, but if it works, great!

rbaleksandar

Thanks. Will give it a try. Although I prefer using Windows in a virtual machine, where "strange happenings" don't happen so often. :D
I am a mighty pirate. Arrrrgh!

deadsuperhero

So in theory, if one wanted to only port the new .NET-based AGS runtime, you'd need Mono. But if you wanted to port the editor as well, you'd need C++?

Could one theoretically write a Linux-based editor in Mono only, since Mono has bindings for GTK? Or would a bridge be required for everything?
The fediverse needs great indie game developers! Find me there!

Ogon

QuoteSo in theory, if one wanted to only port the new .NET-based AGS runtime, you'd need Mono. But if you wanted to port the editor as well, you'd need C++?
AGS games do not use .NET 2.0 and therefore don't need mono or .NET. They are simple, usual applications.

So to run AGS games on linux, you either need the linux engine port or simply use the windows engine in wine (which works fine without installing anything, at least for me).

QuoteCould one theoretically write a Linux-based editor in Mono only, since Mono has bindings for GTK? Or would a bridge be required for everything?

Only some functionality of the editor is not done in mono-compatible things, also see it explained with a quote from CJ here. In theory, this could be ported over so only mono is sufficient to run the editor (and not all that wine work I described above). The engine would still need either a working linux port (don't know how far the current efforts are) or wine.

dankegel

Nice guide!  But you could simplify it a bit by using winetricks to install gdiplus and comctl32, e.g.
  winetricks gdiplus comctl32
No need to run winecfg, winetricks does that for you, more or less.
Also, winetricks vcrun2008 already installs vcrun2008sp1, so no need to be specific.
So steps 3 and 4, plus some later tips, can be more simply stated as
  winetricks dotnet20 vcrun2008 gdiplus comctl32

Section 2 of your "build custom wine" guide links to
  http://bugs.winehq.org/show_bug.cgi?id=14882i
(see the extra i?)  Please remove the stray char.

I'll try to poke the Wine developers to see if they can fix 14882 in trunk.

It would be helpful if you could create an entry for AGS in appdb.winehq.org.

SMF spam blocked by CleanTalk