diff options
author | dec05eba <dec05eba@protonmail.com> | 2017-12-28 17:14:04 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2017-12-28 17:15:53 +0100 |
commit | 22d522f6cd09e2c5f1678a0479be5dc19ca1eb15 (patch) | |
tree | 0cb6fc7733e8d4ccc9e67724e7fc2be56b2ae9fb | |
parent | 1f583ebb6e3973c992d59886659bf53ff87f41de (diff) |
Replace cmake with sibs. Sibs builds itself now
If you dont already have sibs to build sibs, download first release:
https://github.com/DEC05EBA/sibs/archive/0.1.0.tar.gz
Then you can install new version of sibs
-rw-r--r-- | .gitignore | 14 | ||||
-rw-r--r-- | CMakeLists.txt | 24 | ||||
-rw-r--r-- | backend/ninja/Ninja.cpp | 2 | ||||
-rwxr-xr-x | install.sh | 12 | ||||
-rw-r--r-- | project.conf | 7 | ||||
-rw-r--r-- | src/main.cpp | 2 |
6 files changed, 14 insertions, 47 deletions
@@ -1,12 +1,2 @@ -CMakeCache.txt -CMakeFiles -CMakeScripts -Testing -Makefile -cmake_install.cmake -install_manifest.txt -compile_commands.json -CTestTestfile.cmake -cmake-build-debug -.idea -build +sibs-build +.idea/
\ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index a636daa..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -cmake_minimum_required(VERSION 3.0.2) -project(sibs) - -set(CMAKE_CXX_STANDARD 11) - -set(SOURCE_FILES - external/xxhash.c - backend/ninja/Ninja.cpp - src/main.cpp - src/FileUtil.cpp - src/Conf.cpp - src/PkgConfig.cpp - src/Exec.cpp - src/GlobalLib.cpp - src/curl.cpp - src/Archive.cpp) - -find_package(CURL REQUIRED) -find_package(LibArchive REQUIRED) - -add_executable(sibs ${SOURCE_FILES}) - -include_directories(${CURL_INCLUDE_DIR} ${LibArchive_INCLUDE_DIR}) -target_link_libraries(sibs ${CURL_LIBRARIES} ${LibArchive_LIBRARIES})
\ No newline at end of file diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index ddc20dd..43ded44 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -30,7 +30,7 @@ namespace backend i = 0; for(const string &str : list) { - if(i > 0); + if(i > 0) result += joinStr; result += str; ++i; @@ -2,10 +2,8 @@ set -e -scriptpath="$(dirname "$0")" -mkdir -p "$scriptpath/build/release" -cd "$scriptpath/build/release" -cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ../../ -ninja -sudo cp sibs /usr/bin/ -echo "Copied $scriptpath/build/release/sibs to /usr/bin/sibs" +project_dir=`dirname $0` +sibs build $project_dir --release +sudo cp "$project_dir/sibs-build/release/sibs" "/usr/bin/sibs" +echo "Copied $project_dir/sibs-build/release/sibs to /usr/bin/sibs" +echo "Installation successful!"
\ No newline at end of file diff --git a/project.conf b/project.conf index 96bb9b9..a6e811c 100644 --- a/project.conf +++ b/project.conf @@ -1,8 +1,9 @@ [package] name = "sibs" +type = "executable" version = "0.1.0" -authors = ["Aleksi Lindeman <aleksi_888@hotmail.com>"] +authors = ["DEC05EBA <0xdec05eba@gmail.com>"] [dependencies] -sfml-all = "2.4" -xxhash = "0.1.0"
\ No newline at end of file +libcurl = "7" +libarchive = "3.3"
\ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 0f20ea0..c9b1fe2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,6 +20,8 @@ using namespace sibs; // TODO: Places that use PATH_MAX should be modified. A path CAN be longer than PATH_MAX... (does this include replacing tinydir.h?) +// TODO: Remove install.sh when sibs supports installation of packages (so it can install itself) + void usage() { printf("Usage: sibs COMMAND\n\n"); |