Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build/
deploy/
setup/

app/
tmp/
_CPack_Packages/

*.app
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ elseif (UNIX)
endif()

# Set USE_CPACK option.
set(USE_CPACK OFF)
set(USE_CPACK ON)

# Install the application for the target platform.
if (WIN32)
Expand Down
40 changes: 38 additions & 2 deletions cmake/installUbuntu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,44 @@ else()
set(CMAKE_INSTALL_PREFIX "" CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
endif()

# Install RUNTIME targets and dependencies.
install(TARGETS ${CMAKE_PROJECT_NAME} RUNTIME_DEPENDENCIES DESTINATION "${CMAKE_INSTALL_PREFIX}/opt/${CMAKE_PROJECT_NAME}/bin/" )
# Install target RUNTIME.
install(TARGETS ${CMAKE_PROJECT_NAME} RUNTIME_DEPENDENCY_SET RunTimeDependencySet RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/opt/${CMAKE_PROJECT_NAME}/bin/" )

# Install target RUNTIME dependencies.
install(RUNTIME_DEPENDENCY_SET RunTimeDependencySet DESTINATION "${CMAKE_INSTALL_PREFIX}/opt/${CMAKE_PROJECT_NAME}/lib/")

# Get Qt6 lib directory.
get_target_property(Qt6_LIB_DIR Qt6::Core LOCATION)
get_filename_component(Qt6_LIB_DIR ${Qt6_LIB_DIR} DIRECTORY)

# Install Qt6 missing libraries.
file(GLOB LIBWAYLAND "${Qt6_LIB_DIR}/libQt6Wayland*")
install(FILES ${LIBWAYLAND} DESTINATION "${CMAKE_INSTALL_PREFIX}/opt/${CMAKE_PROJECT_NAME}/lib/")
file(GLOB LIBXCB_FILES "${Qt6_LIB_DIR}/libQt6Xcb*")
install(FILES ${LIBXCB} DESTINATION "${CMAKE_INSTALL_PREFIX}/opt/${CMAKE_PROJECT_NAME}/lib/")

# Get Qt6 plugins directory.
set(Qt6_PLUGINS_DIR "${Qt6_LIB_DIR}/../plugins")

# Install the Qt6 plugins.
LIST(APPEND Qt6_PLUGINS_LIST
"xcbglintegrations"
"wayland-shell-integration"
"wayland-graphics-integration-client"
"wayland-decoration-client"
"tls"
"networkinformation"
"imageformats"
"iconengines"
"generic"
"platforms"
)
foreach(PLUGIN ${Qt6_PLUGINS_LIST})
install(DIRECTORY "${Qt6_PLUGINS_DIR}/${PLUGIN}"
DESTINATION "${CMAKE_INSTALL_PREFIX}/opt/${CMAKE_PROJECT_NAME}/plugins"
USE_SOURCE_PERMISSIONS
PATTERN "*.debug" EXCLUDE)
endforeach()

# Install app script file
# Cope app script file directly to usr/local/bin sometimes run into permission issues,
Expand Down
6 changes: 5 additions & 1 deletion package/ubuntu/app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
appname="visParaflow"

# Set LD_LIBRARY_PATH.
LD_LIBRARY_PATH=/opt/$appname/bin
LD_LIBRARY_PATH=/opt/$appname/lib
export LD_LIBRARY_PATH

# Set QT_PLUGIN_PATH.
QT_PLUGIN_PATH=/opt/$appname/plugins
export QT_PLUGIN_PATH

# Set QT_QPA_PLATFORM to xcb or wayland.
export QT_QPA_PLATFORM=wayland

Expand Down
38 changes: 20 additions & 18 deletions package/ubuntu/make-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,34 @@ fi
setupdir="../../setup/ubuntu"
mkdir -p $setupdir

# Define the staging package directory
pkgdir="app"
# Define the staging directory
tmpdir="app"

# Delete the old staging package directory.
rm -rf $pkgdir
echo "The old staging package directory has been deleted."
# Delete the old staging directory.
rm -rf $tmpdir
echo "The old staging directory has been deleted."

# Create the destination directory
mkdir -p $pkgdir/DEBIAN
mkdir -p $pkgdir/opt/$appname/bin
mkdir -p $pkgdir/usr/share/applications
mkdir -p $pkgdir/usr/share/icons/hicolor/48x48/apps
echo "The staging package directories have been created."
mkdir -p $tmpdir/DEBIAN
mkdir -p $tmpdir/opt/$appname/bin
mkdir -p $tmpdir/opt/$appname/lib
mkdir -p $tmpdir/opt/$appname/plugins
mkdir -p $tmpdir/usr/share/applications
mkdir -p $tmpdir/usr/share/icons/hicolor/48x48/apps
echo "The staging direcotry has been created."

# Copy the DEBIAN control files.
cp -r debian/* $pkgdir/DEBIAN/
echo "The DEBIAN control files have been copied to the staging package directory."
cp -r debian/* $tmpdir/DEBIAN/
echo "The DEBIAN control files have been copied to the staging directory."

# Copy the deployed files.
cp -r $depdir/* $pkgdir/
echo "The deployed files have been copied to the staging package directory."
cp -r $depdir/* $tmpdir/
echo "The deployed files have been copied to the staging directory."

# Create the DEBIAN package.
dpkg-deb --build $pkgdir $setupdir/$appname-$verison.deb
dpkg-deb --build $tmpdir $setupdir/$appname-$verison.deb
echo "The DEBIAN package has been created."

# Delete the staging package directory.
rm -rf $pkgdir
echo "The staging package directory has been deleted."
# Delete the staging directory.
rm -rf $tmpdir
echo "The staging directory has been deleted."