Compare commits
2 Commits
0304e4fcee
...
5e66f5402d
Author | SHA1 | Date | |
---|---|---|---|
5e66f5402d | |||
38694ea520 |
@ -1,21 +1,12 @@
|
|||||||
project (hex C)
|
cmake_minimum_required (VERSION 3.0)
|
||||||
cmake_minimum_required (VERSION 2.8.5)
|
project (hex VERSION 0.1.0 LANGUAGES C)
|
||||||
|
|
||||||
# Moar warnings
|
# Moar warnings
|
||||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
|
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
|
||||||
set (wdisabled "-Wno-unused-function -Wno-implicit-fallthrough")
|
set (wdisabled "-Wno-unused-function")
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra ${wdisabled}")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra ${wdisabled}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Version
|
|
||||||
set (project_VERSION_MAJOR "0")
|
|
||||||
set (project_VERSION_MINOR "1")
|
|
||||||
set (project_VERSION_PATCH "0")
|
|
||||||
|
|
||||||
set (project_VERSION "${project_VERSION_MAJOR}")
|
|
||||||
set (project_VERSION "${project_VERSION}.${project_VERSION_MINOR}")
|
|
||||||
set (project_VERSION "${project_VERSION}.${project_VERSION_PATCH}")
|
|
||||||
|
|
||||||
# For custom modules
|
# For custom modules
|
||||||
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/liberty/cmake)
|
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/liberty/cmake)
|
||||||
|
|
||||||
@ -125,16 +116,13 @@ set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hex viewer")
|
|||||||
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
|
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
|
||||||
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
|
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
|
||||||
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||||
set (CPACK_PACKAGE_VERSION_MAJOR ${project_VERSION_MAJOR})
|
|
||||||
set (CPACK_PACKAGE_VERSION_MINOR ${project_VERSION_MINOR})
|
|
||||||
set (CPACK_PACKAGE_VERSION_PATCH ${project_VERSION_PATCH})
|
|
||||||
set (CPACK_GENERATOR "TGZ;ZIP")
|
set (CPACK_GENERATOR "TGZ;ZIP")
|
||||||
set (CPACK_PACKAGE_FILE_NAME
|
set (CPACK_PACKAGE_FILE_NAME
|
||||||
"${PROJECT_NAME}-${project_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
"${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${project_VERSION}")
|
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${PROJECT_VERSION}")
|
||||||
set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
|
set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
|
||||||
set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user")
|
set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user")
|
||||||
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${project_VERSION}")
|
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
|
||||||
|
|
||||||
set (CPACK_SET_DESTDIR TRUE)
|
set (CPACK_SET_DESTDIR TRUE)
|
||||||
include (CPack)
|
include (CPack)
|
||||||
|
@ -35,9 +35,6 @@ Or you can try telling CMake to make a package for you. For Debian it is:
|
|||||||
$ cpack -G DEB
|
$ cpack -G DEB
|
||||||
# dpkg -i hex-*.deb
|
# dpkg -i hex-*.deb
|
||||||
|
|
||||||
Note that for versions of CMake before 2.8.9, you need to prefix `cpack` with
|
|
||||||
`fakeroot` or file ownership will end up wrong.
|
|
||||||
|
|
||||||
Having the program installed, optionally create a configuration file and run it
|
Having the program installed, optionally create a configuration file and run it
|
||||||
on a file of your choice.
|
on a file of your choice.
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef CONFIG_H
|
#ifndef CONFIG_H
|
||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
#define PROGRAM_NAME "${CMAKE_PROJECT_NAME}"
|
#define PROGRAM_NAME "${PROJECT_NAME}"
|
||||||
#define PROGRAM_VERSION "${project_VERSION}"
|
#define PROGRAM_VERSION "${PROJECT_VERSION}"
|
||||||
|
|
||||||
#cmakedefine HAVE_RESIZETERM
|
#cmakedefine HAVE_RESIZETERM
|
||||||
#cmakedefine HAVE_LUA
|
#cmakedefine HAVE_LUA
|
||||||
|
7
hex.c
7
hex.c
@ -339,9 +339,9 @@ app_free_context (void)
|
|||||||
free (g_ctx.marks_by_offset);
|
free (g_ctx.marks_by_offset);
|
||||||
free (g_ctx.offset_entries);
|
free (g_ctx.offset_entries);
|
||||||
|
|
||||||
free (g_ctx.message);
|
cstr_set (&g_ctx.message, NULL);
|
||||||
|
|
||||||
free (g_ctx.filename);
|
cstr_set (&g_ctx.filename, NULL);
|
||||||
free (g_ctx.data);
|
free (g_ctx.data);
|
||||||
|
|
||||||
if (g_ctx.tk)
|
if (g_ctx.tk)
|
||||||
@ -1792,8 +1792,7 @@ app_log_handler (void *user_data, const char *quote, const char *fmt,
|
|||||||
fprintf (stderr, "%s\n", message.str);
|
fprintf (stderr, "%s\n", message.str);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
free (g_ctx.message);
|
cstr_set (&g_ctx.message, xstrdup (message.str));
|
||||||
g_ctx.message = xstrdup (message.str);
|
|
||||||
g_ctx.message_attr = (intptr_t) user_data;
|
g_ctx.message_attr = (intptr_t) user_data;
|
||||||
app_invalidate ();
|
app_invalidate ();
|
||||||
}
|
}
|
||||||
|
2
liberty
2
liberty
@ -1 +1 @@
|
|||||||
Subproject commit 1a76b2032e6d18d9f95d9d0bb98edc26023c8618
|
Subproject commit 8822d06091942454324936329bfade6a47444d70
|
2
termo
2
termo
@ -1 +1 @@
|
|||||||
Subproject commit 8c4e867760eb20e3cdf997a301c8f8672c01e380
|
Subproject commit 065cd3b3e1781ebfddbb272b568918c60c8962c8
|
Loading…
x
Reference in New Issue
Block a user