Open shinra-electric opened 1 year ago
Would that be possible to build the latest MacOS app with Github actions?
Would that be possible to build the latest MacOS app with Github actions?
This issue would prevent the data extractor tool from working
I am technically too far away to debug this. But I am also interested to get it working. I followed the Stargus MacOs build instruction. Everything went fine except of the data extraction from any of my Warcraft copies. GOG and CD. F1 / Help
Did you try to use innoextract (command-line tool) or MSP's Extractor tool on the GoG install exe?
No, but just downloaded now. Do you have instructions how to continue? From where to where, extract files?
Hmm, now I'm having trouble with it... 😅
Sorry, looks like there was a regression. I can't get the wartool extractor to work at all...
FYI Wargus was the only one that was extracting data properly before, war1gus and Stargus both missed files.
If you use Wine or Wineskin maybe try to extract the data with the Windows version of Wargus? I'll be giving that a try now...
I also have wargus running on Windows. Is there a way to use these files from Windows? I copied the stargus folder to my home folder but wagus on macOS didn't accept that.
If you have already extracted the data on Windows, there should be a data.Wargus
folder that you should be able to use (as well as data.War1gus
and data.Stargus
if you have those too). You can copy them into the Stratagus folder in ~/Library/Application Support
, where ~
represents your user name. If the Stratagus folder isn't there you can create it.
FYI I know that War1gus and Wargus both work, but I've never gotten Stargus to work...
Ah, now it starts :) But can't start a game. The fonts and button positions seems to be broken :(
But this is just a workaround anyway. Would be nice to know how we can support to make wargus working again. It seems to run... so it's possible, just need fixes. :D
Ah, now it starts :) But can't start a game. The fonts and button positions seems to be broken :(
The app actually works fine if you have the properly extracted game data:
It's just the extractor tools that are broken on macOS (war1tool, wartool and startool)
But this is just a workaround anyway. Would be nice to know how we can support to make wargus working again. It seems to run... so it's possible, just need fixes. :D
Absolutely. But the main devs don't have Macs....
Nope :( I get this message and then it starts broken :( I just installed wargus 3.3.2 on windows. did everything again and still broken :/
Hm, i managed to find the button to start the game. Everything in the game is fine. Just everything with text is not readable. It is now not only a strategic game, it's also a guessing game :/ Warcraft 1 and Warcraft 2, both have same font issues. I guess its the extractor again as it tries to migrate something
Ok, I got wartool working again...
./wartool -v -r [source folder] [destination folder]
where the source folder is wherever you extracted the GoG data to, and the destination folder is ~/Library/Application Support/Stratagus/data.Wargus
However, the game doesn't launch by opening the app bundle. you can run it from the command line.
All the game data seems to be extracting, but there is one folder called shaders
that I have in my old game data that is missing. The whole thing is 14.6MB smaller, so I think it's missing more files.
Edit: Bizzarely, I'm getting black text on the menu now, even if I go back to my old data and old wargus build....
Edit 2: I've confirmed that the black text on the menu is a regression in Stratagus. I've built checking out older commits and it works fine. I'll bisect and report the PR with the regression....
The last commit that seems to work without issue is #584.
So you can add a checkout instruction to the script:
For example:
...
cd stratagus
git checkout 7b2d62e10098f2f310aca352de84568936a0fafb
mkdir build && cd build
...
@shinra-electric You are the hero of the day!!! That worked!!! Even the data extraction works now for me. So the master
is unfortunately unstable.
BTW: Here is my script out of the build instructions, where you easily can exchange versions:
xCode command line tools
brew install cmake sdl2 sdl2_mixer sdl2_image lua libpng ninja meson ffmpeg
(Plain POSIX sh)
#!/usr/bin/env bash
set -e
# Clone repositories
clone_and_checkout() {
repo_url="$1"
dir_name="$2"
revision="$3"
# Clone the repository
if [ ! -d "$dir_name" ]; then
echo "########## CLONE [$2]"
git clone --recurse-submodules "$repo_url" "$dir_name"
fi
# Checkout the specific tag if the repository was cloned
if [ -d "$dir_name" ]; then
echo "########## CHECKOUT [$2] [$revision]"
cd "$dir_name"
git add . > /dev/null 2>&1 || true
git stash > /dev/null 2>&1 || true
rm -rf build > /dev/null 2>&1 || true
mkdir -p build || true
git fetch --tags
git checkout -f "$revision" || true
git submodule foreach --recursive git clean -xfd || true
git submodule foreach --recursive git reset --hard || true
cd ..
fi
}
clone_and_checkout https://github.com/Wargus/stratagus stratagus "7b2d62e10098f2f310aca352de84568936a0fafb"
clone_and_checkout https://github.com/Wargus/war1gus war1gus "3.3.2"
clone_and_checkout https://github.com/Wargus/wargus wargus "3.3.2"
clone_and_checkout https://github.com/Wargus/stargus stargus "3.3.2"
# Build STRATAGUS
echo "########## Build [stratagus]"
cd stratagus
mkdir -p build && cd build
cmake .. -Wno-dev -DBUILD_VENDORED_LUA=ON && make
cd ../..
export STRATAGUS_INCLUDE_DIR="$PWD"/stratagus/gameheaders
export STRATAGUS="$PWD"/stratagus/build/stratagus
# Build WAR1GUS
echo "########## Build [war1gus]"
cd war1gus
cd build
cmake .. -Wno-dev -DSTRATAGUS_INCLUDE_DIR="$STRATAGUS_INCLUDE_DIR" -DSTRATAGUS="$STRATAGUS" && make
cd ../mac
./bundle.sh
cp -a War1gus.app ../../
cd ../..
# Build WARGUS
echo "########## Build [wargus]"
cd wargus
cd build
cmake .. -Wno-dev -DSTRATAGUS_INCLUDE_DIR="$STRATAGUS_INCLUDE_DIR" -DSTRATAGUS="$STRATAGUS" && make
cd ../mac
./bundle.sh
cp -a Wargus.app ../../
cd ../..
# Build STARGUS
echo "########## Build [stargus]"
cd stargus
meson setup -DSTRATAGUS_INCLUDE_DIR="$STRATAGUS_INCLUDE_DIR" -DSTRATAGUS_BIN="$STRATAGUS" build
ninja -C build
cd mac
./bundle.sh
cp -a Stargus.app ../../
cd ..
echo "########## Done"
Apple M1 14" 2021 OS: macOS 14.2 (Sonoma)
Only Warcraft 1 campaign is now crashing for me. I tried several commits but haven't found jet one which is working.
@YunaBraska We should chat about it on the Stratagus discord channel so we don't derail this issue.
Lua5.1 is no longer available so I cannot make Mac work at all anymore
Lua5.1 is no longer available so I cannot make Mac work at all anymore
Let's keep this issue on topic. Create a new issue if you are having problems with Lua. For what it's worth, I just built Wargus using the latest version of Lua (5.4.6) and didn't have issues.
Lua5.1 is no longer available so I cannot make Mac work at all anymore
Let's keep this issue on topic. Create a new issue if you are having problems with Lua. For what it's worth, I just build Wargus using the latest version of Lua (5.4.6) and didn't have issues.
I was using the Wiki and those steps no longer worked and failed at Lua. But then I used these steps from the txt file:
# Stratagus/Stargus/Wargus build instructions:
# It is assumed you have Xcode command-line tools and Homebrew already installed
# Install the following dependencies (There may be more than listed here, add as required)
brew install cmake sdl2 sdl2_mixer sdl2_image lua libpng ninja meson ffmpeg
# Copy and paste everything below into terminal
# You should find the Warg1us, Wargus and Stargus apps in the folder where you started
git clone --recurse-submodules https://github.com/Wargus/stratagus
git clone --recurse-submodules https://github.com/Wargus/war1gus
git clone --recurse-submodules https://github.com/Wargus/wargus
git clone https://github.com/Wargus/stargus
# STRATAGUS
cd stratagus
mkdir build && cd build
cmake .. -DBUILD_VENDORED_LUA=ON && make
cd ...
export STRATAGUS_INCLUDE_DIR=${PWD}/stratagus/gameheaders
export STRATAGUS=${PWD}/stratagus/build/stratagus
# WAR1GUS
cd war1gus
mkdir build && cd build
cmake .. -DSTRATAGUS_INCLUDE_DIR=${PWD}/../../stratagus/gameheaders -DSTRATAGUS=${PWD}/../../stratagus/build/stratagus && make
cd ../mac
./bundle.sh
cp -a War1gus.app ...
cd ...
# WARGUS
cd wargus
mkdir build && cd build
cmake .. -DSTRATAGUS_INCLUDE_DIR=${PWD}/../../stratagus/gameheaders -DSTRATAGUS=${PWD}/../../stratagus/build/stratagus && make
cd ../mac
./bundle.sh
cp -a Wargus.app ...
cd ...
# STARGUS
cd stargus
meson setup -DSTRATAGUS_INCLUDE_DIR=$STRATAGUS_INCLUDE_DIR -DSTRATAGUS_BIN=$STRATAGUS build
ninja -C build
cd mac
./bundle.sh
cp -a Stargus.app ...
cd ...
Unfortunately the extractor for the MS DOS version is completely busted now. I specify a mounted CD at /Volumes/WAR2 and the extractor is creating broken extracted files. If these files came from the game I'm not sure how it made them 0 bytes. It does seem to extract a bunch of campaign files and music MIDs successfully. Tried Wartool in various ways and no luck with that either.
Describe the bug It is possible to make a macOS app bundle that works fine for playing the game.
However, Wartool will try to copy over the
campaigns
,contrib
,maps
,scripts
, andshaders
folders from the source code folder, and merge them with the extracted game data. If the Wargus source folder is not there, the game extraction will fail.To Reproduce
Expected behavior The data extraction step should work if the source code folder is not present.
Edit: I noticed that the bundle.sh script does actually copy these files into the app bundle in
Wargus.app/Contents/MacOS
. So the issue here is that wartool is not looking for them in the correct place.Desktop: macOS Ventura 13.2.1 / M1 Pro