mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 08:33:36 +02:00
A bit of scripts/ and mac/ cleanup
This commit is contained in:
@@ -1,91 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f mac_release_build ]
|
||||
then
|
||||
echo 'You must execute this script from the base Audacity directory'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
plugs='gverb_1216.so hard_limiter_1413.so sc4_1882.so'
|
||||
for plug in $plugs
|
||||
do
|
||||
if [ ! -f plug-ins/$plug ]
|
||||
then
|
||||
echo "Missing plugin: $plug"
|
||||
echo
|
||||
echo "You must copy the following to the plug-ins directory before building:"
|
||||
echo
|
||||
echo $plugs
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# Build it
|
||||
#
|
||||
cd mac
|
||||
xcodebuild -configuration 'Release Static'
|
||||
cd ..
|
||||
|
||||
# Setup
|
||||
VERSION=`awk '/^#define+ AUDACITY_VERSION / {print $3}' src/Audacity.h`
|
||||
RELEASE=`awk '/^#define+ AUDACITY_RELEASE / {print $3}' src/Audacity.h`
|
||||
REVISION=`awk '/^#define+ AUDACITY_REVISION / {print $3}' src/Audacity.h`
|
||||
|
||||
if [ ! -z "$SUFFIX" ]
|
||||
then
|
||||
SUFFIX="-$SUFFIX"
|
||||
fi
|
||||
|
||||
VERSION=$VERSION.$RELEASE.$REVISION$SUFFIX
|
||||
|
||||
VOL="Audacity $VERSION"
|
||||
DMG="audacity-macosx-ub-$VERSION"
|
||||
|
||||
# Preclean
|
||||
rm -rf "$DMG" "$DMG.dmg" TMP.dmg
|
||||
|
||||
# Create structure
|
||||
mkdir "$DMG"
|
||||
|
||||
# Copy directories
|
||||
SUBDIRS="Audacity.app Languages nyquist plug-ins modules"
|
||||
for SUBDIR in $SUBDIRS
|
||||
do
|
||||
cp -pR "mac/build/Release Static/$SUBDIR" "$DMG"
|
||||
done
|
||||
|
||||
# Retrieve and Copy help
|
||||
cd scripts/mw2html_audacity
|
||||
./wiki2htm.sh
|
||||
cd ../..
|
||||
mkdir "$DMG/help"
|
||||
mv "help/manual" "$DMG/help/"
|
||||
|
||||
# Strip binary
|
||||
strip "$DMG/Audacity.app/Contents/MacOS/"*
|
||||
|
||||
# Install misc files
|
||||
cp -pR README.txt LICENSE.txt "$DMG"
|
||||
|
||||
# Create and mount the image
|
||||
hdiutil create -ov -srcdir "$DMG" -fs HFS+ -volname "$VOL" TMP.dmg
|
||||
|
||||
# Compress and prepare for Internet delivery
|
||||
hdiutil convert TMP.dmg -format UDZO -imagekey zlib-level=9 -o "$DMG.dmg"
|
||||
hdiutil internet-enable -yes "$DMG.dmg"
|
||||
|
||||
# Cleanup
|
||||
rm TMP.dmg
|
||||
|
||||
# Move DMG to parent
|
||||
mv *.dmg ..
|
||||
|
||||
# Remove help contents
|
||||
rm -rf "$DMG/help/"*
|
||||
|
||||
# Create the zip version
|
||||
zip -r9 "../$DMG.zip" "$DMG"
|
||||
|
||||
exit
|
@@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Prepare a disk image
|
||||
#
|
||||
|
||||
#
|
||||
SUFFIX=$1
|
||||
TYPE=$2
|
||||
DEBUG=$3
|
||||
|
||||
# Setup
|
||||
VERSION=`awk '/^#define+ AUDACITY_VERSION / {print $3}' src/Audacity.h`
|
||||
RELEASE=`awk '/^#define+ AUDACITY_RELEASE / {print $3}' src/Audacity.h`
|
||||
REVISION=`awk '/^#define+ AUDACITY_REVISION / {print $3}' src/Audacity.h`
|
||||
|
||||
if [ -z "$SUFFIX" ]
|
||||
then
|
||||
SUFFIX=`grep '^#define AUDACITY_SUFFIX ' src/Audacity.h | cut -d '"' -f 2`
|
||||
fi
|
||||
|
||||
if [ ! -z "$TYPE" ]
|
||||
then
|
||||
TYPE="-$TYPE"
|
||||
fi
|
||||
|
||||
VERSION=$VERSION.$RELEASE.$REVISION$SUFFIX
|
||||
|
||||
VOL="Audacity $VERSION"
|
||||
DMG="audacity-macosx$TYPE-$VERSION"
|
||||
|
||||
# Preclean
|
||||
rm -rf "$DMG" "$DMG.dmg" TMP.dmg
|
||||
|
||||
# Create structure
|
||||
mkdir "$DMG"
|
||||
|
||||
# Copy directories
|
||||
SUBDIRS="Audacity.app Languages nyquist plug-ins"
|
||||
for SUBDIR in $SUBDIRS
|
||||
do
|
||||
if [ -z "$DEBUG" ]
|
||||
then
|
||||
cp -pR "mac/build/Release Static/$SUBDIR" "$DMG"
|
||||
else
|
||||
cp -pR "mac/build/Debug Static/$SUBDIR" "$DMG"
|
||||
fi
|
||||
done
|
||||
|
||||
# Strip binary
|
||||
strip "$DMG/Audacity.app/Contents/MacOS/"*
|
||||
|
||||
# Install misc files
|
||||
cp -pR README.txt LICENSE.txt "$DMG"
|
||||
|
||||
# Create and mount the image
|
||||
hdiutil create -ov -srcdir "$DMG" -fs HFS+ -volname "$VOL" TMP.dmg
|
||||
|
||||
# Compress and prepare for Internet delivery
|
||||
hdiutil convert TMP.dmg -format UDZO -imagekey zlib-level=9 -o "$DMG.dmg"
|
||||
hdiutil internet-enable -yes "$DMG.dmg"
|
||||
|
||||
# Cleanup
|
||||
rm TMP.dmg
|
||||
|
||||
exit
|
@@ -1,40 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
sub mydie {
|
||||
my $message = shift;
|
||||
print "ERROR: $message\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
print "reindent - reformat specified files to match Audacity guidelines.\n";
|
||||
|
||||
# check for indent and correct version
|
||||
|
||||
$indent = `which indent`;
|
||||
chomp $indent;
|
||||
|
||||
-x $indent || mydie "GNU indent must be installed and in your path";
|
||||
|
||||
$version = `$indent --version`;
|
||||
($major, $minor, $subminor) = ($version =~ /(\d+)\.(\d+)\.(\d+)/);
|
||||
|
||||
if($major < 2 ||
|
||||
($major == 2 && $minor < 2) ||
|
||||
($major == 2 && $minor == 2 && $subminor < 4)) {
|
||||
|
||||
mydie "GNU indent must be at least version 2.2.6 (found: $major.$minor.$subminor)";
|
||||
}
|
||||
|
||||
mydie "no files specified" unless @ARGV;
|
||||
|
||||
# everything checks out, proceed...
|
||||
|
||||
foreach my $file (@ARGV) {
|
||||
mydie "file \"$file\" does not exist" unless -e $file;
|
||||
print "indenting $file...\n";
|
||||
system("$indent -kr -nut -i3 -nsob $file");
|
||||
system("rm $file~");
|
||||
}
|
||||
|
||||
# arch-tag: b30b2ac9-5f36-4226-8b79-cb8ebfb908e1
|
||||
|
Reference in New Issue
Block a user