Remove a bunch of old, unused scripts.

This commit is contained in:
casey langen 2022-12-13 21:07:07 -08:00
parent 76a3468cb4
commit 8a93388a49
10 changed files with 14 additions and 191 deletions

View File

@ -7,7 +7,7 @@ add_custom_command(TARGET postbuild POST_BUILD COMMAND cmake .)
# ensure the binaries can find libmusikcore.so, which lives in the same directory.
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
message(STATUS "[post-build] patching macOS rpath...")
add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/script/patch-macos-rpath.sh")
add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/script/patch-rpath.sh")
endif()
# copy boost and ffmpeg libraries (which can't be statically linked) to bin/

View File

@ -1,9 +0,0 @@
#!/bin/sh
SCRIPT_DIR=`dirname "$0"`
rm -rf bin
${SCRIPT_DIR}/clean-nix.sh
cmake -DENABLE_PCH=true -DGENERATE_DEB=true -DDEB_ARCHITECTURE=armhf -DDEB_PLATFORM=rpi -DDEB_DISTRO=buster -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
make -j4
cpack

View File

@ -73,8 +73,7 @@ else
make ${JOBS} || exit $?
fi
./script/patch-linux-rpath.sh || exit $?
./script/patch-macos-rpath.sh || exit $?
./script/patch-rpath.sh || exit $?
rm -rf dist/$VERSION/*${OS_ARCH}_$VERSION* 2> /dev/null

View File

@ -1,28 +0,0 @@
#!/bin/bash
if [[ -z "${MUSIKCUBE_BUILD_HOST_IP}" ]]; then
echo "no build host ip specified"
exit
fi
if [[ -z "${MUSIKCUBE_BUILD_HOST_PW}" ]]; then
echo "no build host pw specified"
exit
fi
if [[ -z "${MUSIKCUBE_BUILD_HOST_PORT}" ]]; then
MUSIKCUBE_BUILD_HOST_PORT=22
fi
GLOB=${1}
if [[ -z "${GLOB}" ]]; then
echo "no file glob specified."
exit
fi
echo "copying build artifacts to host..."
echo " from: ${GLOB}"
ls -al "${GLOB}"
sshpass -p ${MUSIKCUBE_BUILD_HOST_PW} scp -P ${MUSIKCUBE_BUILD_HOST_PORT} -o StrictHostKeyChecking=no "${GLOB}" build@${MUSIKCUBE_BUILD_HOST_IP}:/home/build/ 2> /dev/null
echo "finished copying build artifacts."

View File

@ -1,57 +0,0 @@
#!/bin/bash
function copy_or_download {
url_path=$1
fn=$2
wget_cache="/tmp/musikcube_build_wget_cache"
mkdir -p wget_cache 2> /dev/null
if [[ -f "$wget_cache/$fn" ]]; then
cp "$wget_cache/$fn" .
else
wget -P $wget_cache "$url_path/$fn" || exit $?
cp "$wget_cache/$fn" . || exit $?
fi
unzip $fn
}
function stage_arch {
arch=$1
mkdir -p $arch/lib
mkdir -p $arch/dll
mkdir -p $arch/include
mv stage/bin/
mkdir lib
}
function process_x86() {
mkdir x86
cd x86
copy_or_download https://windows.php.net/downloads/php-sdk/deps/vs16/x86 zlib-1.2.12-vs16-x86.zip
copy_or_download https://windows.php.net/downloads/php-sdk/deps/vs16/x86 openssl-1.1.1n-vs16-x86.zip
copy_or_download https://windows.php.net/downloads/php-sdk/deps/vs16/x86 libcurl-7.83.0-vs16-x86.zip
copy_or_download https://lib.openmpt.org/files/libopenmpt/dev libopenmpt-0.6.3+release.dev.windows.vs2022.zip
rm *.zip
mkdir stage
mv * stage/
cd ..
}
function process_x64() {
mkdir x64
cd x64
copy_or_download https://windows.php.net/downloads/php-sdk/deps/vs16/x64 zlib-1.2.12-vs16-x64.zip
copy_or_download https://windows.php.net/downloads/php-sdk/deps/vs16/x64 openssl-1.1.1n-vs16-x64.zip
copy_or_download https://windows.php.net/downloads/php-sdk/deps/vs16/x64 libcurl-7.83.0-vs16-x64.zip
copy_or_download https://lib.openmpt.org/files/libopenmpt/dev libopenmpt-0.6.3+release.dev.windows.vs2022.zip
rm *.zip
mkdir stage
mv * stage
cd ..
}
rm -rf vendor
mkdir vendor
cd vendor
process_x86
process_x64
cd ..

View File

@ -1,14 +0,0 @@
#!/bin/bash
PLATFORM=$(uname)
if [[ "$PLATFORM" == 'Darwin' ]]; then
echo "[patch-macos-rpath] patch macOS binaries..."
install_name_tool -add_rpath "@executable_path/" bin/musikcube
install_name_tool -add_rpath "@executable_path/lib" bin/musikcube
install_name_tool -add_rpath "@executable_path/" bin/musikcubed
install_name_tool -add_rpath "@executable_path/lib" bin/musikcubed
fi
exit 0

13
script/patch-linux-rpath.sh → script/patch-rpath.sh Executable file → Normal file
View File

@ -3,7 +3,7 @@
PLATFORM=$(uname)
if [[ "$PLATFORM" == 'Linux' ]]; then
echo "[patch-linux-rpath] patch Linux .so files..."
echo "[patch-rpath] patch Linux .so files..."
# update the RPATH so libraries in libs/ can discover each other,
# and plugins can discover themselves, and libs/ (but not the
@ -23,3 +23,14 @@ if [[ "$PLATFORM" == 'Linux' ]]; then
chmod -x ./bin/lib/*
fi
if [[ "$PLATFORM" == 'Darwin' ]]; then
echo "[patch-rpath] patch macOS binaries..."
install_name_tool -add_rpath "@executable_path/" bin/musikcube
install_name_tool -add_rpath "@executable_path/lib" bin/musikcube
install_name_tool -add_rpath "@executable_path/" bin/musikcubed
install_name_tool -add_rpath "@executable_path/lib" bin/musikcubed
fi
exit 0

View File

@ -1,63 +0,0 @@
#!/bin/bash
IP=$1
PORT=$2
PW=$3
JOB_COUNT=$4
if [[ -z "${IP}" ]]; then
echo "no ip address specified."
echo "invoke with 'run-circle-ci.sh <ip> <port> <pw> <job_count>'"
exit
fi
if [[ -z "${PORT}" ]]; then
echo "no file port address specified."
echo "invoke with 'run-circle-ci.sh <ip> <port> <pw> <job_count>'"
exit
fi
if [[ -z "${PW}" ]]; then
echo "no scp password address specified."
echo "invoke with 'run-circle-ci.sh <ip> <port> <pw> <job_count>'"
exit
fi
if [[ -z "${JOB_COUNT}" ]]; then
echo "no job count specified."
echo "invoke with 'run-circle-ci.sh <ip> <port> <pw> <job_count>'"
exit
fi
# pre-process the yml file, and change max processes from 2 to 7
circleci config process .circleci/config.yml > local-circle-ci.yml
sed -i "s/-j2/-j${JOB_COUNT}/g" local-circle-ci.yml
ALL_JOBS=(
"build_ubuntu_focal"
"build_ubuntu_hirsute"
"build_ubuntu_impish"
"build_fedora_32"
"build_fedora_33"
"build_fedora_34"
"build_fedora_35"
"build_mint_una"
"build_debian_buster"
"build_debian_bullseye"
)
BRANCH="master"
REPO="https://github.com/clangen/musikcube"
for JOB in ${ALL_JOBS[@]}; do
circleci local execute \
-c local-circle-ci.yml \
-e CIRCLE_BRANCH=${BRANCH} \
-e CIRCLE_REPOSITORY_URL=${REPO} \
-e MUSIKCUBE_BUILD_HOST_IP=${IP} \
-e MUSIKCUBE_BUILD_HOST_PORT=${PORT} \
-e MUSIKCUBE_BUILD_HOST_PW=${PW} \
-e MUSIKCUBE_BUILD_JOB_COUNT=${JOB_COUNT} \
--job ${JOB}
done

View File

@ -1,11 +0,0 @@
#!/bin/bash
JOB_COUNT=${MUSIKCUBE_BUILD_JOB_COUNT}
if [[ -z "${JOB_COUNT}" ]]; then
JOB_COUNT=2
fi
echo "configuring rpm with ${JOB_COUNT} jobs"
sed -i "s/-j2/-j${JOB_COUNT}/g" musikcube.spec
rpmbuild -ba -vv musikcube.spec

View File

@ -1,5 +0,0 @@
#!/bin/sh
COMMIT_HASH=`git rev-parse --short HEAD 2> /dev/null | sed "s/\(.*\)/#\1/"`
sed -Ei.bak "s/(\s*)(#define VERSION_COMMIT_HASH )(.*)/\1\2\"${COMMIT_HASH}\"/g" src/musikcore/version.h
rm src/musikcore/version.h.bak