You've already forked linuxdeploy
mirror of
https://github.com/encounter/linuxdeploy.git
synced 2026-07-10 12:18:44 -07:00
Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56760df190 | |||
| 23dcaa5cda | |||
| 097212aa1e | |||
| 37b640fa86 | |||
| ed42a40a87 | |||
| 4c5b9c5daf | |||
| 0f5361b457 | |||
| fc27076843 | |||
| f59f8f9512 | |||
| ae8699854a | |||
| fa3e51c7db | |||
| d2e9567029 | |||
| fb5cd4d32d | |||
| 5fb5ca5a8b | |||
| ae714d69ff | |||
| 01331697d0 | |||
| d903364ffc | |||
| d77cff2adc | |||
| 5685bc575e | |||
| d621d3949d | |||
| 0c49714228 | |||
| 9aa59f3e75 | |||
| bcd9d5337e | |||
| 39ab9909cf | |||
| 03d8cb3234 | |||
| 2dfccf760b | |||
| 789222bae6 | |||
| 7e3beb4336 | |||
| 63d2fa5437 | |||
| 49f4f23776 | |||
| 1d534d2b32 | |||
| 3c6096433d | |||
| 86c99ccfb4 | |||
| d5c4124a0b | |||
| a73dbf68f4 | |||
| a7a255f9f1 | |||
| 679904ce7b | |||
| 6b96159f88 | |||
| ab49cecf09 | |||
| 49c3a57226 | |||
| 39b03f630d | |||
| 0a6a1c59b7 | |||
| 7b1c858ff5 | |||
| 0c23a481fe | |||
| b7c9785626 | |||
| 9fb2ac35d2 | |||
| f83a0e99eb | |||
| 8c848e6b26 | |||
| 58f8b6a6fd | |||
| c1bd11028c | |||
| da1bae216a | |||
| b42420e731 | |||
| 8f86082322 | |||
| fb80d6a4f4 | |||
| 575dde281d | |||
| 3e05627373 | |||
| 73f3126a59 | |||
| b6a1ba290e | |||
| 3c21d86574 | |||
| 2554b35403 | |||
| bfcde878e2 | |||
| 04d5321a5f | |||
| 76f1d8fee5 | |||
| e4fff0a5b7 |
@@ -0,0 +1,75 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# build at least once a month
|
||||
- cron: '0 0 1 * *'
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
strategy:
|
||||
matrix:
|
||||
ARCH: [x86_64, i386]
|
||||
BUILD_TYPE: [appimage, coverage]
|
||||
fail-fast: false
|
||||
|
||||
name: ${{ matrix.BUILD_TYPE }} ${{ matrix.ARCH }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
ARCH: ${{ matrix.ARCH }}
|
||||
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies (x86_64)
|
||||
if: matrix.ARCH == 'x86_64'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcovr libmagic-dev libjpeg-dev libpng-dev libboost-filesystem-dev libboost-regex-dev cimg-dev
|
||||
|
||||
- name: Install dependencies (i386)
|
||||
if: matrix.ARCH == 'i386'
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcovr libmagic-dev:i386 libjpeg-dev:i386 libpng-dev:i386 libboost-filesystem-dev:i386 libboost-regex-dev:i386 cimg-dev gcc-multilib g++-multilib libfuse2:i386
|
||||
|
||||
- name: Test coverage
|
||||
run: bash -ex ci/test-coverage.sh
|
||||
if: matrix.BUILD_TYPE == 'coverage'
|
||||
|
||||
- name: Build, test and build AppImage
|
||||
run: bash -ex ci/build.sh
|
||||
if: matrix.BUILD_TYPE != 'coverage'
|
||||
|
||||
- name: Archive artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
if: matrix.BUILD_TYPE != 'coverage'
|
||||
with:
|
||||
name: AppImage
|
||||
path: linuxdeploy*.AppImage*
|
||||
|
||||
upload:
|
||||
name: Create release and upload artifacts
|
||||
needs:
|
||||
- build-and-test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
- name: Inspect directory after downloading artifacts
|
||||
run: ls -alFR
|
||||
- name: Create release and upload artifacts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
|
||||
chmod +x pyuploadtool-x86_64.AppImage
|
||||
./pyuploadtool-x86_64.AppImage **/linuxdeploy*.AppImage*
|
||||
@@ -3,3 +3,4 @@ cmake-build-*/
|
||||
.idea/
|
||||
squashfs-root/
|
||||
*.AppImage
|
||||
*.swp
|
||||
|
||||
+3
-72
@@ -1,81 +1,12 @@
|
||||
[submodule "lib/args"]
|
||||
path = lib/args
|
||||
url = https://github.com/Taywee/args.git
|
||||
[submodule "lib/boost-filesystem"]
|
||||
path = lib/boost-filesystem
|
||||
url = https://github.com/boostorg/filesystem.git
|
||||
[submodule "lib/boost-regex"]
|
||||
path = lib/boost-regex
|
||||
url = https://github.com/boostorg/regex.git
|
||||
[submodule "lib/boost-system"]
|
||||
path = lib/boost-system
|
||||
url = https://github.com/boostorg/system.git
|
||||
[submodule "lib/boost-config"]
|
||||
path = lib/boost-config
|
||||
url = https://github.com/boostorg/config.git
|
||||
[submodule "lib/boost-utility"]
|
||||
path = lib/boost-utility
|
||||
url = https://github.com/boostorg/utility.git
|
||||
[submodule "lib/boost-predef"]
|
||||
path = lib/boost-predef
|
||||
url = https://github.com/boostorg/predef.git
|
||||
[submodule "lib/boost-assert"]
|
||||
path = lib/boost-assert
|
||||
url = https://github.com/boostorg/assert.git
|
||||
[submodule "lib/boost-core"]
|
||||
path = lib/boost-core
|
||||
url = https://github.com/boostorg/core.git
|
||||
[submodule "lib/boost-type_traits"]
|
||||
path = lib/boost-type_traits
|
||||
url = https://github.com/boostorg/type_traits.git
|
||||
[submodule "lib/boost-iterator"]
|
||||
path = lib/boost-iterator
|
||||
url = https://github.com/boostorg/iterator.git
|
||||
[submodule "lib/boost-mpl"]
|
||||
path = lib/boost-mpl
|
||||
url = https://github.com/boostorg/mpl.git
|
||||
[submodule "lib/boost-preprocessor"]
|
||||
path = lib/boost-preprocessor
|
||||
url = https://github.com/boostorg/preprocessor.git
|
||||
[submodule "lib/boost-static_assert"]
|
||||
path = lib/boost-static_assert
|
||||
url = https://github.com/boostorg/static_assert.git
|
||||
[submodule "lib/boost-detail"]
|
||||
path = lib/boost-detail
|
||||
url = https://github.com/boostorg/detail.git
|
||||
[submodule "lib/boost-smart_ptr"]
|
||||
path = lib/boost-smart_ptr
|
||||
url = https://github.com/boostorg/smart_ptr.git
|
||||
[submodule "lib/boost-exception"]
|
||||
path = lib/boost-exception
|
||||
url = https://github.com/boostorg/exception.git
|
||||
[submodule "lib/boost-throw_exception"]
|
||||
path = lib/boost-throw_exception
|
||||
url = https://github.com/boostorg/throw_exception.git
|
||||
[submodule "lib/boost-io"]
|
||||
path = lib/boost-io
|
||||
url = https://github.com/boostorg/io.git
|
||||
[submodule "lib/boost-functional"]
|
||||
path = lib/boost-functional
|
||||
url = https://github.com/boostorg/functional.git
|
||||
[submodule "lib/boost-container_hash"]
|
||||
path = lib/boost-container_hash
|
||||
url = https://github.com/boostorg/container_hash.git
|
||||
[submodule "lib/boost-range"]
|
||||
path = lib/boost-range
|
||||
url = https://github.com/boostorg/range.git
|
||||
[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
|
||||
[submodule "lib/googletest"]
|
||||
path = lib/googletest
|
||||
url = https://github.com/google/googletest
|
||||
[submodule "lib/boost-container"]
|
||||
path = lib/boost-container
|
||||
url = https://github.com/boostorg/container
|
||||
[submodule "lib/linuxdeploy-desktopfile"]
|
||||
path = lib/linuxdeploy-desktopfile
|
||||
url = https://github.com/linuxdeploy/linuxdeploy-desktopfile
|
||||
[submodule "lib/cmake-scripts"]
|
||||
path = lib/cmake-scripts
|
||||
url = https://github.com/linuxdeploy/cmake-scripts.git
|
||||
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
language: cpp
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- name: Ubuntu bionic x86_64 release build
|
||||
env: ARCH=x86_64
|
||||
dist: bionic
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
packages:
|
||||
- libmagic-dev
|
||||
- libjpeg-dev
|
||||
- libpng-dev
|
||||
- cimg-dev
|
||||
script: travis/build.sh
|
||||
after_success:
|
||||
- if [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
|
||||
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||
- bash upload.sh linuxdeploy-"$ARCH".AppImage*
|
||||
|
||||
- name: Ubuntu bionic i386 build
|
||||
env: ARCH=i386
|
||||
dist: bionic
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
packages:
|
||||
- libmagic-dev:i386
|
||||
- libjpeg-dev:i386
|
||||
- libpng-dev:i386
|
||||
- gcc-multilib
|
||||
- g++-multilib
|
||||
- libfuse2:i386
|
||||
- libcairo2:i386
|
||||
script: travis/build.sh
|
||||
after_success:
|
||||
- if [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
|
||||
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||
- bash upload.sh linuxdeploy-"$ARCH".AppImage*
|
||||
|
||||
- name: Ubuntu xenial x86_64 coverage build (no binaries uploaded)
|
||||
env: ARCH=x86_64 BUILD_TYPE=coverage
|
||||
dist: xenial
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
packages:
|
||||
- libmagic-dev
|
||||
- libjpeg-dev
|
||||
- libpng-dev
|
||||
- cimg-dev
|
||||
before_script:
|
||||
- sudo pip install gcovr
|
||||
script: travis/test-coverage.sh
|
||||
after_success: true # also, we don't intend to upload release binaries
|
||||
|
||||
- name: Ubuntu xenial i386 coverage build (no binaries uploaded)
|
||||
env: ARCH=i386 BUILD_TYPE=coverage
|
||||
dist: xenial
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
packages:
|
||||
- libmagic-dev:i386
|
||||
- libjpeg-dev:i386
|
||||
- libpng-dev:i386
|
||||
- gcc-multilib
|
||||
- g++-multilib
|
||||
- libfuse2:i386
|
||||
- libcairo2:i386
|
||||
before_script:
|
||||
- sudo pip install gcovr
|
||||
script: travis/test-coverage.sh
|
||||
after_success: true # also, we don't intend to upload release binaries
|
||||
|
||||
branches:
|
||||
except:
|
||||
- # Do not build tags that we create when we upload to GitHub Releases
|
||||
- /^(?i:continuous)$/
|
||||
+8
-4
@@ -7,9 +7,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
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")
|
||||
|
||||
# support for ccache
|
||||
# call CMake with -DUSE_CCACHE=ON to make use of it
|
||||
set(USE_CCACHE ON CACHE BOOL "")
|
||||
@@ -43,11 +40,18 @@ if(ENABLE_COVERAGE)
|
||||
setup_target_for_coverage_gcovr_text(NAME coverage_text EXECUTABLE "${command}")
|
||||
endif()
|
||||
|
||||
include(CTest)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
# including this before including lib/ makes sure that the top level project's gtest is used everywhere
|
||||
include(${PROJECT_SOURCE_DIR}/lib/cmake-scripts/include-or-build-gtest.cmake)
|
||||
endif()
|
||||
|
||||
add_subdirectory(lib)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
include(CTest)
|
||||
if(BUILD_TESTING)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
@@ -44,17 +44,17 @@ cmake --version
|
||||
# configure build for AppImage release
|
||||
cmake "$REPO_ROOT" -DSTATIC_BUILD=On -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo "${EXTRA_CMAKE_ARGS[@]}"
|
||||
|
||||
make -j"$(nproc)" linuxdeploy
|
||||
make -j"$(nproc)"
|
||||
|
||||
## Run Unit Tests
|
||||
ctest -V
|
||||
|
||||
# build patchelf
|
||||
"$REPO_ROOT"/travis/build-static-patchelf.sh "$(readlink -f out/)"
|
||||
"$REPO_ROOT"/ci/build-static-patchelf.sh "$(readlink -f out/)"
|
||||
patchelf_path="$(readlink -f out/usr/bin/patchelf)"
|
||||
|
||||
# build custom strip
|
||||
"$REPO_ROOT"/travis/build-static-binutils.sh "$(readlink -f out/)"
|
||||
"$REPO_ROOT"/ci/build-static-binutils.sh "$(readlink -f out/)"
|
||||
strip_path="$(readlink -f out/usr/bin/strip)"
|
||||
|
||||
# use tools we just built for linuxdeploy run
|
||||
@@ -1,64 +1,97 @@
|
||||
# required for PNG imported target
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
#[=======================================================================[.rst:
|
||||
FindCImg
|
||||
-------
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(libpng REQUIRED IMPORTED_TARGET libpng)
|
||||
Finds the CImg library.
|
||||
|
||||
# build custom static version of libjpeg for static builds
|
||||
if(STATIC_BUILD)
|
||||
include(ExternalProject)
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
if($ENV{ARCH} MATCHES "i[356]86")
|
||||
set(configure_command_prefix env CFLAGS=-m32 CXXFLAGS=-m32)
|
||||
This module provides the following imported targets, if found:
|
||||
|
||||
``CImg``
|
||||
The CImg library
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``CImg_FOUND``
|
||||
True if the system has the CImg library.
|
||||
``CImg_VERSION``
|
||||
The version of the CImg library which was found.
|
||||
``CImg_INCLUDE_DIRS``
|
||||
Include directories needed to use CImg.
|
||||
``CImg_LIBRARIES``
|
||||
Libraries needed to link to CImg.
|
||||
|
||||
Cache Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``CImg_INCLUDE_DIR``
|
||||
The directory containing ``CImg.h``.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# 3.6 required for PNG imported target
|
||||
# 3.9 required for CMAKE_MATCH_<n>
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
|
||||
find_path(CIMG_H_DIR
|
||||
NAMES CImg.h
|
||||
HINTS ${CMAKE_INSTALL_PREFIX} ${CIMG_DIR}
|
||||
PATH_SUFFIXES include include/linux
|
||||
)
|
||||
|
||||
if(NOT CIMG_H_DIR)
|
||||
set(CImg_FOUND FALSE)
|
||||
else()
|
||||
set(CImg_FOUND TRUE)
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(libpng REQUIRED libpng)
|
||||
pkg_check_modules(libjpeg REQUIRED libjpeg)
|
||||
|
||||
set(PNG_INCLUDE_DIR ${libpng_INCLUDE_DIRS})
|
||||
set(JPEG_INCLUDE_DIR ${libjpeg_INCLUDE_DIRS})
|
||||
|
||||
if(STATIC_BUILD)
|
||||
set(PNG_LIBRARY ${libpng_STATIC_LIBRARIES})
|
||||
set(JPEG_LIBRARIES ${libjpeg_STATIC_LIBRARIES})
|
||||
else()
|
||||
set(PNG_LIBRARY ${libpng_LIBRARIES})
|
||||
set(JPEG_LIBRARIES ${libjpeg_LIBRARIES})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(libjpeg_static_extproj
|
||||
URL https://www.ijg.org/files/jpegsrc.v9d.tar.gz
|
||||
URL_HASH SHA256=99cb50e48a4556bc571dadd27931955ff458aae32f68c4d9c39d624693f69c32
|
||||
BUILD_IN_SOURCE ON
|
||||
EXCLUDE_FROM_ALL ON
|
||||
CONFIGURE_COMMAND ${configure_command_prefix} ./configure --prefix=/usr
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
set(CImg_INCLUDE_DIR ${CIMG_H_DIR} CACHE STRING "")
|
||||
set(CImg_INCLUDE_DIRS ${CImg_INCLUDE_DIR})
|
||||
set(CImg_LIBRARIES "${PNG_LIBRARY};${JPEG_LIBRARIES}")
|
||||
set(CImg_DEFINITIONS "cimg_display=0;cimg_use_png=1;cimg_use_jpeg=1")
|
||||
|
||||
ExternalProject_Get_property(libjpeg_static_extproj SOURCE_DIR)
|
||||
add_library(libjpeg_static INTERFACE IMPORTED)
|
||||
set_property(TARGET libjpeg_static PROPERTY INTERFACE_LINK_LIBRARIES ${SOURCE_DIR}/.libs/libjpeg.a)
|
||||
add_dependencies(libjpeg_static libjpeg_static_extproj)
|
||||
file(READ "${CIMG_H_DIR}/CImg.h" header)
|
||||
string(REGEX MATCH "#define cimg_version ([0-9a-zA-Z\.]+)" _ "${header}")
|
||||
set(CImg_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
set(JPEG_LIBRARIES libjpeg_static)
|
||||
else()
|
||||
find_package(JPEG REQUIRED)
|
||||
endif()
|
||||
# CImg_VERSION
|
||||
|
||||
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")
|
||||
if(NOT TARGET CImg)
|
||||
add_library(CImg INTERFACE)
|
||||
set_property(TARGET CImg PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CIMG_H_DIR};${PNG_INCLUDE_DIR};${JPEG_INCLUDE_DIR}")
|
||||
set_property(TARGET CImg PROPERTY INTERFACE_LINK_LIBRARIES "${CImg_LIBRARIES}")
|
||||
set_property(TARGET CImg PROPERTY INTERFACE_COMPILE_DEFINITIONS "${CImg_DEFINITIONS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PNG_INCLUDE_DIR ${libpng_INCLUDE_DIRS})
|
||||
if(NOT STATIC_BUILD)
|
||||
set(PNG_LIBRARY ${libpng_LIBRARIES})
|
||||
else()
|
||||
set(PNG_LIBRARY ${libpng_STATIC_LIBRARIES})
|
||||
endif()
|
||||
|
||||
#message(FATAL_ERROR "${PNG_LIBRARY}")
|
||||
|
||||
add_library(CImg INTERFACE)
|
||||
set_property(TARGET CImg PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CIMG_H_DIR};${PNG_INCLUDE_DIR};${JPEG_INCLUDE_DIR}")
|
||||
set_property(TARGET CImg PROPERTY INTERFACE_LINK_LIBRARIES "${PNG_LIBRARY};${JPEG_LIBRARIES}")
|
||||
set_property(TARGET CImg PROPERTY INTERFACE_COMPILE_DEFINITIONS "cimg_display=0;cimg_use_png=1;cimg_use_jpeg=1")
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CImg
|
||||
FOUND_VAR CImg_FOUND
|
||||
REQUIRED_VARS
|
||||
CImg_INCLUDE_DIRS
|
||||
CImg_LIBRARIES
|
||||
CImg_DEFINITIONS
|
||||
VERSION_VAR CImg_VERSION
|
||||
)
|
||||
|
||||
@@ -38,6 +38,9 @@ namespace linuxdeploy {
|
||||
// shortcut for using a normal string instead of a path
|
||||
explicit AppDir(const std::string& path);
|
||||
|
||||
// Set additional shared library name patterns to be excluded from deployment.
|
||||
void setExcludeLibraryPatterns(const std::vector<std::string> &excludeLibraryPatterns);
|
||||
|
||||
// creates basic directory structure of an AppDir in "FHS" mode
|
||||
bool createBasicStructure() const;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace linuxdeploy {
|
||||
namespace core {
|
||||
namespace elf {
|
||||
namespace elf_file {
|
||||
// thrown by constructor if file is not an ELF file
|
||||
class ElfFileParseError : public std::runtime_error {
|
||||
public:
|
||||
@@ -64,6 +64,12 @@ namespace linuxdeploy {
|
||||
|
||||
// return OS ABI
|
||||
uint8_t getElfABI();
|
||||
|
||||
// check if this file is a debug symbols file
|
||||
bool isDebugSymbolsFile();
|
||||
|
||||
// check whether the file contains a dynsym section
|
||||
bool isDynamicallyLinked();
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,8 @@ namespace linuxdeploy {
|
||||
|
||||
static int check_waitpid_status_(int status);
|
||||
|
||||
static void close_pipe_fd_(int fd);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create a child process.
|
||||
|
||||
@@ -56,6 +56,18 @@ namespace linuxdeploy {
|
||||
return split(s, '\n');
|
||||
}
|
||||
|
||||
static std::string join(const std::vector<std::string> &strings, const std::string &delimiter) {
|
||||
std::string result;
|
||||
for (size_t i = 0; i < strings.size(); i++) {
|
||||
result += strings[i];
|
||||
|
||||
if (i != strings.size() - 1) {
|
||||
result += delimiter;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline std::string strLower(std::string s) {
|
||||
std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c) { return std::tolower(c); });
|
||||
return s;
|
||||
|
||||
-1
Submodule lib/CImg deleted from 631cb96120
+1
-53
@@ -1,57 +1,5 @@
|
||||
include(CTest)
|
||||
|
||||
add_library(args INTERFACE)
|
||||
target_sources(args INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/args/args.hxx)
|
||||
target_include_directories(args INTERFACE args)
|
||||
|
||||
add_subdirectory(linuxdeploy-desktopfile)
|
||||
|
||||
function(ld_add_boost_headeronly_lib)
|
||||
set(options "")
|
||||
set(oneValueArgs TARGET_NAME ROOT_DIR)
|
||||
set(multiValueArgs LINK_LIBRARIES)
|
||||
cmake_parse_arguments(A "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
# message(STATUS "Adding boost header-only library ${A_TARGET_NAME} in directory ${A_ROOT_DIR} with dependencies to ${A_LINK_LIBRARIES}")
|
||||
add_library(${A_TARGET_NAME} INTERFACE)
|
||||
set_property(TARGET ${A_TARGET_NAME} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${A_ROOT_DIR}/include>")
|
||||
set_property(TARGET ${A_TARGET_NAME} PROPERTY INTERFACE_LINK_LIBRARIES ${A_LINK_LIBRARIES})
|
||||
endfunction()
|
||||
|
||||
|
||||
if(NOT USE_SYSTEM_BOOST)
|
||||
ld_add_boost_headeronly_lib(TARGET_NAME boost_config ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/boost-config)
|
||||
|
||||
ld_add_boost_headeronly_lib(TARGET_NAME boost_throw_exception ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/boost-throw_exception LINK_LIBRARIES boost_throw_exception)
|
||||
|
||||
foreach(boost_lib_name utility predef assert core type_traits iterator mpl preprocessor static_assert detail smart_ptr exception io container_hash range integer)
|
||||
ld_add_boost_headeronly_lib(TARGET_NAME boost_${boost_lib_name} ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/boost-${boost_lib_name} LINK_LIBRARIES boost_config;boost_throw_exception)
|
||||
endforeach()
|
||||
|
||||
ld_add_boost_headeronly_lib(TARGET_NAME boost_functional ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/boost-utility LINK_LIBRARIES boost_config;boost_container_hash)
|
||||
|
||||
file(GLOB boost_system_srcs ${CMAKE_CURRENT_SOURCE_DIR}/boost-system/src/*.cpp)
|
||||
add_library(boost_system STATIC ${boost_system_srcs})
|
||||
target_include_directories(boost_system PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/boost-system/include)
|
||||
target_link_libraries(boost_system PUBLIC
|
||||
boost_config boost_predef boost_assert boost_core boost_type_traits boost_iterator boost_mpl boost_preprocessor
|
||||
boost_static_assert boost_detail boost_smart_ptr boost_throw_exception boost_io boost_functional boost_range
|
||||
)
|
||||
|
||||
file(GLOB boost_filesystem_srcs ${CMAKE_CURRENT_SOURCE_DIR}/boost-filesystem/src/*.cpp)
|
||||
add_library(boost_filesystem STATIC ${boost_filesystem_srcs})
|
||||
target_include_directories(boost_filesystem PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/boost-filesystem/include)
|
||||
target_link_libraries(boost_filesystem PUBLIC boost_config boost_utility boost_system boost_throw_exception)
|
||||
|
||||
file(GLOB boost_regex_srcs ${CMAKE_CURRENT_SOURCE_DIR}/boost-regex/src/*.cpp)
|
||||
add_library(boost_regex STATIC ${boost_regex_srcs})
|
||||
target_include_directories(boost_regex PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/boost-regex/include)
|
||||
target_link_libraries(boost_regex PUBLIC
|
||||
boost_config boost_predef boost_assert boost_throw_exception boost_smart_ptr boost_core boost_mpl
|
||||
boost_type_traits boost_static_assert boost_integer boost_preprocessor boost_functional boost_detail
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING AND NOT TARGET gtest)
|
||||
add_subdirectory(googletest)
|
||||
endif()
|
||||
add_subdirectory(linuxdeploy-desktopfile EXCLUDE_FROM_ALL)
|
||||
|
||||
Submodule lib/boost-assert deleted from 4bd93cd414
Submodule lib/boost-config deleted from 200d36776e
Submodule lib/boost-container deleted from 76b181f024
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user