Skip to content

Trying to compile Weidu in Mac OSX

mlnevesemlnevese Member, Moderator Posts: 10,214
This discussion was created from comments split from: BG1NPC for BG:EE needs testers!.
«134

Comments

  • NifftNifft Member Posts: 1,065
    edited February 2013

    New WeiDU binary! Contains fixes, get it now!

    http://forum.baldursgate.com/discussion/comment/272623/#Comment_272623


    --- original message ---
    Kaeloree said:

    If there are some Mac geniuses out there who are keen to help out with WeiDU, let @Wisp know. I'm sure he'd appreciate the help.

    @Wisp, I'm looking at this.

    I've got some bits of the git trunk compiling already, but not all of it.

    I'm more of a general UNIX genius than a Mac guy in specific.
    Post edited by Nifft on
  • WispWisp Member Posts: 1,102
    Re: off-topic discussion about WeiDU for OS X. To build WeiDU for Mac, you need a Mac and up until recently there has been limited interest from Mac users. It is not modders who are failing to give you your due.

    @Nifft
    If there is something specific that is giving you trouble I will try to answer as best I can. If you'd like, I can also post something general about building WeiDU in the OS X forum. Perhaps @mlnevese would be interested as well.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @Nifft I tried following the steps described here: http://forums.pocketplane.net/index.php?topic=28093.0.

    It fails installing ocaml in my machine even after updating MacPorts.


    @Wisp
    Also I'm splitting this discussion as it has gone way off topic.
  • NifftNifft Member Posts: 1,065
    edited February 2013
    @mlnevese thanks, I'll re-start from there, and join in the new topic.

    EDIT: huh, looks like I'm already in the new topic. Well then.
  • clocknovaclocknova Member Posts: 23
    Couldn't I just run the PC version of Weidu in Wineskin on a PC installation of BG:EE, then copy the data folder over to a Mac installation of BG:EE? Aren't the data files the same?
  • NifftNifft Member Posts: 1,065
    clocknova said:

    Couldn't I just run the PC version of Weidu in Wineskin on a PC installation of BG:EE, then copy the data folder over to a Mac installation of BG:EE? Aren't the data files the same?

    Wineskin has its own directory structure, and the Win32 executable doesn't see the main OS/X file system, but with enough symlinks it might be possible.

    That's how I've been running NearInfinity and EEKeeper on my Wineskin'd Win32 BGEE.
  • CerevantCerevant Member Posts: 2,314
    edited February 2013
    @mlnevese Try installing this version of ocaml - it comes with a pkg that works for me (works = I can type ocaml at a command line and something happens):
    http://caml.inria.fr/ocaml/release.en.html

    Wisp gave a link to the elkhound source here:
    http://www.weidu.org/~thebigg/elkhound-2011.01.28.roy.tar.bz2

    @Wisp will need to tell you where to get the BGEE'ified Weidu source.

    Caveat - I haven't tested any of this together...I'm sure there will need to be tweaking. I really want to dig into this, but I've got a couple of other projects that I need to finish up first.
  • WispWisp Member Posts: 1,102
    The most recent WeiDU source can be had here.
  • NifftNifft Member Posts: 1,065
    edited February 2013
    Okay, that was deceptive... I didn't have elkhound installed, so it tried to use ocaml to parse the .gr files.

    Putting elkhound in the right place fixed it.

    The makefile might want to give a better error for that condition.
    Post edited by Nifft on
  • NifftNifft Member Posts: 1,065
    WeiDU compiled, now to test.
  • NifftNifft Member Posts: 1,065
    Works. I just installed the Kitpack mod on my Wineskin'd BGEE on OS/X, without using Windows.

    I had previously installed the Hellhound mod, and that remains working.
  • CerevantCerevant Member Posts: 2,314
    That's awesome! Feel up to seeing if it will build for ARM (iPad)?
  • NifftNifft Member Posts: 1,065
    Irrelevant; the iPad isn't a terminal-based POSIX-compliant system with a conveniently liberal file system.
  • NifftNifft Member Posts: 1,065
    edited February 2013

    Don't use this one! Use the new one, which is here:
    http://forum.baldursgate.com/discussion/comment/272623/#Comment_272623

    --- original message ---

    Did more testing, no problems so far. I think this executable is good.

    Let me try to upload the executable here...

    EDIT: Looks like it uploaded okay.
    I've tested this on OS/X 10.6 only.
    Can people with 10.7 and 10.8 please download and test this?

    EDIT part DEUX: source of code (for GPL compliance):
    git://github.com/vbigiani/weidu revision e9c84d0332e352dd8abdfb768abd701d82a0e32b (branch 'master')
    Post edited by Nifft on
  • CerevantCerevant Member Posts: 2,314
    Nifft said:

    Irrelevant; the iPad isn't a terminal-based POSIX-compliant system with a conveniently liberal file system.

    Actually, with a jailbroken iPad, all of the above is true. We don't need to build WeiDU on iPad, oCaml and Xcode can cross compile it. Did you have to do anything special to get the Mac build working? If so, pass the details along so the iPad hackers can benefit.

    I'll start doing my work in Mac-land with this build and let you know if I have any trouble.
  • mars0124mars0124 Member Posts: 180
    edited February 2013
    Nifft said:

    Irrelevant; the iPad isn't a terminal-based POSIX-compliant system with a conveniently liberal file system.

    I would say its completely relevant, though you are right about the lack of convenience. If it WERE possible to make WeiDU iPad compatible (something which is over my head at this time) it would then be possible to make Cydia installers for mods. Then iPad users would have convenient Cydia Repo's to just download/install their favorite mod.

    Maybe I am being idealistic, but I would say with ideas like that it would be completely relevant.

  • mlnevesemlnevese Member, Moderator Posts: 10,214
    I'll test this when I get home.
  • NifftNifft Member Posts: 1,065
    edited February 2013
    Cerevant said:

    Nifft said:

    Irrelevant; the iPad isn't a terminal-based POSIX-compliant system with a conveniently liberal file system.

    Actually, with a jailbroken iPad, all of the above is true. We don't need to build WeiDU on iPad, oCaml and Xcode can cross compile it. Did you have to do anything special to get the Mac build working? If so, pass the details along so the iPad hackers can benefit.

    I'll start doing my work in Mac-land with this build and let you know if I have any trouble.
    Oh yeah? Cool!

    Well my iPad isn't jailbroken, but I could cross-compile if you tell me how.

    I didn't do anything special to the WeiDU source code, just picked up the latest version from git and it built.

    The one slightly tricky part was getting Elkhound to compile and putting it in the right place; these instructions were helpful for that:
    http://forums.pocketplane.net/index.php?topic=28093.0

    EDIT: ... and of course fix the paths in weidu/Configuration to suit your system. If you do a MacPorts install of ocaml, that means /opt/local/... instead of /usr/local/... for pretty much everything in weidu/Configuration
    Post edited by Nifft on
  • StickanStickan Member Posts: 136
    @Nifft Awesome job man, can't thank you enough!
  • NifftNifft Member Posts: 1,065
    edited March 2013
    Uploading Elkhound build and new WeiDU-osx-intel binary.

    To install mods, all you need is the attached 'weidu-osx-intel' binary.

    You need Elkhound installed in order to build WeiDU. You do not need Elkhound if you just want to use WeiDU to install mods.

    - - -

    Elkhound

    https://www.dropbox.com/s/1mwjxkt7ik6caoy/elkhound-osx-intel.2013-02-27.zip

    The above version of 'elkhound' was built using source from here:
    http://www.weidu.org/~thebigg/elkhound-2011.01.28.roy.tar.bz2

    Make the changes described here for '(int)' casts and 'int' return types of pointer variables:
    http://forums.pocketplane.net/index.php?topic=28093.0

    Now run './configure' in the "elkound-2009.01.26" [sic] directory, then 'make && sudo make install'. This will install the 'elkhound' executable as "/usr/local/bin/elkhound".

    If you use my pre-compiled elkhound.gz, it goes in "/usr/local/bin/".

    - - -

    WeiDU

    https://www.dropbox.com/s/io02e6krau4g2qe/weidu-osx-intel.2013-02-27.zip
    https://www.dropbox.com/s/ad2devj8zd6m0ko/weidu-osx-intel.2013-03-17.zip

    The above version of 'weidu-osx-intel' was built using source from here:
    https://github.com/FredrikLindgren/weidu/commit/6a84fa3812d30ef2f08085f30a3f0e4ca16cc1c7

    To build WeiDU:
    - Install OS/X developer tools
    - Install MacPorts
    - Use MacPorts to install 'ocaml': sudo port install ocaml +labltk
    - Get the source using 'git' and the URL above.
    - Edit the file "weidu/Configuration"; look for the section starting with Darwin and change /usr/local/... to /opt/local/... for the 'ocaml' paths.
    - At this point 'make' should just work.

    - - -

    EDIT: updated links with current builds.
    Post edited by Nifft on
  • WispWisp Member Posts: 1,102
    The beta WeiDU version Nifft posted contains a new feature with some parts specific to OS X. To ensure it works right across a variety of systems, I would appreciate if it could undergo some testing. I have had it reported that it works on OS X 10.6, but verification that it also works on more recent versions would be welcome.

    Testing it is easy. All you need is BGEE and at least one save. Download and install the attached mod. If it installs successfully the test was a success and you can safely uninstall the mod. It will make no changes to your game.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @Nifft @Wisp I'm getting a permission denied when trying to execute the setup. Also OSX seems to think it's a text file, not an executable for some reason.
  • WispWisp Member Posts: 1,102
    You probably need to flip the executable-bit on it (chmod +x file in a terminal; there's probably some way to do it with the OS X gui as well). Dunno about the text-file stuff, though.
  • NifftNifft Member Posts: 1,065
    @mlnevese - dumb question, you did gunzip on the .gz file, right?

    Some downloaders do this for you, some don't.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @Nifft Yeap I just use the Unarchiver to extract the file
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    edited February 2013
    @Wisp chmod +x fixed it. The mod installed and uninstalled with no errors. Do you want the log?
  • NifftNifft Member Posts: 1,065
    Huh, I just discovered gzip strips off execute bits. Bleah. I'll make a .zip file, is there some way to attach it to my previous post?
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @Nifft Give me the link to download the new file I can edit posts to remove or add files.
  • NifftNifft Member Posts: 1,065
    @mlnevese - Thanks!
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @Nifft Sigh... I just discovered I can only add new files to my own posts... You'll have to make a new post and I can delete the previous one to avoid confusion...
Sign In or Register to comment.