mmatyas / openblok

A customizable, cross platform, open-source falling block game, packed with a bunch of features.
GNU General Public License v3.0
99 stars 15 forks source link

Windows Compilation Guide #40

Closed SkoricIT closed 3 years ago

SkoricIT commented 3 years ago

Is there any info on how to compile this on Windows or on Linux for Windows target?

mmatyas commented 3 years ago

There's no step by step guide, but if you're in general familiar with building C++/CMake projects on Windows, OpenBlok works similarly. You can also take a look at the .appveyor.yml file, which contains all the necessary calls in order to build the game.

SkoricIT commented 3 years ago

The appveyor build produces only an .exe file (at least online)? How do I build all files and also include the localisation?

mmatyas commented 3 years ago

Ah yes, the automatic release died with Travis too... will need to fix that later. Here's the latest Windows build:

openblok.zip

This was built with Gettext support, and the locale directory is data/locale/. I assume one could just drop MO files there (eg. data\locale\de\LC_MESSAGES\main.mo), but not sure how to test this on Windows.

In case you wish to build it manually, you'll need Gettext (and Iconv, on which it depends), you'll need to tell CMake where it is installed, and then the build does the rest. There's probably a prebuilt Gettext for Windows, if you don't want to build it manually, but I haven't looked too hard myself. (Which is why it's not used on AppVeyor: that's there only to test MSVC builds, but the actual release is cross compiled from Linux.)

SkoricIT commented 3 years ago

Thanks for the build. The locale does not get loaded, unfortunately. I additionally tried putting the .pot file in the locale directory but that changed nothing.

Run from Windows Terminal with locale query: image

Directory listing: image

mmatyas commented 3 years ago

There were indeed some leftover CMake issues, but it should now work fine. Tested it on Windows too, with changing the locale vars, hopefully works with the system language too.

openblok.zip

mmatyas commented 3 years ago

Fixed some accented character issues, added a Windows target to the GitHub Actions build, tested and working on Windows:

image

SkoricIT commented 3 years ago

That look great, will test as soon as possible. Thank you for your effort, it is greatly appreciated!

SkoricIT commented 3 years ago

Can confirm that it works on my machine with the GitHub actions artefact!

mmatyas commented 3 years ago

Great! I guess this can be closed then.