Wargus / wargus

Importer and scripts for Warcraft II: Tides of Darkness, the expansion Beyond the Dark Portal, and Aleonas Tales
GNU General Public License v2.0
357 stars 55 forks source link

Wargus.app Not Extracting Files (Mac OS X 10.11.6 El Capitan) #252

Closed dpmayer closed 3 years ago

dpmayer commented 7 years ago

I can't seem to get Wargus 2.4.1 to extract the game files it needs from my Warcraft 2 CD-ROM. I have the retail version that came with a hybrid Mac/Windows CD. Wargus seems to want the DOS *.WAR files so first I mount the Windows partition of the CD:

sudo mount_cd9660 -o nodev,nosuid,rdonly /dev/disk3s1 ~/Desktop/Warcraft2 The disk mounts normally and I can see it in the Finder.

Upon opening Wargus.app, I get the dialog box saying "Wargus data was not extracted, is corrupted, or outdated. You need to extract it from original Warcraft II DOS REZDAT.WAR or BNE Battle.snp file. Please select the Warcraft II DOS REZDAT.WAR or BNE Battle.snp file"

I click OK and proceed through the file select dialog that pops up to select REZDAT.WAR on the CD. I click Choose and then get an error dialog that says "There was an unrecoverable error copying the data" I click OK and get another error dialog saying "Wargus data was not extracted, is corrupted, or outdated. You need to extract it from original Warcraft II DOS REZDAT.WAR or BNE Battle.snp file."

I also tried copying the contents of the CD onto my computer and pointing Wargus.app to the local copy of REZDAT.WAR, but get the same error.

Is this a known issue? Am I doing something incorrectly? This seems remarkably similar to #230

timfel commented 7 years ago

Sorry, just back from holiday... There was an unrecoverable error, let me see. Can you give me the full path to Wargus.app and the full path to your user home? The error indicates that the app couldn't find its own scripts folder.

timfel commented 7 years ago

Another question, did you try launching from the Downloads folder? If yes, try moving the Wargus.app explicitly into the Applications folder. The app doesn't work correctly with the sandbox feature of newer macos releases.

dpmayer commented 7 years ago

The full path to Wargus is /Applications/Wargus.app The user home is /Users/dpmayer

timfel commented 7 years ago

Can you try with the nightly app bundle I just pushed?

On Sun, 3 Sep 2017, 18:59 dpmayer notifications@github.com wrote:

The full path to Wargus is /Applications/Wargus.app The user home is /Users/dpmayer

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Wargus/wargus/issues/252#issuecomment-326817078, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC0m5ZXhV-ZLsxV3oxo7EHPv6FYU_xqks5setrZgaJpZM4PECpg .

dpmayer commented 7 years ago

Still doesn't work but the error message is different now. Instead of saying there was an unrecoverable error, now it says "There was an error copying the data, could not discover contributed directory path."

timfel commented 7 years ago

Is there a directory name in the title of that error window?

On Sun, 3 Sep 2017, 20:12 dpmayer notifications@github.com wrote:

Still doesn't work but the error message is different now. Instead of saying there was an unrecoverable error, now it says "There was an error copying the data, could not discover contributed directory path."

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Wargus/wargus/issues/252#issuecomment-326821404, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC0m3RRU37iiJwkB1u1HEI8k3n48cgvks5seuwhgaJpZM4PECpg .

dpmayer commented 7 years ago

No there isn't. The title of the error dialog just says "Error"

timfel commented 7 years ago

Damn, I don't have a sierra mac available, so I'm just guessing blindly :( I will try to find one that I can use (+ time) and look into this. Sorry.

lacombar commented 6 years ago

I've finally been getting some success tonight. I was able to run stratagus with a mix of manually and automatically extracted data, so something related to the invocation of wartool might not be right.

Hopefully, I can get everything sorted out tomorrow.

edit: typo.

you-fail-me commented 6 years ago

@lacombar I'm facing the very same issue. Could you pls share, how did you get it working?

jarroda commented 5 years ago

Did anybody ever figure this issue out?

sjaak8000 commented 5 years ago

Did anybody ever figure this issue out?

Yes, running into the same issue here. So would also be interested to know if this issue can be fixed.

benhbell commented 5 years ago

replicated the issue on mac too

benhbell commented 4 years ago

One way to get this to work is to use the linux or windows version in a virtual machine or wine to extract the data needed in the data.wargus folder. Then move the contents of that extract folder to $HOME/Library/Stratagus/data.Wargus

I was able to get this to work on Mac OSX 10.13

benhbell commented 4 years ago

Damn, I don't have a sierra mac available, so I'm just guessing blindly :( I will try to find one that I can use (+ time) and look into this. Sorry.

Is there any logging or an experimental build I can use on my machine to show you whats going on? Happy to help test it

jarroda commented 3 years ago

One way to get this to work is to use the linux or windows version in a virtual machine or wine to extract the data needed in the data.wargus folder. Then move the contents of that extract folder to $HOME/Library/Stratagus/data.Wargus

I was able to get this to work on Mac OSX 10.13

@benhbell What specific data needs to be copied into the data.Wargus folder? I have done the extraction on a Windows machine and copied the campaigns, graphics, etc folder into the data.Wargus folder, but I continue to get the same error when starting Wargus. (Wargus data was not extracted, is corrupted...)

image

timfel commented 3 years ago

hm. Just guessing wildly here since I don't have a mac .... something to do with permissions? IIRC I heard that macOS started to not allow filesystem access in general to downloaded apps unless some quarantine bits are cleared.

ryaneroth commented 3 years ago

Wargus is actual able to copy the files to that location without issue. Also, to verify disk access wasn’t the case, I gave stratgus, and wargus, full disk access. I should also mention that it appears that it is only audio files that are affected, as if you run with the debug arg, you can see that other resources load.

timfel commented 3 years ago

Ah, interesting, I hadn't noticed. There's actually multiple issues here, too. The game would start just fine without the sound files, but it's also saying this at the very end: Can't open file 'scripts/constructions.lua': Too many open files

ryaneroth commented 3 years ago

I've got it working now, but I'm not sure what fixed it, and my previous post was probably a red herring

timfel commented 3 years ago

@ryaneroth can you post which version of macOS and what steps you took that worked? That might help the next one.

ryaneroth commented 3 years ago

Big Sur. Not sure what fixed it as I had been compiling it locally, and the last thing I changed was installing SDL2 from mac ports instead of brew. But the latest dev build works too, now.

maizy commented 3 years ago

Can't open file 'scripts/constructions.lua': Too many open files error triggered because of low file handlers limit in macOS.

In macOS 10.15.7 defaults are:

ulimit -a
-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8192
-c: core file size (blocks)         0
-v: address space (kbytes)          unlimited
-l: locked-in-memory size (kbytes)  unlimited
-u: processes                       4176
-n: file descriptors                256

I've solved it with extending limit and launching wartool & wargus manually from terminal. But I still have problems with launching game.

ulimit -S -n 1024
cd /Applications/Wargus.app/Contents/MacOS

./wargus --version
# Stratagus v3.0.0-git185f90da58430c51d3fd56bf68ae391614bc2442

./wartool -V
# 3.0.0

./wartool -v '/path/to/Warcraft II BNE' /path/to/wargus-data  # BNE GOG version 
# convertion is seems to complete successfully

./wargus -v 1920x1080 -d /path/to/wargus-data -u /path/to/saves
# ...
# Can't open file: No such file or directory
# Can't load the graphic 'ui/black_title.png
stcollins commented 3 years ago

Following on from those commands, the quickest way to fix the Can't load the graphic 'ui/black_title.png error is:

# Substitute in your paths if they're different.
cp /Applications/Wargus.app/Contents/MacOS/contrib/black_title.png /Users/$USER/Library/Stratagus/data.Wargus/graphics/ui/

After that, the game runs as above.

timfel commented 3 years ago

I had to drop support for macOS, because Apple seems to be actively making it harder and harder for cross-platform software to build, test, and ship without buying any Apple dev tools or licenses :(

dowobeha commented 2 years ago

I'm having similar issues on macOS 11.6

I tried copying the data.Wargus folder from a Windows Wargus install to ~/Library/Stratagus, but I get a different error then.

If you need a macOS tester to help figure out what's going on, I would be interested in helping.

YunaBraska commented 2 years ago

Tel me how I can setup my dev environment and how I can test things. As I know how to code and have a macOs, I probably can help you. What's the issue with MacOs? How can I get logs?

dowobeha commented 2 years ago

Thanks, @YunaBraska! I can't access things right now, but I really appreciate the offer to help. I'll work on getting you logs, etc, and I'll post here again when I do.