aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2017-12-28 17:14:04 +0100
committerdec05eba <dec05eba@protonmail.com>2017-12-28 17:15:53 +0100
commit22d522f6cd09e2c5f1678a0479be5dc19ca1eb15 (patch)
tree0cb6fc7733e8d4ccc9e67724e7fc2be56b2ae9fb
parent1f583ebb6e3973c992d59886659bf53ff87f41de (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--.gitignore14
-rw-r--r--CMakeLists.txt24
-rw-r--r--backend/ninja/Ninja.cpp2
-rwxr-xr-xinstall.sh12
-rw-r--r--project.conf7
-rw-r--r--src/main.cpp2
6 files changed, 14 insertions, 47 deletions
diff --git a/.gitignore b/.gitignore
index f76c38c..5dc9509 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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;
diff --git a/install.sh b/install.sh
index ac18bf8..c73d777 100755
--- a/install.sh
+++ b/install.sh
@@ -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");