halley icon indicating copy to clipboard operation
halley copied to clipboard

Example can't run lack of game.dat?

Open mindoff6502 opened this issue 6 years ago • 5 comments

I'm useing Window 7,VS2017,successfully compile halley-template example. But while run the app,It says

Unhandled exception : Unable to load resource .../halley-template/assets/game.dat

I checked folder there is no game.dat file there,so what should I do to run a success example?

mindoff6502 avatar May 08 '19 02:05 mindoff6502

After building you need to import assets and then build again. For windows, after building the command is apparently: (Do this inside halley/bin/ after building the build tools)

halley-cmd.exe import /full/path/to/game/repo/root /full/path/to/halley/repo/root

this should generate the game.dat file in the assets/ folder. Then simply build again and it should work.

AnbyKatz avatar May 09 '19 09:05 AnbyKatz

OK,thanks for reply.

Successfuly get game.dat,and now get new error...what is happening?

Halley has aborted with an unhandled exceptions:Process aborting with signal #SIGSEGV (11)

It seems halleyproj.exe does not cry for game.dat but this happened.

mindoff6502 avatar May 10 '19 00:05 mindoff6502

Not 100% sure but first make sure that you have all the necessary libraries eg: boost, sdl, freetype, yaml-cpp Next make sure that when you build, you use a command along the lines of (Im on Linux so it'll be a tiny bit different): cmake -DHALLEY_PATH=../halley -DBUILD_HALLEY_TOOLS=1 -DBUILD_HALLEY_TESTS=0 \ -DCMAKE_INCLUDE_PATH=/usr/include \ -DCMAKE_LIBRARY_PATH=/usr/lib \ -DBoost_USE_STATIC_LIBS=1 \ -DBOOST_INCLUDEDIR=/usr/include/boost .. Your project should be organised in the following way generally:

  • Project
    • build
    • halley (the engine itself)
    • src
    • assets_src
    • halley_project (Some other stuff)

Try again from a clean build (delete the build and bin folders in both halley and your project). Use a similar command as above to make, then type make (in the build directory). After its made, do the import assests thing and then type make again (in the build directory).

Hopefully that helps... maybe?

AnbyKatz avatar May 10 '19 03:05 AnbyKatz

I'm on MacOS, just wanted to check. I ran ./halley_cmd from halley/bin to import assests, but it created a assets_unpacked folder in root instead ... thats not expect is it XD additionally, game.dat was not generated :P

LoveGlitchCoffee avatar Aug 05 '19 12:08 LoveGlitchCoffee

@ParityB1t Bit of a weird one, but on macOS the halley-cmd import requires full paths rather than relative ones. E.g.

./halley/bin/halley-cmd import "$(pwd)" "$(pwd)/halley"

JoelOtter avatar Jan 13 '20 11:01 JoelOtter