31 Commits

Author SHA1 Message Date
TheAssassin c07025ab8a Fix missing dependency 2018-06-30 00:52:55 +02:00
TheAssassin c438d5ee2b Change build type 2018-06-30 00:52:10 +02:00
TheAssassin ee15c88978 Fix path to CImg 2018-06-30 00:22:59 +02:00
TheAssassin 80fc055373 Use bundled CImg for i386 build 2018-06-30 00:18:59 +02:00
TheAssassin 5d81258547 Bundle CImg for multiarch builds 2018-06-30 00:18:29 +02:00
TheAssassin d57e4750c2 Re-enable parallel builds 2018-06-30 00:18:02 +02:00
TheAssassin ddbca26b1b Try to resolve apt package conflict 2018-06-30 00:03:14 +02:00
TheAssassin 2e503362a0 Remove unused code 2018-06-29 23:51:02 +02:00
TheAssassin 7a2390ea95 Show held packages 2018-06-29 23:47:21 +02:00
TheAssassin 312287d937 Try to fix apt issues, mk. 8 2018-06-29 23:26:33 +02:00
TheAssassin a641ae7fac Try to fix apt issues, mk. 7 2018-06-29 23:20:06 +02:00
TheAssassin b332dc7e7d Try to fix missing header 2018-06-29 22:09:36 +02:00
TheAssassin b16329f8ba Debug missing header 2018-06-29 21:59:52 +02:00
TheAssassin ee6fd2e594 Try to fix apt issues, mk. 6 2018-06-29 21:38:59 +02:00
TheAssassin 4ee5a903ce Try to fix apt issues, mk. 5 2018-06-29 21:34:00 +02:00
TheAssassin 852ac4d038 Try to get rid of duplicate i386 builds on Travis, mk. 2 2018-06-29 21:27:35 +02:00
TheAssassin eea9a5a9f9 Try to get rid of duplicate i386 builds on Travis 2018-06-29 21:24:32 +02:00
TheAssassin b046bef4c9 Try to fix apt issues, mk. 4 2018-06-29 21:22:16 +02:00
TheAssassin e311bc9217 Try to fix apt issues, mk. 3 2018-06-29 21:19:26 +02:00
TheAssassin 0cb0223560 Try to fix apt issues, mk. 2 2018-06-29 21:16:30 +02:00
TheAssassin e7b3a0987a Try to fix apt issues 2018-06-29 21:14:22 +02:00
TheAssassin efb59d6ea7 Install cross compilers 2018-06-29 21:09:08 +02:00
TheAssassin 39ddfc5c79 Install libpng-dev 2018-06-29 21:06:27 +02:00
TheAssassin d5aa361eb4 Fix .travis.yml 2018-06-29 21:03:38 +02:00
TheAssassin 08a1bf9b69 Multiarch builds, mk. 1 2018-06-29 21:00:23 +02:00
TheAssassin eba0d70576 Improve ignores 2018-06-29 20:59:56 +02:00
TheAssassin 1a4d9e8130 Add i386 toolchain 2018-06-29 20:50:14 +02:00
TheAssassin 2b94a4b408 Improve FindLibMagic 2018-06-29 12:31:20 +02:00
TheAssassin dcf4f79059 Fix boost library types 2018-06-29 11:17:27 +02:00
TheAssassin 345fc638b6 Improve README 2018-06-29 11:08:37 +02:00
TheAssassin 8d3284c447 Merge branch 'experimental/standalone-boost'
Fixes #4.
2018-06-29 02:46:35 +02:00
11 changed files with 190 additions and 49 deletions
+3
View File
@@ -1,3 +1,6 @@
cmake-build-*/
*build*/
.idea/
squashfs-root/
tests/
*.AppImage
+3
View File
@@ -73,3 +73,6 @@
[submodule "lib/boost-integer"]
path = lib/boost-integer
url = https://github.com/boostorg/integer.git
[submodule "lib/CImg"]
path = lib/CImg
url = https://github.com/dtschump/CImg.git
+24 -7
View File
@@ -1,13 +1,30 @@
language: cpp
sudo: required
addons:
apt:
update: true
packages:
- libmagic-dev
- cimg-dev
- automake # required for patchelf
matrix:
include:
- env: ARCH=x86_64
addons:
apt:
update: true
packages:
- libmagic-dev
- libjpeg-dev
- libpng-dev
- cimg-dev
- automake # required for patchelf
- env: ARCH=i386
addons:
apt:
update: true
packages:
- libmagic-dev:i386
- libjpeg-dev:i386
- libpng-dev:i386
- gcc-multilib
- g++-multilib
- automake # required for patchelf
- libfuse2:i386
install:
- git clone https://github.com/NixOS/patchelf.git
+1
View File
@@ -11,6 +11,7 @@ add_definitions(-DLINUXDEPLOY_VERSION="${LINUXDEPLOY_VERSION}")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
set(USE_SYSTEM_BOOST OFF CACHE BOOL "Set to ON to use system boost libraries instead of building up to date boost libraries from source")
set(USE_SYSTEM_CIMG ON CACHE BOOL "Set to OFF to use CImg library bundled in lib directory")
add_subdirectory(lib)
+97 -1
View File
@@ -2,4 +2,100 @@
AppDir creation and maintenance tool.
**More info will follow soon!**
## About
AppImages are a well known and quite popular format for distributing applications from developers to end users.
[appimagetool](https://github.com/AppImage/AppImageKit), the tool creating AppImages, expects directories in a specific format that will then be converted into the final AppImage. This format is called [AppDir](https://github.com/TheAssassin/linuxdeploy/wiki/AppDir-specification). It is not very difficult to understand, but creating AppDirs for arbitrary applications tends to be a very repetitive task. Also, bundling all the dependencies properly can be a quite difficult task. It seems like there is a need for tools which simplify these tasks.
linuxdeploy is designed to be an AppDir maintenance tool. It provides extensive functionalities to create and bundle AppDirs for applications. It features a plugin system that allows for easy bundling of frameworks and creating output bundles such as AppImages with little effort.
linuxdeploy was greatly influenced by [linuxdeployqt](https://github.com/probonopd/linuxdeployqt), and while it employs stricter rules on AppDirs, it's more flexible in use. If you use linuxdeployqt at the moment, consider switching to linuxdeploy today!
## Usage
linuxdeploy, being a tool for creating AppDirs and eventually AppImages, is released as an AppImage itself. Please download and use the AppImage for normal use. If you encounter errors, e.g., when building the tool from source, please try with the AppImage first before [creating an issue](https://github.com/TheAssassin/linuxdeploy/issues/new).
There are two main ways to use linuxdeploy: Provide the paths to all files you want to bundle manually, or create an FHS-like directory and run linuxdeploy on it.
Most build systems provide some kind of `make install` functionality that is capable of producing FHS-like directory trees that can be turned into AppDirs:
```sh
# automake
./configure --prefix=/usr
make install DESTDIR=AppDir
# cmake
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
make install DESTDIR=AppDir
# qmake
qmake CONFIG+=release PREFIX=/usr .
make install INSTALL_ROOT=AppDir
```
Now, simply run linuxdeploy like `./linuxdeploy*.AppImage --appdir AppDir`.
Please use `./linuxdeploy*.AppImage --help` to get a list of options supported by linuxdeploy.
If your build system cannot produce such install trees or you prefer to bundle everything manually, you can also specify the paths to the resources yourself. linuxdeploy provides the following options for this use case:
```
-l[library...],
--lib=[library...],
--library=[library...] Shared library to deploy
-e[executable...],
--executable=[executable...] Executable to deploy
-d[desktop file...],
--desktop-file=[desktop file...] Desktop file to deploy
enough for some tests
-i[icon file...],
--icon-file=[icon file...] Icon to deploy
```
An example run could look like this:
```bash
./linuxdeploy*.AppImage --app-name myapp --appdir AppDir --init-appdir -e myapp -d myapp.desktop -i myapp_64x64.png
```
Of course both approaches can be combined, e.g., you can bundle additional executables with your main app.
linuxdeploy doesn't mind being run on an AppDir more than once, as it recognize previous runs, and should not break files within the AppDir. This is to allow you debug issues allows you to run linuxdeploy after resolving an issue that it reports.
If you ever encounter issues when running linuxdeploy on an existing AppDir, please let us know by [creating an issue](https://github.com/TheAssassin/linuxdeploy/issues/new).
## Plugins
linuxdeploy features a plugin system. Plugins are separate executables which implement a CLI-based plugin interface ([specification](https://github.com/TheAssassin/linuxdeploy/wiki/Plugin-system)).
There are two types of plugins: bundling and output plugins. Bundling plugins can be used to add resources to the AppDir. Output plugins turn the AppDir in actual bundles, e.g., AppImages.
linuxdeploy looks for plugins in the following places:
- the directory containing the linuxdeploy binary
- when using the AppImage: the directory containing the AppImage
- the directories in the user's `$PATH`
You can use `./linuxdeploy*.AppImage --list-plugins` to get a list of all the plugins linuxdeploy has detected on your system.
linuxdeploy ships with some plugins
If you want to use a plugin to bundle additional resources, please add `./linuxdeploy*.AppImage --plugin <name>` to your linuxdeploy command. Output plugins can be activated using `./linuxdeploy*.AppImage --output <name>`.
## Troubleshooting
> I bundled additional resources, but when I try to run them, either the system binary is called or the file is not found.
linuxdeploy does not change any environment variables such as `$PATH`. Your application **must** search for additional resources such as icon files or executables relative to the main binary.
## Contact
The easiest way to get in touch with the developers is to join the IRC chatroom [#AppImage](https://webchat.freenode.net/?channels=appimage) on FreeNode. This is the preferred way for general feedback or questions how to use this application.
To report problems, please [create an issue](https://github.com/TheAssassin/linuxdeploy/issues/new) on GitHub.
Contributions welcome! Please feel free to fork this repository and send us a pull request. Even small changes, e.g., in this README, are highly appreciated!
+19 -13
View File
@@ -1,22 +1,28 @@
# required for PNG imported target
cmake_minimum_required(VERSION 3.5)
message(STATUS "Searching for CImg")
find_path(CIMG_H_DIR
NAMES CImg.h
HINTS ${CMAKE_INSTALL_PREFIX}
PATH_SUFFIXES include include/linux
)
if(NOT CIMG_H_DIR)
message(FATAL_ERROR "CImg.h not found")
endif()
find_package(PNG REQUIRED)
find_package(JPEG REQUIRED)
add_library(CImg INTERFACE IMPORTED)
if(NOT USE_SYSTEM_CIMG)
message(STATUS "Using bundled CImg library")
set(CIMG_H_DIR "${PROJECT_SOURCE_DIR}/lib/CImg/")
else()
message(STATUS "Searching for CImg")
find_path(CIMG_H_DIR
NAMES CImg.h
HINTS ${CMAKE_INSTALL_PREFIX}
PATH_SUFFIXES include include/linux
)
if(NOT CIMG_H_DIR)
message(FATAL_ERROR "CImg.h not found")
endif()
endif()
add_library(CImg INTERFACE)
set_property(TARGET CImg PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CIMG_H_DIR};${JPEG_INCLUDE_DIR}")
set_property(TARGET CImg PROPERTY INTERFACE_LINK_LIBRARIES "PNG::PNG;${JPEG_LIBRARIES}")
set_property(TARGET CImg PROPERTY INTERFACE_COMPILE_DEFINITIONS "cimg_display=0;cimg_use_png=1;cimg_use_jpeg=1")
+4 -4
View File
@@ -3,9 +3,6 @@ cmake_minimum_required(VERSION 3.3)
message(STATUS "Searching for libmagic")
# on Debian-ish systems, libmagic depends on zlib
find_package(ZLIB REQUIRED)
find_library(LIBMAGIC_A libmagic.a)
if(NOT LIBMAGIC_A)
@@ -16,12 +13,15 @@ find_path(LIBMAGIC_MAGIC_H_DIR
NAMES magic.h
HINTS ${CMAKE_INSTALL_PREFIX}
PATH_SUFFIXES include include/linux
)
)
if(NOT LIBMAGIC_MAGIC_H_DIR)
message(FATAL_ERROR "magic.h not found")
endif()
# on Debian-ish systems, libmagic depends on zlib
find_package(ZLIB REQUIRED)
add_library(libmagic_static INTERFACE IMPORTED)
set_property(TARGET libmagic_static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LIBMAGIC_MAGIC_H_DIR})
set_property(TARGET libmagic_static PROPERTY INTERFACE_LINK_LIBRARIES ${LIBMAGIC_A};ZLIB::ZLIB)
+5
View File
@@ -0,0 +1,5 @@
set(CMAKE_SYSTEM_NAME Linux CACHE STRING "" FORCE)
set(CMAKE_SYSTEM_PROCESSOR i386 CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS "-m32" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-m32" CACHE STRING "" FORCE)
Submodule
+1
Submodule lib/CImg added at 631cb96120
+18 -18
View File
@@ -15,74 +15,74 @@ target_link_libraries(test_cpp_feather_ini_parser PRIVATE cpp-feather-ini-parser
add_test(test_cpp_feather_ini_parser test_cpp_feather_ini_parser)
if(NOT USE_SYSTEM_BOOST)
add_library(boost_config IMPORTED INTERFACE)
add_library(boost_config INTERFACE)
set_property(TARGET boost_config PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-config/include>")
add_library(boost_utility IMPORTED INTERFACE)
add_library(boost_utility INTERFACE)
set_property(TARGET boost_utility PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-utility/include>")
set_property(TARGET boost_utility PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_predef IMPORTED INTERFACE)
add_library(boost_predef INTERFACE)
set_property(TARGET boost_predef PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-predef/include>")
set_property(TARGET boost_predef PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_assert IMPORTED INTERFACE)
add_library(boost_assert INTERFACE)
set_property(TARGET boost_assert PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-assert/include>")
set_property(TARGET boost_assert PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_core IMPORTED INTERFACE)
add_library(boost_core INTERFACE)
set_property(TARGET boost_core PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-core/include>")
set_property(TARGET boost_core PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_type_traits IMPORTED INTERFACE)
add_library(boost_type_traits INTERFACE)
set_property(TARGET boost_type_traits PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-type_traits/include>")
set_property(TARGET boost_type_traits PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_iterator IMPORTED INTERFACE)
add_library(boost_iterator INTERFACE)
set_property(TARGET boost_iterator PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-iterator/include>")
set_property(TARGET boost_iterator PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_mpl IMPORTED INTERFACE)
add_library(boost_mpl INTERFACE)
set_property(TARGET boost_mpl PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-mpl/include>")
set_property(TARGET boost_mpl PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_preprocessor IMPORTED INTERFACE)
add_library(boost_preprocessor INTERFACE)
set_property(TARGET boost_preprocessor PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-preprocessor/include>")
set_property(TARGET boost_preprocessor PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_static_assert IMPORTED INTERFACE)
add_library(boost_static_assert INTERFACE)
set_property(TARGET boost_static_assert PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-static_assert/include>")
set_property(TARGET boost_static_assert PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_detail IMPORTED INTERFACE)
add_library(boost_detail INTERFACE)
set_property(TARGET boost_detail PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-detail/include>")
set_property(TARGET boost_detail PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_smart_ptr IMPORTED INTERFACE)
add_library(boost_smart_ptr INTERFACE)
set_property(TARGET boost_smart_ptr PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-smart_ptr/include>")
set_property(TARGET boost_smart_ptr PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_throw_exception IMPORTED INTERFACE)
add_library(boost_throw_exception INTERFACE)
set_property(TARGET boost_throw_exception PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-throw_exception/include>")
set_property(TARGET boost_throw_exception PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_io IMPORTED INTERFACE)
add_library(boost_io INTERFACE)
set_property(TARGET boost_io PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-io/include>")
set_property(TARGET boost_io PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_container_hash IMPORTED INTERFACE)
add_library(boost_container_hash INTERFACE)
set_property(TARGET boost_container_hash PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-container_hash/include>")
set_property(TARGET boost_container_hash PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_functional IMPORTED INTERFACE)
add_library(boost_functional INTERFACE)
set_property(TARGET boost_functional PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-functional/include>")
set_property(TARGET boost_functional PROPERTY INTERFACE_LINK_LIBRARIES "boost_config;boost_container_hash")
add_library(boost_range IMPORTED INTERFACE)
add_library(boost_range INTERFACE)
set_property(TARGET boost_range PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-range/include>")
set_property(TARGET boost_range PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
add_library(boost_integer IMPORTED INTERFACE)
add_library(boost_integer INTERFACE)
set_property(TARGET boost_integer PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/boost-integer/include>")
set_property(TARGET boost_integer PROPERTY INTERFACE_LINK_LIBRARIES "boost_config")
+15 -6
View File
@@ -26,9 +26,18 @@ OLD_CWD=$(readlink -f .)
pushd "$BUILD_DIR"
cmake "$REPO_ROOT"
if [ "$ARCH" == "x86_64" ]; then
EXTRA_CMAKE_ARGS=()
elif [ "$ARCH" == "i386" ]; then
EXTRA_CMAKE_ARGS=("-DCMAKE_TOOLCHAIN_FILE=$REPO_ROOT/cmake/toolchains/i386-linux-gnu.cmake" "-DUSE_SYSTEM_CIMG=OFF")
else
echo "Architecture not supported: $ARCH" 1>&2
exit 1
fi
make VERBOSE=1
cmake "$REPO_ROOT" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo "${EXTRA_CMAKE_ARGS[@]}"
make -j$(nproc)
# args are used more than once
LINUXDEPLOY_ARGS=("--init-appdir" "--appdir" "AppDir" "-e" "bin/linuxdeploy" "-i" "$REPO_ROOT/resources/linuxdeploy.png" "--create-desktop-file" "-e" "/usr/bin/patchelf" "-e" "/usr/bin/strip")
@@ -37,12 +46,12 @@ LINUXDEPLOY_ARGS=("--init-appdir" "--appdir" "AppDir" "-e" "bin/linuxdeploy" "-i
bin/linuxdeploy "${LINUXDEPLOY_ARGS[@]}"
# bundle AppImage plugin
wget https://github.com/TheAssassin/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
chmod +x linuxdeploy-plugin-appimage*.AppImage
mv linuxdeploy-plugin-appimage*.AppImage AppDir/usr/bin/
wget https://github.com/TheAssassin/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-"$ARCH".AppImage
chmod +x linuxdeploy-plugin-appimage-"$ARCH".AppImage
mv linuxdeploy-plugin-appimage-"$ARCH".AppImage AppDir/usr/bin/
# build AppImage using plugin
AppDir/usr/bin/linuxdeploy-plugin-appimage*.AppImage --appdir AppDir/
AppDir/usr/bin/linuxdeploy-plugin-appimage-"$ARCH".AppImage --appdir AppDir/
# rename AppImage to avoid "Text file busy" issues when using it to create another one
mv ./linuxdeploy*.AppImage test.AppImage