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

Set up windows build #56

Open
v1993 opened this issue Mar 25, 2021 · 4 comments
Open

Set up windows build #56

v1993 opened this issue Mar 25, 2021 · 4 comments
Labels
Priority: P1 HIghest priority T: Enhancement New feature or request

Comments

@v1993
Copy link
Member

v1993 commented Mar 25, 2021

Is your feature request related to a problem? Please describe.
Major amount of Cubosphere enthusiasts use Windows as their platform. Since there is no way we can force them to move to Linux, Windows build becomes a must.

Describe the solution you'd like
I'm mostly considering using cross-compilation since that seems much easier than making build task run on Windows.

Describe alternatives you've considered
Moving all people to Linux? But it is not remotely plausible.

Additional context
There was some work on Windows build, but I really dislike it since it was pretty much cargo-culted from another unrelated project. It also suggests to use their dependencies archive, which is a terrible idea in many ways.

@v1993 v1993 added T: Enhancement New feature or request Priority: P1 HIghest priority labels Mar 25, 2021
@qwertychouskie
Copy link
Member

Just a quick point of clarification, although the archive has the same structure is STK's deps archive, the contents are different (I built it from the ground up with the libs that Cubosphere links to). Using the deps folders at #32 (comment), it should definitely compile with the following commands:

mkdir build && cd build

cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw.cmake [For a 32-bit build, or:]
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw-64bit.cmake [For a 64 bit build]

make -j8

But the build will crash at startup (tested with both Wine and real Windows). I was never able to get past the crash, so I can't say for sure what causes it, but passing pointers directly to the Lua scripts, and therefore truncating them, probably isn't helping.

@SusDTSteve
Copy link

SusDTSteve commented Mar 27, 2021

blablabla, but maybe re-write all of the Lua scripts and see what happens there.

@v1993
Copy link
Member Author

v1993 commented Mar 27, 2021

@SusDTSteve That would take a LOT of work to say the least. Likely more than it takes to rewrite cubosphere entirely because of horrible legacy code and you'll end up with worse results this way for same reason.

@qwertychouskie Lua have lightuserdata type exactly for storing pointers in Lua. If you're going to look into this, finding and using lightuserdata in all places where pointers are passes to/from Lua have a decent chance of fixing things.

@SusDTSteve
Copy link

I just imagined how many months that would take. Anyways, if any of you still have a windows build, try to create a log that tells you exactly what happens where.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P1 HIghest priority T: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants