1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Getting GOG Civilization IV to work on a new Debian Linux installation with Wine

Discussion in 'Civ4 - Technical Support' started by mycophobia, May 6, 2021.

  1. mycophobia

    mycophobia Chieftain

    Joined:
    Oct 14, 2017
    Messages:
    5
    Gender:
    Male
    I'm putting this here because every time I do a fresh install of Debian and I want to install my GOG copy of Civ 4 I have to dig and experiment and do all sorts of dumb stuff for hours to figure out exactly what to do to make it run in wine, so here's a concise sequence of commands that makes it work for me in hopes that it will assist a fellow weary Googler. I'm assuming this would work in other Debian-based distributions like Ubuntu as well:

    First, add the non-free repository to your sources.list if it's not there already.

    To get everything installed and ready:
    sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install wine32 winetricks
    export WINEPREFIX=~/.wine32
    export WINEARCH=win32
    export LC_ALL=C
    wineboot
    winetricks msxml3 d3dx9
    cd ~/wherever_the_gog_installer_is/
    wine setup_civilization4_complete_2.0.0.4.exe

    Run this in the game folder to play:
    WINEPREFIX=~/.wine32 WINEARCH=win32 LC_ALL=C wine [insert game exe here]
     
    Last edited: May 6, 2021
  2. lymond

    lymond Rise Up! (Phoenix Style!) Moderator Hall of Fame Staff

    Joined:
    Mar 11, 2008
    Messages:
    22,557
    ping @Pangaea

    don't know what Debian and all that means, but I think Pangaea uses both Linux and GOG Civ IV, so ping him here. He may be on a bit of a break, but hopefully he stops by soon.
     
    mycophobia likes this.
  3. mycophobia

    mycophobia Chieftain

    Joined:
    Oct 14, 2017
    Messages:
    5
    Gender:
    Male
    Thanks but I'm all set, this is just a guide for others who might have difficulty installing it, or who might be searching "GOG wine civilization 4 installation" or something like that and getting frustrated that they can't find anything useful and straightforward like I was a couple days ago lol
     
    lymond likes this.
  4. Pangaea

    Pangaea Rock N Roller

    Joined:
    Sep 17, 2010
    Messages:
    6,016
    Cheers @lymond. These days I'm simply relying on the work of others. I installed the game using this installer: https://www.gog.com/forum/sid_meiers_civilization_series/civilization_iv_for_linux

    It does all the necessary stuff behind the scenes, and I just double-click on the shortcut it creates. The game was installed on my end years ago, but these days I think this script also includes registry settings that make the game work with BUFFY.

    For others reading (and I see it's part of the OP's setup), the MSXML3 part is crucial, otherwise the game will crash at certain points, like if you build Stonehenge (iirc, that was one of the triggers).

    The recipe looks familiar, though one point to consider is perhaps to put the game in its own Wine "bottle" (instead of merely "wine32"). Great with more focus on this here. I've found that the game works flawlessly on Linux. It's the game itself that has issues with memory leak and whatnot in very long sessions, and that will crop up on Linux as well, like lags and suchlike in hours-long sessions. Restarting the game will solve it -- until you've played another 6 hours or something :D
     
    mycophobia and lymond like this.
  5. mycophobia

    mycophobia Chieftain

    Joined:
    Oct 14, 2017
    Messages:
    5
    Gender:
    Male
    I hadn't thought of that but yeah since I'm specifying a WINEPREFIX for everything including running the game anyway that's probably the cleanest way to do it.

    I didn't have the d3dx9 step in there originally but then I found out the tile yields didn't show up correctly until I did it.
     

Share This Page