Skip to content

Commit

Permalink
Update: change path of pre-generated modules
Browse files Browse the repository at this point in the history
  • Loading branch information
nutti committed Jul 18, 2019
1 parent 816c4f2 commit 05bbbf1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ jobs:
- run:
name: Compress All Generated Packages
command: tar cvfz all.tar.gz release/* && mv all.tar.gz release
- run:
name: Compress All Raw Modules
command: tar cvfz all.tar.gz raw_modules/* && mv all.tar.gz raw_modules
- store_artifacts:
path: release
destination: pip_packages
- store_artifacts:
path: pre_generated_modules
destination: pre_generated_modules
path: raw_modules
destination: raw_modules
22 changes: 11 additions & 11 deletions tools/pip_package/build_pip_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ declare -A BLENDER_TAG_NAME=(
["v279"]="v2.79"
["v279a"]="v2.79a"
["v279b"]="v2.79b"
["v280"]="3b4054cb586f"
["v280"]="v2.80-rc1"
)

TMP_DIR_NAME="tmp"
PREMADE_MODULES_DIR="pre_generated_modules"
RAW_MODULES_DIR="raw_modules"
RELEASE_DIR="release"
SCRIPT_DIR=$(cd $(dirname $0); pwd)
CURRENT_DIR=`pwd`
Expand Down Expand Up @@ -61,7 +61,7 @@ fi

# check if release dir and tmp dir are not exist
tmp_dir=${SCRIPT_DIR}/${TMP_DIR_NAME}-${version}
pre_generated_modules_dir=${CURRENT_DIR}/${PREMADE_MODULES_DIR}
raw_modules_dir=${CURRENT_DIR}/${RAW_MODULES_DIR}
release_dir=${CURRENT_DIR}/${RELEASE_DIR}
if [ -e ${tmp_dir} ]; then
echo "${tmp_dir} is already exists."
Expand All @@ -71,19 +71,19 @@ fi

if [ ${target} = "release" ]; then
# setup pre-generated-modules/release/temp directories
mkdir -p ${pre_generated_modules_dir}
mkdir -p ${raw_modules_dir}
mkdir -p ${release_dir}
mkdir -p ${tmp_dir} && cd ${tmp_dir}

# generate fake bpy module
fake_module_dir="out"
ver=v${version%.*}${version##*.}
sh ${SCRIPT_DIR}/../../src/gen_module.sh ${CURRENT_DIR}/${source_dir} ${CURRENT_DIR}/${blender_dir} ${BLENDER_TAG_NAME[${ver}]} ${fake_module_dir} ${version}
zip_dir="fake_bpy_module_${version}-${now_date}"
zip_dir="fake_bpy_modules_${version}-${now_date}"
cp -r ${fake_module_dir} ${zip_dir}
zip_file_name="pre_generated_modules_${version}-${now_date}.zip"
zip_file_name="fake_bpy_modules_${version}-${now_date}.zip"
zip -r ${zip_file_name} ${zip_dir}
mv ${zip_file_name} ${pre_generated_modules_dir}
mv ${zip_file_name} ${raw_modules_dir}
mv ${fake_module_dir}/* .
rm -r ${zip_dir}
rm -r ${fake_module_dir}
Expand All @@ -107,19 +107,19 @@ if [ ${target} = "release" ]; then

elif [ ${target} = "develop" ]; then
# setup pre-generated-modules/release/temp directories
mkdir -p ${pre_generated_modules_dir}
mkdir -p ${raw_modules_dir}
mkdir -p ${release_dir} && cd ${release_dir}
cp ${SCRIPT_DIR}/setup.py .

# generate fake bpy module
fake_module_dir="out"
ver=v${version%.*}${version##*.}
sh ${SCRIPT_DIR}/../../src/gen_module.sh ${CURRENT_DIR}/${source_dir} ${CURRENT_DIR}/${blender_dir} ${BLENDER_TAG_NAME[${ver}]} ${fake_module_dir}
zip_dir="fake_bpy_module_${version}-${now_date}"
zip_dir="fake_bpy_modules_${version}-${now_date}"
cp -r ${fake_module_dir} ${zip_dir}
zip_file_name="pre_generated_modules_${version}-${now_date}.zip"
zip_file_name="fake_bpy_modules_${version}-${now_date}.zip"
zip -r ${zip_file_name} ${fake_module_dir}
mv ${zip_file_name} ${pre_generated_modules_dir}
mv ${zip_file_name} ${raw_modules_dir}
mv ${fake_module_dir}/* .
rm -r ${zip_dir}
rm -r ${fake_module_dir}
Expand Down
6 changes: 3 additions & 3 deletions tools/utils/download_blender.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ declare -A BLENDER_DOWNLOAD_URL_WIN64=(
["v279"]="https://download.blender.org/release/Blender2.79/blender-2.79-windows64.zip"
["v279a"]="https://download.blender.org/release/Blender2.79/blender-2.79a-windows64.zip"
["v279b"]="https://download.blender.org/release/Blender2.79/blender-2.79b-windows64.zip"
["v280"]="https://builder.blender.org/download/blender-2.80-c0c1b4542f39-win64.zip"
["v280"]="https://download.blender.org/release/Blender2.80/blender-2.80rc1-windows64.zip"
)

declare -A BLENDER_DOWNLOAD_URL_LINUX=(
Expand All @@ -39,7 +39,7 @@ declare -A BLENDER_DOWNLOAD_URL_LINUX=(
["v279"]="https://download.blender.org/release/Blender2.79/blender-2.79-linux-glibc219-x86_64.tar.bz2"
["v279a"]="https://download.blender.org/release/Blender2.79/blender-2.79a-linux-glibc219-x86_64.tar.bz2"
["v279b"]="https://download.blender.org/release/Blender2.79/blender-2.79b-linux-glibc219-x86_64.tar.bz2"
["v280"]="https://builder.blender.org/download/blender-2.80-3b4054cb586f-linux-glibc217-x86_64.tar.bz2"
["v280"]="https://download.blender.org/release/Blender2.80/blender-2.80rc1-linux-glibc217-x86_64.tar.bz2"
)

declare -A NEED_MOVE_MACOSX=(
Expand All @@ -60,7 +60,7 @@ declare -A NEED_MOVE_LINUX=(
["v279"]="blender-2.79-linux-glibc219-x86_64"
["v279a"]="blender-2.79a-linux-glibc219-x86_64"
["v279b"]="blender-2.79b-linux-glibc219-x86_64"
["v280"]="blender-2.80-3b4054cb586f-linux-glibc217-x86_64"
["v280"]="blender-2.80rc1-linux-glibc217-x86_64"
)

function download_blender() {
Expand Down

0 comments on commit 05bbbf1

Please sign in to comment.