amzeratul / halley-template

A blank "Hello World" project using Halley
Apache License 2.0
44 stars 6 forks source link

README.md #1

Open lucasazevedonet opened 5 years ago

lucasazevedonet commented 5 years ago

Hi, could you add a README.md with instructions? Thanks.

cwahlfeldt commented 5 years ago

I'm trying to build on macos Mojave and I cant seem to get it to build.

Ive downloaded all the packages using Homebrew. brew install boost libogg libvorbis lua sdl2 freetype yaml-cpp

I'm invoking the following command when in the build dir. cmake version is 3.13.4.

cmake -G "Unix Makefiles" \
    -DHALLEY_PATH=../halley \
    -DCMAKE_INCLUDE_PATH="/usr/local/Cellar/make/4.2.1_1/include" \
    -DCMAKE_LIBRARY_PATH="/usr/local/Cellar/make/4.2.1_1/libexec" \
    -DBOOST_LIBRARYDIR="/usr/local/Cellar/boost/1.68.0_1/lib" \
    -DBOOST_INCLUDEDIR="/usr/local/Cellar/boost/1.68.0_1/include" \
    -DBoost_USE_STATIC_LIBS=1 \
    -DBUILD_HALLEY_TOOLS=1 \
    -DBUILD_HALLEY_TESTS=0 \
    -DUSE_PCH=1 \
    ..
#^^^ make sure you add the .. to point to CmakeLists.txt!

EDIT: Its building!!! I'm a dingus and forgot to add .. at the end of the command to use the CmakeLists.txt from the build dir. I'm now getting an issue with yaml-cpp:

halley-template/halley/src/tools/tools/src/assets/importers/material_importer.h:3:10: fatal error:
      'yaml-cpp/node/node.h' file not found
#include <yaml-cpp/node/node.h>

Do I need to add something like DCYAML_CPP_INCLUDE_PATH="/path/to/yaml-cpp/include" and so on for the other libs?

cwahlfeldt commented 5 years ago

Anybody got any ideas? Im able to build and run halley-editor on macos mojave but the template itself isnt working. How do you run codegen on the template?

ldavison commented 5 years ago

@cwahlfeldt I used the build commands from the README.md and it worked on macOS 10.14.3:

cmake -DCMAKE_INCLUDE_PATH=/usr/local/include \
      -DCMAKE_LIBRARY_PATH=/usr/local/lib \
      -DBOOST_ROOT=/usr/local/Cellar/boost/1.68.0_1/ ..

Then you have to pack the assets. From the project root:

$ ./halley/bin/halley-editor .

When that's done, you can close it and run:

$ ./bin/halleyproj
cwahlfeldt commented 5 years ago

Hey @ldavison this worked for the most part but I don't have any assets to import yet from my project root. I'm getting the following error when attempting ./bin/halleyproj:

Unhandled exception: Unable to load resource pack "/Users/waffles/Games/halley-template/assets/game.dat"

Am I supposed to pack the assets from the halley dir? or copy and pack in my root?

Thanks a ton for the help btw i feel like im way closer to this actually working.

ldavison commented 5 years ago

@cwahlfeldt The assets/game.dat file will be created if you run:

$ ./halley/bin/halley-editor .

At least that's all I had to do. Is that not working for you?

EDIT: I may have manually created the assets dir before running that, you might try that.

cwahlfeldt commented 5 years ago

That didn't work for me. I ended up having to use import and then pack when they were imported to the root.

Import

./halley/bin/halley-cmd import ~/Games/halley-template ~/Games/halley-template/halley

Pack

./halley/bin/halley-cmd pack ~/Games/halley-template/halley_project/asset_manifest.yaml ~/Games/halley-template ~/Games/halley-template/halley

Had to use absolute paths for it to work.