From b3b49a20fb6628e586af748f400553ab33344416 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Thu, 18 Jul 2019 22:54:34 +0800 Subject: add runfile --- scripts/makeself/build-runfile.sh | 21 +++++++++++++++++++++ scripts/makeself/header | 9 +++++++++ scripts/makeself/lsm | 15 +++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 scripts/makeself/build-runfile.sh create mode 100644 scripts/makeself/header create mode 100644 scripts/makeself/lsm (limited to 'scripts') diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh new file mode 100644 index 000000000..87641dd69 --- /dev/null +++ b/scripts/makeself/build-runfile.sh @@ -0,0 +1,21 @@ +#! /bin/bash + +cd "$(dirname "$0")/../.." + +# prepare files to pack +mkdir -p /tmp/xmake-makeself/xmake +cp -r ./core /tmp/xmake-makeself/xmake +cp -r ./scripts /tmp/xmake-makeself/xmake +cp -r ./xmake /tmp/xmake-makeself/xmake +cp ./*.md /tmp/xmake-makeself/xmake +cp makefile /tmp/xmake-makeself/xmake + +cd /tmp/xmake-makeself +# install makeself +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 + +# make runfile +./makeself-2.4.0/makeself.sh --lsm ./xmake/scripts/makeself/lsm --help-header ./xmake/scripts/makeself/header ./xmake xmake.run xmake ./scripts/get.sh __local__ + +cp xmake.run "$(dirname "$0")" diff --git a/scripts/makeself/header b/scripts/makeself/header new file mode 100644 index 000000000..141a9febd --- /dev/null +++ b/scripts/makeself/header @@ -0,0 +1,9 @@ +xmake, 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 \ No newline at end of file diff --git a/scripts/makeself/lsm b/scripts/makeself/lsm new file mode 100644 index 000000000..597279afb --- /dev/null +++ b/scripts/makeself/lsm @@ -0,0 +1,15 @@ +Begin3 +Title: xmake +Version: 2.7.0 +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 (waruqi@gmail.com) +Maintained-by: ruki (waruqi@gmail.com) +Original-site: https://xmake.io/ +Platform: Unix; Windows +Copying-policy: Apache-2.0 +End \ No newline at end of file -- cgit v1.3.1 From dde2dab37fc5fa661cd99826780e761b27bf1dc0 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Thu, 18 Jul 2019 23:04:35 +0800 Subject: fix --- scripts/makeself/build-runfile.sh | 3 ++- scripts/makeself/header | 2 +- scripts/makeself/lsm | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 scripts/makeself/build-runfile.sh (limited to 'scripts') diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh old mode 100644 new mode 100755 index 87641dd69..be725bbaa --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -1,6 +1,7 @@ #! /bin/bash cd "$(dirname "$0")/../.." +xmakeroot=`pwd` # prepare files to pack mkdir -p /tmp/xmake-makeself/xmake @@ -18,4 +19,4 @@ sh ./makeself-2.4.0.run # make runfile ./makeself-2.4.0/makeself.sh --lsm ./xmake/scripts/makeself/lsm --help-header ./xmake/scripts/makeself/header ./xmake xmake.run xmake ./scripts/get.sh __local__ -cp xmake.run "$(dirname "$0")" +cp xmake.run $xmakeroot/scripts/makeself diff --git a/scripts/makeself/header b/scripts/makeself/header index 141a9febd..5622e4b9b 100644 --- a/scripts/makeself/header +++ b/scripts/makeself/header @@ -6,4 +6,4 @@ Copyright (C) 2005-2015 Mike Pall, luajit.org \ \/ / | \/ |/ _ | |/ / __ \ > < | \__/ | /_| | < ___/ /_/\_\_|_| |_|\__ \|_|\_\____| - by ruki, tboox.org \ No newline at end of file + by ruki, tboox.org diff --git a/scripts/makeself/lsm b/scripts/makeself/lsm index 597279afb..88b322af2 100644 --- a/scripts/makeself/lsm +++ b/scripts/makeself/lsm @@ -12,4 +12,4 @@ Maintained-by: ruki (waruqi@gmail.com) Original-site: https://xmake.io/ Platform: Unix; Windows Copying-policy: Apache-2.0 -End \ No newline at end of file +End -- cgit v1.3.1 From 83df4e2942ed70fee2f1189098a113d322302dcd Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Thu, 18 Jul 2019 23:07:24 +0800 Subject: add sha256 --- scripts/makeself/build-runfile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index be725bbaa..7f65678ad 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -17,6 +17,6 @@ wget https://github.com/megastep/makeself/releases/download/release-2.4.0/makese sh ./makeself-2.4.0.run # make runfile -./makeself-2.4.0/makeself.sh --lsm ./xmake/scripts/makeself/lsm --help-header ./xmake/scripts/makeself/header ./xmake xmake.run xmake ./scripts/get.sh __local__ +./makeself-2.4.0/makeself.sh --sha256 --lsm ./xmake/scripts/makeself/lsm --help-header ./xmake/scripts/makeself/header ./xmake xmake.run xmake ./scripts/get.sh __local__ cp xmake.run $xmakeroot/scripts/makeself -- cgit v1.3.1 From bb6a06dd886720ed975af79db9b37e78e39a5fcc Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 19 Jul 2019 09:31:32 +0800 Subject: clean up package --- scripts/makeself/build-runfile.sh | 34 ++++++++++++++++++++++++---------- scripts/makeself/header | 2 +- scripts/makeself/lsm | 2 +- 3 files changed, 26 insertions(+), 12 deletions(-) (limited to 'scripts') diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index 7f65678ad..87a325557 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -2,21 +2,35 @@ cd "$(dirname "$0")/../.." xmakeroot=`pwd` +temproot=/tmp/xmake-makeself # prepare files to pack -mkdir -p /tmp/xmake-makeself/xmake -cp -r ./core /tmp/xmake-makeself/xmake -cp -r ./scripts /tmp/xmake-makeself/xmake -cp -r ./xmake /tmp/xmake-makeself/xmake -cp ./*.md /tmp/xmake-makeself/xmake -cp makefile /tmp/xmake-makeself/xmake +rm -rf $temproot +mkdir -p $temproot/xmake +cp -r ./core $temproot/xmake +cp -r ./scripts $temproot/xmake +cp -r ./xmake $temproot/xmake +cp ./*.md $temproot/xmake +cp makefile $temproot/xmake +cd $temproot/xmake +rm -rf ./.xmake ./build +rm -rf ./core/src/tbox/tbox/src/demo +rm -rf ./core/src/pdcurses -cd /tmp/xmake-makeself +version=`cat ./core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"` +sed -i "s/#xmake-version#/$version/g" ./scripts/makeself/header +sed -i "s/#xmake-version#/$version/g" ./scripts/makeself/lsm + +cd $temproot # install makeself 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 # make runfile -./makeself-2.4.0/makeself.sh --sha256 --lsm ./xmake/scripts/makeself/lsm --help-header ./xmake/scripts/makeself/header ./xmake xmake.run xmake ./scripts/get.sh __local__ - -cp xmake.run $xmakeroot/scripts/makeself +./makeself-2.4.0/makeself.sh \ + --sha256 \ + --lsm ./xmake/scripts/makeself/lsm \ + --help-header ./xmake/scripts/makeself/header \ + ./xmake $xmakeroot/scripts/makeself/xmake.run \ + xmake \ + ./scripts/get.sh __local__ diff --git a/scripts/makeself/header b/scripts/makeself/header index 5622e4b9b..a65aeddf0 100644 --- a/scripts/makeself/header +++ b/scripts/makeself/header @@ -1,4 +1,4 @@ -xmake, A cross-platform build utility based on Lua +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 _ diff --git a/scripts/makeself/lsm b/scripts/makeself/lsm index 88b322af2..012efa4a1 100644 --- a/scripts/makeself/lsm +++ b/scripts/makeself/lsm @@ -1,6 +1,6 @@ Begin3 Title: xmake -Version: 2.7.0 +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 ...), -- cgit v1.3.1 From bcd6457fa98bab0dd220621754af8451f5a1850f Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 19 Jul 2019 09:44:23 +0800 Subject: reduce size --- .gitignore | 1 + scripts/makeself/build-runfile.sh | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/.gitignore b/.gitignore index e85cd38da..36a3f457c 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ tags winenv/ *.exe *.zip +*.run # Makefile generation /core/xmake.config.h diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index 87a325557..f9ebc7224 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -2,35 +2,39 @@ cd "$(dirname "$0")/../.." xmakeroot=`pwd` +buildroot=$xmakeroot/scripts/makeself temproot=/tmp/xmake-makeself # prepare files to pack rm -rf $temproot -mkdir -p $temproot/xmake +mkdir -p $temproot/xmake/scripts cp -r ./core $temproot/xmake -cp -r ./scripts $temproot/xmake +cp ./scripts/get.sh $temproot/xmake/scripts cp -r ./xmake $temproot/xmake cp ./*.md $temproot/xmake cp makefile $temproot/xmake cd $temproot/xmake -rm -rf ./.xmake ./build +rm -rf ./core/.xmake ./core/build rm -rf ./core/src/tbox/tbox/src/demo rm -rf ./core/src/pdcurses -version=`cat ./core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"` -sed -i "s/#xmake-version#/$version/g" ./scripts/makeself/header -sed -i "s/#xmake-version#/$version/g" ./scripts/makeself/lsm - +# 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 + # install makeself +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 # make runfile ./makeself-2.4.0/makeself.sh \ --sha256 \ - --lsm ./xmake/scripts/makeself/lsm \ - --help-header ./xmake/scripts/makeself/header \ + --lsm ./lsm \ + --help-header ./header \ ./xmake $xmakeroot/scripts/makeself/xmake.run \ xmake \ ./scripts/get.sh __local__ -- cgit v1.3.1 From 744dc38142fd90c1a4c3bdd4e645ce46d16de45e Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 19 Jul 2019 09:51:31 +0800 Subject: simplify code --- scripts/makeself/build-runfile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index f9ebc7224..25f7bd66c 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -35,6 +35,6 @@ sh ./makeself-2.4.0.run --sha256 \ --lsm ./lsm \ --help-header ./header \ - ./xmake $xmakeroot/scripts/makeself/xmake.run \ - xmake \ + ./xmake $buildroot/xmake.run \ + xmake-v$version \ ./scripts/get.sh __local__ -- cgit v1.3.1 From 31b4021c72317c6f4ec6a201f4579b3a39c5fca5 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 19 Jul 2019 10:13:09 +0800 Subject: clean up & comments --- scripts/makeself/build-runfile.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index 25f7bd66c..c06b7d433 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -1,22 +1,32 @@ #! /bin/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 + +# copy files to temproot/xmake mkdir -p $temproot/xmake/scripts +cd $temproot/xmake-repo cp -r ./core $temproot/xmake -cp ./scripts/get.sh $temproot/xmake/scripts +rm -rf ./core/src/tbox/tbox/src/demo +rm -rf ./core/src/pdcurses 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/.xmake ./core/build -rm -rf ./core/src/tbox/tbox/src/demo -rm -rf ./core/src/pdcurses # prepare info texts cd $temproot @@ -25,12 +35,10 @@ version=`cat ./xmake/core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\ sed -i "s/#xmake-version#/$version/g" ./header sed -i "s/#xmake-version#/$version/g" ./lsm -# install makeself +# 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 - -# make runfile ./makeself-2.4.0/makeself.sh \ --sha256 \ --lsm ./lsm \ -- cgit v1.3.1 From 31e7bdaeefe8e22114515804ea86f7b5ced9a88c Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 19 Jul 2019 10:22:06 +0800 Subject: fix --- scripts/makeself/build-runfile.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index c06b7d433..0c8af3587 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash # path constants cd "$(dirname "$0")/../.." @@ -20,13 +20,13 @@ git clean -dfX mkdir -p $temproot/xmake/scripts cd $temproot/xmake-repo cp -r ./core $temproot/xmake -rm -rf ./core/src/tbox/tbox/src/demo -rm -rf ./core/src/pdcurses 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 @@ -43,6 +43,7 @@ sh ./makeself-2.4.0.run --sha256 \ --lsm ./lsm \ --help-header ./header \ - ./xmake $buildroot/xmake.run \ - xmake-v$version \ + ./xmake \ + $buildroot/xmake.run \ + xmake-v$version-runfile \ ./scripts/get.sh __local__ -- cgit v1.3.1 From 349a845bbab84d3678c3aa106d6a7b0fdab4e5bd Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Fri, 19 Jul 2019 10:38:06 +0800 Subject: add submodule clean --- scripts/makeself/build-runfile.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index 0c8af3587..56eca4c4e 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -15,6 +15,7 @@ mkdir -p $temproot 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 -- cgit v1.3.1