Wagic on the FunKey S?

Problems compiling the game? Ask Here
Locked
blaise_rascal
Posts: 4
Joined: Mon Sep 06, 2021 12:19 pm

Wagic on the FunKey S?

Post by blaise_rascal »

Greetings all. I've been working on a possible Wagic port for the FunKey S, a physically tiny retro console running a custom buildroot linux on an ARM processor: https://www.funkey-project.com/ Making SDL applications for the FunKey is pretty easy, and is described here: https://wiki.funkey-project.com/wiki/Setting_up_the_SDK (By the way, I don't expect Wagic to be extremely playable on such a tiny screen, but tweaking things such as the font size may help... I'll worry about that later.) I don't want to use any QT functions, since the FunKey does not have much, if any, QT libraries on it. It'll be all SDL.

Anyway; I'm working in Wagic version 0.18.6 for now. According to the Wagic compiling wiki, I need to $make the JGE and then $make projects/mtg.

1. BUILDING JGE - Running "$sudo make linux" in the JGE folder worked pretty well, and I think it's successfully using the FunKey toolchains ($CC and $CXX). I did have to stop treating warnings as errors. Oh, and I didn't bother adding fmod3.75 to the project; hopefully it's not necessary. The one thing that concerns me is that an error eventually arises that looks like the following:

Code: Select all

src/JFileSystem.cpp:240:38: note:   ‘zip_file_system::izfstream’ is not derived from ‘const std::unique_ptr<_Tp, _Dp>’
                    240 |     if (mZipAvailable && mZipFile != NULL)
                        |                                      ^~~~
                    In file included from /usr/include/c++/9/bits/locale_conv.h:41,
                                    from /usr/include/c++/9/locale:43,
                                    from /usr/include/c++/9/iomanip:43,
                                    from src/zipFS/stdafx.h:13,
                                    from src/zipFS/zfsystem.h:47,
                                    from src/../include/JFileSystem.h:4,
                                    from src/JFileSystem.cpp:33:
                    /usr/include/c++/9/bits/unique_ptr.h:743:5: note: candidate: ‘template<class _Tp, class _Dp> bool std::operator!=(std::nullptr_t, const std::unique_ptr<_Tp, _Dp>&)’
                    743 |     operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept
                        |     ^~~~~~~~
                    /usr/include/c++/9/bits/unique_ptr.h:743:5: note:   template argument deduction/substitution failed:
                    In file included from /usr/include/dirent.h:245,
                                    from src/JFileSystem.cpp:35:
                    src/JFileSystem.cpp:240:38: note:   mismatched types ‘const std::unique_ptr<_Tp, _Dp>’ and ‘long int’
                    240 |     if (mZipAvailable && mZipFile != NULL)
                        |                                      ^~~~
                    make: *** [<builtin>: src/JFileSystem.o] Error 1
Hopefully that error doesn't matter...

2. BUILDING PROJECTS/MTG
- Here's the part that confuses me. The compiling wiki says I need to $make linux in projects/mtg, but I don't see a "linux" target in the makefile in that folder. (I should really learn more about makefiles.) In any case, I can create the /deps folder and run $sudo make linux, which happily fills up the deps folder. (It doesn't do any boost stuff, but fancy multithreading isn't a priority for me right now.) But it doesn't create any sort of executable... Searching through these forums, it seems like I will want to run $qmake on a modified version of wagic-SDL.pro. I think I will need to add a FunKey target to that file, similar to how someone else added a maemo5 target in the past. Oh, and eventually I will need to add the SDL commands used to capture FunKey button presses, as well as output to the FunKey screen.

Anyway, I'll keep trucking along. If anyone can see that I'm missing something, please let me know! This all may be too hard for me, haha, but I'll keep trying. Thank you all. :mrgreen:
Vitty85
Posts: 432
Joined: Mon Jul 29, 2019 5:58 pm

Re: Wagic on the FunKey S?

Post by Vitty85 »

Hi,

To compile for Linux (without QT) just enter the mtg dir and type:

make x11 -j4

To compile with QT support there are some other steps to do before:

mkdir qt-gui-build
cd qt-gui-build
qmake ../projects/mtg/wagic-qt.pro CONFIG+=release CONFIG+=graphics
make -j 4

Hope this helps, see you.
blaise_rascal
Posts: 4
Joined: Mon Sep 06, 2021 12:19 pm

Re: Wagic on the FunKey S?

Post by blaise_rascal »

Thanks for the tips. When I run make x11 -j4 in projects/mtg, I get the following error:

Code: Select all

../../Boost/boost/smart_ptr/shared_ptr.hpp:323:34: error: ‘template<class> class std::auto_ptr’ is deprecated [-Werror=deprecated-declarations]
  323 |     shared_ptr & operator=( std::auto_ptr<Y> & r )
Removing -Werror from the makefile in that folder changes the terminal output. But there is still no binary being generated in projects/mtg/bin. (I would show snippets of the terminal output, but it's very long, and I'm not sure what is or isn't important...)

Oh, and I tried running your qmake command, and got this error:

Code: Select all

Project ERROR: Unknown module(s) in QT: phonon declarative
I'll look into that error tomorrow; might be easy to fix.

Searching through these forums, it really seems like a lot of people have enjoyed building for linux targets using qt creator. I'm currently working through a "No suitable kits found" error in qt creator; it seems like wagic wants to use the qt4 dev tools, but those aren't available in modern versions of ubuntu, only qt5. I'm considering modifying the dependencies...

Right now, I'm not trying to build for the FunKey; rather, I'm just to get *any* sort of linux build working. Hopefully one of these different avenues will bear fruit.
Vitty85
Posts: 432
Joined: Mon Jul 29, 2019 5:58 pm

Re: Wagic on the FunKey S?

Post by Vitty85 »

Hi,

Wagic compiles using qt5 as you can easily understand by reading the ".travis.xml" and the "tools/travis-script.sh" files, on ubuntu it compiles following the steps contained in those files.

see you.
blaise_rascal
Posts: 4
Joined: Mon Sep 06, 2021 12:19 pm

Re: Wagic on the FunKey S?

Post by blaise_rascal »

You're right! It compiles and runs on ubuntu just fine. Yay! (Sound doesn't work, but that's probably fixable.)

It helped me to upgrade to WTH 0.23.1. Previously I had tried to get 0.18.6 working, but that version uses a library called Phonon that is super deprecated. It might have other issues as well.

Gonna take a break, then try to see about making it for the funkey...
Vitty85
Posts: 432
Joined: Mon Jul 29, 2019 5:58 pm

Re: Wagic on the FunKey S?

Post by Vitty85 »

Hi,

If you use QT the sound should be available, while with X11 version I guess not, or at least it isn’t working for me.

See you.
blaise_rascal
Posts: 4
Joined: Mon Sep 06, 2021 12:19 pm

Re: Wagic on the FunKey S?

Post by blaise_rascal »

Yeah, I got sound working on the QT version when I installed a missing QT5 media library - easy enough.

Anyway, I've been working on building Wagic for the FunKey, and today I had a breakthrough. What worked for me was to build a makefile using:
qmake ../projects/mtg/wagic-SDL.pro CONFIG+=release CONFIG+=graphics

Then modify that makefile, replacing instances of local libraries with the FunKey libraries. (For some reason, this seemed to work out better than modifying the makefiles in /projects/mtg.)

When I ran make, it actually managed to build all the source files from A - F before getting an error with GameOptions.cpp. Yay! Gonna take a break, then try to tackle that error. I'm excited!
Vitty85
Posts: 432
Joined: Mon Jul 29, 2019 5:58 pm

Re: Wagic on the FunKey S?

Post by Vitty85 »

Great job, i'm curious to see where it will bring.

See you soon!
Sasuke2690
Posts: 3
Joined: Wed Jun 22, 2022 7:46 am

Re: Wagic on the FunKey S?

Post by Sasuke2690 »

Start conquering the spider solitaire 2 suit deck and try to remove all the cards from the deck to win.
Locked