Skip to content

Wanted: person who compiles programs

WispWisp Member Posts: 1,102
I'm looking for someone who can provide assistance by compiling programs for current versions of OS X. (If none can be found, mod compatibility with OS X is going to suffer.)

First, it seems we are in need of TISPack compiled for OS X x86-64. To my knowledge, the program is only currently available in PPC form.

TISPack is written in C and requires zlib and libjpeg (the independent JPEG group's JPEG library). There are some compile instructions included. However, be advised that TISPack was implicitly written for a 32-bit architecture. On GNU/Linux, this "only" results in compiler warnings, but perhaps it will cause problems.


Secondly, there is WeiDU, without which all hope is lost. The past few beta versions were built for OS X x86-64 by @Nifft, but I haven't heard from him in a few months. In the unfortunate event he should no longer be available, someone else will need to step up and provided OS X builds.

WeiDU is written in OCaml, with a smattering of C. There are (hopefully helpful) instructions for how to build WeiDU here.

WeiDU is getting close to a (BGEE/BG2EE-compatible) stable version, but we are not there quite yet. If you think you may be able to help, please have a go at building WeiDU and get in touch. I'll keep you apprised of when it'd be nice to have an OS X build (your option of all versions, or only stable versions).

Comments

  • AendaeronBluescaleAendaeronBluescale Member Posts: 335
    edited September 2013
    Perhaps it would be a better idea to port these tools to Java. Then it will run on any of the major OSes from just one source. Both ZLib and libjpeg have Java equivalents.
  • alnairalnair Member Posts: 561
    edited September 2013
    I'll give it a shot tomorrow, when I have a real connection to download all the required libraries and whatnot.
    (Edit: I know it's pretty much all lightweight stuff, but I have a really crappy connection right now)

    What should I do with the compiled files afterwards?
  • alnairalnair Member Posts: 561
    The "real" connection is, unfortunately, behind a proxy which doesn't allow through neither git nor homebrew (modern-day alternative to MacPorts). I'll try again as soon as I'm able to get it working.
  • CerevantCerevant Member Posts: 2,314
    Well, tispack was easy enough - looks like it works, but I don't know how to test it.

    I'll look into WeiDU...I think Nifft posted some more details on how to get it to build. I'll poke around and see what I can do.
  • alnairalnair Member Posts: 561
    edited September 2013
    Edit: Other than being ninja'd by @Cerevant, my post contained a blatant mistake which I will not even acknowledge :P
    Post edited by alnair on
  • alnairalnair Member Posts: 561
    edited September 2013
    @Cerevant
    Thanks, I'll look into it.
  • alnairalnair Member Posts: 561
    edited September 2013
    @Cerevant
    That pointed me in the right direction, the culprit was the executable flag on elkhound just as it had happened to @mInevese in that thread.

    Other things I needed to fix in order to be able to compile without errors:

    1)
    cd /usr/local/lib/ocaml
    sudo ln -s libcamlstr.a libstr.a
    (ocaml install path may vary, I installed it through Homebrew)

    2)

    I had to manually create ../WeiDU-mac/WeiDU

    3)

    There was a bit of a SNAFU with this line in the Makefile:
     sed -e's/version_plist=.*/version_plist=\"${VERBIG}\"/g'  '../WeiDU-mac/WeiDU/WeiDU Installer.command' > t
    because sed complained that WeiDU Installer.command didn't exist. Since all it does, apparently, is update the version number, I felt safe just commenting it out (along with the subsequent mv, of course).




    But now, lo and behold, here it is :)

    @Wisp - can you find somebody to thoroughly test it? I should really get working now :P
  • CerevantCerevant Member Posts: 2,314
    Excellent work @alnair! I'll get it up and working too, so there is a backup builder.
  • alnairalnair Member Posts: 561
    edited September 2013
    Reposting the zip because I noticed it had just updated a pre-existent version with the same name in the same folder -__-

    Also @Wisp because I managed to screw up the tagging in my previous post :)
  • alnairalnair Member Posts: 561
    And again because that second zip didn't contain weinstall (for no apparent reason). Weird.
  • This thread should be stickied as an emergency solution for WeiDU Mac OSX. Great work!
  • WispWisp Member Posts: 1,102
    @AendaeronBluescale

    Perhaps it would be a better idea to port these tools to Java. Then it will run on any of the major OSes from just one source. Both ZLib and libjpeg have Java equivalents.

    WeiDU is a pretty large program by now.
    Aside from which, I'm pretty sure there are more than a few who prefer a native program to having to first install runtime dependencies.

    @Cerevant
    Cerevant said:

    Well, tispack was easy enough - looks like it works, but I don't know how to test it.

    Thanks. I'll make sure the TISPack package is updated to include the x86-64 binaries. I suppose the easiest way of testing would be by uncompressing one or more TIZ files on the command line and inspecting the resulting TIS with NI. Command-line usage is
    tisunpack -s -f -o somefile.tis somefile.tiz
    BG2 Tweaks has a TIZ file in bg2_tweaks/tiz/

    @Cerevant
    Cerevant said:
    Is there any particular respect you think the compile instructions I provided can be amended to be more up to date or improved upon? I can make an explicit mention of chmodding elkhound. Anything else?

    @alnair
    Please check your sources. Your problems have already been solved, so I'm guessing you are trying to build from outdated source code. You want this repository.
  • alnairalnair Member Posts: 561
    Wisp said:

    Please check your sources. Your problems have already been solved, so I'm guessing you are trying to build from outdated source code. You want this repository.

    I could have sworn that was where I got the source, but apparently it was the_bigg's repository instead. My apologies.

    I cloned yours this time, and apart from this error/warning:
    Generating dependency information for batteries-lite/batList.mli
    /bin/sh: obj/.depend/batList.di: No such file or directory
    Bad -I option: obj/x86_LINUX: No such file or directory
    just following the build instructions smoothly created the attached zip.
    Wisp said:

    Is there any particular respect you think the compile instructions I provided can be amended to be more up to date or improved upon? I can make an explicit mention of chmodding elkhound. Anything else?

    I would change the MacPorts reference to Homebrew.
    It may be used to install both OCAML and the jpeg libraries needed for compiling tis pack.

    It also says that OCAML install path should be /opt/local/ but your sample.Configuration (BTW, check the filename spelling :P) correctly points to /usr/local/bin, so you could fix that too.
  • WispWisp Member Posts: 1,102
    @alnair
    Thanks. Fixed and updated. I'm listing HomeBrew as an alternative to MacPorts.

    I'm uploading your build among the other beta builds and I'll let you know when the next version is available. How do you want to be credited? As alnair?

    Mac users are encouraged to test WeiDU 231.14 to see if its treatment of BGEE and/or OS X is satisfactory.
  • alnairalnair Member Posts: 561
    edited September 2013
    @Wisp
    Also, it's now possible to install Xcode's command-line tools without Xcode itself, downloading them from Apple Developer (free registration required). They should be enough for building; and for someone who is not a iOS/OSX developer there's no reason to download and install such a huge program, I guess.

    You don't need to credit me, but if you want to, either alnair or my real name is fine, thanks :)
    Post edited by alnair on
  • WispWisp Member Posts: 1,102
    Can someone tell me what the terminal command uname -m returns on a 64-bit Mac?
  • alnairalnair Member Posts: 561
    alnair$ uname -m
    x86_64
  • WispWisp Member Posts: 1,102
    Thanks.
Sign In or Register to comment.