File tree Expand file tree Collapse file tree 6 files changed +83
-0
lines changed Expand file tree Collapse file tree 6 files changed +83
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ add_subdirectory(plugins) # must precede webgui
35
35
add_subdirectory (webgui )
36
36
add_subdirectory (webgui-new )
37
37
add_subdirectory (webserver )
38
+ add_subdirectory (packaging )
38
39
39
40
# Install java libraries
40
41
install (DIRECTORY
Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ set(INSTALL_BIN_DIR "bin")
57
57
set (DATABASE sqlite CACHE STRING "Database type" )
58
58
string (TOUPPER ${DATABASE} DATABASE_U )
59
59
60
+ # Installation directory for dependencies
61
+ set (INSTALL_DEPS_DIR_NAME "deps" )
62
+
60
63
# Set up the dynamic libraries' runtime path to the install folder
61
64
set (CMAKE_SKIP_BUILD_RPATH FALSE )
62
65
set (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE )
Original file line number Diff line number Diff line change
1
+ # Install shared objects to $CMAKE_INSTALL_PREFIX/lib/deps/
2
+ if (INSTALL_RUNTIME_DEPENDENCIES OR ENABLE_PACKAGING )
3
+ install (TARGETS CodeCompass_parser CodeCompass_webserver util gitservice cppparser RUNTIME_DEPENDENCIES LIBRARY DESTINATION "${INSTALL_LIB_DIR} /${INSTALL_DEPS_DIR_NAME} " )
4
+ endif ()
5
+
6
+ if (NOT ENABLE_PACKAGING )
7
+ return ()
8
+ endif ()
9
+
10
+ if (NOT PACKAGE_VERSION )
11
+ set (PACKAGE_VERSION "1.0" )
12
+ endif ()
13
+
14
+ set (PACKAGE_DIR "codecompass" )
15
+
16
+ add_custom_target (
17
+ appimage
18
+
19
+ COMMAND mkdir -p ${PACKAGE_DIR} /usr/
20
+
21
+ COMMAND echo "Adding CodeCompass installation: ${CMAKE_INSTALL_PREFIX} "
22
+ COMMAND cp -r ${CMAKE_INSTALL_PREFIX} /* ${PACKAGE_DIR} /usr/
23
+
24
+ COMMAND echo "Removing webgui-new sources ..."
25
+ COMMAND rm -rf ${PACKAGE_DIR} /usr/share/codecompass/webgui-new/app/
26
+
27
+ COMMAND cp -r ${CMAKE_SOURCE_DIR} /packaging/appimage/* ${PACKAGE_DIR}
28
+ COMMAND chmod +x ${PACKAGE_DIR} /AppRun
29
+
30
+ COMMAND echo "---------- AppRun file ----------"
31
+ COMMAND cat ${PACKAGE_DIR} /AppRun
32
+ COMMAND echo "---------------------------------"
33
+
34
+ COMMAND sed -i "s/\% PACKAGE_VERSION\% /${PACKAGE_VERSION} /" ${PACKAGE_DIR} /codecompass.desktop
35
+
36
+ COMMAND echo "---------- Desktop file ----------"
37
+ COMMAND cat ${PACKAGE_DIR} /codecompass.desktop
38
+ COMMAND echo "----------------------------------"
39
+
40
+ COMMAND echo "Building CodeCompass AppImage ..."
41
+ COMMAND appimagetool-x86_64.AppImage ${PACKAGE_DIR}
42
+ COMMAND echo "Done!"
43
+ )
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ usage ()
4
+ {
5
+ echo " CodeCompass AppImage"
6
+ echo " Usage:"
7
+ echo " ./CodeCompass.AppImage parser <parser arguments>"
8
+ echo " ./CodeCompass.AppImage webserver <webserver arguments>"
9
+ echo " ./CodeCompass.AppImage logger <logger arguments>"
10
+ }
11
+
12
+ export LD_LIBRARY_PATH=" $LD_LIBRARY_PATH :$APPDIR /usr/lib/deps/"
13
+
14
+ if [ -z " $1 " ]; then
15
+ usage
16
+ elif [ " $1 " == " parser" ]; then
17
+ shift
18
+ exec $APPDIR /usr/bin/CodeCompass_parser " $@ "
19
+ elif [ " $1 " == " webserver" ]; then
20
+ shift
21
+ exec $APPDIR /usr/bin/CodeCompass_webserver " $@ "
22
+ elif [ " $1 " == " logger" ]; then
23
+ shift
24
+ exec $APPDIR /usr/bin/CodeCompass_logger " $@ "
25
+ else
26
+ usage
27
+ fi
Original file line number Diff line number Diff line change
1
+ [Desktop Entry]
2
+
3
+ Type =Application
4
+ Version =%PACKAGE_VERSION%
5
+ Name =CodeCompass
6
+ Comment =CodeCompass is a pluginable code comprehension tool.
7
+ Icon =logo
8
+ Terminal =true
9
+ Categories =Development;
You can’t perform that action at this time.
0 commit comments