diff options
author | 2020-08-24 21:58:42 +0900 | |
---|---|---|
committer | 2020-08-24 21:58:42 +0900 | |
commit | 2b4ae7fde370bc3316ab30cc38b74d23e785b360 (patch) | |
tree | 41b6eb70b3419c2fbd192ed133c5890a985eddec /script | |
parent | 6694a4d2952ebd171564932200cac00d6e5792f4 (diff) |
First commitjellyfish_9.99.4jellyfish/9.99.49.99.4
Signed-off-by: Kenji Hosokawa <khosokawa@jp.adit-jv.com>
Change-Id: I381abb0a6521f5349768a76ef7ceecbce4b2d701
Diffstat (limited to 'script')
-rw-r--r-- | script/conv_release.py | 23 | ||||
-rw-r--r-- | script/make_dll_x64.bat | 50 | ||||
-rw-r--r-- | script/make_dll_x64_log.bat | 50 | ||||
-rw-r--r-- | script/make_dll_x86.bat | 50 | ||||
-rw-r--r-- | script/make_dll_x86_log.bat | 50 | ||||
-rw-r--r-- | script/make_release.sh | 98 | ||||
-rw-r--r-- | script/remove_comment.py | 23 | ||||
-rw-r--r-- | script/remove_internal.py | 23 |
8 files changed, 367 insertions, 0 deletions
diff --git a/script/conv_release.py b/script/conv_release.py new file mode 100644 index 0000000..24f62c4 --- /dev/null +++ b/script/conv_release.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +import sys +import re + +def convert_release(): + skip_flag = False + for line in sys.stdin: + line = line.rstrip() + if not skip_flag: + if re.search(r'// +internal +{', line): + skip_flag = True + continue + else: + if re.search(r'// +}', line): + skip_flag = False + continue + print(line) + +if __name__ == '__main__': + convert_release() + +# end of file diff --git a/script/make_dll_x64.bat b/script/make_dll_x64.bat new file mode 100644 index 0000000..0b51c4d --- /dev/null +++ b/script/make_dll_x64.bat @@ -0,0 +1,50 @@ +@echo off
+set ARCH=x64
+set LOG=OFF
+set MODE=%1
+
+if "%MODE%" == "" (
+ set MODE=Release
+)
+if not "%MODE%" == "Debug" (
+ if not "%MODE%" == "Release" (
+ echo Usage: %0 Debug or Release
+ goto end
+ )
+)
+set LOGLABEL=
+if "%LOG%" == "ON" (
+ set LOGLABEL=_log
+) else (
+ set LOGLABEL=
+)
+
+set CMAKE_OPTION=
+if "%ARCH%" == "x86" (
+ set CMAKE_OPTION="Visual Studio 15 2017"
+) else if "%ARCH%" == "x64" (
+ set CMAKE_OPTION="Visual Studio 15 2017 Win64"
+)
+
+set DIRNAME=build_%ARCH%%LOGLABEL%
+set OUTNAME=%MODE%_%ARCH%%LOGLABEL%
+
+if exist "%DIRNAME%\" (
+ goto exec_make
+)
+
+mkdir %DIRNAME%
+cd %DIRNAME%
+
+if "%LOG%" == "ON" (
+ cmake -G %CMAKE_OPTION% ..
+) else (
+ cmake -G %CMAKE_OPTION% -DNOLOG=1 ..
+)
+cd ..
+
+:exec_make
+cmake --build %DIRNAME% --config %MODE%
+
+:end
+echo done.
diff --git a/script/make_dll_x64_log.bat b/script/make_dll_x64_log.bat new file mode 100644 index 0000000..414936d --- /dev/null +++ b/script/make_dll_x64_log.bat @@ -0,0 +1,50 @@ +@echo off
+set ARCH=x64
+set LOG=ON
+set MODE=%1
+
+if "%MODE%" == "" (
+ set MODE=Release
+)
+if not "%MODE%" == "Debug" (
+ if not "%MODE%" == "Release" (
+ echo Usage: %0 Debug or Release
+ goto end
+ )
+)
+set LOGLABEL=
+if "%LOG%" == "ON" (
+ set LOGLABEL=_log
+) else (
+ set LOGLABEL=
+)
+
+set CMAKE_OPTION=
+if "%ARCH%" == "x86" (
+ set CMAKE_OPTION="Visual Studio 15 2017"
+) else if "%ARCH%" == "x64" (
+ set CMAKE_OPTION="Visual Studio 15 2017 Win64"
+)
+
+set DIRNAME=build_%ARCH%%LOGLABEL%
+set OUTNAME=%MODE%_%ARCH%%LOGLABEL%
+
+if exist "%DIRNAME%\" (
+ goto exec_make
+)
+
+mkdir %DIRNAME%
+cd %DIRNAME%
+
+if "%LOG%" == "ON" (
+ cmake -G %CMAKE_OPTION% ..
+) else (
+ cmake -G %CMAKE_OPTION% -DNOLOG=1 ..
+)
+cd ..
+
+:exec_make
+cmake --build %DIRNAME% --config %MODE%
+
+:end
+echo done.
diff --git a/script/make_dll_x86.bat b/script/make_dll_x86.bat new file mode 100644 index 0000000..fa6f5ff --- /dev/null +++ b/script/make_dll_x86.bat @@ -0,0 +1,50 @@ +@echo off
+set ARCH=x86
+set LOG=OFF
+set MODE=%1
+
+if "%MODE%" == "" (
+ set MODE=Release
+)
+if not "%MODE%" == "Debug" (
+ if not "%MODE%" == "Release" (
+ echo Usage: %0 Debug or Release
+ goto end
+ )
+)
+set LOGLABEL=
+if "%LOG%" == "ON" (
+ set LOGLABEL=_log
+) else (
+ set LOGLABEL=
+)
+
+set CMAKE_OPTION=
+if "%ARCH%" == "x86" (
+ set CMAKE_OPTION="Visual Studio 15 2017"
+) else if "%ARCH%" == "x64" (
+ set CMAKE_OPTION="Visual Studio 15 2017 Win64"
+)
+
+set DIRNAME=build_%ARCH%%LOGLABEL%
+set OUTNAME=%MODE%_%ARCH%%LOGLABEL%
+
+if exist "%DIRNAME%\" (
+ goto exec_make
+)
+
+mkdir %DIRNAME%
+cd %DIRNAME%
+
+if "%LOG%" == "ON" (
+ cmake -G %CMAKE_OPTION% ..
+) else (
+ cmake -G %CMAKE_OPTION% -DNOLOG=1 ..
+)
+cd ..
+
+:exec_make
+cmake --build %DIRNAME% --config %MODE%
+
+:end
+echo done.
diff --git a/script/make_dll_x86_log.bat b/script/make_dll_x86_log.bat new file mode 100644 index 0000000..7d7d057 --- /dev/null +++ b/script/make_dll_x86_log.bat @@ -0,0 +1,50 @@ +@echo off
+set ARCH=x86
+set LOG=ON
+set MODE=%1
+
+if "%MODE%" == "" (
+ set MODE=Release
+)
+if not "%MODE%" == "Debug" (
+ if not "%MODE%" == "Release" (
+ echo Usage: %0 Debug or Release
+ goto end
+ )
+)
+set LOGLABEL=
+if "%LOG%" == "ON" (
+ set LOGLABEL=_log
+) else (
+ set LOGLABEL=_nolog
+)
+
+set CMAKE_OPTION=
+if "%ARCH%" == "x86" (
+ set CMAKE_OPTION="Visual Studio 15 2017"
+) else if "%ARCH%" == "x64" (
+ set CMAKE_OPTION="Visual Studio 15 2017 Win64"
+)
+
+set DIRNAME=build_%ARCH%%LOGLABEL%
+set OUTNAME=%MODE%_%ARCH%%LOGLABEL%
+
+if exist "%DIRNAME%\" (
+ goto exec_make
+)
+
+mkdir %DIRNAME%
+cd %DIRNAME%
+
+if "%LOG%" == "ON" (
+ cmake -G %CMAKE_OPTION% ..
+) else (
+ cmake -G %CMAKE_OPTION% -DNOLOG=1 ..
+)
+cd ..
+
+:exec_make
+cmake --build %DIRNAME% --config %MODE%
+
+:end
+echo done.
diff --git a/script/make_release.sh b/script/make_release.sh new file mode 100644 index 0000000..5f7769d --- /dev/null +++ b/script/make_release.sh @@ -0,0 +1,98 @@ +#!/bin/sh + +RELEASE_DIR=./release + +# Get SHA-1 first 6 chatacters +dt=`date "+%Y%m%d"` +sha1=`git rev-parse HEAD | cut -c 1-7` +workdir=$RELEASE_DIR/${dt}_${sha1}/rba +docdir=$RELEASE_DIR/$sha1/doc +rbadir=`pwd` +includedir=$workdir/include/rba +libdir=$workdir/lib +unittestdir=$workdir/unittest + +# Make work directory +if [ ! -d $workdir ]; then + mkdir -p $workdir +fi + +# if [ ! -d $docdir ]; then +# mkdir -p $docdir +# fi + +# Make librba +builddir=./build_release +if [ ! -d $builddir ]; then + mkdir -p $builddir +fi + +pushd $builddir +if [ -f CMakeCache.txt ]; then + /bin/rm -f CMakeCache.txt +fi +cmake -DNOLOG=1 -DRELEASE=1 .. +make -j9 +popd + +# Copy lib files +if [ ! -d $libdir ]; then + mkdir -p $libdir +fi + +cp lib/librba.* $libdir/. + +# Copy header files +if [ ! -d $includedir ]; then + mkdir -p $includedir +fi + +for hppfile in `/bin/ls include/rba/*.hpp`; do + # remove internal region + anim=`echo $hppfile | grep "Animation"` + if [ -n "$anim" ]; then + continue + fi + cat $hppfile | python3 script/remove_internal.py > __tmp + /bin/mv -f __tmp $workdir/$hppfile +done +echo "Copy header files...done" + +# Copy unittest +if [ -d $unittestdir ]; then + /bin/rm -fr $unittestdir +fi +/bin/mkdir -p $unittestdir +/bin/cp -f unittest/BUILD.md $unittestdir/. +/bin/cp -f unittest/main.cpp $unittestdir/. +/bin/cp -f unittest/exec_unittest.bat $unittestdir/. +#/bin/cp -f unittest/CMakeLists.txt $unittestdir/. +echo "set(NOLOG TRUE)" > $unittestdir/CMakeLists.txt +cat unittest/CMakeLists.txt >> $unittestdir/CMakeLists.txt + +/bin/mkdir -p $unittestdir/script +/bin/cp -f unittest/script/install_gt.sh $unittestdir/script/. +/bin/cp -f unittest/script/gtbuild.bat $unittestdir/script/. +/bin/cp -f unittest/script/make_ut.bat $unittestdir/script/. + +/bin/cp -r unittest/logic_test $unittestdir/. +/bin/cp -r unittest/api_test $unittestdir/. + +echo Copy unittest...done + +echo $workdir + +exit +# +# make document +# +pushd doc +sh mkdoc.sh +popd +cp -r ./doc/work/rtf_en $docdir/. +cp -r ./doc/work/rtf_jp $docdir/. + +echo Release directory is $workdir +echo done + +# end of file diff --git a/script/remove_comment.py b/script/remove_comment.py new file mode 100644 index 0000000..673f3b3 --- /dev/null +++ b/script/remove_comment.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +import sys +import re + +def convert_release(): + skip_flag = False + for line in sys.stdin: + line = line.rstrip() + if not skip_flag: + if re.search(r'// +remove +doxygen +{', line): + skip_flag = True + continue + else: + if re.search(r'// +}', line): + skip_flag = False + continue + print(line) + +if __name__ == '__main__': + convert_release() + +# end of file diff --git a/script/remove_internal.py b/script/remove_internal.py new file mode 100644 index 0000000..24f62c4 --- /dev/null +++ b/script/remove_internal.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +import sys +import re + +def convert_release(): + skip_flag = False + for line in sys.stdin: + line = line.rstrip() + if not skip_flag: + if re.search(r'// +internal +{', line): + skip_flag = True + continue + else: + if re.search(r'// +}', line): + skip_flag = False + continue + print(line) + +if __name__ == '__main__': + convert_release() + +# end of file |