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

Wget.lua - Add dlls to compilator #9

Open
tt-thoma opened this issue Jun 29, 2021 · 34 comments
Open

Wget.lua - Add dlls to compilator #9

tt-thoma opened this issue Jun 29, 2021 · 34 comments

Comments

@tt-thoma
Copy link

tt-thoma commented Jun 29, 2021

I'm trying to download a file from github using wget (wget -f https://raw.githubusercontent.com/IgorTimofeev/MineOS/master/Installer/BIOS.lua /tmp/bios.lua) but wget say Connection refused
I tried to allow the emulator on my firewall, but still the same error
What can I do ?

Edit: pastebin works normally

@zenith391
Copy link
Owner

Well to fix this I would need to know what's the precise error in the first place, if you can send that

@tt-thoma
Copy link
Author

GitHub refuse any connection from the function internet.request()

@zenith391
Copy link
Owner

On my computer, wget -f https://raw.githubusercontent.com/IgorTimofeev/MineOS/master/Installer/BIOS.lua /tmp/bios.lua works correctly alongside using internet.request() for GitHub. Can you open https://raw.githubusercontent.com/IgorTimofeev/MineOS/master/Installer/BIOS.lua in your browser or does it only not work using internet.request() in OCEmu ?

@tt-thoma
Copy link
Author

tt-thoma commented Jun 29, 2021

Have you tried to do the command in the emulator ?

@zenith391
Copy link
Owner

Yes, by on my computer I meant in OCEmu using OpenOS.

@tt-thoma
Copy link
Author

Can I have your version of OCEmu ?
Your README.md is saying that you haven't compiled the current version yet

@misiuji
Copy link

misiuji commented Jun 30, 2021

I have the same issue on OCEmu. I think it's a windows issue, because zenith uses linux I think

image

also removing the -f option

image

@tt-thoma
Copy link
Author

It's because @zenith391 have the last version

@tt-thoma
Copy link
Author

After compiling it says "unsupported protocol"

@misiuji
Copy link

misiuji commented Jun 30, 2021

change https:// to http://

@tt-thoma
Copy link
Author

tt-thoma commented Jun 30, 2021

Maybe github refuse connection just because it wants https but there is no https protocol in \src\extras\socket

@misiuji
Copy link

misiuji commented Jun 30, 2021

maybe, here is the wget command in a normal terminal
image

first request gets 301 Moved Permanently pointing to https url
secound request gets 200 ok

@tt-thoma
Copy link
Author

@zenith391 Can you add an https addon ?

@tt-thoma
Copy link
Author

tt-thoma commented Jun 30, 2021

image
Opencomputers ^
OCemu V
image
The real Openos support https protocol.

@misiuji
Copy link

misiuji commented Jun 30, 2021

seems like the install script doesn't install luasec correctly
this would explain why this happens only on windows

@tt-thoma tt-thoma changed the title Wget.lua:72: Connection refused Wget.lua - Add https protocol Jun 30, 2021
@tt-thoma
Copy link
Author

image

@misiuji
Copy link

misiuji commented Jun 30, 2021

well if you look in /src/extras/ssl there is https.lua
that's where it shoud be
image

@tt-thoma
Copy link
Author

image
I moved it and i'll try to recompilate

@misiuji
Copy link

misiuji commented Jun 30, 2021

image
this is how internet.lua gets https, but it doesn't find it

@tt-thoma
Copy link
Author

Here we go again...

@misiuji
Copy link

misiuji commented Jun 30, 2021

I moved it and i'll try to recompilate

recompiling will on do anything since the OCEmu.exe just calls boot.lua

@misiuji
Copy link

misiuji commented Jun 30, 2021

if you launch OCEmu via mingw then it works
image
image

@tt-thoma
Copy link
Author

Ok

@misiuji
Copy link

misiuji commented Jun 30, 2021

I think it's not stripping the ssl core correctly, but I can be entirely wrong

@misiuji
Copy link

misiuji commented Jun 30, 2021

after requiring ssl at boot:

image
at the bottom: "cannot find specified module"

manual boot from console works

@tt-thoma
Copy link
Author

tt-thoma commented Jun 30, 2021

ffi file is missing
What is it ?

@misiuji
Copy link

misiuji commented Jun 30, 2021

it's a lua library https://luajit.org/ext_ffi.html

@tt-thoma
Copy link
Author

Pls have you a tutorial to install I am stuck I have windows 64 bits I try following the readme nothing work I'm tired of solving problems

@misiuji
Copy link

misiuji commented Jun 30, 2021

for windows all you have to do is (once you installed msys2) run the script msys2_setup_ocemu.sh with mingw64.exe and hit enter a coupple of times, it should make a file OCEmu.exe in src dir

@misiuji
Copy link

misiuji commented Jun 30, 2021

there are no libeay32.dll and ssleay32.dll in any of the the bin folders
i think that the issue as per this stackoverflow thread

@tt-thoma tt-thoma changed the title Wget.lua - Add https protocol Wget.lua - Https protocol failure Jul 1, 2021
@tt-thoma
Copy link
Author

tt-thoma commented Jul 1, 2021

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEES

Thank you so munch

@tt-thoma
Copy link
Author

tt-thoma commented Jul 1, 2021

How to do:

  1. Download and install MSYS2
  2. Follow the steps
  3. Go to https://www.dll-files.com/ and search for libeay32.dll and ssleay32.dll
  4. Download both
  5. Extract both
  6. Place both in C:\msys64\usr\bin. Use the custom path if you set one.
  7. Type MinGW in the windows search bar, then launch it
  8. In any folder you want, run: git clone https://github.com/zenith391/OCEmu
  9. Go to the newly created OCEmu folder.
  10. Run ./msys2_setup_ocemu.sh. Sometimes you'll need to press enter

After that (considering that there is no error(s) while compiling), go to src, and you'll find the file OCEmu.exe

@tt-thoma tt-thoma closed this as completed Jul 1, 2021
@misiuji
Copy link

misiuji commented Jul 1, 2021

now how to put this into the setup script @zenith391?
just download it from dll-files as a work around or some other way?

@tt-thoma tt-thoma reopened this Jul 1, 2021
@tt-thoma tt-thoma changed the title Wget.lua - Https protocol failure Wget.lua - Add dlls to compilator Jul 1, 2021
@fixator10
Copy link

So, after some digging in it with process hacker:
image
ssl.dll by itself, most likely (based on its size), does nothing other than just loading and, probably, mapping SSL libs. The libraries itself are looked in PATH, and since MingW sets path to its own bin folder - its works in MingW. Doing set PATH=%PATH%;C:\msys64\mingw64\bin (assuming msys is installed to C:\msys64) before starting OCEmu fixes issue with HTTPS.

So basically, for standalone SSL support in OCEmu you need to: add folder with required libs to PATH or copy SSL libraries to PATH (or in folder with ocemu.exe, which is, basically, first place, where OS looking for files/libraries before looking for them in PATH)

Example of SSL after copying libcrypto-1_1-x64.dll and libssl-1_1-x64.dll to folder with OCEmu.exe:
image

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

4 participants