-
Notifications
You must be signed in to change notification settings - Fork 91
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 SDL2 build support #17
Comments
Hi @puzrin I would like to help with this. I cloned the git $ git clone https://github.com/littlevgl/lv_platformio.git Compile Error attached |
You can just comment appropriate string in config. |
Sorry, I don't know how to comment the appropriate string |
Then i think it's better to wait until someone suggests working soluion. As i said in first post, i have no windows and no plans to spend time about it. |
@timmcarson Adding a semicolon before |
@embeddedt Thanks, I tried that and then I got a gcc error |
It seems that you don't have a compiler installed, or the wrong one is being chosen. |
I'm not sure how PlatformIO works, but with other IDEs on Windows, you're typically given an option to download the IDE+compiler or download the compiler separately. Because PlatformIO is an addon to Visual Studio Code, I'm not sure that the same options are available. @puzrin probably knows more about this than I do. |
Thanks everyone for the help. I changed gears and tried for a simple example. I have been able to successfully run the ESP32_TFT_eSPI.ino Arduino example on an ESP32 using platformIO on a windows machine. This is good enough for me. thanks again. |
@embeddedt https://travis-ci.org/github/littlevgl/lv_platformio/builds/672323062 bare metal builds work on all OS-es. Questions about sdl2 win builds are not expected IMO. |
To build emulator in Windows: install MSYS2 : https://www.msys2.org/ install VS Code : https://code.visualstudio.com/ |
@nickrodie That's great! Can we add this description to the README? |
Sure. |
@kisvegabor Should probably point out that those versions are quite specific. Namely mingw for 64bit Windows and SDL2. You might want to add that you can search for different vesrions in MSYS2 eg Also thanks for LVGL |
I think having at least one working version for Windows is already great. |
IMO this can be done more convenient:
In this case it will "just work". If anyone provides this kind of working example, i will help to do this compatible with anoter OS-es. |
Why comment out needed? This line should add |
It fails for me. |
Thanks for info. Try to swap |
IIRC I did actually manage to build SDL2 from https://www.libsdl.org/release/SDL2-devel-2.0.12-mingw.tar.gz but no matter what I tried I couldn't get lvgl to find all the files. I was following these instructions https://w3.cs.jmu.edu/bernstdh/Web/common/help/cpp_mingw-sdl-setup.php |
Yep that fixed it native SUCCESS 00:00:04.455 |
Great! Let's fight with SDL2 to make it work in 1 click :). Try this in your fork:
Tips:
I'm not familiar with win toolchains. Could you explain why you install mingw version of gcc? AFAIK pio should provide something built-in for native platform. No? If user still must to use MSYS2/pacman for gcc install, then no need to do something special for sdl2. |
I don't think it will be as simple as 1 click for most. Processing native (platform: native) |
...
Also forgot to add in my original instructions that I had to add the What I can tell you is that as far as a Windows user experience goes the MSYS2 method is very simple. Just a few simple clicks and it's all done for you. |
Hm... if user has to install gcc, then your choice of MSYS2 is reasonable, and it's not a problem to install stl2 from the same source. Then we can use your recipe as is. Not 1-click, but useable and simple enouth. I don't know why but Travis docs suggest PS. I don't understand anything in this for win, only copy-pasted recipe. |
I think python is autpmatically installed as part of the platformio extension in vs code |
Also as far as installing gcc goes the msys method is also the easiest I tried. I did originally use mingw from http://www.mingw.org/wiki/Getting_Started but it took me a couple of goes to get all the right packages so that i could build SDL |
@kisvegabor @puzrin FYI I had a typo in original post and wrong SDL2 installation. I have amended the instructions. |
This is not convenient (need to think instead of copy-paste commands). Is there any way to autodetect location or add it to path automatically? Did you tried |
I don't think you'll have any luck making it any easier than what I've already indicated. Even MS talk about manually editing the path https://code.visualstudio.com/docs/cpp/config-mingw |
To make it easier I think you'd have to find an installer that has an "Add to PATH" option built in. |
Sorry, i misread your post. I thought it's about path to sdl2. Then link to https://code.visualstudio.com/docs/cpp/config-mingw#_prerequisites should be ok. PS. Last time i used windows, when path was added via editing |
I mean you can add it with |
This will be useful for Travis-CI anyway, i need add build test. |
@nickrodie Do you wish make readme PR to reflect your help in commits history? |
No. But thanks for the offer. |
Please, check. Any fixes needed? |
Close as complete. Big thanks to @nickrodie for help! |
Demo now supports sdl2 in Linux & Macos. Windows user can build bare metal env, but can't built emulator env. Unfortunately, i don't use Windows and have no time to add this feature. But i can help with PIO scripting and CI tests if anyone wish to care about Win.
Suggested plan is:
platform.ini
(don't worry about other OS-es at this step)I also prepared template for CI testing.
The text was updated successfully, but these errors were encountered: