Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OSX Data Install Issue #404

Closed
jupera opened this issue Nov 28, 2021 · 19 comments
Closed

Mac OSX Data Install Issue #404

jupera opened this issue Nov 28, 2021 · 19 comments

Comments

@jupera
Copy link

jupera commented Nov 28, 2021

Describe the bug
Cannot Install Data on Mac OSX 12.0.1
My Original Disk is: WAR2_122 : Warcraft II Tides of Darkness

To Reproduce
Upon Launching I get the message:
Wargus data was not extracted, is corrupted, or outdated.
You need to extract it from original Warcraft II DOS REZDAT.WAR or BNE INSTALL.MPQ/INSTALL.EXE file. Please select the Warcraft II DOS REZDAT.WAR or BNE INSTALL.MPQ/INSTALL.EXE file

I select DATA/REZDAT.WAR

Result:
There was an error copying the data, could not discover contributed directory path.

Screen Captures
Screen Shot 2021-11-28 at 10 07 12 AM
Screen Shot 2021-11-28 at 10 17 05 AM

Screen Shot 2021-11-28 at 10 11 48 AM

Screen Shot 2021-11-28 at 10 18 44 AM

@ghost
Copy link

ghost commented Nov 28, 2021

Could you try running it in the terminal and pasting any output you get here? You may also want to try building it from source if you are comfortable with that. I have some instructions on building it on macOS here: https://github.com/Wargus/stratagus/wiki/Building-on-macOS .

@macsobel
Copy link

macsobel commented Feb 2, 2022

I was able to get the script working in Terminal. It failed entirely at first until I installed Homebrew and FFMPEG for macOS. Running the script gave me a similar output to what I get in Windows but it created the files in a folder called "data" in my macOS user folder ("/data") instead of "/Library/Stratagus/data.Wargus/". Here is my log for running wartool in Terminal:

Terminal Saved Output.txt
Screen Shot 2022-02-01 at 10 28 06 PM

Leaving the files there or moving them to proper location results in Wargus starting up and saying the Wargus format has changed, and then fails to fix it with the following messages when I try to launch:

Screen Shot 2022-02-01 at 10 36 05 PM

Screen Shot 2022-02-01 at 10 30 47 PM

Screen Shot 2022-02-01 at 10 30 52 PM

Screen Shot 2022-02-01 at 10 30 56 PM

Wargus macOS build, macOS 12.1, M1 MacBook Pro
Screen Shot 2022-02-01 at 10 42 59 PM

@jupera
Copy link
Author

jupera commented Feb 13, 2022

In a last desperate attempt, I copied the Stratagus/data.Wargus from a working Windows installation and now I get the same error message as macsobel
Screen Shot 2022-02-13 at 11 07 53 AM
.

@praetorfenix404
Copy link

praetorfenix404 commented Mar 4, 2022

Running wartool manually to extract the data results in this:

./wartool -r -v /Volumes/Warcraft\ 2 ~/Library/Stratagus/data.Wargus
Please be patient, the data may take a couple of minutes to extract...
Archive "/Volumes/Warcraft 2/suPPORT/TOMES/TOME.2"
sh: -c: line 0: unexpected EOF while looking for matching `"'
sh: -c: line 1: syntax error: unexpected end of file

It appears to be munging the path.

MacBook Pro 16,1
Monterey 12.2.1
BNE CD

@praetorfenix404
Copy link

I'm not a developer, but I know enough to be dangerous. Looking through the logic to detect versions and paths for case sensitivity gave me the idea. I copied everything from the BNECD and wrote a small shell script to rename all files and folders to lower case. The GUI still failed to load after selecting install.exe, so no change there, however that allowed the wartool to work as expected when ran manually.

Placing the extracted data in ~/Library/Stratagus/data.Wargus resulted in "Stratagus failed to load game data" when launching the GUI and running via command line threw an error for missing images in a /ui folder. I was able to locate those files in "contrib" and put them in place. Still the GUI failed, but running via command line worked specifying the data and user paths.

Finally able to somewhat launch the app, trying to start the campaign fails with the menu going in circles back to the beginning.

Hope this helps.

@JiLiZART
Copy link

JiLiZART commented Sep 6, 2022

I have compile stratagus 3.3.3 and wargus from source code.
Also Install ffmpeg theora codec brew install ffmpeg2theora.
Place compiled stratagus wargus wartool to /Applications/Wargus.app/Contents/MacOS also copied campaigns contrib maps scripts shaders folders from wargus to /Applications/Wargus.app/Contents/MacOS

After run
/Applications/Wargus.app/Contents/MacOS/wartool -v -r '/path/to/original-warcraft2' '~/Library/Stratagus/data.Wargus'

And run game.

I share precompiled binaries here https://github.com/JiLiZART/wargus-3.3.3-macos-m1-app (well tested on MacOS 12.4 M1 Chip)

@jupera
Copy link
Author

jupera commented Sep 15, 2022

Thank you for the binaries JiLiZART!

It's finally working, but not completely. I'll explain.

After following your steps, if I try running the App from finder I get this error:

Screen Shot 2022-09-14 at 7 00 33 PM

But if I use terminal and go into the Package itself, into Contents/MacOS and run ./wargus it works great!

I'm sure it's something stupid, but what?

Thanks again for your help!

@shinra-electric
Copy link
Contributor

shinra-electric commented Mar 14, 2023

This should be fixed now if you build Stratagus and Wargus yourself.

You should be able to launch by just opening the app now. No need to open through Terminal anymore.

Please retest.

Stratagus macOS build instructions.txt

@praetorfenix404
Copy link

praetorfenix404 commented Mar 17, 2023

This should be fixed now if you build Stratagus and Wargus yourself.

You should be able to launch by just opening the app now. No need to open through Terminal anymore.

Please retest.

Stratagus macOS build instructions.txt

Wartool ran as expected, however a new issue has crept up with the extraction process resulting in failure to launch.

Couldn't load file /Users/..me../Library/Application Support/Stratagus/data.Wargus/graphics/ui/human/filler-right.png: Unsupported image formatCan't load the graphic '/Users/..me../Library/Application Support/Stratagus/data.Wargus/graphics/ui/human/filler-right.png

It appears all UI elements among other asset PNGs are 0 bytes.

Screenshot 2023-03-17 at 1 59 43 PM

@shinra-electric
Copy link
Contributor

shinra-electric commented Mar 18, 2023

It appears all UI elements among other asset PNGs are 0 bytes.

Are you extracting from the DOS version or the GOG version?
I’m using GOG, I haven’t tried it with DOS…

@praetorfenix404
Copy link

It appears all UI elements among other asset PNGs are 0 bytes.

Are you extracting from the DOS version or the GOG version? I’m using GOG, I haven’t tried it with DOS…

The only copy I’ve got is an original Battle.net edition CD from ‘99

@shinra-electric
Copy link
Contributor

It might be an issue specific to the CD version maybe?

I'll see if I can dig up a copy to test on.

@shinra-electric
Copy link
Contributor

shinra-electric commented Mar 19, 2023

I managed to get my hands on a BNE edition. I had to install it using Wineskin in order to get the "correct" install.exe, but I had no issues extracting it...

Screenshot 2023-03-19 at 17 14 22

Not having the same zero size images that you were.

Can you delete your data.Wargus folder and try again?

@shinra-electric
Copy link
Contributor

shinra-electric commented Mar 19, 2023

I recently just discovered a few things that might help you:

1: Wartool will fail if you delete the source code folder. See #438 for details.

2: The Windows BNE version comes on a CD that has an install.exe file, but this is not the one that wartool is looking for. Once WC2 has been installed on Windows there will be another install.exe file that is the right one. (It can be installed without Windows by using Wineskin).

3: It will complain when trying to extract from the BNE data, but it will actually open a Terminal window in the background and start working.
Screenshot 2023-03-19 at 21 30 13
4: It will ask if you want to install from the expansion CD, even though BNE and GOG versions already include it. Just select no.
Screenshot 2023-03-19 at 21 31 55

@praetorfenix404
Copy link

praetorfenix404 commented Mar 20, 2023

May have found something with wartool. Managed to get my hands on ancient DOS versions of the original and expansion. They both contain the same errors when extracting from tomes. The libpng warning repeats many times.

Archive "/Users/..me../Documents/ISO/Games/WAR2BNECD/support/tomes/tome.1" Ignore entry 25 in archive (invalid uncompressed length) Ignore entry 32 in archive (invalid uncompressed length) Copied /Users/..me../Documents/ISO/Games/WAR2BNECD/support/tomes/tome.1->/Users/..me../Desktop/test/support/tomes/tome.1 libpng warning: Application built with libpng-1.4.12 but running with 1.6.39

@shinra-electric
Copy link
Contributor

Did you build the app yourself? If so, libpng should be up to date....

@praetorfenix404
Copy link

I did indeed compile stratagus and wargus from source.

@shinra-electric
Copy link
Contributor

Can you export your terminal output from when you build and post here as a text file? I might spot something.

Actually, maybe we can chat in the discord channel so we don't pollute GitHub....

@shinra-electric
Copy link
Contributor

This issue can likely be closed, unless other people are still having trouble.

There is still a data extraction issue in #438 that is the cause of trouble for most people, but that is a separate issue.

@jupera jupera closed this as completed Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants