logic: Added "Empty Python" Sourcegroup to project setup

The respective release of the SourcetrailPythonIndexer project is automatically downloaded from GitHub when the setup script is executed.
This commit is contained in:
mlangkabel
2019-04-02 15:54:17 +02:00
parent 5d672fafc4
commit 045a3a4e50
34 changed files with 450 additions and 29 deletions
+2 -1
View File
@@ -24,7 +24,7 @@ fi
ROOT_DIR=$ROOT_DIR/..
# Enter masterproject directory
# Enter sourcetrail root directory
cd $ROOT_DIR/
if [ $PLATFORM == "Windows" ]; then
@@ -41,6 +41,7 @@ if [ $PLATFORM == "Windows" ]; then
fi
# Remove folders and contents
rm -rf bin/app/data/python
rm -rf java_indexer/bin
rm -rf build
+70
View File
@@ -0,0 +1,70 @@
#!/bin/bash
SOURCETRAIL_PYTHON_INDEXER_VERSION="v0_db23_p2"
# Determine current platform
PLATFORM='unknown'
if [ "$(uname)" == "Darwin" ]; then
PLATFORM='osx'
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
PLATFORM='linux'
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
PLATFORM='windows'
fi
PACKAGE_NAME="SourcetrailPythonIndexer_${SOURCETRAIL_PYTHON_INDEXER_VERSION}-${PLATFORM}"
PACKAGE_FILE_NAME="${PACKAGE_NAME}.zip"
PACKAGE_URL="https://github.com/CoatiSoftware/SourcetrailPythonIndexer/releases/download/${SOURCETRAIL_PYTHON_INDEXER_VERSION}/${PACKAGE_FILE_NAME}"
TEMP_PATH="build/temp"
TARGET_PATH="bin/app/data/python"
ABORT="\033[31mAbort:\033[00m"
SUCCESS="\033[32mSuccess:\033[00m"
INFO="\033[33mInfo:\033[00m"
if [ $PLATFORM == "windows" ]; then
ORIGINAL_PATH_TO_SCRIPT="${0}"
CLEANED_PATH_TO_SCRIPT="${ORIGINAL_PATH_TO_SCRIPT//\\//}"
ROOT_DIR=`dirname "$CLEANED_PATH_TO_SCRIPT"`
else
ROOT_DIR="$( cd "$( dirname "$0" )" && pwd )"
fi
ROOT_DIR=$ROOT_DIR/..
# Enter main directory
cd $ROOT_DIR/
mkdir -p $TEMP_PATH
echo -e $INFO "starting to download $PACKAGE_FILE_NAME"
if [ $PLATFORM == "linux" ]; then
wget -O $TEMP_PATH/$PACKAGE_FILE_NAME $PACKAGE_URL
elif [ $PLATFORM == "osx" ]; then
wget -O $TEMP_PATH/$PACKAGE_FILE_NAME $PACKAGE_URL
elif [ $PLATFORM == "windows" ]; then
certutil.exe -urlcache -split -f $PACKAGE_URL $TEMP_PATH/$PACKAGE_FILE_NAME
fi
echo -e $INFO "finished downloading $PACKAGE_FILE_NAME"
if [ $PLATFORM == "linux" ]; then
unzip -d $TEMP_PATH $TEMP_PATH/$PACKAGE_FILE_NAME
elif [ $PLATFORM == "osx" ]; then
unzip -d $TEMP_PATH $TEMP_PATH/$PACKAGE_FILE_NAME
elif [ $PLATFORM == "windows" ]; then
winrar x $TEMP_PATH/$PACKAGE_FILE_NAME $TEMP_PATH
fi
echo -e $INFO "clearing $TARGET_PATH"
rm -rf $TARGET_PATH
mkdir -p $TARGET_PATH
cp -r $TEMP_PATH/$PACKAGE_NAME/* $TARGET_PATH
echo -e $INFO "clearing temporary data at $TEMP_PATH"
rm -rf $TEMP_PATH
+9 -4
View File
@@ -34,10 +34,9 @@ echo -e $INFO "install git settings"
git config commit.template setup/git/git_commit_template.txt
git config color.ui true
if [ -d ".git/hooks" ]
then
cp setup/git/git_pre_commit_hook.sh .git/hooks/pre-commit
cp setup/git/git_pre_push_hook.sh .git/hooks/pre-push
if [ -d ".git/hooks" ]; then
cp setup/git/git_pre_commit_hook.sh .git/hooks/pre-commit
cp setup/git/git_pre_push_hook.sh .git/hooks/pre-push
fi
# Create Debug and Release folders
@@ -102,6 +101,12 @@ else
mkdir -p build/Release/test
fi
if [ $PLATFORM == "Windows" ]; then
sh script/download_python_indexer.sh
else
MY_PATH=`dirname "$0"`
$MY_PATH/download_python_indexer.sh
fi
if [ $PLATFORM == "Windows" ]; then
echo -e $INFO "creating program icon"