Ticket #5270: runprefix.2.patch
File runprefix.2.patch, 5.1 KB (added by , 17 years ago) |
---|
-
configure
181 181 echo "" 182 182 echo " --enable-mac-bundle produce standalone OS X apps (e.g. mythfrontend.app)" 183 183 echo "" 184 echo " --runtime-prefix=PREFIX prefix to be used at runtime" 185 echo " (e.g. .. or /myth/latest)" 184 186 echo " --with-bindings=LIST install the bindings specified in the" 185 187 echo " comma-separated list" 186 188 echo " Supported bindings: perl, python" … … 1160 1162 CONFIG_DEFINES="" 1161 1163 CONFIG_INCLUDEPATH="" 1162 1164 PROFILEFLAGS="" 1165 RUNPREFIX=$PREFIX 1163 1166 audio_alsa="default" 1164 1167 audio_alsa_libs="-lasound" 1165 1168 audio_arts="default" … … 1395 1398 ;; 1396 1399 --enable-mac-bundle) enable mac_bundle 1397 1400 ;; 1401 --runtime-prefix=*) RUNPREFIX="$optval" 1402 ;; 1398 1403 --previous|--prev) 1399 1404 echo "No history of previous configure parameters." 1400 1405 ;; … … 2889 2894 echo "DistCC $distcc$distcc_txt" 2890 2895 echo "qmake $(which $qmake)" 2891 2896 echo "install prefix $PREFIX" 2897 echo "runtime prefix $RUNPREFIX" 2892 2898 <<BLOCK_QUOTE 2893 2899 echo "source path $source_path" 2894 2900 echo "C compiler $cc" … … 3075 3081 echo "#define FFMPEG_CONFIG_H" >> $TMPH 3076 3082 echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH 3077 3083 3084 echo "RUNPREFIX=$RUNPREFIX" >> $MYTH_CONFIG_MAK 3078 3085 echo "PREFIX=$PREFIX" >> $MYTH_CONFIG_MAK 3079 3086 echo "LIBDIR=$libdir" >> $MYTH_CONFIG_MAK 3080 3087 <<BLOCK_QUOTE -
libs/libmyth/mythcontext.cpp
221 221 Settings *m_settings; ///< connection stuff, theme, button style 222 222 Settings *m_qtThemeSettings; ///< everything else theme-related 223 223 224 QString m_installprefix; ///< Compile-time PREFIX, or generated224 QString m_installprefix; ///< Compile-time RUNPREFIX, or generated 225 225 ///< from enviroment ($MYTHTVDIR or $cwd) 226 QString m_installlibdir; ///< Compile-time LIBDIR, or generated227 226 228 227 bool m_gui; ///< Should this context use GUI elements? 229 228 bool m_backend; ///< Is this host any sort of backend? … … 314 313 MythContextPrivate::MythContextPrivate(MythContext *lparent) 315 314 : parent(lparent), 316 315 m_settings(new Settings()), m_qtThemeSettings(new Settings()), 317 m_installprefix( PREFIX), m_installlibdir(LIBDIR),316 m_installprefix(RUNPREFIX), 318 317 m_gui(false), m_backend(false), m_themeloaded(false), 319 318 m_menuthemepathname(QString::null), m_themepathname(QString::null), 320 319 m_backgroundimage(NULL), … … 356 355 357 356 VERBOSE(VB_IMPORTANT+VB_EXTRA, 358 357 "Relative PREFIX!\nappDir=" + prefixDir.canonicalPath() + 359 "\nprefix=" + m_installprefix + ", libdir=" + m_installlibdir);358 "\nprefix=" + m_installprefix); 360 359 prefixDir.cd(m_installprefix); 361 360 m_installprefix = prefixDir.canonicalPath(); 362 363 // Not strictly necessary, but it tidies up the path:364 if (QDir(m_installlibdir).isRelative())365 {366 prefixDir = qApp->applicationDirPath();367 prefixDir.cd(m_installlibdir);368 m_installlibdir = prefixDir.canonicalPath();369 }370 361 } 371 else if (prefixDir.path().contains(".app/Contents/MacOS"))372 {373 prefixDir.cd("../Resources");374 if (QDir(prefixDir.canonicalPath() + "/bin").exists() ||375 QDir(prefixDir.canonicalPath() + "/share").exists())376 m_installprefix = prefixDir.canonicalPath();377 if (QDir(prefixDir.canonicalPath() + "/lib").exists())378 m_installlibdir = prefixDir.canonicalPath() + "/lib";379 }380 362 381 VERBOSE(VB_IMPORTANT, QString("Using runtime prefix = %1, libdir = %2") 382 .arg(m_installprefix).arg(m_installlibdir)); 363 VERBOSE(VB_IMPORTANT, "Using runtime prefix = " + m_installprefix); 383 364 } 384 365 385 366 MythContextPrivate::~MythContextPrivate() -
settings.pro
3 3 isEmpty( PREFIX ) { 4 4 PREFIX = /usr/local 5 5 } 6 isEmpty( RUNPREFIX ) { 7 RUNPREFIX = $$PREFIX 8 } 9 isEmpty( LIBDIR ) { 10 LIBDIR = $${RUNPREFIX}/lib 11 } 6 12 7 13 LIBVERSION = 0.22 8 14 VERSION = 0.22.0 … … 89 95 DEFINES += $$CONFIG_DEFINES 90 96 DEFINES += _GNU_SOURCE 91 97 DEFINES += _FILE_OFFSET_BITS=64 98 DEFINES += RUNPREFIX=\\\"$${RUNPREFIX}\\\" 92 99 DEFINES += PREFIX=\\\"$${PREFIX}\\\" 93 100 DEFINES += LIBDIR=\\\"$${LIBDIR}\\\" 94 101 -
contrib/OSX/build/osx-packager.pl
483 483 'mythtv' 484 484 => [ 485 485 '--prefix=' . $PREFIX, 486 '--runtime-prefix=../Resources', 486 487 # To "cross compile" something for a lesser Mac: 487 488 #'--tune=G3', 488 489 #'--disable-altivec',