AL|EN Posted July 15, 2019 Author Share Posted July 15, 2019 (edited) 14 minutes ago, subtledoctor said: I don't understand. Extracting != launching. I meant above, move your BGEE game out of the root directory. Just like Windows: the OS doesn't like it when you mess with official applications in official locations, like /Applications. Move or copy the game itself into /Users/you/Applications, or /Users/you/Desktop, or something like that. Then put the Weidu .app into the game folder and it should run without a hitch. Moved game dir into /Users/you/Desktop, trying to launch setup-mymod.app, still the same issue. It appears that it's a new security model for Mojave. Edited July 15, 2019 by AL|EN Quote Link to comment
subtledoctor Posted July 15, 2019 Share Posted July 15, 2019 I have Mojave, and my Weidu Launcher doesn't have this issue... :shrug: Quote Link to comment
subtledoctor Posted July 16, 2019 Share Posted July 16, 2019 You know AL|EN, if you are handy with shell scripts as you seem, maybe you can help me convert the Weidu Launcher to a .command file. There's no technical reason it won't work, and a shell script would be more efficient than my Applescript. The only thingbit would lose vs. an .app package would be the ability to bundle Weidu with it. (And the ability to give it a fancy icon.) Quote Link to comment
AL|EN Posted July 16, 2019 Author Share Posted July 16, 2019 (edited) 8 hours ago, subtledoctor said: You know AL|EN, if you are handy with shell scripts as you seem, maybe you can help me convert the Weidu Launcher to a .command file. There's no technical reason it won't work, and a shell script would be more efficient than my Applescript. The only thingbit would lose vs. an .app package would be the ability to bundle Weidu with it. (And the ability to give it a fancy icon.) Let me understand what you actually trying to achieve: A. Distribute mod package with per-mod .command file + per-mod weidu = current, old ways of doing things B. Distribute mod package with per-mod .command file + global weidu = my new solution C. Distribute mod package with per-mod "Mac OS WeiDU Launcher" as .app + global weidu = you current method of mod distribution D. Distribute mod package with per-mod "Mac OS WeiDU Launcher" as .command + global weidu = is this is what you want? E. Distribute separate global "Mac OS WeiDU Launcher" (as app or as .command) + separate global weidu and separate mod package without either per-mod weidu, per-mod .command or per-mod "Mac OS WeiDU Launcher" as app/.command in it = this is what I would like to see It's the D variant which you are trying to achieve? Why I'm against 'keeping "Mac OS WeiDU Launcher" as part od mod package"? Because if a modder will use older version of this application and include it inside mod package, then it can overwrite new version which comes from new mods. Actually, no one is distributing mods like that and you won't find similar approach when you take look at the other games mod distribution. Edited July 16, 2019 by AL|EN Quote Link to comment
lynx Posted July 16, 2019 Share Posted July 16, 2019 linux users don't care about desktop files or their misuse. So you don't need to lose sleep over that. Quote Link to comment
AL|EN Posted July 16, 2019 Author Share Posted July 16, 2019 Does anyone thinks that 'setup-' is important for newcomers because it somehow indicate installation file? Quote Link to comment
AL|EN Posted July 17, 2019 Author Share Posted July 17, 2019 (edited) Well, the wariant 2 where the weidu is globally shared between mods and games cannot be used if there is no way to check (& download if missing) for a latest weidu version. Without such feature, avoiding distribution of the per-mod weidu executable is impossible. Edited July 17, 2019 by AL|EN Quote Link to comment
AL|EN Posted July 17, 2019 Author Share Posted July 17, 2019 (edited) I was able to create what I wanted for macOS. But I can't get away the feeling that it's overkill. I even created a version which allows for pining specified version of WeiDU for the first installation of the mod, but it breaks re-installation - I guess such feature must be part of proper mod manager, not some custom script which cannot handle more complex logic. Variant 3 macOS: - it's not relay on the Github API - it eliminates the need for WeiDU executable for every mod and even for initial installation of the first extracted mod - latest WeiDU version will be downloaded and shared globally, every time when the new version will be available online - works correctly regardless of 'MyMod\mymod.tp2' or 'MyMod\setup-mymod.tp2' - you can name the .command file "MyMod-Setup.command" if you care about 'setup' word and still keep "search by keyboard" feature #!/bin/bash cd "${0%/*}" ScriptName="${0##*/}" BaseName="${ScriptName%.*}" ID="${BaseName/setup-/}" ID="${ID/-setup/}" VersionLong=$(curl --silent "https://github.com/weiduorg/weidu/releases/latest" | sed 's#.*tag/\(.*\)\".*#\1#') Version=${VersionLong/v/} Version=${Version/.*/} if ! [ -f "/usr/local/bin/weidu-$Version" ] ; then Name="WeiDU-Mac-$Version" Url="https://github.com/WeiDUorg/weidu/releases/download/$VersionLong/WeiDU-Mac-$Version.zip" wget -qO- $Url -O /tmp/$Name.zip && unzip -o -q /tmp/$Name.zip -d /tmp/ && rm /tmp/$Name.zip mv "/tmp/WeiDU-Mac/bin/amd64/weidu" "/usr/local/bin/weidu-$Version" && chmod +x "/usr/local/bin/weidu-$Version" fi # --no-exit-pause prevents 'double Enter' for macOS if [ -f "$ID/$ID.tp2" ] ; then "/usr/local/bin/weidu-$Version" "$ID/$ID.tp2" --no-exit-pause --log "$ID.debug" else "/usr/local/bin/weidu-$Version" "$ID/setup-$ID.tp2" --no-exit-pause --log "$ID.debug" fi It was fun hacking and experimenting, I will leave it here as a reference if someone wana try it. Edited July 30, 2019 by AL|EN Quote Link to comment
Angel Posted July 21, 2019 Share Posted July 21, 2019 My suggestion for Linux would be to make an actual package for WeiDU (rpm, apt, or maybe portage ebuild) so it can be installed like any other tool. Such packages already exist for GemRB, for example. Linux users would then only need to install WeiDU once, and maybe update it every now and then, most Linux users are savvy enough to do this and it can even be automated using standard distribution tools. That would completely eliminate the need for mods to include WeiDU at all, which is imho pretty silly to begin with. Quote Link to comment
AL|EN Posted July 21, 2019 Author Share Posted July 21, 2019 @AngelHow do you expect for a mod manager to install rpm/apt package into some custom directory? I'm not familiar with all those Linux package manages to be able to create prof-of-concept. for this I need help form one of the linux master. Quote Link to comment
lynx Posted July 22, 2019 Share Posted July 22, 2019 Nah, it'd still be the user's responsibility, the same it is now. The only benefit is that it's easier to uninstall this way, at the cost of lower portability, since the static binaries mostly just work and there's no need to figure out what tools are needed. btw, arch has weidu in abs. Quote Link to comment
Angel Posted July 22, 2019 Share Posted July 22, 2019 22 hours ago, AL|EN said: How do you expect for a mod manager to install rpm/apt package into some custom directory? I'm not familiar with all those Linux package manages to be able to create prof-of-concept. for this I need help form one of the linux master. There is no need to. Make a package that installs it in a proper location that is in $PATH like /usr/local/bin and it can be called from anywhere like an ordinary program. Do you need to install a copy of ls (or dir, if you want a dos/windows analog) in every directory you run it from. Once again, shipping a copy of WeiDU with every mod is purest idiocy, there is a reason current mods packaged for Linux don't do it. Install it and use it like a proper tool. Have the mod manager test for an installed copy and if it's not there, prompt the user to install it and try again. That is exactly how I use it now and it certainly beats having twenty-odd different copies of WeiDU sitting in my game directory for no good reason. Quote Link to comment
AL|EN Posted July 23, 2019 Author Share Posted July 23, 2019 (edited) @Angel You are talking about rpm package for weidu distribution. It's different thing than mod package. For this, you need to ask @Wisp , he can extend the weidu build process and add generation of the rpm/apt package + publish it into various package managers. But let's just assume that such package already exist, a player installed clean version of Ubuntu, then use apt install weidu, he download 3 mods (Tweaks, SCS, UB) and extract them into game directory. How he suppose to initiate the installation of the first mod? How he suppose to initiate the uninstallation of the mod? Edited July 23, 2019 by AL|EN Quote Link to comment
lynx Posted July 23, 2019 Share Posted July 23, 2019 By invoking weidu? Nothing changes there, this is the way we have used it since the start. Quote Link to comment
AL|EN Posted July 23, 2019 Author Share Posted July 23, 2019 @lynx But that's also require to open console, and type "weidu path/to/tp2" - the whole point it so avoid this kind of stuff because it's unnecessary. Currently, the only way to support "Double-click > install mod" is via .desktop files, assuming that weidu is installed globally. If you don't care, fine but it's not a bad thing, isn't it? Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.