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

🐧 [Bleeding] Shell scripts are opened in a text editor, but in v23.6.0 they execute #1608

Closed
aaronfranke opened this issue Jan 10, 2018 · 6 comments

Comments

@aaronfranke
Copy link

aaronfranke commented Jan 10, 2018

Section of manifest file:

[[actions]]
name = "Red Alert - Linux"
path = "./openra-ra.sh"

It does not make a difference whether or not I include ./ or change the file name to have a .sh or not (the scripts OpenRA comes with have no file extension, I just tried adding it on to test if Itch was searching for .sh). The file is executable, and is of type "shell script".

On stable Itch v23.6.0, the script executes properly.

On the bleeding version cloned from cave-commands, it just opens it in my text editor, Mousepad.

This may be a side-effect of moving to butler. #1530

@fasterthanlime
Copy link
Collaborator

On the bleeding version cloned from cave-commands

I'm not sure why I'm only replying to this now, but since then, cave-commands has been merged into master - just thought I'd let you know for future testing!

prereqs & launch haven't been ported to butler yet, I'll keep an eye out for this issue when doing that.

@fasterthanlime
Copy link
Collaborator

Seems to work fine in master (just merged a biiiiiiig branch - make sure you have butler HEAD in the bin/ directory).

@fasterthanlime
Copy link
Collaborator

@aaronfranke I'm looking at Zero-K right now, and their Zero-K.sh is not launching because it doesn't have a shebang, ie. the file is currently:

sudo apt-get update
sudo apt-get install mono-complete libsdl2-2.0-0 libopenal1 libcurl3

mono Zero-K.exe

And it should be:

#!/bin/bash
sudo apt-get update
sudo apt-get install mono-complete libsdl2-2.0-0 libopenal1 libcurl3

mono Zero-K.exe

I think it definitely should have one, but I'm wondering how common it is for developers to miss a she-bang.

Anyway, this file is not going to run with either versions of the app, because sudo requires a password and there is no shell window popping up, which brings us right back to the mono prereq :)

@fasterthanlime
Copy link
Collaborator

Also, Zero-K.sh has windows line endings (CRLF) :(

@aaronfranke
Copy link
Author

aaronfranke commented Apr 26, 2018

I believe the plan for the future, once Itch can handle dependencies, is to have the app manifest just do the last line. In which case, the problems with the .sh are temporary-ish.

This does make me realize that SDL2 libs might also be a nice prereq to look into. I'm not sure how many games need system-side libsdl2 as AFAIK SDL2 creates a self-contained executable. But if Zero-K recommends installing it, there may be a reason or advantage to it.

@fasterthanlime
Copy link
Collaborator

@aaronfranke see #1606 (comment) - if we do go ahead with the linux runtime thing, SDL2 will definitely be part of it (most games link to it dynamically afaict!)

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

2 participants