1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-15 15:11:12 +02:00

Removed old build system

This was fun!!! Holler if I had too much fun. :-)
This commit is contained in:
Leland Lucius
2020-05-24 13:18:47 -05:00
parent 1075f15182
commit c42d188e7b
370 changed files with 7 additions and 319993 deletions

View File

@@ -1,105 +0,0 @@
set -x
# Setup
VERSION=`awk '/^#define+ AUDACITY_VERSION / {print $3}' build/Info.plist.h`
RELEASE=`awk '/^#define+ AUDACITY_RELEASE / {print $3}' build/Info.plist.h`
REVISION=`awk '/^#define+ AUDACITY_REVISION / {print $3}' build/Info.plist.h`
VERSION=$VERSION.$RELEASE.$REVISION
cd "${DSTROOT}"
chmod -RH "${INSTALL_MODE_FLAG}" "${TARGET_BUILD_DIR}"
chown -RH "${INSTALL_OWNER}:${INSTALL_GROUP}" "${TARGET_BUILD_DIR}"
echo "Audacity has been installed to: ${DSTROOT}"
cd ..
VOL="Audacity $VERSION"
DMG="audacity-macos-$VERSION"
# Preclean
rm -rf "$DMG" "$DMG.dmg" TMP.dmg
# Create structure
mkdir "$DMG"
cp -pR "${DSTROOT}/" "${DMG}"
#Add a custom icon for the DMG
#cp -p mac/Resources/Audacity.icns "${DMG}"/.VolumeIcon.icns
# Make sure it's not already attached
ATTACHED=$(hdiutil info | awk "/\/Volumes\/${VOL}/{print \$1}")
if [ -n "${ATTACHED}" ]
then
hdiutil detach "${ATTACHED}"
fi
# Create and mount the image
hdiutil create -ov -format UDRW -srcdir "$DMG" -fs HFS+ -volname "$VOL" TMP.dmg
if [ $? -ne 0 ]
then
echo "Create failed"
exit 1
fi
#Mount the DMG and store the name it was mounted with
TITLE=$(hdiutil attach TMP.dmg | grep \/Volumes | sed "s/^.*\/Volumes\///")
if [ $? -ne 0 ]
then
echo "Attach failed"
exit 1
fi
# And wait for it to show up in Finder
osascript <<EOF
tell application "Finder"
repeat until exists disk "${TITLE}"
log "Waiting for ${TITLE} to appear"
delay 0.2
end repeat
end tell
EOF
#Set the custom icon flag
#SetFile -a C /Volumes/"$TITLE"
#Make our DMG look pretty and install the custom background image
echo '
tell application "Finder"
tell disk "'$TITLE'"
open
set current view of container window to icon view
set toolbar visible of container window to false
set statusbar visible of container window to false
set the bounds of container window to {400, 100, 1000, 550}
set theViewOptions to the icon view options of container window
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 72
set background picture of theViewOptions to file ".background:Audacity-DMG-background.png"
make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"}
set position of item "Audacity" of container window to {170, 350}
set position of item "Applications" of container window to {430, 350}
close
open
update without registering applications
delay 5
eject
end tell
end tell
' | osascript
# Compress and prepare for Internet delivery
hdiutil convert TMP.dmg -format UDZO -imagekey zlib-level=9 -o "$DMG.dmg"
# Create zip version
rm -rf "${DMG}/.background"
rm -rf "${DMG}/Audacity.app/help/"
zip -r9 "${DMG}.zip" "${DMG}"
# Cleanup
#rm -rf ${DMG} TMP.dmg
echo 'resizing and openning dmg'
hdiutil resize -size 200m TMP.dmg
hdiutil mount TMP.dmg
echo 'declutter the dmg, sign, compress and sign it'

View File

@@ -1,10 +0,0 @@
#!/bin/sh
for (( i = 0; i < ${SCRIPT_INPUT_FILE_COUNT}; i++ ))
do
in="$(eval echo \${SCRIPT_INPUT_FILE_${i}})"
out="$(eval echo \${SCRIPT_OUTPUT_FILE_${i}})"
cp -pPR "${in}" "${out}"
done
exit 0

View File

@@ -1,10 +0,0 @@
#!/bin/sh
for (( i = 0; i < ${SCRIPT_INPUT_FILE_COUNT}; i++ ))
do
in="$(eval echo \${SCRIPT_INPUT_FILE_${i}})"
out="$(eval echo \${SCRIPT_OUTPUT_FILE_${i}})"
cp -pPR "${in}" "${out}"
done
exit 0

View File

@@ -1,39 +0,0 @@
#!/bin/sh
#
# Here we create empty xcconfig files if they do not exist. Otherwise,
# the build will fail.
#
configs='Debug Release'
for config in $configs
do
if [ ! -f $TOPLEVEL/mac/$config.xcconfig ]
then
touch $TOPLEVEL/mac/$config.xcconfig
fi
done
#
# Generate the header file for preprocessing the Info.plist
#
# It's also used for create the distribution files
#
cd ${TOPLEVEL}
mkdir -p mac/build
eval $(g++ -Wno-deprecated -stdlib=libc++ -E -dM src/Audacity.h | awk '/#define *AUDACITY_(VERSION|RELEASE|REVISION|MODLEVEL) /{print $2 "=" $3}')
case $CONFIGURATION in
Debug|Debug64)
AUDACITY_EXECUTABLE=Wrapper;;
*)
AUDACITY_EXECUTABLE=Wrapper;;
esac
cat >mac/build/Info.plist.h <<EOF
#define AUDACITY_EXECUTABLE ${AUDACITY_EXECUTABLE}
#define AUDACITY_VERSION ${AUDACITY_VERSION}
#define AUDACITY_RELEASE ${AUDACITY_RELEASE}
#define AUDACITY_REVISION ${AUDACITY_REVISION}
#define AUDACITY_DIST_VERSION ${AUDACITY_VERSION}.${AUDACITY_RELEASE}.${AUDACITY_REVISION}
#define AUDACITY_INFO_VERSION ${AUDACITY_VERSION}.${AUDACITY_RELEASE}.${AUDACITY_REVISION}.${AUDACITY_MODLEVEL}
EOF
exit 0

View File

@@ -1,10 +0,0 @@
fmt='
#if !defined(REV_LONG)
#define REV_LONG "%H"
#endif
#if !defined(REV_TIME)
#define REV_TIME "%cd"
#endif
'
git show -s --format="${fmt}" | tee ../src/RevisionIdent.h
touch ../src/AboutDialog.cpp

View File

@@ -1,115 +0,0 @@
#!/bin/sh
#
# This script builds the 2 plugins that are included in the Audacity
# distribution.
#
# Since we do not include the plugin source as part of Audacity, we
# must retrieve it first, followed by configure. However, we do not
# use the constructed Makefile since we only need 2 of the plugins and
# it is not universal binary friendly.
#
# In addition, each plugin has an initialization routine that must be
# executed before the plugin can be used. The plugin distribution does
# not provide support for this on OSX so, by default, the initialization
# routine never gets executed.
#
# Therefore, we assign the constructor attribute to the initialization
# routine which causes the routine to be executed as soon as the plugin
# is loaded.
#
# Set to the URL to the plugins source distribution
swhdist="http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz"
# Set to base directory within the above distribution
swhpath="./swh-plugins-0.4.15"
#
# Builds an individual plugin
#
function build
{
# Get the plugin name
target="$1"
shift
# Create the destination directory if it's not already there
if [ ! -d "${TARGET_BUILD_DIR}" ]
then
mkdir -p "${TARGET_BUILD_DIR}"
chmod -RH "${INSTALL_MODE_FLAG}" "${TARGET_BUILD_DIR}"
chown -RH "${INSTALL_OWNER}:${INSTALL_GROUP}" "${TARGET_BUILD_DIR}"
fi
# Build the plugin if it doesn't exist
if [ ! -e "${TARGET_BUILD_DIR}/${target}.so" ]
then
GCC=gcc
if [ -e "${GCC}-${GCC_VERSION}" ]
then
GCC="${GCC}-${GCC_VERSION}"
fi
echo "Building ${target} using ${GCC}"
"${GCC}" -bundle -arch ${ARCHS/ / -arch } \
-mmacosx-version-min="${MACOSX_DEPLOYMENT_TARGET}" -isysroot "${SDKROOT}" \
-O3 -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math \
"-D_init=__attribute__ ((constructor)) _${target}_init" \
-o "${TARGET_BUILD_DIR}/${target}.so" ${*}
fi
}
function cleanAction
{
[ -d "${TARGET_TEMP_DIR}" ] && rm -rf "${TARGET_TEMP_DIR}"
rm -f "${TARGET_BUILD_DIR}/sc4_1882.so"
}
function buildAction
{
# Create the temp directory
mkdir -p "${TARGET_TEMP_DIR}"
cd "${TARGET_TEMP_DIR}"
# Get the distribution
if [ ! -e "${swhpath}" ]
then
echo "Retrieving plugins"
curl "${swhdist}" | tar xf -
fi
# Get to where we need to be
cd "${swhpath}"
# Get rid of the existing config.h options
echo >config.h
# Build the 2 standard plugins
build sc4_1882 sc4_1882.c util/db.c util/rms.c
}
function installAction
{
# Just do the build to put things where the belong
buildAction
}
case "${ACTION}" in
"" | build)
TARGET_BUILD_DIR="${TARGET_BUILD_DIR}/Audacity.app/Contents/plug-ins"
buildAction
;;
install)
TARGET_BUILD_DIR="${DSTROOT}/Audacity.app/Contents/plug-ins"
installAction
;;
clean)
TARGET_BUILD_DIR="${TARGET_BUILD_DIR}/Audacity.app/Contents/plug-ins"
cleanAction
;;
esac
exit

View File

@@ -1,61 +0,0 @@
#!/bin/sh
#
# This script retrieves and build the Audacity manual
#
function cleanAction
{
[ -d "${TARGET_TEMP_DIR}" ] && rm -rf "${TARGET_TEMP_DIR}"
[ -d "${TOPLEVEL}/help/manual" ] && rm -r "${TOPLEVEL}/help/manual"
rm -rf "${TARGET_BUILD_DIR}"
}
function buildAction
{
# Retrieve the manual
if [ ! -d "${TOPLEVEL}/help/manual" ]
then
cd "${TOPLEVEL}/scripts/mw2html_audacity"
./wiki2htm.sh
cd "${SRCROOT}"
fi
# Create the destination directory if it's not already there
if [ ! -d "${TARGET_BUILD_DIR}" ]
then
mkdir -p "${TARGET_BUILD_DIR}"
chmod -RH "${INSTALL_MODE_FLAG}" "${TARGET_BUILD_DIR}"
chown -RH "${INSTALL_OWNER}:${INSTALL_GROUP}" "${TARGET_BUILD_DIR}"
fi
# Copy the manual to the destination
cp -pPR "${TOPLEVEL}/help/manual/" "${TARGET_BUILD_DIR}"
# Remove svn files
find "${TARGET_BUILD_DIR}" -name .svn -print0 | xargs -0 rm -rf
}
function installAction
{
# Just do the build to put things where the belong
buildAction
}
case "${ACTION}" in
"" | build)
TARGET_BUILD_DIR="${TARGET_BUILD_DIR}/Audacity.app/Contents/help/manual"
buildAction
;;
install)
TARGET_BUILD_DIR="${DSTROOT}/Audacity.app/Contents/help/manual"
installAction
;;
clean)
TARGET_BUILD_DIR="${TARGET_BUILD_DIR}/Audacity.app/Contents/help/manual"
cleanAction
;;
esac
exit

View File

@@ -1,15 +0,0 @@
#Hand edit this to get the 'right' results.
#This batch file is just a reminder of the commands...
hdiutil resize -size 200m /private/tmp/TMP.dmg
hdiutil mount /private/tmp/TMP.dmg
#Now move the folders out the way so they don't clutter appearance.
#Also optionally add Portable Settings and Auto Save with chmod 777.
codesign --deep -s IDENTITY -v "/Volumes/Audacity VERSION/Audacity.app"
spctl -a -v "/Volumes/Audacity VERSION/Audacity.app"
hdiutil eject "/Volumes/Audacity VERSION/"
# Compress and prepare for Internet delivery
hdiutil convert /private/tmp/TMP.dmg -format UDZO -imagekey zlib-level=9 -o "/private/tmp/RESULT.dmg"