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. FNP

    FNP Chieftain

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

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    i saw this
    unfortunately i don't really know what it means:mischief: and i can't test it right now.

    try this: add mscoree.dll to the windows/system32 folder in your wrapper. you can find it here. some people running off of the cd versions were having trouble that sounds like what your seeing.

    actually, don't do this. use disk utility to make .cdr images of your cds and keep all three images mounted as you are attempting this. you might need to take a few whacks at this problem and your HD will load new installations faster than having to copy from discs.

    after making a wrapper with all of the changes/winetricks, copy/duplicate it and then run the installers. once you get a stable version running, then go ahead and clear off your HD.

    i also really advise against running vanilla civ4 version 1.0.x or whatever. instead, patch BtS all the way up to 3.19 and try a Test Run. sometimes problems arise when using wine to access different volumes on the same drive, and also there might be a bug in the installer program itself, making things even more confusing. version 3.19 had a bunch of bug fixes and optimizations that definitely improved stability. just use the latest and greatest;p
     
  3. tldavis92

    tldavis92 Chieftain

    Joined:
    May 19, 2013
    Messages:
    6
    This is working up to step 8. I got the windows EXE to point to the right address, but then what do I do? Do I press install software and if so what file do I point to?
     
  4. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    click test run. that should start the Civ4BeyondSword.exe and hopefully something should happen... otherwise, launch it from steam.

    you only need to use the install software button to get the steam client set up, and then use the client to download and install the game files.
     
  5. tldavis92

    tldavis92 Chieftain

    Joined:
    May 19, 2013
    Messages:
    6
    So Civ4 seems to load up flawlessly. But then the problem is that when I try to exit Civ4 I get a black screen with the civ loading window over it and it doesn't go away. The only way out is to force quit.

    Also, I wasn't able to follow step 7 because the terminal couldn't find the file. I tried browsing for it manually but can't get past user/applications/wineskin. The only file I see at that point is civbts319. How do I get to the path that looks like it's coming out of windows?
     
  6. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    i figured out how to do this, it's right there in the wineskin advanced window under tools:blush:. there is a button called Custom Executable Launcher Maker

    from here you can basically make a short cut. in the picture above, i made a link to the Colonization remake, and when you click save you get a little .app file inside your wrapper. you can rename colony.app or whatever, and drag it out of the wrapper to run it from anywhere.


    you can use the method to have autolaunch options for mods, also. choose a name, anything works here. browse to the correct exe file (so if you are using a mod for warlords or BtS, make sure you point to that version). then set an EXE flag to make your mod launch at start.

     
  7. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    right click (or control left click) on the civ4bts319 app and Show Package Content. the correct path is:

    ~/Applications/Wineskin/civ4bts319.app/Contents/Resources/drive_c/...

    and then work it out from there. you can also use the terminal if you are familiar with how it works.

    as for the problems in step 7: the first part, all it does is copy a font file from the civ folder to the windows Fonts folder. you can do this "manually" from the finder. try doing a search for sylfaen.ttf but you MUST do the search from inside the civ4bts319 (NOT this mac) or you won't find it.

    the second part i would think should work correctly, unless the steam version keeps the CivilizationIV.ini file in a different place than it normally would. to fix it, again show package content, and then do a search within that package for the ini file. when you find it, right-click and choose textedit as your preferred program.

    well, that's not so bad. i don't have that problem, so it's probably something to do with the steam version, not wine. could you post a screen shot? also, are you launching civ4 directly, or are you using the steam client to launch civ? in other words, what does your windows EXE path look like under Configuration options in Wineskin Advanced?
     
  8. tldavis92

    tldavis92 Chieftain

    Joined:
    May 19, 2013
    Messages:
    6
    Found it, thanks! The game seems to run great. The problem with having to force quit is less of a deal now that the game is run in a window; I can just option-click on the icon to dump it.

    I'm running the game directly as Civ4 without launching through Steam, but it does log me into Steam when I launch the game. That must be their DRM kicking in.

    Going to try out some mods now. Thanks again!
     
  9. sgi

    sgi Chieftain

    Joined:
    May 28, 2013
    Messages:
    6
    Hi,

    many thanks for this tutorial. However, it doesn't work at all on the two very recent computers I tried it (both on Mountain Lion 10.8.3); as it is the first time I use winetricks it is entirely possible I missed completely something.

    My problem arises when I ask to execute the exe file on the DVD: I get the message "Oops! No new executable found! Maybe the installer failed?"

    What is really weird is that I obtain this with the complete DVD; I also have a vanilla Civilization IV which runs itself without any issue.

    I have tried around several tricks to make it work, without success:
    . In the list of libraries, only the xml related one appear, not all the others related to directx. If before using Winetricks I set a Windows more recent than Windows XP, they do appear as in the screenshot, but I get the error message anyway.
    . I have tried DirectX9 or D3Dx9_, with the same result.
    . When I install DirectX, I have a message that the checksum fails. So I have tried to download independently directx_feb2010_redist.exe and put it in the correct location; I avoid the message but the error remains.
    . A test log prints the message err:ole:CoGetClassObject class {6bf52a52-394a-11d3-b153-00c04f79faa6} not registered. I haven't found which dll would solve this, but my old Civ4 vanilla works anyway, so I guess this is not the core of my problem.
    . I have installed in winetricks the library one after the other. When I did it en masse, some dialogs weren't opened. A problem I consistently have concerns dotnet11sp1: there is a message asking to mimic a reboot. If I say yes I have an error message issued, if I say no my problem is not solved.
    . I have tried both 1.4.1 and 1.4.1NoXInput2, as the screenshots aren't entirely consistent about them. Both fails equally.

    So I must admit I'm completely stuck; I have no idea what to try next to solve this. What is really frustrating is that apparently I'm the only one experiencing those specific mishaps.

    Many thanks for any advice that could help me make the installation work.
     
  10. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    ok. so nothing is installing. that's why you are seeing the "Oops! No new executable found! Maybe the installer failed?" message. make sure to point to the correct installer, in the case of the complete DVD, it's called "setup.exe" without quotes. if you point to "autorun.exe" you might run into problems.

    my first attempts to install this use wine 1.4.1, but i found out later that 1.4.1NoXInput2 works better for full-screen mode. don't worry about this anyway, because you can always change your wine engine if something better comes along.

    make sure to click Update Winetricks before you try this step. however, i'd bet that you are streaming content while attempting these downloads. if this is the case, then stop! i have also encountered checksum errors using winetricks if i'm also streaming music, etc. so don't do it! otherwise, you can download the files that you need and put them into:
    ~/Library/Caches/winetricks/blahblahblah/whatever.installer
    note that blahblahblah is hardcoded to winetricks. if your download fails, there is probably going to be a folder in the tree to show you what you need, so just put the file you want in that spot, and then rerun winetricks. HOWEVER!!! you shouldn't need to do this, and i don't recommend it.

    Spoiler :
    type that into a terminal if you really want to look at the files in the finder.


    i just rewrote the whole part about using winetricks. hopefully this new method is a little bit easier to follow, although it does feel a bit like banging your head against the wall.

    could you post a screenshot? idk about this one; ive never noticed it. ultimately, you shouldn't worry about this one until you have the game up and running. the really crucial dll is msxml3, as i've gotten the game to run with only this one tweak.
     
  11. sgi

    sgi Chieftain

    Joined:
    May 28, 2013
    Messages:
    6
    Thanks for your quick and thorough reply.

    I have tried the new instructions you gave, without success (by the way it is likely you forgot corefonts in your list).

    The problem is in fact very likely related to my connection: the checksum for both DirectX and dotnet1 keeps failing, so it downloads again... I will therefore try to download it from another place and see if it works better.

    I wasn't streaming during the downloads, merely browsing, and during my last attempt I even kept from doing so.

    I tried again to download independently the files, but the dotnetfx I fetched wasn't clearly the same one and it tried to download it.

    I'll let you know once I've tried downloading from elsewhere.

    Best regards, and thank you for your help!
     
  12. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    fixed. good catch.

    you might try deleting the files found under ~/Library/Caches/winetricks/ except for msxml3 since you know that one is right, and then trying again. i've had checksum errors sometimes, and i'm not sure what causes it, although streaming music seems to have an effect. this picture might help you:



    once everything is setup right, this is what you should see. hopefully;p
     
  13. sgi

    sgi Chieftain

    Joined:
    May 28, 2013
    Messages:
    6
    I've tried the process elsewhere, and this time no checksum error of any sort.

    However, the final result remains the same: it doesn't work...

    Here is a message about Dotnet 1.1:

    "You just simulate a Windows reboot to complete the installation of Microsoft .NET Framework 1.1. Click Yes to do this now or No if you want to restart later".

    Clicking on yes leads to error but in the end it said it is correctly installed...

    So I've run out of ideas for now... I think I will give it a try in few days, but I must admit I'm quite fed up at the moment.

    Really thank you for all your help and advices!

    Best regards,
     
  14. sgi

    sgi Chieftain

    Joined:
    May 28, 2013
    Messages:
    6
    Just one more question... I assumed all along that wine was installed in the Winetricks app, but the more I'm digging the more I'm doubting this...

    I have currently (quite recently in fact) a new error message in Test Run:

    "The X11 driver is missing. Check your build!"

    A Google search highlights two possible causes:
    . Wine run as root. Not my case.
    . WIne not completely installed.

    I've been on wineticks page, and ran the download script; it fails due to wineserver not found.

    The only point that tells me it would be too simple an explanation is that my vanilla Civilization IV CD was working...
     
  15. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    you aren't installing wine, per se; when you download a new wine engine, you can create a new installation package. wine is not an emulator. it isn't a program that you install, it just sort of passes windows instructions through to linux and your processor. it's more of a library?:confused: http://wiki.winehq.org/Debunking_Wine_Myths

    okay, i think :crazyeye: that you are having a problem your wine engine. in wineskin winery.app delete your installed engine and try to download it again. or it could be an issue with Xcode, in which case you should uninstall/reinstall it. if this still doesn't fix things, you should try XQuartz. i have this on my system, and it could be making the difference. however, i've managed to build this installation on machines that only have Xcode installed.

    was?!?! working...
     
  16. sgi

    sgi Chieftain

    Joined:
    May 28, 2013
    Messages:
    6
    Thanks for the clarification... My question was induced by the winetricks installation I tried from the script available on the site https://code.google.com/p/winetricks: I got the message wineserver not found. And looking in the script itself it was when a wineserver library was looked at in a /usr/lib* folder.

    XCode is working as expected (I am a developer and therefore use it routinely; the very last version is currently installed). Xquartz is also installed on both my computers.

    I can try what you suggest, but I have done many times now the trick of removing/reinstalling from scratch (after removing the adequate folders in Library/Cache and Library/Application\ Support.


    As I said in my very first post, I have a complete DVD and a vanilla CD ROM. The vanilla CD-rom ran as expected when I choose Install Software (the only problem with it is that I can't use the program as there is a problem with CD detection, but I didn't dig it as my goal is to use the DVD with Beyind the Sword).

    The DVD on the other hand never worked past the Install Software step.

    Thanks anew for your help!
     
  17. sgi

    sgi Chieftain

    Joined:
    May 28, 2013
    Messages:
    6
    I've finally managed to make it work. The recipe: I have installed it completely on a Windows computer and have copied the folder on an external hard drive. I have then chosen the option "Copy a folder" inside Wineskin, and it works perfectly well.

    I guess the problem was somehow related to my optical drive: I have a late 2012 iMac, which doesn't provide a native optical drive. I have an external one, but maybe Wineskin can't cope with it (in the setup it was always indicated as "Network share"instead iof CD-ROM, and I couldn't modify it. If I deleted it and create a new one with CD-ROM it was taken into account but another "Network share" to the DVD path was nevertheless recreated.

    Another note for those using a recent Mac (with Ivy bridge chipset specifically): it seems Wine can't cope well with it until 1,5.9 (there is for instance a message about a CPU performance problem for the sound -see for instance https://discussions.apple.com/thread/4072881?start=0&tstart=0)

    So on my installation I have asked a very recent Wine library and it works quite well (the 1.5.27 - I've also had problems with 1.5.28 and 1.5.29).

    I hope it might help someone else.

    Thanks again for your help, z0wb13.

    Best regards!
     
  18. z0wb13

    z0wb13 undead

    Joined:
    Feb 9, 2009
    Messages:
    657
    i tried this, and ran into the same problem you had at first. your solution works great, but there are two other ways to do this. the easiest is to make a .dmg file with disk utility and then copy it onto the computer without a drive.

    the other way is to get wine to "see" your remote disc. this is how i did it:

    0. put your disc into the old computer, then go to the new computer.
    1. use Finder to mount the DVD as a remote disc. make sure it shows up on your desktop (or mounts, whatever)
    2. double-click the wineskin.app inside the wrapper, and then go to wineskin advanced menu.
    3. go to Tools, then Config Utility, then click on the Drives tab.
    4. click auto-detect, apply, then OK.
    5. wine should be able to see your DVD and installation should proceed normally.

    note that this was tried using a 20-inch Mid 2007 and a 21.5-inch Late 2012 iMac, both running 10.8.4 mountain lion. it works. disc images also work.

    also, the approach you took (installing on windows, then copying the entire directory into a wrapper) is a perfectly acceptable alternative. but if you don't have a windows machine, you can still make it work with only macs.
     
  19. Alphadj

    Alphadj Chieftain

    Joined:
    Jul 21, 2013
    Messages:
    1
    Hi guys,
    thanks for this guide, very helpful. Btw, I have a big problem at the 5th step, when I select "setup.exe" everything goes wrong:







    This is what I've done: downloaded the file "civ4wrapper.dmg" -> application folder -> clicked "advanced" and then "install software" -> "Choose Setup Executable" -> "setup.exe".

    Have I done something wrong?

    Thanks for your help ;)
     
  20. Mr. Sulu

    Mr. Sulu Liberal Democrat

    Joined:
    May 3, 2011
    Messages:
    193
    Okay, so I followed the steps, but by Step 5 I ran into problems. I first set up my executable, which I am pretty sure is correct. But, I was confused by Step 6, as I couldn't figure out how to update the game. But, I also could not find the files that the executable pointed to, I looked through my Mac but while there was a file named Program Files, I could not find a file named 2K Games, and couldn't find any files after. But, the weird thing is that my civ4bts319 app, when I press it actually loads the game in windows, but I can't find the files for that either. So, right now I can't find my files and that I fear I might have botched the download somewhere. Then, when I tried to do a test run through Wineskin Advanced it gave me two logs, and one of them said

    fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
    fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
    fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
    Note: Those faces are supposed to be colons, I don't know what happened there

    So, any help you could give me is appreciated greatly
     

Share This Page