iOS Port

i am building from idimter’s iOS branch posted in the last page and going from there,also as for the compiler output

In file included from /Users/Dave/Documents/vcmi-ios/client/CPreGame.cpp:1:
In file included from /Users/Dave/Documents/vcmi-ios/client/StdInc.h:3:
In file included from /Users/Dave/Documents/vcmi-ios/client/../Global.h:113:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/thread.hpp:13:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/thread/thread.hpp:22:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/thread/detail/thread.hpp:29:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind.hpp:22:
/Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind/bind.hpp:313:8: error: no matching function for call to object of type 'boost::_mfi::mf1<void, CBonusSelection, int>'
       unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/Dave/Documents/vcmi-ios/client/CPreGame.cpp:1:
In file included from /Users/Dave/Documents/vcmi-ios/client/StdInc.h:3:
In file included from /Users/Dave/Documents/vcmi-ios/client/../Global.h:113:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/thread.hpp:13:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/thread/thread.hpp:22:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/thread/detail/thread.hpp:29:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind.hpp:22:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind/bind.hpp:873:
/Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind/bind_template.hpp:47:27: note: in instantiation of function template specialization 'boost::_bi::list2<boost::_bi::value<CBonusSelection *>, boost::_bi::value<std::__1::placeholders::__ph<1> > >::operator()<boost::_mfi::mf1<void, CBonusSelection, int>, boost::_bi::list1<const int &> >' requested here
        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
                          ^
In file included from /Users/Dave/Documents/vcmi-ios/client/CPreGame.cpp:1:
In file included from /Users/Dave/Documents/vcmi-ios/client/StdInc.h:3:
In file included from /Users/Dave/Documents/vcmi-ios/client/../Global.h:61:
In file included from /Users/Dave/Documents/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/algorithm:627:
In file included from /Users/Dave/Documents/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:601:
/Users/Dave/Documents/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:413:12: note: in instantiation of function template specialization 'boost::_bi::bind_t<void, boost::_mfi::mf1<void, CBonusSelection, int>, boost::_bi::list2<boost::_bi::value<CBonusSelection *>, boost::_bi::value<std::__1::placeholders::__ph<1> > > >::operator()<int>' requested here
    return _VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...);
           ^
In file included from /Users/Dave/Documents/vcmi-ios/client/CPreGame.cpp:1:
In file included from /Users/Dave/Documents/vcmi-ios/client/StdInc.h:3:
In file included from /Users/Dave/Documents/vcmi-ios/client/../Global.h:58:
In file included from /Users/Dave/Documents/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cstdio:99:
/Users/Dave/Documents/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:345:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
In file included from /Users/Dave/Documents/vcmi-ios/client/CPreGame.cpp:1:
In file included from /Users/Dave/Documents/vcmi-ios/client/StdInc.h:3:
In file included from /Users/Dave/Documents/vcmi-ios/client/../Global.h:67:
/Users/Dave/Documents/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/functional:1370:12: note: in instantiation of function template specialization 'std::__1::__invoke<boost::_bi::bind_t<void, boost::_mfi::mf1<void, CBonusSelection, int>, boost::_bi::list2<boost::_bi::value<CBonusSelection *>, boost::_bi::value<std::__1::placeholders::__ph<1> > > > &, int>' requested here
    return __invoke(__f_.first(), _VSTD::forward<_ArgTypes>(__arg)...);
           ^
/Users/Dave/Documents/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/functional:1596:26: note: in instantiation of member function 'std::__1::__function::__func<boost::_bi::bind_t<void, boost::_mfi::mf1<void, CBonusSelection, int>, boost::_bi::list2<boost::_bi::value<CBonusSelection *>, boost::_bi::value<std::__1::placeholders::__ph<1> > > >, std::__1::allocator<boost::_bi::bind_t<void, boost::_mfi::mf1<void, CBonusSelection, int>, boost::_bi::list2<boost::_bi::value<CBonusSelection *>, boost::_bi::value<std::__1::placeholders::__ph<1> > > > >, void (int)>::operator()' requested here
            ::new (__f_) _FF(_VSTD::move(__f));
                         ^
In file included from /Users/Dave/Documents/vcmi-ios/client/CPreGame.cpp:2:
In file included from /Users/Dave/Documents/vcmi-ios/client/CPreGame.h:6:
In file included from /Users/Dave/Documents/vcmi-ios/client/GUIClasses.h:4:
/Users/Dave/Documents/vcmi-ios/client/../lib/FunctionList.h:26:25: note: in instantiation of function template specialization 'std::__1::function<void (int)>::function<boost::_bi::bind_t<void, boost::_mfi::mf1<void, CBonusSelection, int>, boost::_bi::list2<boost::_bi::value<CBonusSelection *>, boost::_bi::value<std::__1::placeholders::__ph<1> > > > >' requested here
        funcs.push_back(std::function<Signature>(f));
                        ^
/Users/Dave/Documents/vcmi-ios/client/CPreGame.cpp:3193:43: note: in instantiation of function template specialization 'CFunctionList<void (int)>::CFunctionList<boost::_bi::bind_t<void, boost::_mfi::mf1<void, CBonusSelection, int>, boost::_bi::list2<boost::_bi::value<CBonusSelection *>, boost::_bi::value<std::__1::placeholders::__ph<1> > > > >' requested here
        bonuses = new CHighlightableButtonsGroup(boost::bind(&CBonusSelection::selectBonus, this, _1));
                                                 ^
In file included from /Users/Dave/Documents/vcmi-ios/client/CPreGame.cpp:1:
In file included from /Users/Dave/Documents/vcmi-ios/client/StdInc.h:3:
In file included from /Users/Dave/Documents/vcmi-ios/client/../Global.h:94:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/algorithm/string.hpp:23:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/algorithm/string/split.hpp:16:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/algorithm/string/iter_find.hpp:27:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/algorithm/string/find_iterator.hpp:24:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/algorithm/string/detail/find_iterator.hpp:18:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/function.hpp:24:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/function/detail/prologue.hpp:18:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/mem_fn.hpp:22:
In file included from /Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind/mem_fn.hpp:215:
/Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind/mem_fn_template.hpp:163:7: note: candidate function not viable: no known conversion from 'std::__1::placeholders::__ph<1>' to 'int' for 2nd argument
    R operator()(T * p, A1 a1) const
      ^
/Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind/mem_fn_template.hpp:168:25: note: candidate function [with U = CBonusSelection *] not viable: no known conversion from 'std::__1::placeholders::__ph<1>' to 'int' for 2nd argument
    template<class U> R operator()(U & u, A1 a1) const
                        ^
/Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind/mem_fn_template.hpp:176:25: note: candidate function [with U = CBonusSelection *] not viable: no known conversion from 'std::__1::placeholders::__ph<1>' to 'int' for 2nd argument
    template<class U> R operator()(U const & u, A1 a1) const
                        ^
/Users/Dave/Documents/vcmi-ios/ios/deps/boost.framework/Headers/bind/mem_fn_template.hpp:184:7: note: candidate function not viable: no known conversion from 'CBonusSelection *' to 'CBonusSelection &' for 1st argument; dereference the argument with *
    R operator()(T & t, A1 a1) const
      ^
18 warnings and 1 error generated.

gah incredibly sorry about this i thought scroll would have a scrollbar cause of the big amount of text

And here is your offender:

/Users/Dave/Documents/vcmi-ios/client/CPreGame.cpp:3193:43: note: in instantiation of function template specialization 'CFunctionList<void (int)>::CFunctionList<boost::_bi::bind_t<void, boost::_mfi::mf1<void, CBonusSelection, int>, boost::_bi::list2<boost::_bi::value<CBonusSelection *>, boost::_bi::value<std::__1::placeholders::__ph<1> > > > >' requested here 
         bonuses = new CHighlightableButtonsGroup(boost::bind(&CBonusSelection::selectBonus, this, _1));

Replacing boost::bind with std::bind should help but again - this was already fixed in git. I suggest rebasing* his branch on our current code to get all necessary fixes.

  • actually, in terms of git rebasing likely won’t work - you’ll have to merge changes from our main repo onto yours

thank’s for the help,just 1 last error that i posted above remains,for the full log i went ahead and posted it on paste bin to avoid cluttering the thread anymore,once it builds and i can test it working on x64 and regular iOS devices i’ll try to merge the ios-specific fixes to the main repo
ur1.ca/ireuc

nothing to show of nearly 2 weeks of trying to fix it.

Hello, guys.
I’m sorry for my very late response. But I’ve started working on a huge game and almost have no time for anything else right now. I have not merged the main branch for very long time now and I think some parts of my fork need fixing. If someone in the meantime manage to get it running I’ll be happy to accept a PR on github.

Currently the game only works on a jailbroken devices and data needs to be in the main Documents directory in order to run it. I’ll think of a way to distribute the compiled .ipa file without using iTunes store.

I promise that once I got back to work on this project I will let you know via this post.

if you can provide an ipa i would be more than happy to it on my cydia repo,it shouldn’t take more than 3 minutes to make a proper package out of it

People, I believe in you, because there is only RoE by Ubisoft without addons :frowning:

Hi All,
I create fork of Vcmi and port to iOS last source from original project also make base support localization (but can have crash for non English , in progres). See github.com/COJIDAT/vcmi-ios

Tested under iPad and for build use Xcode 6 (last versio) and OSX 10.10

Hi all.
Instruction
After installation you need copy some folders and files to Documents directory. You can copy by iTunes (i share Documents folder for this application).
Need following folder structures in Document directory:
Data
Maps
Mp3
config
Games
Mods

In Data folder copy H3*.snd,H3*.vid,H3*.lod,VIDEO.VID files from original HMM3 game
In Maps folder copy maps files from origin game (*.h3m)
In Mods folder copy vcmi folder from Mods folder in sources.
In MP3 folder copy MP3 folder from origin games.
in config folder copy config folder from source code.
After that you can start test/game.
Enjoy

Hey, could you provide a compiled version of the current IOS port? I don’t have a Mac at hand.

COJDAT, built that, it is crashing on startup in void IVCMIDirs::init() … bfs::create_directories(userConfigPath());
with Operation not permitted error.
Is there some quick fix?

Hi! See my previous post about directory/files.

Yea, sure, i added everything required. it crashes exactly on config directory creation.

boost::filesystem::filesystem_error: boost::filesystem::create_directory: Operation not permitted: "/private/var/mobile/Containers/Data/Application/9E684091-DE8B-40CD-B269-1208507B442E/.config"

i tried following dir structures:

.config/<content from git/config>
config/<content from git/config>
config/config/<content from git/config>
.config/config/<content from git/config>

My brother is very interested in this project, but got iOS. Is there any way he can be a tester of this project?

Its would be really be worth if you can provide us with the ios port with original project.?

Currently working on the iOS port: https://github.com/kambala-decapitator/vcmi/tree/ios-wip

So far managed to launch app on device and see main menu. iPhone needs letterboxing, iPad looks good.

Turned out that having both client and server within a single process is impossible due to current VCMI architecture, so iOS has to run separate client and server apps for single player. Without jailbreak this is possible only on an iPad with multitasking features that supports Split View.

Now main dev branch is https://github.com/kambala-decapitator/vcmi/tree/ios-wip-server-app

created TODO list: https://github.com/kambala-decapitator/vcmi/issues

1 Like