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

--script/-s argument is ignored on Ubuntu #30680

Closed
quentincaffeino opened this issue Jul 18, 2019 · 10 comments
Closed

--script/-s argument is ignored on Ubuntu #30680

quentincaffeino opened this issue Jul 18, 2019 · 10 comments

Comments

@quentincaffeino
Copy link
Contributor

Godot version:
v3.2.dev.custom_build.755b58938

OS/device including version:
4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Issue description:
I think some time ago it was even written in docs that -s argument is supported only by windows based os. Now this line is gone, but I'm still not able to run godot in script mode.

Steps to reproduce:
Run godot --path $PWD -s somescript.gd on script that extends MainLoop.

@quentincaffeino quentincaffeino changed the title [Possibly bug/Feature request] --scirpt/-s argument is ignored on ubuntu --scirpt/-s argument is ignored on ubuntu Jul 20, 2019
@NilsIrl
Copy link
Contributor

NilsIrl commented Jul 20, 2019

@quentincaffeino where in the documentation?

@bojidar-bg
Copy link
Contributor

bojidar-bg commented Jul 21, 2019

Cannot confirm on Arch Linux, Godot v3.2.dev.custom_build. 22c843b.

Tried:

godot -s project/script.gd
godot -s script.gd --path project
godot -s project/script.gd --path $PWD
godot --path project -s script.gd
godot --path $PWD -s project/script.gd
cd project/
godot -s script.gd
godot --path $PWD -s script.gd

My script extends SceneTree, but that shouldn't matter, right?

@quentincaffeino
Copy link
Contributor Author

@Calinou
Copy link
Member

Calinou commented Aug 27, 2019

@quentincaffeino Can you reproduce this issue with a blank project that contains just the script you're trying to run?

Maybe this is caused by some project settings in the project you tried to run the script in. If you can confirm this, it'd be nice to upload a ZIP archive of this project (or link to a repository) 🙂

@Calinou Calinou changed the title --scirpt/-s argument is ignored on ubuntu --script/-s argument is ignored on Ubuntu Aug 27, 2019
@KoBeWi
Copy link
Member

KoBeWi commented Sep 27, 2020

The last comment didn't get a reply, so closing for inactivity. Comment if you can still reproduce in 3.2.3.

@quentincaffeino
Copy link
Contributor Author

Sorry, I forgot about this issue. Yes issue is still occurring on v3.2.3.stable.official.

  1. I've created new blank project.
  2. Added main scene with a Label
  3. Added script which extends SceneTree
  4. Ran godot -s test.gd --path $(pwd) -v

Output:

Godot Engine v3.2.3.stable.official - https://godotengine.org
XInput: Refreshing devices.
XInput: No touch devices found.
WARNING: initialize: XOpenIM failed
   At: platform/x11/os_x11.cpp:195.
Detecting GPUs, set DRI_PRIME in the environment to override GPU detection logic.
Only one GPU found, using default.
WARNING: initialize: XCreateIC couldn't create xic
   At: platform/x11/os_x11.cpp:497.
Failed loading custom cursor: size_bdiag
Failed loading custom cursor: size_fdiag
Using GLES3 video driver
OpenGL ES 3.0 Renderer: GeForce GTX 1070/PCIe/SSE2
PulseAudio: detected 2 channels
PulseAudio: audio buffer frames: 512 calculated latency: 11ms
 
CORE API HASH: 17947557007960061372
EDITOR API HASH: 513236543915789544
Loading resource: res://test.gd
Loading resource: res://default_env.tres
Loaded builtin certs

What I see:
image

Minimal repro project:
run-as-script-repro.tar.gz
run-as-script-repro.zip

@quentincaffeino
Copy link
Contributor Author

Actually I didn’t accurately describe the problem in the first post. Script runs fine (the reproduction project has an error where I've put print into _ready not _init) and prints message. What I thought the issue was that I see this blank gray window, should it open?

@KoBeWi
Copy link
Member

KoBeWi commented Sep 28, 2020

Yeah, the window should open. If you want to run the script without window, you need to use a headless build. It that's the only problem then it's not a bug.

@quentincaffeino
Copy link
Contributor Author

Then we can consider this resolved)
Thanks all for help.

@Calinou
Copy link
Member

Calinou commented Sep 28, 2020

If you want to run the script without window, you need to use a headless build. It that's the only problem then it's not a bug.

See also #42276.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants