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

how to port windows civ4 to mac osx (10.6-10.10) using wine wrappers and run more mod

Discussion in 'Civ4 - Macintosh' started by z0wb13, Aug 11, 2012.

  1. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,317
    Gender:
    Male
    Location:
    England
    It's possible to create an empty wineskin that you drop an executable onto to run it. So maybe you can create two such wineskins, each with a different EXE flag to load the appropriate mod.
     
  2. guspasho

    guspasho Prince

    Joined:
    Apr 5, 2005
    Messages:
    362
    I created a blank wrapper but I can't figure out how to get it to point to an EXE in another wrapper. I think I'd have a similarly hard time if I tried creating a batch file that pointed to an EXE in another wrapper. I posted my question in the Wineskin support forum so hopefully they will have an answer shortly.

    EDIT: Creating an alias across wrappers didn't work either. :(
     
  3. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,317
    Gender:
    Male
    Location:
    England
    I think you have to copy the .exe to a Mac folder outside the wrapper.
     
  4. justinbn1

    justinbn1 Chieftain

    Joined:
    Jan 20, 2007
    Messages:
    13
    Thanks for the Wineskin guide, it has been very helpful to me.

    I have a bit of a problem, though. I'm using the Caveman2Cosmos mod, and I keep getting random crashes when I end my turns. Even weirder, I find thereafter that all the closest saves (be they regular or autosaves) crash upon loading.

    I suspect that Wine somehow runs out of RAM (which is weird: I have 4Gb), since the only other person I found on the C2C forums experiencing this sort of problem was a Windows user with very low memory on his computer.

    I've included my "test run" logs as attachments. Are any of you experienced enough to tell me what they mean?
     

    Attached Files:

  5. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    couldn't load in-process dll L"C:\\windows\\system32\\gameux.dll

    make sure to disable gameux in winecfg.

    fixme:d3d:wined3d_buffer_preload Too many declaration changes or converting dynamic buffer, stopping converting
    fixme:d3d:state_lastpixel Last Pixel Drawing Disabled, not handled yet

    this is probably the problem. there is something going on with the graphics card. try turning of anti-aliasing and running in a windowed mode. it could be that the mod you are playing is too big for the games memory restrictions.

    you could try installing xquartz and have wine use that instead of x11. i'll try to post more on this later.
     
  6. Keinpferd

    Keinpferd King

    Joined:
    Nov 30, 2009
    Messages:
    611
    Location:
    Berlin
    Thank you for this very useful guide, z0wb13!

    Are there any changes to your method in regard to 10.8.3?

    I got it to work with OS 10.8.3., wineskin 2.5.9 and WS9Wine1.4.1.. I didn't have the chance to test over a longer period of turns, though. Therefore I'm a little anxious about what you're saying in step 8:

    Some mods (like Pie's Ancient Europe, working) require to be installed exactly in that place and throw a GFC error if located in the place you recommend as safer (the MyGames/… path).

    The three other mods I tried in my new shiny wine version were the Stone Age mod and TTT-Modern Alliances, both located in ~/Documents/My Games/BtS/MODS, the first working, the second not working, and thirdly asioasos WWII-mod, an .exe, that prompted an installation path down the c:\Program Files… way. The latter didn't show in the mod menu ingame.

    I'm not expecting you to sort this all out, just as a little more feedback on the grounds of a newer system and newer wrapper than at the time when you posted your instructions;).
     
  7. FNP

    FNP Chieftain

    Joined:
    Nov 2, 2009
    Messages:
    70
    Location:
    ashore
    Since Civ IV works, I tried to run Civ II with wineskin. It also worked except for multiple event scenarios [e.g. Red Front]. The 16 bit delevent.exe file is not supported by wineskin.

    Keu wrote a 32 bit delevent.exe file which can be used to replace the old one. Although written to enable the old Civ II to run on newer windows machines, it works just fine for wineskin.
    http://forums.civfanatics.com/attachment.php?attachmentid=284194&d=1298900467

    With it, the batch file and CIV II multiple event scenarios under wineskin can be run on an iMac.
     
  8. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657

    TTT-Modern Alliances: dropped the folder into ~/My Documents/My Games/Beyond the Sword/MODS and this is what i got.
    Spoiler :




    there is a problem with my resolution not being high enough, it looks like, or something wrong with the font, but it's not too bad.

    so then i tried Stone Age the same way.

    Spoiler :




    two for two! then i tried the PAE and got the same GFC error. so, i took a gamble and installed it to ~/Programs Files/.../2k Games/.../Beyond the Sword/Mods and guess what?

    Spoiler :




    so i guess that i'm gong to have to update my post, because installing mods into Program Files/../Mods or My Games/.../MODS seems to make a difference, and it has something to do with the way the plug-in was written. i still don't understand the difference, and i only played about ten turns on each of those rounds, but the mods seem to work fine.
     
  9. Keinpferd

    Keinpferd King

    Joined:
    Nov 30, 2009
    Messages:
    611
    Location:
    Berlin
    Maybe I should have given the TTT mod more than just one try;), because when I moved on to Realism Invictus, I found, first of all, that it's working perfectly well, but also that it shuts down sometimes when loading. This happens only when loading the mod freshly, about every other time. Once the game is running, there seem to be no problems, at all. No single crash during well above first hundred turns:)!

    I'm sure, the RI mod folder should be located in ~/Programs Files/.../2k Games/.../Beyond the Sword/Mods, because the RI installer screen asked me to put it there. When I just checked, I can't find it there anymore:crazyeye:, but there is a RI mod folder in ~/My Documents/My Games/Beyond the Sword/MODS. The latter could be a remnant from an earlier attempt to install it in this place…

    To cut it short: If you want to play Realism Invictus, follow the instructions of the installer they wrote, it works:)! If a mod doesn't load at first, that doesn't necessarily mean, it's not working.

    GFC errors occur, as I understand it, when the mod includes some interface changes. z0wb13, do you know, how to work around this in CIV4ArtDefines_Misc.xml und Civ4.thm? (I don't.) In cases when a mod refuses to work installed in ~/Programs Files/.../2k Games/.../Beyond the Sword/Mods and throws these GFC errors when located in ~/My Documents/My Games/Beyond the Sword/MODS, such a workaround would possibly deal with the more intractable cases, so truely all mods would be playable on a Mac. That would kind of complete your, again, very useful tutorial!
     
  10. Keinpferd

    Keinpferd King

    Joined:
    Nov 30, 2009
    Messages:
    611
    Location:
    Berlin
    z0wb13, when I installed asioasio's WW II mod, I noticed, that the mod creates a mod folder of its own, that means instead of ~/Programs Files/.../Beyond the Sword/Mods you get ~/Programs Files/.../Beyond the Sword/Mods/Mods. In this case, it seems necessary not to follow the installer prompts, but browse to the desired target folder yourself, which is ~/Programs Files/.../Beyond the Sword/Mods.

    Your screenshot in Step 8 (which you edited in later) clarifies perfectly, what the directory path should eventually look like for those mods, that don't work in the ~/My Documents/My Games/Beyond the Sword/MODS location.

    Another thing that startles me: In step 4, in the wine configuration menu, there was no gameux library, so I had to "get it" from the "New overide for library" scroll down menu, myself. But the msxml3r was completely missing, in that scroll down menu, too. I realized that only yesterday, when I reread your thread, while installing asioasio's mod. However, I was able to complete my Realism Invictus game (hundreds of turns in their recommended "realistic" marathon speed) without a single crash during the entire game, despite the loading process itself failed about every other time, as mentioned in my earlier posting. Would this missing msxml3r library be responsible for that? How do I tell Wine to find that library, if it's not listed in the menu already? Or is there a way to manually download it and stick it in the right place?

    I also had the impression, that alterations in the Wine configuration menu lead to a completely new build of the app. Is that so? At least, when I loaded RI just to look inside their pedia last night, I found, that all my saves had disappeared from the load game menu. They are still in the My Games/Beyond… place, thank god, but apparently, the changes I made, in order to run asioasio's mod, swirled some data;). Anyway, WW II 1939: confirmed as working.

    I'm not trying to point out, that the whole thing isn't as easy as promised, but rather although there are some pitfalls in it for people like me, who really don't know what they're doing when messing around with Wine, this tutorial has proven very instructive!
     
  11. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    type the .dll name into the text box under "New overrides for library:" click add and it will appear in the "Existing overrides:" list below. select each one, then, click on the "Edit..." button to change the "Load order" to the correct setting.

    the Configuration menu lets you affect how windows (or in this case a windows-like virtual machine-thingy) runs your program, so i guess you could also think of this as changing your "build". like, if you changed the "Windows EXE:" path, you could run Warlords or vanilla Civ. or you could make a .bat file to launch civ-whatever version AND the map finder program (if you can figure out how that thing works).

    what's really neat is that you can set "EXE Flags:" to various things to affect how the game launches. so for instance, type in "/mod= BUGMod3.0" (or whatever) and it will load your mod everytime you play. there are other things you can do in here, but it mostly duplicates CivilizationIV.ini changes.



    so the short answer is: no. long answer: you can use Wrapper Tools in the Wineskin Advanced Tools menu to adjust your wine build. i used Update Wrapper when the 10.8.1 update broke wineskin, and it worked fine. and i've used Change Engine Used to up- and down-grade from less stable wine versions, depending on the different stuff i've tried to run. what's the difference between Refresh and Rebuild Wrapper? ihnfi.

    the title is more of a rhetorical device than an apt description;p in "step 1" you have to do at least 5 or 6 things, depending on how you count it.

    just installing Xcode is too much for some users. trust me, i do mac phone support and some of our customers have to come into the shop every time they need their itunes p/w updated. i take it for granted that installing free programs from the app store is easy, and i figure everyone else on the forums are the same way (that's why i just posted a link to it). but i've been mucking around with wine and linux for awhile, done this particular install dozens of times, and sometimes i might gloss over something that seems easy to me. so please don't hesitate to let me know what seems unclear.

     
  12. Hodi

    Hodi Chieftain

    Joined:
    Feb 18, 2007
    Messages:
    18
    Thank you so much for this great guide. Unfortunately, I am unable to make it work at the moment. I cannot even make the Test Run get me to the opening screen.
    I am just getting this:

    Spoiler :
    Cannot locate the CD-ROM. Please insert the correct CD-ROM, slect OK and restart the application.

    I have tried putting all of the different CD's in and none work so far. Can you let me know what changes I would need to make if I am installing Civ4 first, then Warlords, then BTS?

    Spoiler :
    fixme:service:QueryServiceObjectSecurity 0x169b48 4 0x16a1f8 0 0x32f070 - semi-stub
    fixme:service:QueryServiceObjectSecurity 0x169b48 4 0x16a1f8 28 0x32f070 - semi-stub
    fixme:service:SetServiceObjectSecurity 0x169b48 4 0x32efec
    fixme:ntdll:RtlNtStatusToDosErrorNoTeb no mapping for 00000005


    Spoiler :
    WineskinX11: main(): argc=12
    Waiting for startup parameters via Mach IPC.
    WineskinX11: do_start_x11_server(): argc=12
    Attempting to use pixel depth of 24
    [2889202.083] WineskinX11 starting:
    [2889202.083] X.Org X Server 1.13.0
    [2889202.083] Build Date: 20120921
    [2889202.083] _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
    [2889202.085] Initializing built-in extension Generic Event Extension
    [2889202.085] Initializing built-in extension SHAPE
    [2889202.085] Initializing built-in extension MIT-SHM
    [2889202.085] Initializing built-in extension XInputExtension
    [2889202.085] Initializing built-in extension XTEST
    [2889202.085] Initializing built-in extension BIG-REQUESTS
    [2889202.086] Initializing built-in extension SYNC
    [2889202.086] Initializing built-in extension XKEYBOARD
    [2889202.086] Initializing built-in extension XC-MISC
    [2889202.086] Initializing built-in extension XINERAMA
    [2889202.086] Initializing built-in extension PseudoramiX
    [2889202.086] Initializing built-in extension XFIXES
    [2889202.086] Initializing built-in extension RENDER
    [2889202.086] Initializing built-in extension RANDR
    [2889202.086] Initializing built-in extension DAMAGE
    [2889202.086] Initializing built-in extension MIT-SCREEN-SAVER
    [2889202.086] Initializing built-in extension DOUBLE-BUFFER
    [2889202.086] Initializing built-in extension RECORD
    [2889202.086] Initializing built-in extension X-Resource
    [2889202.086] Initializing built-in extension XVideo
    [2889202.086] Initializing built-in extension XVideo-MotionCompensation
    [2889202.086] Initializing built-in extension GLX
    [2889202.086] x: 0, y: 0, w: 1280, h: 778
    [2889202.297] (II) GLX: Initialized Core OpenGL GL provider for screen 0
    [2889202.297] [dix] Could not init font path element /opt/X11/share/fonts/75dpi, removing from list!
    [2889202.297] [dix] Could not init font path element /opt/X11/share/fonts/100dpi, removing from list!
    [2889202.297] [dix] Could not init font path element /opt/X11/share/fonts/cyrillic, removing from list!
    [2889202.297] [dix] Could not init font path element /opt/X11/share/fonts/misc, removing from list!
    [2889202.297] [dix] Could not init font path element /opt/X11/share/fonts/OTF, removing from list!
    [2889202.297] [dix] Could not init font path element /opt/X11/share/fonts/Speedo, removing from list!
    [2889202.297] [dix] Could not init font path element /opt/X11/share/fonts/TTF, removing from list!
    [2889202.298] [dix] Could not init font path element /opt/X11/share/fonts/Type1, removing from list!
    [2889202.298] [dix] Could not init font path element /opt/X11/share/fonts/util, removing from list!
    [2889202.592] noPseudoramiXExtension=0, pseudoramiXNumScreens=1
    Engine Used: WS9Wine1.4.1
    Hardware:

    Hardware Overview:

    Model Name: MacBook Pro
    Model Identifier: MacBookPro9,2
    Processor Name: Intel Core i5
    Processor Speed: 2.5 GHz
    Number of Processors: 1
    Total Number of Cores: 2
    L2 Cache (per Core): 256 KB
    L3 Cache: 3 MB
    Memory: 4 GB
    Boot ROM Version: MBP91.00D3.B08
    SMC Version (system): 2.2f41
    Sudden Motion Sensor:
    State: Enabled

    Graphics/Displays:

    Intel HD Graphics 4000:

    Chipset Model: Intel HD Graphics 4000
    Type: GPU
    Bus: Built-In
    VRAM (Total): 512 MB
    Vendor: Intel (0x8086)
    Device ID: 0x0166
    Revision ID: 0x0009
    Displays:
    Color LCD:
    Display Type: LCD
    Resolution: 1280 x 800
    Pixel Depth: 32-Bit Color (ARGB8888)
    Main Display: Yes
    Mirror: Off
    Online: Yes
    Built-In: Yes
     
  13. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    what versions/cds are you referring to? this guide assumes you have the civ4 complete dvd; it should work with the steam version, but not the amazon version.

    did you update to version 3.19? it removes the disc check when launching the game. you can also point wine to your discs, but it's a few more steps. try running the updater first. if that doesn't work, go to the winecfg menu and click on the Drives tab. there is a button to click called AutoDetect. insert your play disc, click autodetect, and hope it works. if not, you can manually assign a drive letter, then browse to the disc. it's confusing.
     
  14. tldavis92

    tldavis92 Chieftain

    Joined:
    May 19, 2013
    Messages:
    6
    I followed your instructions up to Step 5 but then got lost because I bought Civ 4 on Steam instead of on a disk. I'm a novice to this process so could you walk me through what I do next? It would be great if I could get this to work because I'm not sure I can play plain Civ again after reading about the Revolution mod!
     
  15. AlanH

    AlanH Mac addict, php monkey Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    29,317
    Gender:
    Male
    Location:
    England
    I think the trick is to install Steam in the Wineskin that you intend to run Civ4 in. But I can't advise on the detailed steps to achieve that.
     
  16. FNP

    FNP Chieftain

    Joined:
    Nov 2, 2009
    Messages:
    70
    Location:
    ashore
     
  17. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    i'm sure i'm not following you FNP. you can assign any drive letter you want, are you having a problem running the 3.19 updater?

    update: i just came across this :
    if this is the case, then i'm not exactly sure what you need to do. the person that posted the above message did not specify what their disc was named or what the installer was looking for.

    try this (it will attempt to make wine point to your cd): right click your civ4bts319 and Show Package Contents. double-click the Wineskin.app that you find inside. choose Advanced, then Tools, and click on Config Utility (winecfg).
    here are some pictures to help assign a drive:

    first, click on Add... and you will get an option to assign drive letter. choose whatever you want, although you can't pick c because it's already in use.


    after you have added the drive, you have to specify its path. click on browse, scroll down to Volumes, and select your cd. or, just click on Autodetect and hope for the best.




    if the problem you're having is updating to version 3.19, then it doesn't matter where the installer program is. it can be in your downloads folder, etc. or you can move it into the c drive, it doesn't matter. to run the updater, double click the Wineskin.app in the civ4bts319 package, click Install Software, then Choose Setup Executable, and then browse to the updater. this is a link to the updater.

    also, if you can copy all of the windows files, from a civ4 install on a windows computer, you can move the file structure into a wineskin.
    this last option would take much longer over your typical home network than installing from discs, so it's a last resort if you can't get your cd's to install.
     
  18. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    you can install the steam client into a wineskin in order to download purchases. from there, it looks like you run it just like any other steam game. there is a command in winetricks called "steam" that should download and run the installer for you, although on my attempts i got a checksum error. there is more information available from here. mileage may vary.

    okay. i can get steam to work, although i needed to manually install the steam client as winetricks kept giving me errors. after running "steam" in winetricks, i had a file called SteamInstaller.msi under ~/Library/Cache/winetricks/steam
    it's a hidden folder (hold option and click on the Go menu in Finder)
    after installing the steam client, it seems to want to freeze up, so force quit it and relaunch.
    after my second relaunch, i got a text message to add a "new" computer to my account.
    enter code. launch steam. good luck;p
    you need to add -no-dwrite to EXE Flags under the Configuration menu in the Wineskin Advanced options.


    i want to emphasize that i don't know/haven't tested any versions that didn't come from the civ4complete dvd version.
    steam version is untested, at least by me. check here for tests.
    bts version 3.19 should run on wine (1.41 with a few tweaks), no matter how it's installed, if you can install it;p

    discs>download
     
  19. tldavis92

    tldavis92 Chieftain

    Joined:
    May 19, 2013
    Messages:
    6
    Thanks for the reply! Just to clarify, should I do steps 3 and 4 from your original post?
     
  20. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    yes, the game needs those missing libraries to run correctly, consistently.

    my advice, which i take no responsibility for;p would be to:

    1. install xcode
    2. install wineskin
    3. download SteamInstaller.msi
    4. create a wrapper (use wine 1.4.1NoXInput2)
    5. use winetricks,winecfg and advanced options to tweak the wrapper (steps 3 & 4 in the guide)
    6. install the steam client:
    under Wineskin Advanced=>Configuration, click Install Software
    choose setup.exe and install Steam client from .msi file
    go to Configuration (look at the picture) chose correct exe path and set flag "-no-dwrite". click the Test Run button
    steam will auto-update, just like every time you connect to steam
    steam may freeze, force quit if the updater seems to hang and relaunch
    eventually i was able to enter my credentials, i got a text message on my phone to verify the new "machine"
    from here i was able to click around pretty normally, look at my purchases, etc.
    =============== after this point i have not tried anything that follows. good luck!
    7. install civ version whatever. i think on steam there is civ4 vanilla for $20, and complete is $30 neither requires an update, sfaik
    8. delete the "-no-dwrite" flag under Configuration and change the Windows EXE to something like:
    c:/ProgramFiles (x86)/Steam/SteamApps/common/.../.../Civ4BeyondSword.exe
    9. at this point, civ should be installed and running. go back to step 6 in the guide, skipping the bit about running the updater.

    let me know if this works, i have no idea if steam's DRM is going to be a problem, but from my experience it works as advertised.
    that is to say, you only need to log in to download your games, you don't have to be online to play them.
    it would be kind of neat if the steam achievements would still work with this setup.

    one last thing, you can make a batch.bat file to launch two programs at the same time in wine, so if steam has to be running, this would be the solution. also, the steam client throws up GameOverlayRenderer.dll errors, so don't run it if you don't have to.
     

Share This Page