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

Add tool: json cache generator #22

Merged
merged 4 commits into from Jul 8, 2017

Conversation

Projects
None yet
4 participants
@carstene1ns
Copy link
Member

carstene1ns commented Mar 25, 2016

  • Windows support added by @Ghabry
  • Will use objects instead of flat file list (needs Player change)
@carstene1ns

This comment has been minimized.

Copy link
Member Author

carstene1ns commented Apr 29, 2016

This now outputs in legacy mode (linear list) like the php tool by default.

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Aug 15, 2016

I finally want to give this tool some love (for Windows) so we can ship this together with 0.5. But I get 4 linker errors and even adding all icu libs doesn't help:

Any idea which relevant icu lib could be missing?

1>main.obj : warning LNK4217: Lokal definiertes Symbol "??3UMemory@icu_56@@SAXPEAX@Z (public: static void __cdecl icu_56::UMemory::operator delete(void *))" wurde in "public: virtual void * __cdecl icu_56::StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::`scalar deleting destructor'(unsigned int)" (??_G?$StringByteSink@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@icu_56@@UEAAPEAXI@Z)-Funktion importiert.
1>main.obj : warning LNK4217: Lokal definiertes Symbol "??0ByteSink@icu_56@@QEAA@XZ (public: __cdecl icu_56::ByteSink::ByteSink(void))" wurde in "public: __cdecl icu_56::StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (??0?$StringByteSink@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@icu_56@@QEAA@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)-Funktion importiert.
1>main.obj : warning LNK4217: Lokal definiertes Symbol "??1ByteSink@icu_56@@UEAA@XZ (public: virtual __cdecl icu_56::ByteSink::~ByteSink(void))" wurde in "public: virtual __cdecl icu_56::StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::~StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(void)" (??1?$StringByteSink@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@icu_56@@UEAA@XZ)-Funktion importiert.
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __cdecl icu_56::UnicodeString::toUTF8(class icu_56::ByteSink &)const " (__imp_?toUTF8@UnicodeString@icu_56@@QEBAXAEAVByteSink@2@@Z)" in Funktion ""public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __cdecl icu_56::UnicodeString::toUTF8String<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)const " (??$toUTF8String@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@UnicodeString@icu_56@@QEBAAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV23@@Z)".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: class icu_56::UnicodeString & __cdecl icu_56::UnicodeString::toLower(void)" (__imp_?toLower@UnicodeString@icu_56@@QEAAAEAV12@XZ)" in Funktion ""class nlohmann::basic_json<class std::map,class std::vector,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,__int64,double,class std::allocator> __cdecl parse_dir_recursive(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?parse_dir_recursive@@YA?AV?$basic_json@Vmap@std@@Vvector@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@_N_JNVallocator@2@@nlohmann@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __cdecl icu_56::UnicodeString::UnicodeString(char const *)" (__imp_??0UnicodeString@icu_56@@QEAA@PEBD@Z)" in Funktion ""class nlohmann::basic_json<class std::map,class std::vector,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,__int64,double,class std::allocator> __cdecl parse_dir_recursive(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?parse_dir_recursive@@YA?AV?$basic_json@Vmap@std@@Vvector@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@_N_JNVallocator@2@@nlohmann@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: virtual __cdecl icu_56::UnicodeString::~UnicodeString(void)" (__imp_??1UnicodeString@icu_56@@UEAA@XZ)" in Funktion ""class nlohmann::basic_json<class std::map,class std::vector,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,__int64,double,class std::allocator> __cdecl parse_dir_recursive(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?parse_dir_recursive@@YA?AV?$basic_json@Vmap@std@@Vvector@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@_N_JNVallocator@2@@nlohmann@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)".

@carstene1ns

This comment has been minimized.

Copy link
Member Author

carstene1ns commented Aug 16, 2016

Does MSVC need some flag to compile in c++11 mode?

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Aug 16, 2016

Nope, always compiles in the highest mode it supports (C++14 + some of C++17) and you can't disable it >.>
But the dllimport is suspicious because I did a static build, hmm

@carstene1ns

This comment has been minimized.

Copy link
Member Author

carstene1ns commented Aug 16, 2016

These seem to come from the C++ stdlib, which could make sense as the json header adds to the STL.
However, no idea why this affects ICU.

@carstene1ns

This comment has been minimized.

Copy link
Member Author

carstene1ns commented Aug 16, 2016

Updated the json header now as they claim to have made the MSVC support better in 2.0.0.
(will squash this commit later)

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Aug 16, 2016

My guess was correct. Removing __dllimport fixed it. So the static ICU build has a bug...

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Aug 22, 2016

This works for Windows. Used that dirent_win.h which we already use for Player...

The code will fail when the files are not in the local codepage because using the widestring API makes everything messy. This will break the use case when somebody wants to create a cache of a japanese yume nikki on an european Windows...

Ghabry@54684fa

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Aug 22, 2016

Update: Ghabry@e7c07e5

GENCACHE is part of the EasyRPG Project.
More information is available at the project website:

https://easy-rpg.org/

This comment has been minimized.

@hellow554

hellow554 Sep 27, 2016

these urls are outdated (afaik)

@carstene1ns carstene1ns force-pushed the carstene1ns:jsoncache branch 4 times, most recently from 9150b60 to a7544d3 Jul 7, 2017

carstene1ns and others added some commits Mar 25, 2016

Add legacy json mode
This should work with current Player Emscripten port.

@carstene1ns carstene1ns force-pushed the carstene1ns:jsoncache branch from a7544d3 to ad75400 Jul 7, 2017

@carstene1ns carstene1ns changed the title [WIP] Add tool: json cache generator Add tool: json cache generator Jul 7, 2017

@carstene1ns

This comment has been minimized.

Copy link
Member Author

carstene1ns commented Jul 7, 2017

This is now ready.

@fdelapena fdelapena merged commit d7d98af into EasyRPG:master Jul 8, 2017

2 checks passed

GNU/Linux Build finished.
Details
Windows Build finished.
Details

@carstene1ns carstene1ns deleted the carstene1ns:jsoncache branch Jul 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment