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

Add windows/powershell install instructions #86

Open
ShortRoundDev opened this issue Jul 4, 2020 · 3 comments
Open

Add windows/powershell install instructions #86

ShortRoundDev opened this issue Jul 4, 2020 · 3 comments

Comments

@ShortRoundDev
Copy link

ShortRoundDev commented Jul 4, 2020

Running luarocks install lua-sdl2 on windows with powershell runs into several problems:

  1. trying to pass the directories manually for SDL2_image (as well as other SDL2 addon libraries) yields an error because luarocks appears to not allow lowercase letters when passing in variables. Doing so yield Invalid assignment as an error.

  2. Placing the lua development headers and binaries in c:\external then runs into the problem of requiring cl.exe to be present in the path of the user - which it is not by default

  3. Adding the directory for cl.exe to the path of the user then results in the inability to find c runtime headers such as stdio.h since cl.exe requires all include directories to be manually specified and has no default directory. Since the rock doesn't specify any include path or environment variable to set for the c runtime, they cannot be found

Currently, as far as I can tell, building through luarocks on windows/Visual C++ is broken. It would be nice to have:

  1. instructions for building on windows specifically
  2. allow a directory to be specified in the luarocks install command for wincrt headers so cl.exe can build correctly
  3. fix the variable names in the rock to remove lowercase letters from the SDL2 directories
  4. provide binary distributions directly for the most common OS/architectures to avoid having to build the binaries yourself, which would make program distribution easier (don't have to distribute your own binaries, and don't have to instruct users to install luarocks and overcome all these obstacles themselves)
@ByPikod
Copy link

ByPikod commented Nov 21, 2022

I am trying to set luasdl2 up in windows and I had tons of different errors in few hours. I don't even remember the first error I got. I am trying to install this thing for almost 4 hour. My brain about to explode. Please add better instructions.

PeriodicFemaleAmoeba-size_restricted

@clitic
Copy link

clitic commented Nov 26, 2022

@ByPikod I had also a great trouble when I was building lua-sdl2 on windows using msvc. After failing to build lua-sdl2 I decided to switch to meson build and created lua-batteries. It includes latest version of lua-sdl2. Also sdl2 and it's dependent libraries are all statically linked to lua-sdl2 module. For now msvc builds works fine but I am working to support mingw.

lua-sdl2.mp4

@ByPikod
Copy link

ByPikod commented Nov 26, 2022

@clitic thank you so much. You are a life saver. I am going to try your solution. I'll let u know if it works.
youre-a-wonderful-human-youre-a-great-person

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

3 participants