summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/makeself/build-runfile.sh50
-rw-r--r--scripts/makeself/header9
-rw-r--r--scripts/makeself/lsm15
3 files changed, 74 insertions, 0 deletions
diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh
new file mode 100755
index 000000000..56eca4c4e
--- /dev/null
+++ b/scripts/makeself/build-runfile.sh
@@ -0,0 +1,50 @@
+#! /usr/bin/env bash
+
+# path constants
+cd "$(dirname "$0")/../.."
+xmakeroot=`pwd`
+buildroot=$xmakeroot/scripts/makeself
+temproot=/tmp/xmake-makeself
+
+# prepare files to pack
+# clean up temproot
+rm -rf $temproot
+mkdir -p $temproot
+
+# copy xmake repo to temproot/xmake-repo, remove git ignored files
+cp -Tr $xmakeroot $temproot/xmake-repo
+cd $temproot/xmake-repo
+git clean -dfX
+git submodule foreach git clean -dfX
+
+# copy files to temproot/xmake
+mkdir -p $temproot/xmake/scripts
+cd $temproot/xmake-repo
+cp -r ./core $temproot/xmake
+cp -r ./xmake $temproot/xmake
+cp ./scripts/get.sh $temproot/xmake/scripts
+cp ./*.md $temproot/xmake
+cp makefile $temproot/xmake
+cd $temproot/xmake
+rm -rf ./core/src/tbox/tbox/src/demo
+rm -rf ./core/src/pdcurses
+
+# prepare info texts
+cd $temproot
+cp $buildroot/* .
+version=`cat ./xmake/core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"`
+sed -i "s/#xmake-version#/$version/g" ./header
+sed -i "s/#xmake-version#/$version/g" ./lsm
+
+# make run file
+cd $temproot
+wget https://github.com/megastep/makeself/releases/download/release-2.4.0/makeself-2.4.0.run -O ./makeself-2.4.0.run
+sh ./makeself-2.4.0.run
+./makeself-2.4.0/makeself.sh \
+ --sha256 \
+ --lsm ./lsm \
+ --help-header ./header \
+ ./xmake \
+ $buildroot/xmake.run \
+ xmake-v$version-runfile \
+ ./scripts/get.sh __local__
diff --git a/scripts/makeself/header b/scripts/makeself/header
new file mode 100644
index 000000000..a65aeddf0
--- /dev/null
+++ b/scripts/makeself/header
@@ -0,0 +1,9 @@
+xmake v#xmake-version#, A cross-platform build utility based on Lua
+Copyright (C) 2015-2019 Ruki Wang, tboox.org, xmake.io
+Copyright (C) 2005-2015 Mike Pall, luajit.org
+ _
+ __ ___ __ __ __ _| | ______
+ \ \/ / | \/ |/ _ | |/ / __ \
+ > < | \__/ | /_| | < ___/
+ /_/\_\_|_| |_|\__ \|_|\_\____|
+ by ruki, tboox.org
diff --git a/scripts/makeself/lsm b/scripts/makeself/lsm
new file mode 100644
index 000000000..012efa4a1
--- /dev/null
+++ b/scripts/makeself/lsm
@@ -0,0 +1,15 @@
+Begin3
+Title: xmake
+Version: #xmake-version#
+Description: xmake is a cross-platform build utility based on lua.
+ The project focuses on making development and building easier and
+ provides many features (e.g package, install, plugin, macro, action, option, task ...),
+ so that any developer can quickly pick it up and
+ enjoy a productivity boost when developing and building projects.
+Keywords: make build
+Author: ruki ([email protected])
+Maintained-by: ruki ([email protected])
+Original-site: https://xmake.io/
+Platform: Unix; Windows
+Copying-policy: Apache-2.0
+End