mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-02 20:36:44 +01:00
Use cross version of install_name_tool if available.
This commit is contained in:
parent
acc5e9f07c
commit
ae4fac4b4f
37
dist/macdeploy.py
vendored
37
dist/macdeploy.py
vendored
@ -15,6 +15,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
# along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from distutils import spawn
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -113,9 +114,12 @@ QT_PLUGINS_SEARCH_PATH=[
|
|||||||
'/Developer/Applications/Qt/plugins',
|
'/Developer/Applications/Qt/plugins',
|
||||||
]
|
]
|
||||||
|
|
||||||
GIO_MODULES_SEARCH_PATH=[
|
GIO_MODULES_SEARCH_PATH = ['/target/lib/gio/modules',]
|
||||||
'/target/lib/gio/modules',
|
|
||||||
]
|
INSTALL_NAME_TOOL_APPLE = 'install_name_tool'
|
||||||
|
INSTALL_NAME_TOOL_CROSS = 'x86_64-apple-darwin-%s' % INSTALL_NAME_TOOL_APPLE
|
||||||
|
INSTALL_NAME_TOOL = INSTALL_NAME_TOOL_CROSS if spawn.find_executable(
|
||||||
|
INSTALL_NAME_TOOL_CROSS) else INSTALL_NAME_TOOL_APPLE
|
||||||
|
|
||||||
|
|
||||||
class Error(Exception):
|
class Error(Exception):
|
||||||
@ -334,34 +338,39 @@ def CopyFramework(src_binary):
|
|||||||
|
|
||||||
# Create symlinks in the Framework to make it look like
|
# Create symlinks in the Framework to make it look like
|
||||||
# https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html
|
# https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html
|
||||||
commands.append(['ln', '-sf',
|
commands.append([
|
||||||
'Versions/Current/%s' % name,
|
'ln', '-sf', 'Versions/Current/%s' % name, os.path.join(dest_base, name)
|
||||||
os.path.join(dest_base, name)])
|
])
|
||||||
commands.append(['ln', '-sf',
|
commands.append([
|
||||||
'Versions/Current/Resources',
|
'ln', '-sf', 'Versions/Current/Resources',
|
||||||
os.path.join(dest_base, 'Resources')])
|
os.path.join(dest_base, 'Resources')
|
||||||
commands.append(['ln', '-sf',
|
])
|
||||||
version,
|
commands.append(
|
||||||
os.path.join(dest_base, 'Versions/Current')])
|
['ln', '-sf', version, os.path.join(dest_base, 'Versions/Current')])
|
||||||
|
|
||||||
return dest_binary
|
return dest_binary
|
||||||
|
|
||||||
|
|
||||||
def FixId(path, library_name):
|
def FixId(path, library_name):
|
||||||
id = '@executable_path/../Frameworks/%s' % library_name
|
id = '@executable_path/../Frameworks/%s' % library_name
|
||||||
args = ['install_name_tool', '-id', id, path]
|
args = [INSTALL_NAME_TOOL, '-id', id, path]
|
||||||
commands.append(args)
|
commands.append(args)
|
||||||
|
|
||||||
|
|
||||||
def FixLibraryId(path):
|
def FixLibraryId(path):
|
||||||
library_name = os.path.basename(path)
|
library_name = os.path.basename(path)
|
||||||
FixId(path, library_name)
|
FixId(path, library_name)
|
||||||
|
|
||||||
|
|
||||||
def FixFrameworkId(path, id):
|
def FixFrameworkId(path, id):
|
||||||
FixId(path, id)
|
FixId(path, id)
|
||||||
|
|
||||||
|
|
||||||
def FixInstallPath(library_path, library, new_path):
|
def FixInstallPath(library_path, library, new_path):
|
||||||
args = ['install_name_tool', '-change', library_path, new_path, library]
|
args = [INSTALL_NAME_TOOL, '-change', library_path, new_path, library]
|
||||||
commands.append(args)
|
commands.append(args)
|
||||||
|
|
||||||
|
|
||||||
def FindSystemLibrary(library_name):
|
def FindSystemLibrary(library_name):
|
||||||
for path in ['/lib', '/usr/lib']:
|
for path in ['/lib', '/usr/lib']:
|
||||||
full_path = os.path.join(path, library_name)
|
full_path = os.path.join(path, library_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user