Skip to content

Trying to compile Weidu in Mac OSX

13

Comments

  • NifftNifft Member Posts: 1,065
    @subtledoctor - yeah, but in a way that is entirely wrong. :-)

    Basically, WeiDU assumes there is exactly ONE language per game, since that's how it used to be, and asks the player to tell the program which one-and-only language to install.

    BG:EE has many languages per game, so WeiDU really ought to install into all of them, in case you get a foreign girlfriend and she wants to start a new game on your iPad while you're rock climbing.

    - - -

    But that's an aside. The thing I'm talking about is picking the right language path for the dialog.tlk, which can't happen inside WeiDU, since WeiDU thinks there's only one dialog.tlk. Basically, right now there MUST be agreement about language choice between the wrapper and WeiDU, but there's no way to check that from inside WeiDU.

    It may be possible to check that from the wrapper script, though, and to pass both the path to the dialog.tlk (which includes language) and the "interior" language choice to WeiDU as a command line option.
  • The user and all related content has been deleted.
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
  • NifftNifft Member Posts: 1,065
    @subtledoctor - WeiDU has a "--language XXXX" option, and better yet, it has a "--list-languages" option so you don't have to parse the .tp2 files yourself.

    So what you could do is something like:
    - Build a list of "*/*.tp2" files, allow the user to pick one.
    - Build a list of available game languages ("lang/*").
    - Run "weidu --list-languages" on the chosen .tp2 to get available mod languages.
    - Join up available game languages and available mod languages, and allow the user to pick one of those.
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
  • NifftNifft Member Posts: 1,065

    @Nifft I confess I'm a bit confused as to how that works, since I haven't seen it run. By this,

    - Build a list of "*/*.tp2" files, allow the user to pick one.
    ...are you envisioning running a single Applescript launcher app, and choosing which mod you want to install each time you run it? Because it occurs to me that that would be possible. But, separate from the language issue. Yeah, that would also solve the issue of Win32 developers not being able to modify the Applescript app.

    And, just so I'm clear, does this

    - Join up available game languages and available mod languages, and allow the user to pick one of those.
    ...mean we are going to only have WeiDU install one language choice? Or are we trying to have it install multiple languages simultaneously?

    Because, (again, to be clear) IF we just need to have WeiDU focus on a single .tp2 file, and IF in that circumstance you can just append "--list-languages" to the command, well then that can be done easily, with the AppleScript the way it already is. It's only in the event that we need to specify, i.e. if we need to append "--language XXXX", that things get complicated. (Complicated, but still possible. Just more work.)
    Hmm, then maybe one Applescript app per language, if it's difficult to parse the output of a shell program.

    The thing you have to code for is:
    - paths for dialog.tlk involves language
    - language selection

    I envisioned something like:
    PATH_LANG=en_US
    TP2_LANG=English

    ./weidu --language ${TP2_LANG} --tlkin lang/${PATH_LANG}/dialog.tlk --tlkout lang/${PATH_LANG}/dialog.tlk

  • NifftNifft Member Posts: 1,065
    ... and I don't seem to get any useful output from "--list-languages", so maybe that's off the table anyway. Or maybe I'm using it wrong. :-/
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
  • NifftNifft Member Posts: 1,065
    Okay, --list-languages does work, but I guess I was trying it on a single-language mod before. Here's some sample output:

    0:English
    1:Espanol (www.clandlan.net)
    2:Polski (Yarpen)
    3:Deutsch (Leonardo Watson)
    4:Francais (Mornagest)
    5:Italiano (Stoneangel)
    6:Russian (Prowler/Silent)
    7:Korean (Menocu)

    @Wisp, how reliable are language strings? Like, can we count on Polish always being "Polski"?
  • WispWisp Member Posts: 1,102
    edited April 2013
    The --language option takes an integer argument, and which integer corresponds to what language varies from mod to mod. The string is completely arbitrary and also varies from mod to mod.

    If you care to wait a bit longer, there is something in the works that should address your concerns in a broader scope. Or get involved, that would be even better. If only you knew what it was. Doh! (It's a cross-platform GUI frontend and distribution format.)
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
  • NifftNifft Member Posts: 1,065
    Wisp said:

    Doh! (It's a cross-platform GUI frontend and distribution format.)

    Cool.

    What is it called?
  • The user and all related content has been deleted.
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • NifftNifft Member Posts: 1,065

    What am I doing wrong? If I can't get the language list in person, there's no way I can get is in a script! Help!

    "--list-languages" requires an argument! :-)

    Even if the name of the script is implicit in argv[0], you need to tell weidu what script you were talking about again.

    In this case, I guess it'd be:

    ./setup-BPSeries --list-languages BPSeries/setup-BPSeries.tp2

  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
  • NifftNifft Member Posts: 1,065
    edited April 2013

    Ah! Okay. I tried a few variations on that, but not with the subfolder as part of the argument. That could be a problem, if modders don't follow a uniform practice in naming mod data folders.... we shall see tomorrow how it pans out.

    If you're getting the .tp2 names from a file glob, you'll have the full path.

    If you're NOT using a file glob and instead relying on the modder using the standard WeiDU behavior, you can just assume that the .tp2 will be in the appropriate folder. The problem is when a modder uses a .BAT file...
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    Here:

    cs_CZ
    de_DE - German
    en_US - English
    es_ES - Spanish
    fr_FR - French
    pl_PL - Polish
    pt_BR - Portuguese
    tr_TR - Turkish

    I really don't know what the first language is.
  • WispWisp Member Posts: 1,102
    Nifft said:


    What is it called?

    It hasn't been announced yet. I expect it'll be another few days, or a week or two, before the design is in a presentable state.

    @mlnevese
    It's Czech.
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
  • WispWisp Member Posts: 1,102
    edited April 2013
    @subtledoctor
    You may also want to account for how WeiDU will work as of next version. Edit: specifically, if a mod is installed with the --tlkin and --tlkout options, it must also be uninstalled with the same TLKs, or the user's game will be partially hosed.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @subtledoctor There are more official translations being done right now, like Italian and Russian, for instance, so that directory structure is likely to change in the future.

    Meanwhile I think it would be safe to defaul to English.
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @subtledoctor When installing multiple mods remember that SCS, if detected, should always be the last mod installed.
  • WispWisp Member Posts: 1,102
    @mlnevese
    That's a bit simplistic. For instance, both aTweaks and Item Randomiser are best installed after SCS (and failing to do so may even cause bugs). As more and more mods become available for BGEE, the full range of inter-dependencies will come into play.
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @Wisp Yeah I know. I was considering just the mods in this forum list. Soon things will get really complicated with portions of SCS being installed, then other mods, then returning to SCS, as you have to do when installing The Big World Project default mods, for instance.
  • [Deleted User][Deleted User] Posts: 0
    edited April 2013
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
Sign In or Register to comment.