summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 80b30d2)
raw | patch | inline | side by side (parent: 80b30d2)
author | Alexander Shiryaev <aixp@mail.ru> | |
Sun, 16 Feb 2014 21:25:48 +0000 (01:25 +0400) | ||
committer | Alexander Shiryaev <aixp@mail.ru> | |
Sun, 16 Feb 2014 21:25:48 +0000 (01:25 +0400) |
README | patch | blob | history | |
new/README | patch | blob | history | |
new/export | patch | blob | history |
index 8bc9c167ad8d345311a0e61fa162e37e482e16b5..df987b3949463bf5ca9f2be1f9b47119bbbc9225 100644 (file)
--- a/README
+++ b/README
-** Ducumentation (Russian): **
+Ducumentation (Russian):
- http://gitlab.molpit.com/idenisov/blackbox-linux/wikis/home
+ http://gitlab.molpit.com/idenisov/blackbox-linux/wikis/home
+Directories structure:
-** Folders structure: **
+ new/
+ universal development environment
+ synchronized with original BlackBox 1.6
-./new/
- universal development environment
- synchronized with original BlackBox 1.6
+ examples/ (all axamples are not tested on `new` version yet)
+ server/
+ static web-server as the example of an application for Linux OS
+ console/
+ simple console application
+ fpstest/
+ loop test
-./examples/ (all axamples are not tested on `new` version yet)
- /server/
- static web-server as the example of an application for Linux OS
- /console/
- simple console application
- /fpstest/
- loop test
-
-** Installation **
+To build BlackBox:
-1. For creating links in development directory run:
+ cd new
+ ./switch-target `uname -s` GUI
+ ./build
- cd ./new
- ./README
+To run BlackBox (after build):
- To start:
+ cd new
+ ./run-BlackBox
- ./run-BlackBox
+To create BlackBox assembly (after build):
-2. For creating assembly for target OS in development directory run:
+ cd ./new
+ ./export <outputDirectory>
- cd ./new
- ./export (Linux|OpenBSD|FreeBSD) (GUI|)
-
- Example for Linux:
-
- ./export Linux GUI
-
- Then:
-
- cd ../Linux_GUI
- ./build
-
- To start with .so loader:
-
- ./run-BlackBox
-
- To start with .ELF loader
-
- ./run-BlackBox-2
+Example: build, create assembly in /tmp, run BlackBox from assembly:
+ cd new
+ ./switch-target `uname -s` GUI
+ ./build
+ ./export /tmp/BlackBox-`uname -s`
+ cd /tmp/BlackBox-`uname -s`
+ ./run-BlackBox
diff --git a/new/README b/new/README
index c157efd0923a24a92b7d4c4383484079de7931d5..f589760382e5f71fe8c1a31e6287b43a5560688e 100644 (file)
--- a/new/README
+++ b/new/README
-# For preparing the BlackBox for the target OS run:
-# ./README
+# To build BlackBox (for current operating system):
+# ./switch-target `uname -s` GUI
+# ./build
+#
+# To run BlackBox (after build):
+# ./run-BlackBox
+#
+# To export BlackBox (after build):
+# ./export <outputDir>
+#
+# To clean up:
+# ./clean
+# ./switch-target none
+#
+# Build and run BlackBox:
echo "Please wait..."
./switch-target `uname -s` GUI
./build
./run-BlackBox
-
-# For clearing the folders before commit run
-# ./switch-target none
diff --git a/new/export b/new/export
index 0d923c239170d022a53b5bb8ed0a7f6d1a56fe58..9ab476226cfe06ae97bb441300225e4ba43f5799 100755 (executable)
--- a/new/export
+++ b/new/export
#!/bin/sh
-mklinks () {
- find "${1}" -mindepth ${2} -maxdepth ${2} \( -type f -o -type l \) -print |
- while read l; do
- to=`echo $l | sed "s/^${line}\///"`
- mkdir -p `dirname "${4}/${to}"`
- cp ${l} "${4}/${to}"
- done
-}
-
-dolinks () {
- mkdir -p ../${1}_${2}
- cp -R 'System' ../${1}_${2}/
- cp -R 'Code' ../${1}_${2}/
- cp -R 'Comm' ../${1}_${2}/
- cp -R 'Cons' ../${1}_${2}/
- cp -R 'Dev' ../${1}_${2}/
- cp -R 'Docu' ../${1}_${2}/
- cp -R 'Gtk2' ../${1}_${2}/
- cp -R 'Host' ../${1}_${2}/
- cp -R 'Lin' ../${1}_${2}/
- cp -R 'Obx' ../${1}_${2}/
- cp -R 'Sql' ../${1}_${2}/
- cp -R 'Std' ../${1}_${2}/
- cp -R 'Sym' ../${1}_${2}/
- cp -R 'Text' ../${1}_${2}/
- cp -R 'Xhtml' ../${1}_${2}/
- cp -R 'run-BlackBox' ../${1}_${2}/
- cp -R 'run-dev0' ../${1}_${2}/
-
- lines1=`find . -mindepth 1 -maxdepth 1 -name "_*${1}*_" -print | sed 's/\.\///'`
- lines2=`find . -mindepth 1 -maxdepth 1 -name "__*${2}*" -print | sed 's/\.\///'`
- lines3=`find . -mindepth 1 -maxdepth 1 -name "_*"${1}"*_*${2}*" -print | sed 's/\.\///'`
- for line in $lines1 $lines2 $lines3; do
- find "${line}" -mindepth 1 -maxdepth 1 \( -type f -o -type l \) -print |
- while read l; do
- cp $l ../${1}_${2}/
- done
-
- mklinks "${line}" 3 ../.. ../${1}_${2}
- mklinks "${line}" 4 ../../.. ../${1}_${2}
- done
-}
-
if [ $# -eq 1 ]; then
- dolinks "${1}" Interp
- echo "Export complite to the directory ../${1}_Interp!"
- echo "For compiling BlackBox modules run:"
- echo " cd ../${1}_Interp"
- echo " ./build"
-elif [ $# -eq 2 ]; then
- dolinks "${1}" "${2}"
- echo "Export complite to the directory ../${1}_${2}!"
- echo "For compiling BlackBox modules run:"
- echo " cd ../${1}_${2}"
- echo " ./build"
+ outDir="${1}"
+ if [ ! -e "${outDir}" ]; then
+ mkdir "${outDir}"
+ pax -r -w -L -s ',^Lin/Mod/gen-.*,,' -s ',^Lin/Rsrc.*,,' `ls -p | grep -E "^[A-Z].+\/$" | grep -v "^${outDir}\/$"` libBB.so loader run-BlackBox "${outDir}"
+ else
+ echo "${outDir}: already exists"
+ exit 2
+ fi
else
- echo "Exporting BlackBox from development to distribution form for target OS."
- echo "Usage: `basename $0` OS [ configuration ]"
- echo " OS: Linux | OpenBSD | FreeBSD"
- echo " configuration: GUI"
- echo "Example: ./export Linux GUI"
+ echo "usage: `basename $0` outputDirectory"
exit 1
fi