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

The starcraft script isn't working as intended. #168

Closed
audunmg opened this issue May 24, 2024 · 6 comments
Closed

The starcraft script isn't working as intended. #168

audunmg opened this issue May 24, 2024 · 6 comments
Labels
bug Something isn't working cd_version starcraft

Comments

@audunmg
Copy link

audunmg commented May 24, 2024

This line moved everything in my $HOME/tmp folder to the root of the wineprefix:

The preceding find command copied install.exe to the root of the wineprefix instead of the game directory.

@legluondunet
Copy link
Owner

Hello, thank you for your report.
I can not reproduce your issue on my computer, I need Lutris log file to debug your issue.
Please follow steps from this page:
https://github.com/legluondunet/MyLittleLutrisScripts/blob/master/.github/ISSUE_TEMPLATE/report-issue.md

@legluondunet
Copy link
Owner

legluondunet commented May 24, 2024

I just optimized code in clean.sh script and fixed a bug than can cause your issues, tell me if you can still reproduce them.

@legluondunet legluondunet added bug Something isn't working starcraft cd_version labels May 24, 2024
@audunmg
Copy link
Author

audunmg commented May 24, 2024

That was impressively fast, thank you!

The issue was probably caused by me installing to a different directory than the default, I didn't think that would matter.

Can I suggest changes to the script to support that (installing to any directory)?

To detect the game directory, you can find the StarCraft.exe and strip that out of the string:

gamedir="$PWD/`dirname $(find -name StarCraft.exe)`"
# Sets the variable gamedir to something like /home/audunmg/Games/starcraft/./drive_c/anything/Starcraft

Then to create the symbolic links you can strip off the drive_c/ prefix:

cd Program Files
ln -s "../${gamedir##*drive_c/}" "Starcraft"

This should make it easier to unpack the cnc-ddraw, since unzip -d "$gamedir" cnc-ddraw.zip, and copying the starcraft.mpq, since you can specify absolute paths.

I'd be happy to make a pull request if that's ok?

Please let me know if I'm being too much. It's weekend after all.

Debug output showing script not finding where i installed the game:


7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,64 bits,20 CPUs x64)

Scanning the drive for archives:
1 file, 2607157 bytes (2547 KiB)

Extracting archive: /home/audunmg/.cache/lutris/installer/starcraft/wrapper/cnc-ddraw.zip
--
Path = /home/audunmg/.cache/lutris/installer/starcraft/wrapper/cnc-ddraw.zip
Type = zip
Physical Size = 2607157

Everything is Ok

Folders: 7
Files: 18
Size:       5407019
Compressed: 2607157
lutris-wrapper: /home/audunmg/.cache/lutris/installer/starcraft/script/clean.sh
Started initial process 1942559 from /home/audunmg/.cache/lutris/installer/starcraft/script/clean.sh /mnt/img
Start monitoring process.
can not find Starcraft install
Monitored process exited.
Initial process has exited (return code: 0)
All processes have quit
Exit with return code 0

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,64 bits,20 CPUs x64)

Scanning the drive for archives:
1 file, 10592318 bytes (11 MiB)

Extracting archive: /home/audunmg/.cache/lutris/installer/starcraft/patch/SC-1161.7z
--
Path = /home/audunmg/.cache/lutris/installer/starcraft/patch/SC-1161.7z
Type = 7z
Physical Size = 10592318
Headers Size = 146
Method = LZMA2:12m BCJ
Solid = -
Blocks = 1

Everything is Ok

Size:       10696135
Compressed: 10592318
lutris-wrapper: /home/audunmg/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wine
Started initial process 1942571 from /home/audunmg/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wine /home/audunmg/.cache/lutris/installer/starcraft/SC-1161.exe
Start monitoring process.
fsync: up and running.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
Initial process has exited (return code: 0)
wine: Read access denied for device L"\\??\\F:\\", FS volume label and serial are not available.
Monitored process exited.
Exit with return code 0

@legluondunet
Copy link
Owner

legluondunet commented May 24, 2024

The issue was probably caused by me installing to a different directory than the default, I didn't think that would matter.

you broke an important Lutris script rule: always let the default options unchanged during install ;)
I thought your issues could be caused because you modified default game install directory, that's why I optimized and secured my code in clean.sh script:

  • script exit if it doesn't find starcraft install directory and let a message error in Lutris log
    But I fixed two other things too.

When we write Lutris script installer, we should prioritizing Lutris code usage and minimize bash code usage.
That why I will not complexify more my script code.
But you are welcome to help us to write Lutris game scripts.

If game installs correctly for you now, can we close this issue?

@audunmg
Copy link
Author

audunmg commented May 26, 2024

I tested and it works, feel free to close this.

Just a little question, about the comment the Program Files (x86) directory, in all of my testing, the game installers chooses the default one from the wine (or windows) registry, and I haven't seen one which picks a different one, so it seems really strange to me.

Is there a starcraft cd version which doesn't pick this one, and this is to work around that?

@legluondunet
Copy link
Owner

legluondunet commented May 26, 2024

Is there a starcraft cd version which doesn't pick this one, and this is to work around that?

yes, one Starcraft cd version installs his files to "program files" instead of "program files (x86)", so my script creates a symbolik link between this two folders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cd_version starcraft
Projects
None yet
Development

No branches or pull requests

2 participants