Skip to content

Commit

Permalink
Adding AudioDescriptors plugins to installer (MacOS)
Browse files Browse the repository at this point in the history
  • Loading branch information
OKGougou committed Jun 7, 2024
1 parent 7417146 commit 5aaf082
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
8 changes: 7 additions & 1 deletion installer/Distribution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ function speakerview_mobile_selected() {
<pkg-ref id="ca.umontreal.musique.gris.speakerview.mobile.pkg"/>
<pkg-ref id="ca.umontreal.musique.gris.controlgris.pkg"/>
<pkg-ref id="ca.umontreal.musique.gris.movesgtoforeground.pkg"/>
<pkg-ref id="ca.umontreal.musique.gris.audiodescriptors.pkg"/>

<choices-outline>
<line choice="ca.umontreal.musique.gris.spatgris.pkg"/>
<line choice="ca.umontreal.musique.gris.speakerview.pkg"/>
<line choice="ca.umontreal.musique.gris.speakerview.compatibility.pkg"/>
<line choice="ca.umontreal.musique.gris.speakerview.mobile.pkg"/>
<line choice="ca.umontreal.musique.gris.controlgris.pkg"/>
<line choice="ca.umontreal.musique.gris.audiodescriptors.pkg"/>
</choices-outline>

<choice id="ca.umontreal.musique.gris.spatgris.pkg" visible="true" title="SpatGRIS">
<pkg-ref id="ca.umontreal.musique.gris.spatgris.pkg"/>
</choice>
Expand All @@ -70,12 +72,16 @@ function speakerview_mobile_selected() {
<choice id="ca.umontreal.musique.gris.controlgris.pkg" visible="true" title="ControlGRIS">
<pkg-ref id="ca.umontreal.musique.gris.controlgris.pkg"/>
</choice>
<choice id="ca.umontreal.musique.gris.audiodescriptors.pkg" visible="true" title="AudioDescriptors">
<pkg-ref id="ca.umontreal.musique.gris.audiodescriptors.pkg"/>
</choice>

<pkg-ref id="ca.umontreal.musique.gris.spatgris.pkg" onConclusion="none" auth="root">Application.pkg</pkg-ref>
<pkg-ref id="ca.umontreal.musique.gris.speakerview.pkg" onConclusion="none" auth="root">SpeakerView.pkg</pkg-ref>
<pkg-ref id="ca.umontreal.musique.gris.speakerview.compatibility.pkg" onConclusion="none" auth="root">SpeakerView_Compatibility.pkg</pkg-ref>
<pkg-ref id="ca.umontreal.musique.gris.speakerview.mobile.pkg" onConclusion="none" auth="root">SpeakerView_Mobile.pkg</pkg-ref>
<pkg-ref id="ca.umontreal.musique.gris.movesgtoforeground.pkg" onConclusion="none" auth="root">MoveSGToForeground.pkg</pkg-ref>
<pkg-ref id="ca.umontreal.musique.gris.controlgris.pkg" onConclusion="none" auth="root">Plugins.pkg</pkg-ref>
<pkg-ref id="ca.umontreal.musique.gris.audiodescriptors.pkg" onConclusion="none" auth="root">AudioDescriptorsPlugins.pkg</pkg-ref>

</installer-gui-script>
46 changes: 34 additions & 12 deletions installer/osx_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
# Developers: Gaël Lane Lépine, Olivier Belanger, Samuel Béland

#==============================================================================
export USAGE="usage:\n\tosx_builder --path <bin-path> --plugins <pugins-pkg-path> --blackhole <blackhole-pkgs-dir-path> --speakerview <speakerview-app-path> --speakerview-compat <speakerview-compat-app-path> --speakerview-mobile <speakerview-mobile-app-path> --pass <dev-id-password>"
export USAGE="usage:\n\tosx_builder --path <bin-path> --plugins <plugins-pkg-path> --blackhole <blackhole-pkgs-dir-path> --speakerview <speakerview-app-path> --speakerview-compat <speakerview-compat-app-path> --speakerview-mobile <speakerview-mobile-app-path> --desc-plugins <audio-descriptors-plugins-pkg-path> --pass <dev-id-password>"
export BIN_PATH=""
export PASS=""
export PLUGINS_PKG=""
export AUDIO_DESCRIPTORS_PKG=""
export BLACKHOLE_PKGS_DIR=""
export SPEAKERVIEW_APP=""
export SPEAKERVIEW_COMPATIBILITY_APP=""
Expand Down Expand Up @@ -64,6 +65,11 @@ case $key in
shift
shift
;;
--desc-plugins)
AUDIO_DESCRIPTORS_PKG="$2"
shift
shift
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
Expand All @@ -74,36 +80,40 @@ set -- "${POSITIONAL[@]}" # restore positional parameters

if [[ "$BIN_PATH" == "" ]];then
echo "Missing param --path"
echo -e "$USAGE"
echo "$USAGE"
exit 1
elif [[ "$PASS" == "" ]];then
echo "Missing param --pass"
echo -e "$USAGE"
echo "$USAGE"
exit 1
elif [[ $PLUGINS_PKG == "" ]];then
echo "Missing param --plugins"
echo -e "$USAGE"
echo "$USAGE"
exit 1
elif [[ $BLACKHOLE_PKGS_DIR == "" ]];then
echo "Missing param --backhole"
echo -e "$USAGE"
echo "$USAGE"
exit 1
elif [[ $SPEAKERVIEW_APP == "" ]];then
echo "Missing param --speakerview"
echo -e "$USAGE"
echo "$USAGE"
exit 1
elif [[ $SPEAKERVIEW_COMPATIBILITY_APP == "" ]];then
echo "Missing param --speakerview-compat"
echo -e "$USAGE"
echo "$USAGE"
exit 1
elif [[ $SPEAKERVIEW_MOBILE_APP == "" ]];then
echo "Missing param --speakerview-mobile"
echo -e "$USAGE"
echo "$USAGE"
exit 1
elif [[ $MOVE_SG_TO_FOREGROUND_DIR == "" ]];then
echo "Missing param --movetoforeground"
echo -e "$USAGE"
echo "$USAGE"
exit 1
elif [[ $AUDIO_DESCRIPTORS_PKG == "" ]];then
echo "Missing param --desc-plugins"
echo "$USAGE"
exit 1
fi

#==============================================================================
Expand All @@ -119,6 +129,12 @@ echo "SpatGris version is $VERSION"
PLUGINS_VERSION=$(echo $PLUGINS_PKG | awk -F 'ControlGris_' '{print $NF}' | awk -F '.pkg' '{print $1}')
echo "ControlGris version is $PLUGINS_VERSION"

#==============================================================================
# get audio descriptors version

AUDIO_DESCRIPTORS_VERSION=$(echo $AUDIO_DESCRIPTORS_PKG | awk -F 'AudioDescriptors_' '{print $NF}' | awk -F '.pkg' '{print $1}')
echo "AudioDescriptors version is $AUDIO_DESCRIPTORS_VERSION"

#==============================================================================
# get SpeakerView version

Expand Down Expand Up @@ -188,7 +204,7 @@ function build_package() {

echo "copying application..."
cp -r $BIN_PATH $APPLICATIONS_DIR/ || exit 1

echo "copying SpeakerView Forward application..."
cp -r $SPEAKERVIEW_APP $SPEAKERVIEW_APPLICATIONS_DIR/ || exit 1

Expand All @@ -206,6 +222,9 @@ function build_package() {
echo "Copying plugins..."
cp -r $PLUGINS_PKG "$INSTALLER_DIR/Plugins.pkg"

echo "Copying AudioDescriptors plugins..."
cp -r $AUDIO_DESCRIPTORS_PKG "$INSTALLER_DIR/AudioDescriptorsPlugins.pkg"

cd $INSTALLER_DIR

echo "building Application.pkg"
Expand Down Expand Up @@ -256,12 +275,13 @@ function build_package() {
--timestamp \
"MoveSGToForeground.pkg" || exit 1

echo "adding SpatGris, SpeakerView and ControlGris versions to installer"
echo "adding SpatGris, SpeakerView, ControlGris and AudioDescriptors versions to installer"
sed -i '' "s/title=\"SpatGRIS.*\"/title=\"SpatGRIS $VERSION\"/" ../Distribution.xml || exit 1
sed -i '' "s/title=\"SpeakerView Forward.*\"/title=\"SpeakerView Forward $SPEAKERVIEW_VERSION (Recommended)\"/" ../Distribution.xml || exit 1
sed -i '' "s/title=\"SpeakerView Compatibility.*\"/title=\"SpeakerView Compatibility $SPEAKERVIEW_COMPAT_VERSION\"/" ../Distribution.xml || exit 1
sed -i '' "s/title=\"SpeakerView Mobile.*\"/title=\"SpeakerView Mobile $SPEAKERVIEW_MOBILE_VERSION\"/" ../Distribution.xml || exit 1
sed -i '' "s/title=\"ControlGRIS.*\"/title=\"ControlGRIS $PLUGINS_VERSION\"/" ../Distribution.xml || exit 1
sed -i '' "s/title=\"AudioDescriptors.*\"/title=\"AudioDescriptors $AUDIO_DESCRIPTORS_VERSION\"/" ../Distribution.xml || exit 1

echo "building $PACKAGE_NAME"
productbuild --distribution "../Distribution.xml" \
Expand All @@ -277,6 +297,7 @@ function build_package() {
sed -i '' "s/title=\"SpeakerView Compatibility.*\"/title=\"SpeakerView Compatibility\"/" ../Distribution.xml || exit 1
sed -i '' "s/title=\"SpeakerView Mobile.*\"/title=\"SpeakerView Mobile\"/" ../Distribution.xml || exit 1
sed -i '' "s/title=\"ControlGRIS.*\"/title=\"ControlGRIS\"/" ../Distribution.xml || exit 1
sed -i '' "s/title=\"AudioDescriptors.*\"/title=\"AudioDescriptors\"/" ../Distribution.xml || exit 1
}

#==============================================================================
Expand Down Expand Up @@ -356,6 +377,7 @@ function cleanup() {
echo "cleaning up resources..."
rm -rf $INSTALLER_DIR
rm -fr Plugins.pkg
rm -rf AudioDescriptorsPlugins.pkg
}

#==============================================================================
Expand All @@ -364,4 +386,4 @@ build_dmg
send_for_notarisation
wait_for_notarization
staple
# cleanup
# cleanup

0 comments on commit 5aaf082

Please sign in to comment.