From 165bc589fdb5e8d3dd03f2e6030172629eb07ded Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 8 Nov 2013 17:37:47 -0500 Subject: [PATCH] Linux install and uninstall seem to work. --- .gitignore | 1 + Makefile.linux | 3 +++ buildinstaller.sh | 8 ++++---- file2lz4c.cpp | 4 ++-- installer.cpp | 8 +++++++- installer/linux/init.d/zerotier-one | 2 +- installer/linux/uninstall.sh | 17 ++++++++++------- 7 files changed, 28 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index def2ee7a..13ae8d3b 100755 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ mac-tap/tuntap/tap.kext *.tlog /installer-build /zt1-*-install +/file2lz4c diff --git a/Makefile.linux b/Makefile.linux index 1bae1c3b..83953ac1 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -38,6 +38,9 @@ idtool: $(OBJS) file2lz4c: ext/lz4/lz4hc.o FORCE $(CXX) $(CXXFLAGS) -o file2lz4c file2lz4c.cpp node/Utils.cpp node/Salsa20.cpp ext/lz4/lz4hc.o +installer: one FORCE + ./buildinstaller.sh + clean: rm -f $(OBJS) file2lz4c zerotier-* zt1-*-install rm -rf installer-build diff --git a/buildinstaller.sh b/buildinstaller.sh index a669ab59..f47b2d52 100755 --- a/buildinstaller.sh +++ b/buildinstaller.sh @@ -1,6 +1,6 @@ #!/bin/bash -make -j 4 one file2lz4c +make file2lz4c if [ ! -f file2lz4c ]; then echo "Build of file2lz4c utility failed, aborting installer build." @@ -8,7 +8,7 @@ if [ ! -f file2lz4c ]; then fi if [ ! -f zerotier-one ]; then - echo "Build of zerotier-one failed, aborting installer build." + echo "Could not find 'zerotier-one' binary, please build before running this script." exit 2 fi @@ -50,10 +50,10 @@ case "$system" in ./file2lz4c installer/linux/uninstall.sh uninstall_sh >installer-build/uninstall_sh.h ./file2lz4c installer/linux/init.d/zerotier-one linux__init_d__zerotier_one >installer-build/linux__init_d__zerotier_one.h - ls -l installer-build - g++ -Os -o "zt1-${vmajor}_${vminor}_${revision}-linux-${machine}-install" installer.cpp ext/lz4/lz4.o ext/lz4/lz4hc.o + ls -l zt1-*-install + ;; Darwin) diff --git a/file2lz4c.cpp b/file2lz4c.cpp index 7715ba87..aa0acd0b 100644 --- a/file2lz4c.cpp +++ b/file2lz4c.cpp @@ -69,8 +69,8 @@ int main(int argc,char **argv) for(int i=0;i