-
Notifications
You must be signed in to change notification settings - Fork 172
/
fixlibs.sh
executable file
·111 lines (87 loc) · 6.03 KB
/
fixlibs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/sh
#
# This script will prepare the application (.app) bundle for Mac OS X.
# Hydrogen
# Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
# Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
#
# http://www.hydrogen-music.org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# prepare the .app package icon
#echo " *** Copying icon"
#mkdir -p hydrogen.app/Contents/Resources
#cp macos/Hydrogen.icns hydrogen.app/Contents/Resources/Hydrogen.icns
#sed -e "s/<string></<string>Hydrogen.icns</" hydrogen.app/Contents/Info.plist
echo " *** Copying data directory"
rm -rf hydrogen.app/Contents/Resources/data
cp -R data hydrogen.app/Contents/Resources/data
echo " *** Copying plugins directory"
rm -rf hydrogen.app/Contents/Resources/plugins
mkdir -p hydrogen.app/Contents/Resources/plugins
cp -R plugins/*.dylib hydrogen.app/Contents/Resources/plugins
# remove the unnecesssary subversion directories
rm -rf `find hydrogen.app/Contents/Resources/data | grep "\.svn"`
# remove all the old dynamic libraries
#rm -rf hydrogen.app/Contents/Frameworks
#mkdir hydrogen.app/Contents/Frameworks
# copy all dynamic libraries and frameworks
#echo " *** Processing libsndfile"
#cp -L /usr/lib/libsndfile.dylib hydrogen.app/Contents/Frameworks/libsndfile.dylib
#install_name_tool -id @executable_path/../Frameworks/libsndfile.dylib hydrogen.app/Contents/Frameworks/libsndfile.dylib
#install_name_tool -change /usr/local/lib/libsndfile.1.dylib @executable_path/../Frameworks/libsndfile.dylib hydrogen.app/Contents/MacOS/hydrogen
#echo " *** Processing libFLAC"
#cp -L /usr/lib/libFLAC.dylib hydrogen.app/Contents/Frameworks/libFLAC.dylib
#install_name_tool -id @executable_path/../Frameworks/libFLAC.dylib hydrogen.app/Contents/Frameworks/libFLAC.dylib
#install_name_tool -change /usr/local/lib/libFLAC.7.dylib @executable_path/../Frameworks/libFLAC.dylib hydrogen.app/Contents/MacOS/hydrogen
#echo " *** Processing libFLAC++"
#cp -L /usr/lib/libFLAC++.dylib hydrogen.app/Contents/Frameworks/libFLAC++.dylib
#install_name_tool -id @executable_path/../Frameworks/libFLAC++.dylib hydrogen.app/Contents/Frameworks/libFLAC++.dylib
#install_name_tool -change /usr/local/lib/libFLAC++.5.dylib @executable_path/../Frameworks/libFLAC++.dylib hydrogen.app/Contents/MacOS/hydrogen
#install_name_tool -change /usr/local/lib/libFLAC.7.dylib @executable_path/../Frameworks/libFLAC.dylib hydrogen.app/Contents/Frameworks/libFLAC++.dylib
#echo " *** Processing QT Gui lib"
#cp -L $QTDIR/lib/libQtGui.4.dylib hydrogen.app/Contents/Frameworks/libQtGui.dylib
#install_name_tool -id @executable_path/../Frameworks/libQtGui.dylib hydrogen.app/Contents/Frameworks/libQtGui.dylib
#install_name_tool -change $QTDIR/lib/libQtGui.4.dylib @executable_path/../Frameworks/libQtGui.dylib hydrogen.app/Contents/MacOS/hydrogen
#install_name_tool -change $QTDIR/lib/libQtCore.4.dylib @executable_path/../Frameworks/libQtCore.dylib hydrogen.app/Contents/Frameworks/libQtGui.dylib
#echo " *** Processing QT Network lib"
#cp -L $QTDIR/lib/libQtNetwork.4.dylib hydrogen.app/Contents/Frameworks/libQtNetwork.dylib
#install_name_tool -id @executable_path/../Frameworks/libQtNetwork.dylib hydrogen.app/Contents/Frameworks/libQtNetwork.dylib
#install_name_tool -change $QTDIR/lib/libQtNetwork.4.dylib @executable_path/../Frameworks/libQtNetwork.dylib hydrogen.app/Contents/MacOS/hydrogen
#install_name_tool -change $QTDIR/lib/libQtCore.4.dylib @executable_path/../Frameworks/libQtCore.dylib hydrogen.app/Contents/Frameworks/libQtNetwork.dylib
#echo " *** Processing QT Core lib"
#cp -L $QTDIR/lib/libQtCore.4.dylib hydrogen.app/Contents/Frameworks/libQtCore.dylib
#install_name_tool -id @executable_path/../Frameworks/libQtCore.dylib hydrogen.app/Contents/Frameworks/libQtCore.dylib
#install_name_tool -change $QTDIR/lib/libQtCore.4.dylib @executable_path/../Frameworks/libQtCore.dylib hydrogen.app/Contents/MacOS/hydrogen
#echo " *** Processing QT SVG lib"
#cp -L $QTDIR/lib/libQtSvg.4.dylib hydrogen.app/Contents/Frameworks/libQtSvg.dylib
#install_name_tool -id @executable_path/../Frameworks/libQtSvg.dylib hydrogen.app/Contents/Frameworks/libQtSvg.dylib
#install_name_tool -change $QTDIR/lib/libQtSvg.4.dylib @executable_path/../Frameworks/libQtSvg.dylib hydrogen.app/Contents/MacOS/hydrogen
#install_name_tool -change $QTDIR/lib/libQtGui.4.dylib @executable_path/../Frameworks/libQtGui.dylib hydrogen.app/Contents/Frameworks/libQtSvg.dylib
#install_name_tool -change $QTDIR/lib/libQtXml.4.dylib @executable_path/../Frameworks/libQtXml.dylib hydrogen.app/Contents/Frameworks/libQtSvg.dylib
#install_name_tool -change $QTDIR/lib/libQtCore.4.dylib @executable_path/../Frameworks/libQtCore.dylib hydrogen.app/Contents/Frameworks/libQtSvg.dylib
#echo " *** Processing QT XML lib"
#cp -L $QTDIR/lib/libQtXml.4.dylib hydrogen.app/Contents/Frameworks/libQtXml.dylib
#install_name_tool -id @executable_path/../Frameworks/libQtXml.dylib hydrogen.app/Contents/Frameworks/libQtXml.dylib
#install_name_tool -change $QTDIR/lib/libQtXml.4.dylib @executable_path/../Frameworks/libQtXml.dylib hydrogen.app/Contents/MacOS/hydrogen
#install_name_tool -change $QTDIR/lib/libQtCore.4.dylib @executable_path/../Frameworks/libQtCore.dylib hydrogen.app/Contents/Frameworks/libQtXml.dylib
# strip the executable
strip hydrogen.app/Contents/MacOS/hydrogen
# just for info...
echo " *** Library dependencies"
otool -L hydrogen.app/Contents/MacOS/hydrogen
du -h hydrogen.app
echo ""
echo " *** Finished"