mac_app.py   mac_app.py 
#!/usr/bin/env python #!/usr/bin/env python
# This utility is used to correctly populate the Stellarium.app bundle, onc e 'make install' has been run. The 'make mac_app' # This utility is used to correctly populate the Stellarium.app bundle, onc e 'make install' has been run. The 'make mac_app'
# target causes this to run. # target causes this to run.
# #
# It copies over into the bundle all direct and inderect frameworks and plu gins, and them updates the ID and load paths # It copies over into the bundle all direct and inderect frameworks and plu gins, and them updates the ID and load paths
# using install_name_tool. It copies over all resources needed. It then upd ates the stellarium binary itself (the load paths). # using install_name_tool. It copies over all resources needed. It then upd ates the stellarium binary itself (the load paths).
# #
# Copyright (C) 2013 Timothy Reaves # Copyright (C) 2013 Timothy Reaves
# Copyright (C) 2014 Alexander Wolf
import os import os
import shutil import shutil
import sys import sys
from subprocess import Popen from subprocess import Popen
from subprocess import PIPE from subprocess import PIPE
installDirectory = None installDirectory = None
qmlDirectory = None qmlDirectory = None
qtFrameworksDirectory = None qtFrameworksDirectory = None
skipping to change at line 111 skipping to change at line 112
def processFrameworks(): def processFrameworks():
''' '''
Copies over and process all linked Qt frameworks. Copies over and process all linked Qt frameworks.
''' '''
frameworkDirectory = os.path.join(installDirectory, 'Frameworks') frameworkDirectory = os.path.join(installDirectory, 'Frameworks')
os.mkdir(frameworkDirectory) os.mkdir(frameworkDirectory)
allFramework = [] allFramework = []
# First, copy over the stellarium dependencies # First, copy over the stellarium dependencies
frameworks = getListOfLinkedQtFrameworksForFile(os.path.join(install Directory, 'MacOS/stellarium')) frameworks = getListOfLinkedQtFrameworksForFile(os.path.join(install Directory, 'MacOS/stellarium'))
# QtMultimedia?
if 'QtMultimedia' in ' '.join(frameworks):
frameworks.append(frameworks[-1].replace('QtMultimedia','QtM
ultimediaWidgets'))
for framework in frameworks: for framework in frameworks:
copyFrameworkToApp(framework) copyFrameworkToApp(framework)
allFramework.append(framework) allFramework.append(framework)
# Now copy over any of the framework's dependencies themselves # Now copy over any of the framework's dependencies themselves
for framework in frameworks: for framework in frameworks:
for dependentFramework in getListOfLinkedQtFrameworksForFile (framework): for dependentFramework in getListOfLinkedQtFrameworksForFile (framework):
copyFrameworkToApp(dependentFramework) copyFrameworkToApp(dependentFramework)
allFramework.append(dependentFramework) allFramework.append(dependentFramework)
# for framework in set(allFramework): # for framework in set(allFramework):
updateName(framework) updateName(framework)
skipping to change at line 153 skipping to change at line 157
Copies over and process all Qt plugins. Copies over and process all Qt plugins.
''' '''
#Setup the plugin directory #Setup the plugin directory
pluginsDirectory = os.path.join(installDirectory, 'plugins') pluginsDirectory = os.path.join(installDirectory, 'plugins')
os.mkdir(pluginsDirectory) os.mkdir(pluginsDirectory)
# copy over image plugins # copy over image plugins
copyPluginDirectory('imageformats') copyPluginDirectory('imageformats')
copyPluginDirectory('iconengines') copyPluginDirectory('iconengines')
copyPluginDirectory('qmltooling') copyPluginDirectory('qmltooling')
# check multimedia support
if 'QtMultimedia' in ' '.join(getListOfLinkedQtFrameworksForFile(os.
path.join(installDirectory, 'MacOS/stellarium'))):
copyPluginDirectory('mediaservice')
copyPluginDirectory('audio')
# copy over the Cocoa platform plugin; we do single one here, as we do not want every platform # copy over the Cocoa platform plugin; we do single one here, as we do not want every platform
os.mkdir(os.path.join(pluginsDirectory, 'platforms')) os.mkdir(os.path.join(pluginsDirectory, 'platforms'))
shutil.copy(os.path.join(qtPluginsDirectory, 'platforms', 'libqcocoa .dylib'), os.path.join(pluginsDirectory, 'platforms')) shutil.copy(os.path.join(qtPluginsDirectory, 'platforms', 'libqcocoa .dylib'), os.path.join(pluginsDirectory, 'platforms'))
for framework in getListOfLinkedQtFrameworksForFile(os.path.join(plu ginsDirectory, 'platforms', 'libqcocoa.dylib')): for framework in getListOfLinkedQtFrameworksForFile(os.path.join(plu ginsDirectory, 'platforms', 'libqcocoa.dylib')):
copyFrameworkToApp(framework) copyFrameworkToApp(framework)
updateLibraryPath(framework, 'Frameworks') updateLibraryPath(framework, 'Frameworks')
# Always update paths after copying... # Always update paths after copying...
updateLibraryPath('libqcocoa.dylib', 'plugins/platforms') updateLibraryPath('libqcocoa.dylib', 'plugins/platforms')
 End of changes. 3 change blocks. 
0 lines changed or deleted 10 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/