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

Fix compilation on both Windows and Linux #12

Open
Tru-Dev opened this issue Aug 12, 2022 · 2 comments
Open

Fix compilation on both Windows and Linux #12

Tru-Dev opened this issue Aug 12, 2022 · 2 comments

Comments

@Tru-Dev
Copy link

Tru-Dev commented Aug 12, 2022

I have managed to compile the latest commit (at time of writing: 122fe39) under both Windows and Linux, but not without modification.

The issues I found and had to fix are as follows:

Windows/MSVC

Linux/GCC

I did not test Mac compilation because I do not have a Mac, but if Mac compilation didn't work before it should work now...

@Karl5766
Copy link

Karl5766 commented Aug 13, 2022

I was able to reproduce the bug described on Windows, and confirm that the fix does work. For convenience I will put the steps I used to build below (with windows powershell):

git clone --recursive https://github.com/Xrysnow/LuaSTG-x.git
cd LuaSTG-x/frameworks/cocos2d-x/external
git clone --recursive https://github.com/Xrysnow/cocos2d-x-3rd-party-libs-bin.git
move .\cocos2d-x-3rd-party-libs-bin\* .
rm -r -Force cocos2d-x-3rd-party-libs-bin

cd ../../..
mkdir win32-build
cd win32-build

# now in the main LuaSTG-x directory go into CMakeLists.txt and set No_LIVE2D flag to ON
cmake .. -G "Visual Studio 16 2019" -A Win32

Now replace all min/max in the entire solution as specified by @Tru-Dev 's steps, manually take care of a few (3) lines that the parenthesis are not added correctly.

Afterwards I run

cmake --build . --config Release

dll and exe files are successfully built. (and after replacing and modifying some files in a previous release the game is runnable)

@ShizuhaAki
Copy link

I've got a fish script at Ravenclaw-OIer/getLuaSTG, which auto fixes at least some of the problems (as I built it in April). Also refer to #11 for some of my notes on GNU/Linux compilation.

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