From aaa870a2e99e6c495a0384684c6f878c47f8fb18 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 13 Apr 2017 05:20:21 -0500 Subject: [PATCH] Add install for nost-pack --- src/tools/CMakeLists.txt | 7 +++++++ src/tools/pack.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index 9e4f481b..3e69dc97 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -17,6 +17,13 @@ target_link_libraries( NostalgiaCore ) +install( + TARGETS + nost-pack + RUNTIME DESTINATION + bin +) + set(CMAKE_INCLUDE_CURRENT_DIR OFF) set(CMAKE_AUTOMOC OFF) diff --git a/src/tools/pack.cpp b/src/tools/pack.cpp index 0724e9db..cc04f3b8 100644 --- a/src/tools/pack.cpp +++ b/src/tools/pack.cpp @@ -64,7 +64,7 @@ int run(ClArgs args) { auto compact = args.getBool("c"); QMap colors; QImage src(inPath); - const auto imgDataBuffSize = sizeof(Pallete) + src.width() * src.height(); + const auto imgDataBuffSize = sizeof(Pallete) - 1 + src.width() * src.height(); uint8_t imgDataBuff[imgDataBuffSize]; GbaImageData *id = (GbaImageData*) imgDataBuff; int colorId = 0;