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

[Windows] Add function execute_shell_for_output() #1675

Merged
merged 6 commits into from Jun 22, 2019
Merged

[Windows] Add function execute_shell_for_output() #1675

merged 6 commits into from Jun 22, 2019

Conversation

time-killer-games
Copy link
Contributor

No description provided.

@time-killer-games
Copy link
Contributor Author

@RobertBColton ready for review.

@RobertBColton
Copy link
Contributor

Please ping @JoshDreamland since he was the last one discussing this with you. I am working on other things at the moment. Do this as a general rule of thumb.

@time-killer-games
Copy link
Contributor Author

time-killer-games commented Apr 13, 2019

@RobertBColton josh told me to ping you for windows related stuff. The code doesn't work anyway i just tested it so im going to spend more time on it tmr and then ill ask josh

@codecov
Copy link

codecov bot commented Apr 13, 2019

Codecov Report

Merging #1675 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1675   +/-   ##
=======================================
  Coverage   18.82%   18.82%           
=======================================
  Files         169      169           
  Lines       16782    16782           
=======================================
  Hits         3159     3159           
  Misses      13623    13623

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb9d867...81c309c. Read the comment docs.

@RobertBColton
Copy link
Contributor

RobertBColton commented Apr 13, 2019

Ok, sounds good. Also, you don't have to actually tag people by name for every comment. It's only really useful if multiple people are talking or the person has not been subscribed to the issue. The first time you mention them or they reply to the issue/pull they are subscribed and will receive notifications for every reply.

@time-killer-games
Copy link
Contributor Author

time-killer-games commented Apr 14, 2019

@JoshDreamland I'm busy with freelance work right now but I'd love to get some assistance on this if I can't figure it out on my own, I've tried show_message(execute_shell_for_output("echo 1")) and it always shows some random foreign characters, I think because I am doing the wide char version of popen but not the other functions such as fread but I can't seem to find the wide char versions of the other functions, is the biggest issue. I really need this to be cross-platform for something I'm working on. I need UTF-8 support.

@JoshDreamland
Copy link
Member

From the Microsoft docs:

_wpopen is a wide-character version of _popen; the path argument to _wpopen is a wide-character string. _wpopen and _popen behave identically otherwise.

@time-killer-games
Copy link
Contributor Author

Then that's really odd, I wonder why it isn't working then.

@RobertBColton RobertBColton added the Platforms Win32, Xlib, Cocoa, SDL and other target platforms. label Apr 15, 2019
@time-killer-games
Copy link
Contributor Author

time-killer-games commented Apr 17, 2019

@JoshDreamland to clarify what isn't working, the command argument works and it executes stuff, but the output doesn't and it returns random crap characters. While stuff is executing and you try to click on or interact with the game window too much, the game will segfault.

Copy link
Member

@JoshDreamland JoshDreamland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft seems to be bad at naming things... anyway, thank you, Sam; this looks great!

@JoshDreamland JoshDreamland merged commit adc12c9 into enigma-dev:master Jun 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platforms Win32, Xlib, Cocoa, SDL and other target platforms.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants