Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
513 stars 131 forks source link

need help building on windows. #180

Closed emmauss closed 3 years ago

emmauss commented 6 years ago

i have been trying to build on windows using vs, but cmake is not able to configure the build. it cannot find any on the dependencies. i have all the dependencies in PATH, including pkg_config. but cmake cannot find any of them.

carstene1ns commented 6 years ago

You need to set EXTERNAL_LIB_PATH cmake variable. Do not forget to clean your cmake cache before trying again.

emmauss commented 6 years ago

should EXTERNAL_LIB_PATH point to the .../x/lib, .../x/bin, .../x/include or .../x/ , if x is the parent folder for the libraries.

emmauss commented 6 years ago

I have tried a lot of combinations, but still no luck. it just does not find them. and the lib are official releases from the original source.

carstene1ns commented 6 years ago

There are a few things to note:

For now, you would either need to use a supported build method (e.g. mingw/msys2), generate a vcxproj file yourself or add the needed detection features and additional stuff to the CMakeLists.txt file.

Ghabry commented 6 years ago

As @carstene1ns said the CMake file won't work on Windows because of pkg-config which is just not used under Windows. You could try e.g. "msys2" which kinda emulates a Linux environment under Windows.

For real Windows support the CMakeLists file needs an overhaul. The pkg_config calls must be replaced with "FindModules". These modules probe common library locations and attempt to find the file, which removes the explicit dep on pkg_config.

Another problem is compiling the dependencies under Windows, which always was a source of permanent frustration. Fortunately https://github.com/Microsoft/vcpkg makes this step almost trivial by now.

emmauss commented 6 years ago

thanks for the info

hanetzer commented 6 years ago

@emmauss I just got a build cross-compiled from linux with mingw-w64 done; I'm currently without a windows machine with which to test, but if you like I could probably bundle up a fresh zip at some point in the nearish future.

emmauss commented 6 years ago

okay. let me have it @hanetzer

hanetzer commented 6 years ago

@emmauss https://ptpb.pw/oA8_.tar.xz should theoretically work; I'm away from my xsession right now so I can't test much even with wine, but it gets to the point of init'ing a gfx context.

emmauss commented 6 years ago

tested it with my games, and it seems that it can't load png, so it does not even boot. it gives this error Error initializing SDL_image: PNG images not supported. I do not have any games that do not use png assets.

hanetzer commented 6 years ago

@emmauss ah, I must have built SDL2_image without PNG support. Even if you don't use png assets, the subsystem is still initialized at src/main.cpp#L242, so I'll rebuild that shortly.

hanetzer commented 6 years ago

@emmauss try this: https://ptpb.pw/f8Fm.tar.xz

emmauss commented 6 years ago

@hanetzer it work to some extent.tested many games, and all but one failed before going ingame. they are probably caused by bugs in mkxp. VX Ace games boot to menu, but then crash due to missing assets(while the main game exe works perfectly), fonts or some script exception. other games just crash before menu.Only one game went ingame.

hanetzer commented 6 years ago

@emmauss well, missing assets are not a fault of mkxp itself and can be fixed easily via adding the missing resources into the appropriate directories in the game dir. May take a bit of trial and error, but it should be fine. Future builds won't have dll-spam all in the main dir, once I get this manifest business figured out.

emmauss commented 6 years ago

@hanetzer those missing assets are part of the rtp, which i have properly installed. all games that do not use custom assets work as normal with their game.exe , but not with mkxp. this is definately a bug with mkxp. mkxp can't use the rtp assets from PATH.

cremno commented 6 years ago

That doesn't sound like a bug but rather a missing/incorrect mkxp.conf file.

emmauss commented 6 years ago

I created a mkxp.conf file and added the following to it

RTP=C:\Program Files (x86)\Common Files\Enterbrain\RGSS\Standard
RTP=C:\Program Files (x86)\Common Files\Enterbrain\RGSS2\RPGVX
RTP=C:\Program Files (x86)\Common Files\Enterbrain\RGSS3\RPGVXAce

now works properly for most games, xp, vx and ace. @cremno . Thanks

Ancurio commented 3 years ago

Closing for now. Hopefully we can get some better docs up for targeting the win32 platform (ideally via mingw).