diff --git a/.gitignore b/.gitignore index 5a1ac105cb..6981bcce0c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.bak *.diff *.orig +*.patch *.pyc *.rej *.swp diff --git a/autobuild.xml b/autobuild.xml index 88ee1e4cba..e1963e3597 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1002,11 +1002,11 @@ fmodstudio copyright - FMOD Studio, copyright (c) Firelight Technologies Pty, Ltd., 2012-2017. + FMOD Studio by Firelight Technologies Pty Ltd. description - FMOD Studio audio system library + FMOD Studio API license - fmodstudio + fmod license_file LICENSES/fmodstudio.txt name diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp index e13176e8fa..53f98adbbf 100644 --- a/indra/llcommon/indra_constants.cpp +++ b/indra/llcommon/indra_constants.cpp @@ -84,3 +84,5 @@ const LLUUID IMG_USE_BAKED_AUX1 ("9742065b-19b5-297c-858a-29711d539043"); const LLUUID IMG_USE_BAKED_AUX2 ("03642e83-2bd1-4eb9-34b4-4c47ed586d2d"); const LLUUID IMG_USE_BAKED_AUX3 ("edd51b77-fc10-ce7a-4b3d-011dfc349e4f"); +const LLUUID IMG_LOGO_FMOD("876982f5-f5fd-4a68-b5e7-727f3ae3487b"); + diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index f52e6b6584..eca87af940 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -222,6 +222,8 @@ LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX1; LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX2; LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX3; +LL_COMMON_API extern const LLUUID IMG_LOGO_FMOD; + LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4278f4555f..3ed56244c8 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2111,6 +2111,8 @@ endif (OPENAL) if (FMODSTUDIO) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO") + # texture list needs to load fmod icon + set_source_files_properties(llviewertexturelist.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") set(FMODWRAPPER_LIBRARY ${FMODSTUDIO_LIBRARY}) endif (FMODSTUDIO) @@ -2239,10 +2241,10 @@ if (WINDOWS) if (FMODSTUDIO) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/Release/fmod.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll - ${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll - ) + ${SHARED_LIB_STAGING_DIR}/Release/fmod.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll + ${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll + ) endif (FMODSTUDIO) if (OPENAL) diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 89c97f687c..1dbbce959c 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -42,6 +42,7 @@ #include "llbutton.h" #include "llcallbacklist.h" #include "llfocusmgr.h" +#include "lliconctrl.h" #include "llnotifications.h" #include "llprogressbar.h" #include "llstartup.h" @@ -245,6 +246,7 @@ void LLProgressView::setVisible(BOOL visible) if (getVisible() && !visible) { LLPanel::setVisible(FALSE); + setShowLogos(FALSE); } // showing progress view else if (visible && (!getVisible() || mFadeToWorldTimer.getStarted())) @@ -388,6 +390,18 @@ void LLProgressView::setMessage(const std::string& msg) mMessageText->setValue(mMessage); } +void LLProgressView::setShowLogos(const BOOL logos_visible) +{ + LLIconCtrl* logo = getChild("fmod_logo"); + if (logos_visible) + { + logo->setValue(IMG_LOGO_FMOD); + } + logo->setVisible(logos_visible); + getChild("fmod_text")->setVisible(logos_visible); + getChild("message_text")->setVisible(!logos_visible); +} + void LLProgressView::setCancelButtonVisible(BOOL b, const std::string& label) { mCancelBtn->setVisible( b ); diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h index 448b626fe4..9440d58aa7 100644 --- a/indra/newview/llprogressview.h +++ b/indra/newview/llprogressview.h @@ -73,6 +73,9 @@ public: void setStartupComplete(); + // turns on logos, hides message of the day + void setShowLogos(const BOOL logos_visible); + void setCancelButtonVisible(BOOL b, const std::string& label); static void onCancelButtonClicked( void* ); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c036fda386..16e8602741 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -985,11 +985,11 @@ bool idle_startup() #ifdef LL_FMODSTUDIO #if !LL_WINDOWS - if (NULL == getenv("LL_BAD_FMODSTUDIO_DRIVER")) + if (NULL == getenv("LL_BAD_FMODSTUDIO_DRIVER")) #endif // !LL_WINDOWS - { - gAudiop = (LLAudioEngine *) new LLAudioEngine_FMODSTUDIO(gSavedSettings.getBOOL("FMODProfilerEnable"), gSavedSettings.getU32("FMODResampleMethod")); - } + { + gAudiop = (LLAudioEngine *) new LLAudioEngine_FMODSTUDIO(gSavedSettings.getBOOL("FMODProfilerEnable"), gSavedSettings.getU32("FMODResampleMethod")); + } #endif #ifdef LL_OPENAL @@ -1155,6 +1155,7 @@ bool idle_startup() display_startup(); // LLViewerMedia::initBrowser(); LLStartUp::setStartupState( STATE_LOGIN_SHOW ); + gViewerWindow->setShowLogos(TRUE); return FALSE; } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 18656e40a3..72261eeef9 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -193,6 +193,37 @@ void LLViewerTextureList::doPreloadImages() mImagePreloads.insert(image); } + // Normally images are located in 'skins' folder in working directory, + // but 3p images were added from packages and had to stay in separate folder + // with path relative to exe. + +#ifdef LL_FMODSTUDIO +#ifdef LL_WINDOWS + std::string full_path = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "3p_icons", "fmod.png"); +#elif LL_DARWIN + // On MAC use resource directory + std::string full_path = gDirUtilp->add(gDirUtilp->getAppRODataDir(), "3p_icons", "fmod.png"); +#else + std::string full_path = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "3p_icons", "fmod.png"); +#endif + image = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + full_path, FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, + 0, 0, IMG_LOGO_FMOD); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_WRAP); + mImagePreloads.insert(image); + // Speed up load (this texture will be used early) + image->setKnownDrawSize(364, 98); + image->processTextureStats(); + image->setDecodePriority(LLViewerFetchedTexture::maxDecodePriority()); + image->updateFetch(); + // Fmod logo is only needed at startup, if we will get more logos + // for startup, might be good idea to save resources and do loading + // in scope of llprogressview and then unload everything once no + // longer needed + } +#endif + LLPointer img_blak_square_tex(new LLImageRaw(2, 2, 3)); memset(img_blak_square_tex->getData(), 0, img_blak_square_tex->getDataSize()); LLPointer img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, FALSE)); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b0a54da88f..4e0868e2b8 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -6394,6 +6394,10 @@ void LLViewerWindow::setProgressCancelButtonVisible( BOOL b, const std::string& } } +void LLViewerWindow::setShowLogos(const BOOL show_3p_logos) +{ + mProgressView->setShowLogos(show_3p_logos); +} LLProgressView *LLViewerWindow::getProgressView() const { diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 04b0308f57..7847f2a9c0 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -310,6 +310,7 @@ public: void setProgressPercent(const F32 percent); void setProgressMessage(const std::string& msg); void setProgressCancelButtonVisible( BOOL b, const std::string& label = LLStringUtil::null ); + void setShowLogos(const BOOL show_3p_logos); LLProgressView *getProgressView() const; void revealIntroPanel(); void setStartupComplete(); diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml index 860caf2d21..03caf8e8ad 100644 --- a/indra/newview/skins/default/xui/en/panel_progress.xml +++ b/indra/newview/skins/default/xui/en/panel_progress.xml @@ -106,6 +106,28 @@ top="145" right="-90" word_wrap="true"/> + + + Made with FMOD Studio by Firelight Technologies Pty Ltd. + Remove VMP + + # Copy 3p icons + with self.prefix(src=os.path.join(pkgdir, "icons"), dst="3p_icons"): + if self.args['fmodstudio'] == 'ON': + self.path("fmod.png") + # Plugin host application self.path2basename(os.path.join(os.pardir, 'llplugin', 'slplugin', self.args['configuration']), @@ -1324,6 +1330,11 @@ class DarwinManifest(ViewerManifest): with self.prefix(src=pkgdir,dst=""): self.path("ca-bundle.crt") + # Copy 3p icons + with self.prefix(src=os.path.join(pkgdir, "icons"), dst="3p_icons"): + if self.args['fmodstudio'] == 'ON': + self.path("fmod.png") + icon_path = self.icon_path() with self.prefix(src=icon_path) : self.path("firestorm_icon.icns") @@ -2083,6 +2094,11 @@ class Linux_i686_Manifest(LinuxManifest): relpkgdir = os.path.join(pkgdir, "lib", "release") debpkgdir = os.path.join(pkgdir, "lib", "debug") + # Copy 3p icons + with self.prefix(src=os.path.join(pkgdir, "icons"), dst="3p_icons"): + if self.args['fmodstudio'] == 'ON': + self.path("fmod.png") + with self.prefix(src=relpkgdir, dst="lib"): self.path("libapr-1.so") self.path("libapr-1.so.0")