Compare commits

..

818 Commits

Author SHA1 Message Date
Inusaito Sayori
e5b09a0876 Fix bug in which texture drag&drop to a texturectrl wouldn't make apply buttons enable (IE: group profile) 2015-02-16 14:57:28 -05:00
Inusaito Sayori
e9a517985b Instead of "?object_not_owner" display " (Owner)" appended on Object IM Info Floater
Translators may want to update floater_object_im_info.xml, string "owner" was added.
2015-02-13 02:56:52 -05:00
Inusaito Sayori
a2058bc1e8 Hopefully fix Router's issue by caching ID for map compare, not name. 2015-02-13 00:01:19 -05:00
Inusaito Sayori
de96b8e43e Use friendlier names in friendly situations~ 2015-02-12 23:46:22 -05:00
Inusaito Sayori
d1e5d67336 What Altivec? This isn't PowerPC 2015-02-12 21:01:24 -05:00
Inusaito Sayori
5279697890 mFocusLostSignal is not needed, these disconnect themselves. 2015-02-11 01:44:26 -05:00
Inusaito Sayori
fd9166e32a Presentation of group ban date bug go squash. 2015-02-09 17:01:45 -05:00
Inusaito Sayori
6b9c53c3c0 Fix missing ) at the end of llTextBox description tooltip. 2015-02-05 00:38:17 -05:00
Inusaito Sayori
3620e537ab Satisfy Issue 1827: Group Profile Texture Expansion
Also fix buttons laying over Group Insignia text
2015-02-05 00:37:35 -05:00
Inusaito Sayori
e625fa3b33 Cleanup duplicate show_picture codestuffs. 2015-02-04 23:47:37 -05:00
Inusaito Sayori
f0b18e52a3 OR not AND 2015-02-04 13:54:39 -05:00
Inusaito Sayori
adecaca730 Work around crash signature 8715
Apparently SL Grid gives some odd session types for P2P?
This should be looked into closer, but for now just accept that it happens.
2015-02-04 01:07:56 -05:00
Inusaito Sayori
10ef3ff683 Fix crash signature 7694 2015-02-04 00:30:40 -05:00
Inusaito Sayori
ef5b95d5b9 Fix crash signature 9141 2015-02-04 00:02:09 -05:00
Inusaito Sayori
c3e9150125 Oops, should leave that there. 2015-02-02 19:28:29 -05:00
Inusaito Sayori
ac0afbcc4a Fix llDialog tooltip 2015-02-02 16:12:56 -05:00
Inusaito Sayori
a9593e62b7 LLViewerMenu code cleanup 2015-02-02 16:12:32 -05:00
Inusaito Sayori
4b7bc99291 Cleanup LLNotify
Adds support for SUPPRESS_TOAST in payload to skip display of notices and just spew them to chat. (this was requested to be hooked up around last release, I think)
Fixes Singularity->Close All Dialogs breaking notifications such that the skip button would appear when not needed.

Cleans up a buncha dead code and silliness.
Also Cleanup LLGroupNotify because why not?
2015-02-02 15:44:06 -05:00
Inusaito Sayori
43e1aa9c01 Apply Aleric's fix for Issue 1810: Import of XML shape data from Avastar 2015-01-31 06:47:24 -05:00
Inusaito Sayori
d44d6515d8 [Voice Update] Use newest SLVoice~ 2015-01-30 18:17:06 -05:00
Shyotl
7c636c6c17 Remove unused linear_to_srgb function from several shaders. 2015-01-29 17:49:18 -06:00
Shyotl
c094314a2d LLFeatureManager cleanup. 2015-01-29 17:48:15 -06:00
Shyotl
9da87128f1 Disable usage of glFog when drawing selected objects, if using shaders. 2015-01-29 17:47:39 -06:00
Shyotl
1036e1f3fb Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer.git 2015-01-29 17:40:44 -06:00
Inusaito Sayori
6b5fd054f6 Update all other platforms to FMOD Studio 1.05.11 2015-01-29 06:52:12 -05:00
Shyotl
91b6d68eae Avoid unix-based mkdir usage on windows. 2015-01-29 04:03:45 -06:00
Shyotl
a0487b12be FMOD Studio prebuilt update for OSX. Also, delete "autobuild-package.xml" that is in newer v3-based prebuilt packages, and prevent registry key from trumping usage of fmodstudio prebuilt; it must now be explicitly set in the develop.py invocation. 2015-01-29 00:55:08 -06:00
Shyotl
1e07b626c4 Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer.git 2015-01-28 16:39:39 -06:00
Shyotl
b247ca3f76 Fix osx packaging. 2015-01-28 16:37:06 -06:00
Inusaito Sayori
5f3cac46eb This slipped by me, oopsies. 2015-01-28 13:12:38 -05:00
Inusaito Sayori
a7c424fc68 Fix remaining issues with new packaging system (mostly Linux)
Thanks to Duncan Armundsen and Damian Zhaoying for the pointers
(merges slightly with alchemy)
2015-01-27 12:08:46 -05:00
Inusaito Sayori
a35f159117 Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer 2015-01-27 09:15:01 -05:00
Shyotl
b865b92a6a Merge branch 'FMODStudio'
Conflicts:
	indra/cmake/PNG.cmake
	indra/newview/llnetmap.cpp
	indra/newview/llviewermessage.cpp



PARAMETERS: CLEAN
2015-01-26 17:15:46 -06:00
Shyotl
2132978c41 Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2015-01-26 15:26:02 -06:00
Inusaito Sayori
97f6b9d845 Fix missing notification warning pointed out by Nomade and the French testers
Merci Beaucoup, tout les monde!
2015-01-26 13:33:31 -05:00
Shyotl
6e4ef6f8a1 I'll have all the derps, please. 2015-01-23 16:49:21 -06:00
Shyotl
56bd48bd2a elseif (WINDOWS AND WORD_SIZE EQUAL 32)' mistakenly clobbered. Also, try 'ProgramFiles(x86)' envvar first 2015-01-23 02:07:19 -06:00
Shyotl
ca98523c41 Cmake version bump, cleanup, typo fixes, rewrite of fmodex.cmake. 2015-01-22 02:39:45 -06:00
Inusaito Sayori
290f143b5c Fix the << button on local chat not working, thanks for pointing this out, Nomade~
Also code cleanupsies~
2015-01-21 17:21:38 -05:00
Inusaito Sayori
123ded50ef Oops, that should use emplace, too bad we don't have C++11. 2015-01-20 17:44:22 -05:00
Inusaito Sayori
18b7f6925a Fix/Update Inspect Tool
Solves Issue 1131: Inspect Window while open prevents camming
Possibly fixes Issue 928: Have to Click a second time to Inspect an object, I couldn't reproduce, but maybe you still can?

Fixes a bug in the name cache connection setting of llfloaterinspect.cpp from upstream.
2015-01-20 04:59:46 -05:00
Inusaito Sayori
51aaa9f26b LLTool Update/Sync
Better diff against Alchemy.
2015-01-20 04:37:32 -05:00
Inusaito Sayori
a75964c993 Move menu stuff out of lltoolmgr and into llviewermenu.cpp 2015-01-20 02:00:25 -05:00
Inusaito Sayori
9bd9cb697e Fix SLVoice erroring when log folder path has a space in it.
Thanks to Nomade and Melissa for the help tracking this!
2015-01-13 21:00:57 -05:00
Shibe Doge
4d29117148 Doge wuz here. Also barkies.
░░░░░░░░░▄░░░░░░░░░░░░░░▄░░░░
░░░░░░░░▌▒█░░░░░░░░░░░▄▀▒▌░░░
░░░░░░░░▌▒▒█░░░░░░░░▄▀▒▒▒▐░░░
░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐░░░
░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐░░░
░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌░░░
░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌░░
░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐░░
░▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄▌░
░▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▌░
▀▒▀▐▄█▄█▌▄░▀▒▒░░░░░░░░░░▒▒▒▐░
▐▒▒▐▀▐▀▒░▄▄▒▄▒▒▒▒▒▒░▒░▒░▒▒▒▒▌
▐▒▒▒▀▀▄▄▒▒▒▄▒▒▒▒▒▒▒▒░▒░▒░▒▒▐░
░▌▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒░▒░▒░▒░▒▒▒▌░
░▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▒▄▒▒▐░░
░░▀▄▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▄▒▒▒▒▌░░
░░░░▀▄▒▒▒▒▒▒▒▒▒▒▄▄▄▀▒▒▒▒▄▀░░░
░░░░░░▀▄▄▄▄▄▄▀▀▀▒▒▒▒▒▄▄▀░░░░░
░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▀▀░░░░░░░░
2015-01-13 17:31:20 -05:00
Inusaito Sayori
dd4f2e857b If we're gonna autologin, remember name too. 2015-01-13 00:52:27 -05:00
Inusaito Sayori
0b998da183 Cleanup stuffs inspired by Drake's work~ 2015-01-13 00:50:49 -05:00
Inusaito Sayori
eef7596aeb Combine renderPhysicsDisplay code loops, but don't actually fix any bugs X3 2015-01-13 00:46:20 -05:00
Inusaito Sayori
4abf23f9a9 [OpenSim] Seriously fix Issue 1791, the names thing.
Don't leave me now, don't say it's the end of the road~
2015-01-12 22:07:23 -05:00
Inusaito Sayori
56d2754606 Bricks in the wall 2015-01-12 21:32:29 -05:00
Inusaito Sayori
88ca93d24f Fix vivox logging borkage.
Thankies to Drake/Alchemy~
2015-01-12 19:16:47 -05:00
Inusaito Sayori
72c85ef104 Solve Issue 1234: Enable opening of chat logs in external editor under linux too
Requires xdg-open, but meh~
2015-01-12 19:14:53 -05:00
Inusaito Sayori
c6b1763d96 [STORM-1949] Add default values for ExternalEditor
Thankies Cinder~
2015-01-12 19:00:44 -05:00
Inusaito Sayori
844444c33b Optimize loops calling endInstances()
Thankies to Drake Arconis/Alchemy~
2015-01-12 18:06:49 -05:00
Shyotl
c708408f64 Linux OSS was removed from fmodstudio. Also fix issue in linux manifest. 2015-01-10 16:11:52 -06:00
Lirusaito
03e9db98e6 [OpenSim] Optimize the minimap region tile matrix implementation 2015-01-10 16:29:23 -05:00
Inusaito Sayori
bf3947dcc5 [OpenSim] Draw property lines on minimap properly for variable size regions
This fixes Issue 1684: Minimap on Opensim Var Region showing bad the property lines

This changeset is welcome for use under LGPL.
2015-01-10 12:31:26 -05:00
Inusaito Sayori
5140affe07 [OpenSim] Fix World Map Textures on Minimap of Variable Size Regions.
Thanks to Shyotl for the helpies~
2015-01-10 03:01:02 -05:00
Shyotl
b808caaa0e Appease cmake 3.1.0 2015-01-09 21:38:27 -06:00
Inusaito Sayori
658c617c75 Don't add this column twice, that's just silly. 2015-01-09 17:14:08 -05:00
Inusaito Sayori
05fcfc32bc [OpenSim] Remove unneeded code from the previous name resolution fixes 2015-01-09 15:57:24 -05:00
Inusaito Sayori
05a4409b3d Fix display names not being considered default if the display name is sent empty 2015-01-09 14:29:57 -05:00
Inusaito Sayori
cadc08af87 Remove assert for Issue 1784 (crash signature 450), it didn't fail.
This reverts commit bb297ac354.
2015-01-08 15:08:24 -05:00
Shyotl
2678d0f99e Trying fmodstudio as a prebuilt. (pushed to test on linux buildserver) 2015-01-08 00:49:42 -06:00
Shyotl
b1954e411b Nice typos. 2015-01-08 00:46:36 -06:00
Inusaito Sayori
5d47c7ecfa [OpenSim] Properly fix name lookups, oops~ 2015-01-07 19:02:28 -05:00
Inusaito Sayori
f09d399e88 Only spam the logs about missing var region flags when we're not on SL. 2015-01-07 15:47:14 -05:00
Inusaito Sayori
c592184aa6 Oops, uninstaller wasn't cleaning up the Portable shortcut. 2015-01-07 13:03:04 -05:00
Inusaito Sayori
bb297ac354 Add an assert for Issue 1784 (crash signature 450) 2015-01-07 00:46:01 -05:00
Inusaito Sayori
7871be05af Login entry must be a map to construct an LLSavedLoginEntry, not just defined.
Login Screen Crash Fix.
2015-01-06 15:33:50 -05:00
Shyotl
1a9cd725b2 boost::mutex seems slow with vs2010, so fall back to apr_mutex for it. 2015-01-06 03:56:57 -06:00
Shyotl
1e0395c26d Back to boost mutexes 2015-01-05 17:02:00 -06:00
Shyotl
7943adedaa Also need this. Last build only succeeded due to lingering obsolete entries in the cmake var cache. 2015-01-05 14:25:55 -06:00
Inusaito Sayori
2285830c8f This message ish too long now. 2015-01-04 09:55:09 -05:00
Inusaito Sayori
eff4bc7ad6 Bring back the Copy Key button and offer Copy SLURL as part of a flyout instead. 2015-01-03 22:50:55 -05:00
Inusaito Sayori
794027d91e In (readonly) combo_boxes and flyout_buttons allow use of the font attribute. 2015-01-03 22:14:53 -05:00
Inusaito Sayori
312625036b Fix max_chars on login screen, oopsie. 2015-01-03 15:50:42 -05:00
Inusaito Sayori
e7c1dc3b8e Include object key in objectiminfo floater
General cleanup of llfloaterobjectiminfo included
Update of object im command handler code from v3
2014-12-30 18:02:32 -05:00
Inusaito Sayori
a29b50b4cd Fix crash signature 86
Cleans up a buncha lame code in llpanellogin.cpp
Removes some static silliness from the old days.
Removes RememberLogin because RememberName serves its purpose.
Stylistic fixups~
Removes some pointless functions.
2014-12-30 16:49:40 -05:00
Inusaito Sayori
d03b03ac93 Fix crash signature 230 2014-12-30 14:42:13 -05:00
Shyotl
a891d2fdea FMOD(STUDIO|EX)_SDK_DIR wasn't being properly set. Change fallback on missing msvc*, as the old code made no sense (wildcarded paths don't throw when not found) 2014-12-29 18:59:15 -06:00
Inusaito Sayori
de28034c20 Feature Request: Copy URI button in avatar profiles
This takes the copy key button's place... if this is bad, I'll figure something out down the line.
2014-12-29 18:53:01 -05:00
Inusaito Sayori
01c639c261 Map all the people! 2014-12-29 16:52:51 -05:00
Inusaito Sayori
fe21270bbc [Radar] Attempt to fix the rare spamming of left/entered messages 2014-12-29 16:44:50 -05:00
Inusaito Sayori
b9acd64221 Better the cmdline_partial_name2key function
Just style fixes and opts.
2014-12-29 16:42:38 -05:00
Inusaito Sayori
9bf2092c7e Don't hide the tab container for classifieds (especially not at the wrong time)
Thanks to Aztek Aeon for pointing out this bug!

Includes random stylistic fixes. (everywhere~)
2014-12-29 16:12:18 -05:00
Inusaito Sayori
0eba34d5a8 Can haz groups left count in groups list.
Translators, this is in panel_groups.xml and panel_groups_horiz.xml called groupcount

Inspired by Alchemy<3
2014-12-28 13:33:21 -05:00
Inusaito Sayori
5257eec81e Address Issue 1761: Grid status from Help menu
Adds Grid Status... item to Help menu

Translators:
add WebLaunchGridStatus notification translation to notifications.xml
add Grid Status... menu item translation to menu_viewer.xml and menu_login.xml

Adds menu visibility function "VisibleSecondLife" for hiding things that shouldn't be shown on OpenSim
Hides SL issue tracker and wiki menu items on non-SL grids
2014-12-28 12:17:18 -05:00
Shyotl
2d2513369a OSX poking. 2014-12-28 00:20:30 -06:00
Inusaito Sayori
6e8cd5a4cc Bug fixy ~ Reset Ambient Occlusion setting on cancel
Thanks to Cale Flanagan for finding this one.
2014-12-27 13:11:11 -05:00
Inusaito Sayori
7749f8a99d Edit Linked Parts counts and costs display update~
Show proper impact when editing multiple prims with edit linked parts enabled
Show "Selected prims:" instead of "Selected Objects: 0" when editing linked parts
Show two decimals of impact precision when editing linked parts.
2014-12-27 13:10:46 -05:00
Inusaito Sayori
ef32d0d321 French login panel further update. 2014-12-27 10:46:38 -05:00
Inusaito Sayori
f26d7c7bf2 Update instant message stuff
Fixes auto response chats not showing the name, anymore; switches to using 25% more font color transparency to indicate autoresponse
Cleans up and reorganizes im codestuffs~
2014-12-27 10:20:57 -05:00
Shyotl
86240966b6 Include build version and arch/platform in generated symbol file's name. 2014-12-27 02:54:04 -06:00
Shyotl
f5d3bc2b7b Fixed CMP0026 properly. Requires cmake 2.8.8+ 2014-12-26 23:53:14 -06:00
Shyotl
b3bd91877c Fixed CMP0048 properly. 2014-12-26 23:51:05 -06:00
Shyotl
00123d2dde Not sure why this line got deleted. It's needed for linux breakpad. 2014-12-25 01:57:59 -06:00
Shyotl
ecd58e3924 Reduce some diagnostic spam. 2014-12-23 20:00:01 -06:00
Shyotl
0ac3fd0563 Rename linux build directory from viewer-* to build-*. Also have mac use the unix run_build if not using Xcode 2014-12-22 20:52:11 -06:00
Inusaito Sayori
a805d15797 Do not include Server Release Notes, unless the region has that capability. 2014-12-22 21:05:19 -05:00
Shyotl
28024d7a01 Try better handling CMAKE_BUILD_TYPE if xcode (supports multi-configurations, unlike Unix Makefiles) 2014-12-22 02:42:31 -06:00
Shyotl
e0fb73414b Mac fixup. 2014-12-22 02:08:18 -06:00
Inusaito Sayori
94d6969fed Fix Resident no longer stripping for username only mode
Thanks for noticing this Gamer Expert
2014-12-19 21:27:07 -05:00
Inusaito Sayori
8e5fad2209 Login Panel Redesign Desu
More clear text
Cleaner appearance
Can haz tab from username to password to grid.
2014-12-19 21:26:03 -05:00
Shyotl
ca49db02df Fixed doublequote issue with --extra_libraries 2014-12-19 19:25:31 -06:00
Shyotl
08db85fa99 Unused assets can DIAF. 2014-12-18 23:17:03 -06:00
Shyotl
e57bcea3b6 Experimentation with msbuild 12.0 2014-12-18 18:26:21 -06:00
Shyotl
5c5fae78c6 Fix some annoying issues with spaces in develop.py, for windows. 2014-12-18 18:08:59 -06:00
Shyotl
44f8f17763 V3 merge for most python scripts. fmod inclusion/linkage/packaging changes. 2014-12-18 18:01:41 -06:00
Inusaito Sayori
78e7b288b8 Fix ClickToWalk not allowing mouse-walk (behavior change)
Ansariel and worked together on this to solve http://jira.phoenixviewer.com/browse/FIRE-15189

The behavior change is that when your own avatar is clicked and the mouse is dragged, the camera no longer simply turns on a single axis,
since the behavior for dragging from anywhere else is still the old single-axis pan, this is not a very big deal. I can even see this being more useful!
2014-12-18 08:35:03 -05:00
Inusaito Sayori
78131d2d53 [OpenSim] Fix name lookup fails (on the agent only?) when a grid does not have NameLookupURL 2014-12-17 08:46:21 -05:00
Inusaito Sayori
ca8aa4dc0a Remove the assert I was using to debug Issue 1670
Apparently it is failing on alphas during initialization (loading log file?)
Doesn't matter now, the issue is solved.
2014-12-17 01:28:13 -05:00
Lirusaito
81ef1292ed Fix broked World->Chat 2014-12-16 21:35:28 -05:00
Inusaito Sayori
b67f55cff7 Prevent failure to create SLURL when an object chats but is not on the object list.
Fixes an issue I couldn't remember nor find on the issue tracker.

SLURLs for found objects remain unchanged.
SLURLs for objects that are not found, but we could find their owners now display the owner's position and region, with "?owner_not_object" appended to the slurl as a note to the user
SLURLs for objects that are not found, and we could not find their owners, now display as being from the position 0, 0, 0 in the users region
2014-12-16 19:57:46 -05:00
Inusaito Sayori
9880134b4d Feature request: Add the ability to use keyboard shortcuts from the login panel, whether or not the login webpage is focused 2014-12-16 19:45:19 -05:00
Inusaito Sayori
cc32df6fd8 Update and Sync Mutelist with upstream alchemy
Satisfies the feature request for mute toggle to display mute status
Adds dynamic mute/unmute option to P2P IM dropdown.

Translators should look into the changes made in this commit for:
floater_chat_history.xml, floater_instant_message.xml, floater_instant_message_concisebuttons.xml
panel_avatar.xml has been taken care of for spanish and french, although they should be looked into more closely by the translators.

Cleanup and Sync in related places~
Removal of old static callbacks.
Moves God Names logic into LFSimFeatureHandler
Adds a custom function LLMuteList::hasMute() for quickly checking if a mute is in the internal set.
2014-12-16 19:42:27 -05:00
Inusaito Sayori
0e48a2196f Update/Modernize LLAvatarName and LLAvatarNameCache and _EVERYTHING_ they touch
Fairly certain this adds the feature in which the user may click the online notification to open a chat with the user coming online.

Translators may want to look at the xml changes of this change to see what to update

Removes old LegacyMultiAttachmentSupport patch
Moves LLAvatarName-centric functions into LLAvatarName from elsewhere.
Adds boost::signals2::connections to name polling places.
Removes more old icky static callbacks
Merge from Alchemy, credit where due~
Update notifications.xml to have a bunch of the tags from upstream to ease diffing
2014-12-16 17:55:23 -05:00
Inusaito Sayori
39d27e3a4e Move llavatarname.* to llmessage/ from llcommon/ 2014-12-15 18:35:30 -05:00
Inusaito Sayori
48e6a4f535 LLPanelLogin code cleanup 2014-12-12 20:33:36 -05:00
Inusaito Sayori
7db5126182 Autoreplace toggle on Autoreplace toolbar button~ 2014-12-12 20:26:03 -05:00
Inusaito Sayori
0d4ac69465 [Warnings] Fix sign/unsigned mismatch 2014-12-12 20:21:36 -05:00
Shyotl
32706065ac Have CopyWinLibs only copy files needed for current configuration. 2014-12-12 03:49:47 -06:00
Shyotl
d571b8be81 Viewer manifest cleanup/updating 2014-12-09 16:13:59 -06:00
Shyotl
f014c8207c Try path.os.basename/split instead of string.rsplit 2014-12-09 01:28:23 -06:00
Shyotl
b680b53128 Update vstool executable path. 2014-12-08 23:34:42 -06:00
Shyotl
e2cd11ccd7 Fix up some small typos and avoid c++11's string::back()/pop_back() calls for now. 2014-12-08 21:40:11 -06:00
Shyotl
ab4561aacc Linux build pass. 2014-12-08 18:46:15 -06:00
Inusaito Sayori
a7733a6c55 Fixyfixy 2014-12-08 11:45:52 -05:00
Inusaito Sayori
688aa50064 Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer 2014-12-05 19:13:55 -05:00
Inusaito Sayori
232bf22e51 Compile foxies 2014-12-05 18:43:50 -05:00
Inusaito Sayori
171c1a5c44 Fix media controls loading entered urls twice as much.
Thanks to Diva Canto for working with me on this!
2014-12-05 18:41:08 -05:00
Inusaito Sayori
80b4fe6613 Solve Issue 1755: Change Appearance Save button to a flyout option, and move File->Update Outfit
Update Outfit is now at the bottom of the inventory's File menu.
2014-12-05 18:39:05 -05:00
Inusaito Sayori
18f640d73d Fix Linux linker errors
Patch by Aleric
2014-12-05 12:52:01 -05:00
Inusaito Sayori
9e2667261f Timeout policy removal in llmarketplacefunctions.cpp 2014-12-05 12:16:12 -05:00
Shyotl
18e33d2268 Un-break build for older compilers. 2014-12-04 17:53:41 -06:00
Shyotl
fd13ccf802 Support running develop.py without needing to be in indra directory. 2014-12-04 17:23:27 -06:00
Shyotl
fbf947fcd7 Pre cmake3.0 support. 2014-12-04 16:43:52 -06:00
Shyotl
958031dbaf Moved build dirs out of indra directory. installed.xml and prebuilts are now per-build-target. Added support for v3 prebuilt package layout. 2014-12-03 22:36:42 -06:00
Shyotl
7ddef751ef Update md5 checksums for vs2012 x64 libs. 2014-11-28 23:29:34 -06:00
Inusaito Sayori
a81ecc2006 Introduce LLInventoryAction namespace, move doToSelected into it. 2014-11-27 12:45:55 -05:00
Shyotl
fedd094987 Clean up warning. (implicit float to signed integer conversion) 2014-11-26 22:57:50 -06:00
Shyotl
36a8a20434 Alignment fixes. 2014-11-26 22:53:32 -06:00
Shyotl
f5204cc8f5 Check for bad FMOD_RESULT return values for practically every fmod api call. Wavedata dsp also now attached before fmod's fader DSP, and although that makes the stream channelgroup less than necessary, channelgroups are still nice to have. 2014-11-26 01:15:17 -06:00
Inusaito Sayori
808e262a4d MAINT-3562 FIXED Viewer crashes when updating local textures using Substance Designer : add code for control input buffer size
3e69e78acb
2014-11-26 01:23:45 -05:00
Inusaito Sayori
152cf42029 This escaped the getOpenIcon->getIconOpen commit. 2014-11-25 23:39:10 -05:00
Inusaito Sayori
e69385861a Add LLHTTPClient::putRaw 2014-11-25 23:36:43 -05:00
Shyotl
87f87bf2ff Delegate stream shutdown to LLAudioEngine and LLStreamingAudio_* 2014-11-25 16:37:39 -06:00
Shyotl
b3d86e626b Fixed wind dsp and implemented a DSP that mimics removed FMOD::Channel::getWaveData func.
Fixed crash if fmod profiling was enabled.
Fixed crash due to failing to check if resulting utf string from stream metadata was zero-length before calling std::string::back.
2014-11-25 16:32:04 -06:00
Inusaito Sayori
d80ebdc77d getOpenIcon -> getIconOpen 2014-11-25 01:46:12 -05:00
Inusaito Sayori
80ac46c9a5 Move llfoldertype from llcommon/ to llinventory/ 2014-11-24 20:38:46 -05:00
Lirusaito
4387118d55 Remove silly redundant code in LLFloater::draw
Thanks to Diva for pointing this out.
2014-11-23 18:50:59 -05:00
Shyotl
c2abbaedc8 Merge branch 'master' of https://Shyotl@bitbucket.org/LightDrake/singularityviewer-internal.git into FMODStudio 2014-11-22 22:20:32 -06:00
Shyotl
f8927a8a11 Merge branch 'master' of https://Shyotl@bitbucket.org/LightDrake/singularityviewer-internal.git into FMODStudio
Conflicts:
	indra/llcommon/llsingleton.h
2014-11-22 22:19:44 -06:00
Shyotl
7054a2a6d2 Added some fasttimers to LLVOAvatar::idleUpdate 2014-11-22 22:04:18 -06:00
Shyotl
f2f8ecab98 Clean up code for vivox session participant management. 2014-11-22 22:02:46 -06:00
Shyotl
be9d417778 Added vector_shrink_to_fit to llstl.h 2014-11-22 22:02:20 -06:00
Shyotl
6e537cd322 Try to handle BOM for utf stream metadata (doesn't seem common, at all). 2014-11-22 22:01:45 -06:00
Inusaito Sayori
19cae9b59b [RLVa] Escape potentially dirty strings before using them as regex in replace_all_regex
Fixes crashes
This changeset is welcome for use in LGPL viewers

Thanks to Ansariel Hiller for pointing this crash out.
2014-11-21 03:12:06 -05:00
Inusaito Sayori
89e65ed89e CMake 3 Fixies from Alchemy 2014-11-20 22:04:32 -05:00
Inusaito Sayori
9892d23735 Sync stuff 2014-11-20 13:41:19 -05:00
Inusaito Sayori
10a3339019 Check for signing variables before even trying to sign
Also tabs to spaces and fix typo.
2014-11-20 13:40:05 -05:00
Inusaito Sayori
8b658bd628 Attempted fox for PNG 2014-11-20 12:21:35 -05:00
Lirusaito
5a045db751 Fix Voice on Linux.
No such thing as -st/shutdown timeout on Vivox 2.x SDK
2014-11-20 10:28:44 -05:00
Inusaito Sayori
80e7854300 Merge branch 'master' of https://github.com/DamianZhaoying/SingularityViewer 2014-11-17 22:50:18 -05:00
Inusaito Sayori
c83c1ed291 Add reset_camera to keyboard action registry. 2014-11-17 22:49:59 -05:00
Inusaito Sayori
37412c8dd2 wlfPanel cleanup and simplification 2014-11-10 18:25:31 -05:00
Damian Zhaoying
aaa1a5451e Merge remote-tracking branch 'Liru/master' 2014-11-10 19:37:48 -03:00
Inusaito Sayori
e3d45d99da Address Issue 1732: Display name in the Communication box
Adds Chat Tabs namesystem combobox to Adv. Chat->Chat UI.
2014-11-10 16:09:43 -05:00
Inusaito Sayori
60d9301646 Support GridName sim feature, show grid name in status bar when hypergridded over to another grid.
V3s will want to add this display to the NavBar, most likely.
Adds const Type& ref() function to SignaledType to get a const reference from it where needed.
2014-11-10 15:58:58 -05:00
Inusaito Sayori
23f070128a Clean up and optimize more draw call logic in llstatusbar.cpp 2014-11-10 14:46:49 -05:00
Inusaito Sayori
39e0e4ad9e LFSimFeatureHandler cleanup~ 2014-11-10 13:36:23 -05:00
Damian Zhaoying
bde1853862 Merge remote-tracking branch 'Liru/master' 2014-10-30 14:47:32 -03:00
Lirusaito
637b70a723 Cleanup and revision to solve Issue 1548: Right click zoom in mouselook resets on left click.
Removes variables tracking right mouse down from lltoolfocus and lltoolcompgun in favor of using the already existing LLViewerWindow::getRightMouseDown()
2014-10-30 11:15:36 -04:00
Inusaito Sayori
d34c5034c3 Of course, I'd only notice this file is unstaged after the commit has been pushed. 2014-10-24 18:05:05 -04:00
Damian Zhaoying
8dc3dcd2ac Added Spanish translations to new Quit button toolbar and Shared options 2014-10-23 21:36:21 -03:00
Inusaito Sayori
b25643f0bf Clean up and draw optimization in LLStatusBar.
I saw a 1.7 FPS gain, which is pretty good for my old card ^*^
2014-10-23 04:28:18 -04:00
Inusaito Sayori
3231a7d25f Complete keyboard-camera panning featureset with pgup pan in and pgdn pan out 2014-10-23 04:25:37 -04:00
Inusaito Sayori
855769c53e Add quit button to toolbar. 2014-10-23 04:16:31 -04:00
Lirusaito
7cf069bf4c Fix libpng warning: iCCP: known incorrect sRGB profile 2014-10-22 20:50:11 -04:00
Lirusaito
bd94e2ae73 Linux64 library update! (other platforms to come)
Curl 7.38
LibPNG 1.6.13
LLQTWebkit 4.8.6
OpenSSL 1.0.1j (Yep, this fixes POODLE)

Libraries provided by Alchemy Viewer.
2014-10-21 05:41:44 -04:00
Inusaito Sayori
6c2871402d [RLVa] Don't filter parts of words out just because they match a name under restraint
This fix is free to be reused under LGPL..
2014-10-19 21:44:45 -04:00
Inusaito Sayori
341ca20529 Avatar Picker's list of friends should use the friends name system. 2014-10-18 15:05:10 -04:00
Inusaito Sayori
0d300776ca Muscle Memory fix, move Share to the bottom of the inventory menu. 2014-10-18 14:40:59 -04:00
Inusaito Sayori
fad498cfb8 Merge branch 'master' of https://github.com/DamianZhaoying/SingularityViewer 2014-10-17 01:04:27 -04:00
Inusaito Sayori
39d3a58b49 Only disable friend items that have rights changed (scope reduction surgery)
Thanks to Deltek for finding this one!
2014-10-17 00:53:56 -04:00
Inusaito Sayori
e98792209e Issue 1151: Add share to LLAvatarActions
Syncs LLGiveInventory and LLFloaterAvatarPicker with upstream.
Syncsyncsync~

Translators:
menu_inventory.xml menu_radar.xml and menu_avs_list.xml: Share
notifications.xml: ShareNotification, ShareItemsConfirmation, ShareFolderConfirmation, ItemsShared
strings.xml: share_alert
2014-10-17 00:33:33 -04:00
Inusaito Sayori
2d53641cd0 Fix up overcomplicated logic to get friends search working right. 2014-10-15 01:54:58 -04:00
Inusaito Sayori
529c61fabe Fix friends list online count being wrong
This patch changes from always updating online count with cells, to checking the indicator cell's previous value before changing it, maintaining the count instead of always modifying it during updates..
Removes commented out OnlineSIP bits, as it's just easier not to upkeep them.
2014-10-15 01:20:01 -04:00
Damian Zhaoying
614a1c3bb6 Spanish translation to Fix "The notification called 'AuthRequest' was not found in notifications.xml." alert
Some minor fixes in other files.
2014-10-14 12:35:20 -03:00
Damian Zhaoying
663d9ce3d1 Merge remote-tracking branch 'Liru/master' 2014-10-14 04:42:59 -03:00
Latif Khalifa
67b8c8d360 Put Vivox license file online, avoid issues with local paths 2014-10-14 00:45:37 -04:00
Inusaito Sayori
4c5379fe30 Merge branch 'master' of https://github.com/DamianZhaoying/SingularityViewer 2014-10-14 00:43:32 -04:00
Inusaito Sayori
65c613fb3e Clean up in the friends list code, fixing things~
The entire list should no longer lock up when changing friend rights for just some people
Visual changes:
Muted people's names in friends list are now displayed in the muted color (this still needs testing)
The collapse and expand button now uses icons instead of < and > characters.

Complex stuff devs may read:
Remove pointless classes, definitions, and functions.
Replace static callbacks with bound ones.
Cleanup commented stuff
Fix styling and spacing stuffs
Comment out unexecuted code paths
Optimizes updating uncached names so full refresh is not required, just a single name update.
Comment out unused voice stuff, since SIP buddylist was removed in Voice Update.
Switch to Params for list building~
2014-10-14 00:35:26 -04:00
Cinder Biscuits
d0f265f6d9 OMG backout worst fix of the year right here. 2014-10-12 21:56:50 +00:00
Cinder
ec4d13741f Code signing for Windows and OS X 2014-10-10 21:30:23 -06:00
Cinder
d6b87f141f Ported viewer-stare fixes 2014-10-10 21:17:47 -06:00
Inusaito Sayori
cd61a2ae20 Fix "The notification called 'AuthRequest' was not found in notifications.xml." alert
Thanks to Eva Darkwyr for alerting me of this.
2014-10-08 01:37:04 -04:00
Inusaito Sayori
d99528f4b4 GPU Table update
New cards added from the cool vl viewer's table, thanks Henri~
Tabbing fixed up so that the numbers all align.
2014-10-06 13:57:39 -04:00
Cinder Biscuits
775a7be958 Allow disabling crash reporter on mac 2014-10-06 01:45:54 -04:00
Inusaito Sayori
77f5851b3c Nomade translated animation for appearance mode toggle 2014-10-03 03:55:55 -04:00
Damian Zhaoying
e4ac5c8f6c Merge remote-tracking branch 'Liru/master' 2014-10-02 19:27:23 -03:00
Inusaito Sayori
4f6ec26dc9 Merge branch 'master' of github.com:slabua/SingularityViewer 2014-10-02 16:10:08 -04:00
Salvatore La Bua
55fda48a3b Fix issue 1670: radio group for LinksForChattingObjects 2014-10-02 20:26:56 +02:00
Damian Zhaoying
5dc2bc06cf Added Spanish Translation of xml export floater. Update translations in files notificationsa and floater radar. 2014-10-02 12:39:52 -03:00
Damian Zhaoying
f2367575a2 Merge remote-tracking branch 'Liru/master' 2014-10-02 03:58:38 -03:00
Inusaito Sayori
345d5d99b3 Woops, that logic is backwards. 2014-10-02 01:30:56 -04:00
Inusaito Sayori
5c86dfeb6e Tiny tweak to handle_go_to that Ubit says will help on opensim
Doesn't seem to change anything on SecondLife.
2014-10-02 01:01:23 -04:00
Inusaito Sayori
b119aa49ef Take SinguMotionResetsCamera into in handle_go_to. 2014-10-02 01:00:20 -04:00
Inusaito Sayori
8b84d5597f Hide the drop target reset button when its in the default state 2014-10-01 23:23:54 -04:00
Inusaito Sayori
b060ba3c38 Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer 2014-10-01 20:30:51 -04:00
Inusaito Sayori
17c2e93c78 Solve Issue 1696: buttons overlap 2014-10-01 18:45:15 -04:00
Inusaito Sayori
6a2353f08b Feature Request: If only one prim in a linkset is selected, show its individual land impact, like we used to. 2014-10-01 18:44:59 -04:00
Inusaito Sayori
da2d80d23a Useful fixies from upstream 2014-10-01 18:43:59 -04:00
Inusaito Sayori
01f2e70f1d Fix Issue 1690: Problem in the Italian translation 2014-10-01 18:43:38 -04:00
Inusaito Sayori
b77268b0e3 Attempt to fix blank region name in region restarting floater. 2014-10-01 18:42:43 -04:00
Inusaito Sayori
6a4c1f6ac6 Feature Request: Add a clear button to drop targets (except where not needed). 2014-10-01 18:42:14 -04:00
Inusaito Sayori
1d6e21247e Move LLDropTarget rectangle setting into a common function setChildRects 2014-10-01 18:41:53 -04:00
Inusaito Sayori
4a699d6160 Have Drop Targets with settings update when their settings update. 2014-10-01 18:35:09 -04:00
Inusaito Sayori
06584a38ab Stylistic changes and whatnot for LLDropTarget what with setValue and setItem 2014-10-01 18:34:26 -04:00
Inusaito Sayori
d2dd03dcba War on std::string::find compares against -1 instead of std::string::npos 2014-10-01 18:27:03 -04:00
Inusaito Sayori
3b631a4f90 Back out of droptarget support for links.
Drag and drop support for links would have to be done in lltooldraganddrop, and would probably require a rework there.
2014-10-01 18:26:44 -04:00
Aleric Inglewood
3555967812 Write <archetype><meta> for assets in "My Inventory" folder too. 2014-09-30 18:12:39 +02:00
Damian Zhaoying
358135a890 Merge remote-tracking branch 'Liru/master' 2014-09-20 16:10:10 -03:00
Inusaito Sayori
73ac76a0eb LLDropTarget should accept link targets instead of links
Also stylization changes
2014-09-16 20:33:37 -04:00
Shyotl
972c92a3fe Inconsequential template tweak. 2014-09-15 15:24:40 -05:00
Shyotl
f6209dec34 Silence some LL_INFOS spam on shader init. 2014-09-15 15:23:22 -05:00
Shyotl
738ce6422a A bit of code consolidation. Unified code for OUT_TERSE_IMPROVED and OUT_FULL terse subset. 2014-09-15 15:22:33 -05:00
Inusaito Sayori
dd3cb2b43c French Translation of xml export floater, thankies Nomade. 2014-09-14 17:18:19 -04:00
Damian Zhaoying
8fd1788ece Merge remote-tracking branch 'Liru/master' 2014-09-13 14:46:59 -03:00
Inusaito Sayori
d34bd5338d Comment out something from the llviewerobjectbackup.cpp sync that looks iffy and seemed to cause malfunction. 2014-09-11 22:27:25 -04:00
Inusaito Sayori
8dca737dc8 Solve Issue 1539: XML Export consistently fails as of latest alpha (build 5824) 2014-09-11 22:26:45 -04:00
Inusaito Sayori
86ff77665c Sync llviewerobjectbackup with Cool VL Viewer
Note to Translators:
-Adds translation work to floater_object_backup.xml
-Adds ImportFailed, ExportAborted, and ConfirmAbortBackup to notifications.xml

Turns LLViewerObjectBackup into an LLFloaterSingleton.. but eventually, this should probably be an instance tracker on the uuid of the object to export or something instead.
2014-09-11 19:45:15 -04:00
Inusaito Sayori
e5e665b9ee Sync LLAssetUploadResponders with upstream
Move LLSendTexLayerResponder into llviewertexlayer.cpp to reduce diff noise
2014-09-11 18:13:11 -04:00
Inusaito Sayori
6863eb6651 Be sure the object's inventory serial is incorrect before dirtying the inventory
Thanks to Ubit for pointing this out
2014-09-11 16:02:54 -04:00
Shyotl
0493a91a42 Boost 1.52 uses a completely different api for atomics. Not going to be supporting them. Also, fix llcalcparser in more old-boost compatible manner, and fix linux usage of apr_signal_description_get. 2014-09-11 05:20:01 -05:00
Inusaito Sayori
1ee939c7f7 [Radar] Feature Request: Add the ability to see avatar distance in avatar range alerts.
To toggle this feature, right click the radar, under the Alerts submenu choose "Include distance in alerts"

Cleans up code for calls to setPosition.
For now only entering messages will show distance, unless testing shows that it should be otherwise.
2014-09-11 03:58:23 -04:00
Inusaito Sayori
ff8b4fd95a [Radar] Optimize hidden column evaluation and generation out of draw call.
Please view this diff without space changes.
2014-09-11 03:37:51 -04:00
Inusaito Sayori
a68983b37f [Warnings] Fix ‘std::string {anonymous}::compute_CPUFamilyName(const char*, int, int)’ defined but not used 2014-09-10 16:58:44 -04:00
Drake Arconis
2d0905a4a6 Fix for fmod studio 1.5 2014-09-10 01:11:14 -04:00
Drake Arconis
eb96dee176 Murrrrge 2014-09-10 01:03:04 -04:00
Shyotl
df2ca052ea I suppose actually including llvoavatar.cpp would help too... 2014-09-09 21:56:53 -05:00
Shyotl
e95c0a4631 Revert some bogus changes in f38754d0d6. Not sure where these changes came from. 2014-09-09 20:44:00 -05:00
Shyotl
fbbd45c674 Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer.git 2014-09-09 19:48:42 -05:00
Shyotl
69064e96f0 Merge branch 'Supp' 2014-09-09 19:48:13 -05:00
Damian Zhaoying
1e0b95ca68 Update spanish translations. New Reset settings buttons in Graphics - DOF tab. Fix buttons in Group roles. Fix texts in map search places. 2014-09-09 14:36:39 -03:00
Inusaito Sayori
a5ac768540 Don't play empty audio urls. 2014-09-09 12:38:29 -04:00
Inusaito Sayori
1c7772e731 Sync with Alchemy, fixes not being able to send calling cards to people. 2014-09-08 21:25:12 -04:00
Cinder Biscuits
2db2c96329 Fix find evaluation on newer versions of clang (and 64-bit macs) 2014-09-07 22:43:03 -04:00
Inusaito Sayori
76616ee6f6 Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer 2014-09-07 18:25:25 -04:00
Shyotl
37c7a72505 Implement boost and stl mutexes and atomics. 2014-09-07 17:18:55 -05:00
Inusaito Sayori
b198e296cb Allow right clicking avatar lists with multiple avatars selected to invite to group. 2014-09-07 17:32:08 -04:00
Shyotl
f38754d0d6 Fixed an alignment issue with LLAvatarJointCollisionVolume array. Thanks Henri. 2014-09-07 15:55:53 -05:00
Shyotl
e5a0393480 Merge branch 'master' of git@github.com:singularity-viewer/SingularityViewer.git 2014-09-07 15:46:05 -05:00
Inusaito Sayori
e62ef91404 Fix sex radio: Now let's hear some kinky tunes~ 2014-09-07 15:26:20 -05:00
Inusaito Sayori
71d78425be Preload trash icon
Solves the issue where the remove saved login button has nothing on it
2014-09-07 15:26:12 -05:00
Inusaito Sayori
c7db5122c8 Fix Issue 1653: Using Search Box causes crash 2014-09-07 15:26:03 -05:00
Shyotl
89fcf69948 Added several temporary fasttimers to better pinpoint idle stall. 2014-09-07 15:22:19 -05:00
Inusaito Sayori
724ea77bef Translate Render muted avatars to francais 2014-09-07 12:43:18 -04:00
Inusaito Sayori
b127dd514d Stylistic changes and such. 2014-09-07 12:40:46 -04:00
Inusaito Sayori
a732635e75 Merge branch 'master' of https://github.com/MelanieT/SingularityViewer 2014-09-06 19:35:39 -04:00
Inusaito Sayori
5072f983ed Fix up skins, remove poor line endings and remove a few nonexistent colors. 2014-09-06 19:17:29 -04:00
Inusaito Sayori
6c9fca3f61 Merge branch 'master' of github.com:slabua/SingularityViewer 2014-09-06 18:52:35 -04:00
Inusaito Sayori
91b98bed05 Fix sex radio: Now let's hear some kinky tunes~ 2014-09-06 18:42:24 -04:00
Salvatore La Bua
195f7502b7 Merge branch 'master' of github.com:singularity-viewer/SingularityViewer 2014-09-06 20:08:09 +02:00
Lirusaito
1b8779f93e Fix teh Singletons to have a global registry 2014-09-06 11:30:25 -04:00
Salvatore La Bua
f0f124a23a Add skin Dark Green, based upon the Dark skin
Little changes on fonts' and windows icons' colour.
2014-09-05 15:40:09 +02:00
Inusaito Sayori
2772daa964 Preload trash icon
Solves the issue where the remove saved login button has nothing on it
2014-09-04 18:35:28 -04:00
Inusaito Sayori
2338e8a186 Fix Issue 1653: Using Search Box causes crash 2014-09-04 17:32:21 -04:00
Inusaito Sayori
ab7acd7149 Modernize LLSingleton 2014-09-04 17:32:16 -04:00
Inusaito Sayori
43a9aedf7d Sync with Upstream Alchemy
Changes LLEnvManagerNew::setRegionChangeCallback to LLAgent::addRegionChangedCallback
Cleans up some of the timeout policies that aren't necessary any longer.
Modernizes parts of LLViewerKeyboard, updates llregistry.h
Begins changeover from LLDynamicArray to std::vector
Minor merge of newer, trivial SSA functions.
Introduces LLAgent functions: addParcelChangedCallback and canJoinGroups
Support for secondlife:///app/appearance SLapps.
Cleans up older functions.
2014-09-04 17:32:03 -04:00
Shyotl
1608ed43c1 Release 1.8.6 2014-09-04 03:20:01 -05:00
Inusaito Sayori
fa103a69f9 I like jackals. 2014-09-03 21:49:08 -04:00
Inusaito Sayori
f8520f9dd3 Em Dash wants build tools to focus properly when the build button is clicked.
If the world is in focus and build button is pressed without the build floater open, don't bother focusing.
If a floater is in focus and build button is pressed without the build floater open, focus the build floater
If the build floater is in the background and the button is pressed, focus the build floater.
If the build floater is in focus and the button is pressed, close the build floater.
If the build floater is  not in focus but nothing else is, close the build floater.
2014-09-03 19:41:07 -04:00
Inusaito Sayori
3a372afc0e Add Render muted avatars check to System->Security & Privacy Preferences
Redefaulted LiruLegacyDisplayMuteds to false due to (at least) two alpha testers noticing it and wanting it back how it is in the current release (since 1.7.0).
True was to get back to the old ways of v1, but it's okay to be false by default, better now since it's exposed.

Also irrelevant tiny voice cleanup from Spatters.
2014-09-03 08:28:16 -04:00
Inusaito Sayori
95d6bec68f Maximum bandwidth is apparently 10000 on SL Viewer, match that. 2014-09-03 08:28:11 -04:00
Inusaito Sayori
56f2e20cb4 Feature Request: Add LiruResizeRootWithScreen to prevent ui getting messed up when the window is resized
This is not complete, and it should only be used if you know what you're getting into.
2014-09-03 08:28:06 -04:00
Shyotl
4cbcaba7f2 Merge branch 'master' of git@github.com:Shyotl/SingularityViewer.git 2014-09-03 01:47:43 -05:00
Shyotl
aeeca6e2c0 llcommon.dll doer faster. (set /LTCG and /GL) 2014-09-03 01:45:47 -05:00
Inusaito Sayori
74704d0d2a Fix crash signature 608
This was a crash in LLPanelDirClassified::postBuild(), on the line changed here, probably accessng null pointer.
There are probably a few other signatures for this in our database.
2014-09-02 10:53:36 -04:00
Shyotl
0b384bdd72 Merge branch 'master' of git@github.com:Shyotl/SingularityViewer.git 2014-09-02 02:57:28 -05:00
Shyotl
e9cf3a6806 Fix tiled snapshots. Also, LLRender::genRot takes degrees, not radians. 2014-09-02 02:53:10 -05:00
Shyotl
c5f9068664 Merge branch 'master' of git@github.com:Shyotl/SingularityViewer.git 2014-09-01 00:49:05 -05:00
Shyotl
992bbbba1c A bit of cleanup, and call subprocess.Popen with shell=True. 2014-09-01 00:47:39 -05:00
Shyotl
fe9dd63558 Merge branch 'master' of git@github.com:Shyotl/SingularityViewer.git 2014-08-31 04:58:29 -05:00
Shyotl
8e45003c27 Packaging bugs. I'm drowning in them. (use subprocess.Popen instead of os.popen) 2014-08-31 04:56:55 -05:00
Shyotl
f53d824e07 Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer.git 2014-08-31 00:05:11 -05:00
Shyotl
259670af85 Merge branch 'master' of git@github.com:Shyotl/SingularityViewer.git 2014-08-31 00:04:59 -05:00
Shyotl
c7e9430f99 Avoid erroneously creating 'About Land' instance. Also avoid issuing 'ParcelPropertiesRequest' excessively. 2014-08-30 23:48:56 -05:00
Shyotl
afe573d2eb Spaces in path... and nsi script... issues. 2014-08-30 23:47:32 -05:00
Shyotl
547d9817db Replace \t with spaces in develop.py. 2014-08-30 18:57:12 -05:00
Shyotl
9c63243fe7 Fix issue with planar face alignment. 2014-08-30 18:56:27 -05:00
Shyotl
5535ba6b47 Fix issue with paths with spaces, in viewer_manifest.py 2014-08-30 16:25:46 -05:00
Drake Arconis
5059d5e2da Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer 2014-08-30 14:29:32 -04:00
Inusaito Sayori
52a80f98ed Nomade's touches to french Object Weights Floater
Supposedly fixes a french crash.
2014-08-30 06:09:33 -04:00
Inusaito Sayori
9600319094 Add debug setting LiruHighlightNewInventory to prevent selection being changed on accepting new inventory. 2014-08-27 07:58:08 -04:00
Aleric Inglewood
9b930c8716 Don't set a SSL ctx callback when we don't use openSSL. 2014-08-26 19:19:06 +02:00
Aleric Inglewood
eb0d2e5b2c libcurl-gnutls.so (debian) links with libgnutls.so
In that case we DO reach the assert here.
I verified that curl_global_init() indeed calls gnutls_global_init().
2014-08-26 01:35:13 +02:00
Aleric Inglewood
5e2722475a This header uses LLMatrix4a, not LLMatrix4. 2014-08-26 00:29:59 +02:00
Aleric Inglewood
b1e406731d Merge remote-tracking branch 'singu/master' 2014-08-25 18:39:46 +02:00
Aleric Inglewood
8c6d51cb71 No longer support DEBUG_CURLIO when libcwd isn't installed. 2014-08-25 17:58:45 +02:00
Shyotl
4b205084f8 Fix develop.py 'build' command. 2014-08-23 20:52:01 -05:00
Shyotl
eb910b0bae Use /Zm140 for all windows builds. 2014-08-23 20:50:56 -05:00
Shyotl
09a6a1f259 Merge branch 'master' of git@github.com:Shyotl/SingularityViewer.git 2014-08-23 01:37:48 -05:00
Shyotl
315618a18b Fixed materials specularmap + glossiness=0 combination. 2014-08-23 01:34:25 -05:00
Inusaito Sayori
59af03695b Fix debug settings boolean to work with the radiogroup update. 2014-08-23 00:24:57 -04:00
Inusaito Sayori
e1851f7b5b Sync llwindowwin32 with Alchemy. 2014-08-22 21:47:52 -04:00
Inusaito Sayori
a126b4003f Fix the first double click of every session failing. 2014-08-22 21:43:48 -04:00
Inusaito Sayori
9067de26ac Seriously, what is logic? 2014-08-22 17:32:28 -04:00
Inusaito Sayori
260c5345fd Logic, what's that?! 2014-08-22 16:16:08 -04:00
Drake Arconis
29195e8460 Merged upstream/master 2014-08-22 10:26:58 -04:00
Inusaito Sayori
e3dd05ef21 Fix the broken radio groups
Now can I go to sleep, Papa?
...
But I did my chores and fixed the bugs.
...
YAY! *runs off to bed*
2014-08-22 07:14:19 -04:00
Inusaito Sayori
9379bcedf9 A propos de [SHORT_APP_NAME] 2014-08-22 06:02:03 -04:00
Inusaito Sayori
2c91210d6e Is almost zero approximately zero? 2014-08-22 06:01:45 -04:00
Shyotl
f721d935e4 Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer.git 2014-08-22 03:55:21 -05:00
Shyotl
66597cade3 Use [SHORT_APP_NAME] xui/de/floater_about.xml as per liru request. 2014-08-22 03:52:13 -05:00
Shyotl
3c5f39e26a Use a dynamic buffer for LLMeshHeaderResponder. 2014-08-22 03:41:00 -05:00
Shyotl
24e3176f1b Fixed some odd initialization oddness in develop.py. Also changed win64 build targetdir to build-vc###-Win64 2014-08-22 03:38:49 -05:00
Drake Arconis
e49156a074 Fix mesh upload broken by # 2014-08-22 00:29:46 -04:00
Drake Arconis
948ebe5213 All your codebase are belong to us. 2014-08-22 00:15:09 -04:00
Drake Arconis
2a64c07215 Fix fmodex breakage 2014-08-21 22:00:59 -04:00
Drake Arconis
578a5719dd Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer 2014-08-21 21:59:51 -04:00
Shyotl
e59757e3e8 Clean up a few harmless compiler warnings (signed/unsigned, double to float) 2014-08-20 19:43:32 -05:00
Shyotl
282de8c7f5 Only use LLAvatarJoint when necessary, else LLJoint 2014-08-20 19:40:31 -05:00
Shyotl
541021f29c Fix relwithdebug. 2014-08-20 17:42:48 -05:00
Melanie
6804253bfc Merge branch 'master' of github.com:singularity-viewer/SingularityViewer
Conflicts:
	indra/newview/llfloaterperms.cpp
2014-08-20 05:46:50 +02:00
Inusaito Sayori
e01b9dcd39 If it's not a translation, don't change APP_NAME and related strings in strings.xml 2014-08-19 20:06:43 -04:00
Inusaito Sayori
8d4567b930 Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer 2014-08-19 19:55:34 -04:00
Inusaito Sayori
6f6988a487 Add "Move to Lost And Found" option for displaced inventory
Inspired by the work of Kitty Barnett
Fixes Issue 1337: Corrupted Inventory
Fixes Issue 1625: Unattainable inventory is Outside of My Inventoy and no options to move back to My Inventory
Fixes Issue 1580: Deleted folders showing outside of inventory folder.
2014-08-19 19:52:24 -04:00
Inusaito Sayori
435ab2ce77 Modernize llradiogroup, allows v3-style attributes: value, label for radio_item; allow_deselect for radio_group.
LLRadioCtrl moves into llradiogroup.cpp
2014-08-19 19:42:42 -04:00
Shyotl
1afd723c4e Post-merge fixup. 2014-08-19 01:36:24 -05:00
Shyotl
b09f7f5ac7 Merge branch 'master' of https://github.com/Lirusaito/SingularityViewer.git
Conflicts:
	indra/newview/llviewerobjectlist.cpp
	indra/newview/llviewerpartsim.cpp
2014-08-18 23:55:03 -05:00
Shyotl
1b3f0f9ec0 Manual texture reloading now re-fetches materials-related textures. 2014-08-18 23:47:37 -05:00
Shyotl
d1d68721ac Pulled mesh header info parsing and VFS fetching into their own procedures to remove duplicate code. 2014-08-18 17:16:45 -05:00
Inusaito Sayori
2f4afe5b68 Fix About [APP_NAME] to read About [SHORT_APP_NAME] 2014-08-18 17:58:45 -04:00
Shyotl
47fcc70756 Write initial mesh data to file in larger chunks. Reduces file i/o stalls. 2014-08-18 00:54:46 -05:00
Shyotl
0e86b696c5 Added more verbose statemachine debug output. 2014-08-18 00:54:01 -05:00
Shyotl
54f05b409c Always use dynamic_cast when casting from an LLJoint* 2014-08-13 18:04:24 -05:00
Inusaito Sayori
350dff9b98 Cinder made some logic enhancements to hippogridmanager.cpp, I've picked them up~ 2014-08-13 02:34:52 -04:00
Inusaito Sayori
f198221812 System preferences and Menu translation updates by Nomade Zhao. 2014-08-13 02:04:17 -04:00
Inusaito Sayori
dee08b4216 Spanish translation pruning, also Manage ban list translation by Damian. 2014-08-13 02:02:34 -04:00
Damian Zhaoying
e02d074a85 Merge remote-tracking branch 'Liru/master' 2014-08-11 18:25:32 -03:00
Damian Zhaoying
8e2da87b97 Update spanish translations to reflect a lot of changes and adds in last Alphas builds. 2014-08-11 18:22:34 -03:00
Inusaito Sayori
2deba06212 Missed a spot with the date column for group bans
I'm thinking of putting a setting here instead of hardcoding the date format, actually, but for now this is good enough.
2014-08-11 14:36:37 -04:00
Drake Arconis
90d2dce07a Add FMOD Studio support 2014-08-10 17:41:10 -04:00
Latif Khalifa
a6ac8e1f71 Workaround for clang bugs 2014-08-09 11:24:22 -04:00
Inusaito Sayori
69436a9032 Add french translation for connect to neighboring regions from Nomade Zhao 2014-08-09 10:50:24 -04:00
Inusaito Sayori
50d91d13be Allow dragging and dropping to attached objects
There's now a guard serverside that'll prevent the situation that would cause things to break in the past, so there's no reason not to have this.
2014-08-08 16:26:40 -04:00
Inusaito Sayori
54a6db146e Upon further consideration and a bit of feedback, the new matching common characters behavior of gesture autocomplete is probably bad, I've commented it out and brought back the old code. 2014-08-08 14:57:14 -04:00
Inusaito Sayori
3b31fe91a6 Address Deltek's concern that the Open Attachment button wasn't changing text to just say save when the object is not the openable type. 2014-08-08 14:52:52 -04:00
Inusaito Sayori
90c5219be9 Move Media Filter from the View menu to the Singularity menu.
Moves Media Filter in all translations, no need for translators to worry~
Nomade, please translate the Singularity menu at your discretion.. in menu_viewer.xml
2014-08-08 08:43:24 -04:00
Inusaito Sayori
669fe29173 Initialize members of LLMediaFilter, fixes win64 filter being broken. 2014-08-08 08:26:48 -04:00
Inusaito Sayori
d7d06c8234 Oh, and this one too, maybe it is fixed now? 2014-08-08 07:07:51 -04:00
Inusaito Sayori
4754c1322d This should probably be a size_t, perhaps this fixes the win64 mediafilter bug. 2014-08-07 21:56:25 -04:00
Inusaito Sayori
acb093c277 Media Filter code cleanup 2014-08-07 20:37:03 -04:00
Inusaito Sayori
21d54edeb9 Per-slider reset buttons? Sure.
Adds callback to registrar: "Prefs.Reset", pass debug setting name as parameter.
2014-08-07 20:29:12 -04:00
Inusaito Sayori
20ea0968da Feature Request from friti: Add a reset button to Depth of Field tab of graphics.
Actually should've committed this last night. X3
2014-08-07 08:31:26 -04:00
Shyotl
398d8c52a2 Minor cleanup. 2014-08-07 01:57:11 -05:00
Lirusaito
f82d12d381 Fix linker errors on linux after merging Shyotl 2014-08-07 01:54:56 -05:00
Lirusaito
91ee5724ca Fix compile errors and warnings on linux after merging Shyotl. 2014-08-07 01:54:45 -05:00
Inusaito Sayori
a82443f271 Make sure that we have a token when doing sscanf in llinventory.cpp and llviewerobject.cpp
Guards against opensim grids that may leave new/blank lines of sorts after their message blocks
2014-08-06 23:29:23 -04:00
Cinder Biscuits
1cd0b70055 Fix filling in MediaAlert notification. 2014-08-06 16:34:23 -04:00
Inusaito Sayori
8f8904ad0f Feature Request: Autoselect the parcel you are on for about land floater when there's no active parcel selection. 2014-08-05 23:25:39 -04:00
Shyotl
e975e389df Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git
Conflicts:
	indra/newview/llnetmap.cpp
2014-08-05 18:17:13 -05:00
Inusaito Sayori
d3242393e0 Better default rect for those two new v3 floaters (destinations and avatar picker) from Latif. 2014-08-05 13:35:42 -04:00
Inusaito Sayori
ce7d0e81bd Toggle control_name in <floater/>'s like booleans for visibility, if they exist.
Look out for this in the UI Overhaul merge, this is gonna clash big time.
2014-08-05 12:48:28 -04:00
Inusaito Sayori
0cf16e6f8f Allow edit menu shortcuts to work while on login screen~ 2014-08-05 11:20:58 -04:00
Inusaito Sayori
0ab395794e [Warnings] "One more," says friti; "One more," fixes Liru. 2014-08-05 00:57:26 -04:00
Inusaito Sayori
ac06a8394b I'm a sillyfolf, here's a compile fix. 2014-08-05 00:48:13 -04:00
Inusaito Sayori
46dd1ad154 Merge branch 'master' of git://github.com/Shyotl/SingularityViewer 2014-08-05 00:34:06 -04:00
Inusaito Sayori
e57a7b6f3b [Warnings] Fix the "no biggie" warnings
Thanks to friti for providing the pastebin~
2014-08-05 00:31:52 -04:00
Inusaito Sayori
409128b07f [Warnings] enumeral mismatch in conditional expression: ‘DS3Keys’ vs ‘XBoxKeys’ [-Wenum-compare]
Thought I covered this one already...
2014-08-05 00:31:03 -04:00
Inusaito Sayori
fd562061ee Update simple codeless floater behavior
Such that floater's named according to their filename will now close if they were frontmost
making their menu entries and buttons, toggly.

This effects the behavior of the toolbar preferences floater, the Favorites floater, and the My Outfits floater.
(and any such simple extensions made by forks and those that will come in the future)
2014-08-04 23:36:47 -04:00
Inusaito Sayori
c6a7dc8f9c Nomade's update to Camera and Input preferences. 2014-08-04 23:32:44 -04:00
Shyotl
5275f7e852 Re-determine spatial groups for hud attachments upon teleport. Fixes missing prim issue. 2014-08-03 18:52:06 -05:00
Inusaito Sayori
6ec19e4630 Minor edits to french translation. 2014-08-01 09:01:48 -04:00
Inusaito Sayori
690ac8d4b1 Ooooops, broke showcase tab on SL, needs to expandURLSubstitutions(). 2014-08-01 05:56:20 -04:00
Inusaito Sayori
7ae1cd33be Add debug setting LiruShowTransactionThreshold for filtering out low amount transaction notifications. 2014-08-01 05:21:14 -04:00
Inusaito Sayori
a7c6c184da Now that I'm more awake, this is a far better solution for the default sim features issues.
Adds const Type mDefaultValue reset() and getDefault() to SignaledType
Cleans up code by not needing to reset to the default by value every time, nice template function to do this~
Leaves in hg boolean, but commented out in case opensim ever decides to make that a reality.
2014-07-31 22:50:02 -04:00
Inusaito Sayori
29d6b423a3 Toolbar prefs was filling up quick, gave it an extra 20 pixels of height and reordered. 2014-07-31 14:52:41 -04:00
Inusaito Sayori
b3590c5ae6 Add Default Avatar Picker Floater (World->Default Avatars)
Default Avatars button option added to Toolbar prefs.
Adds debug setting ToolbarVisibleAvatar
Hooks into "avatar_picker_url" login response on opensim.
Also includes hooking up of DestinationGuideShown to startup, which was left unstaged from the initial commit of the Destination Guide.
2014-07-31 14:45:27 -04:00
Inusaito Sayori
67f549d86d SimFeaturesHandler: Work around grids where OpenSimExtras aren't implemented by not overriding hg strings there. 2014-07-31 11:29:26 -04:00
Inusaito Sayori
9096265bff Possible solution for Issue 954: Singularity Alpha Build 4701 EULA file missing on first login. 2014-07-31 11:20:17 -04:00
Inusaito Sayori
ce265b3948 Add Destination Guide
Adds llfloaterdestinations.* and floater_destinations.xml (needs translations, but not really)
Adds GenericErrorPageURL, DestinationGuideURL (not persistent), DestinationGuideShown, and DestinationGuideRect to debug settings
Removes ShowcaseURLDefault in favor of DestinationGuideURL from upstream.
Also Adds ToolbarVisibleDestinations for the toolbar button, but I'll need to set up a nice way to make the button invisible when the url is empty before adding it to the gui... maybe.. or maybe it's just not important.

This commit comes with support for dynamically changing destination guide page based on opensimextras simulator features cap
2014-07-31 10:07:11 -04:00
Inusaito Sayori
7fee70543d Login Response support for destination_guide_url, OpenSimExtras support (properly) search-server-url, and support the new destination-guide-url from OpenSimExtras
Expands SignaledType's callback to accept const Type& as argument.
typedefs Signal::slot_type to slot_t so that SignaledType can be altered without needing to update all lines setting slots.

Merges floater_directory.xml with floater_directory(2|3).xml
Condenses translations down to one xml(, finally the nightmare is over).
Better ui code support for classic find all panel
Not like anyone cares, but ShowcaseURLDefault no longer persists value changes between sessions.

Moves SearchType and getSearchUrl(SearchType ty, bool is_web) from HippoGridInfo into a namespace in llpaneldirfind.cpp, the only place where it is used; so that it may wrap the sim feature lookup.

Thanks to Shyotl for the help in dynamically maintaining tab positions for dynamic tabs.
2014-07-31 08:12:00 -04:00
Inusaito Sayori
f3a48bb0f0 Silk Aeon wants greater precision on the Object Weights Floater. 2014-07-30 08:43:12 -04:00
Inusaito Sayori
c151c12b95 Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer 2014-07-25 20:55:39 -04:00
Aleric Inglewood
b8d999066d Allow usage of default timeout policy 2014-07-26 02:46:11 +02:00
Inusaito Sayori
0e816492b4 Merge branch 'master' of https://bitbucket.org/Shyotl/singularityviewer-internal 2014-07-23 22:08:12 -04:00
Inusaito Sayori
c6ef099e18 When we setTextEntry on a combo box, move the cursor to the beginning of the new text.
This fixes the login location combo box not displaying the location cleanly after appending coordinates and such.
2014-07-23 18:15:14 -04:00
Inusaito Sayori
1c5872da0c Fix the grids combobox on the login panel not being scrollable because of constantly reordering grids
Still select the current grid, just use its index number to select it, instead of hacking it to the top of the combo box.
2014-07-23 18:12:18 -04:00
Shyotl
d95e94fa07 Missed a cast to LLMatrix4. Was causing assorted wonkiness (most noticeably, mouselook oddities) 2014-07-23 16:55:46 -05:00
Inusaito Sayori
d7bbbd9d40 Fix Group Role Data never loading since the group bans merge. 2014-07-23 16:58:41 -04:00
Inusaito Sayori
cf56659b18 Add xcode_fix.sh to scripts/ to avoid users needing to download it. 2014-07-23 16:51:14 -04:00
Inusaito Sayori
4163b8e40b Well that's a strange bug... eh, not too important. 2014-07-22 14:38:29 -04:00
Inusaito Sayori
4ca6a5c52c Sync up most of the realistic mouselook code with alchemy.
This should fix the inverted mouselook when sitting problem
Think the bug was in llvoavatar, but keeping in sync is always good for the future overall.
2014-07-22 07:07:38 -04:00
Inusaito Sayori
511811de3b Fix Media Filtering preferences code to work right. 2014-07-22 07:05:36 -04:00
Inusaito Sayori
6ef4dfb61f Fix Media Filtering preferences UI to look proper. 2014-07-22 05:49:41 -04:00
Inusaito Sayori
5ca2a3b0f7 Feature request: Change status bar search to search in all (applicable) tabs
Opens up to last tab selected now, but puts query text and triggers searches in all tabs.

Singu TODO: Have it search marketplace?
2014-07-22 05:48:30 -04:00
Inusaito Sayori
88794d0288 Add "Connect to neighboring regions" checkbox to Vanity->Main preferences. 2014-07-22 04:40:21 -04:00
Lirusaito
30e76a7c11 Fix linker errors on linux after merging Shyotl 2014-07-22 04:24:26 -04:00
Lirusaito
41eb687243 Fix compile errors and warnings on linux after merging Shyotl. 2014-07-22 03:39:01 -04:00
Inusaito Sayori
5191baa659 Merge branch 'master' of https://bitbucket.org/Shyotl/singularityviewer-internal
Conflicts:
	indra/newview/llnetmap.cpp - Thankies Shyotl~
2014-07-21 23:31:59 -04:00
Inusaito Sayori
8159eff664 Ban From Group option belongs in the Moderation submenu on the radar. 2014-07-21 23:13:12 -04:00
Inusaito Sayori
c6eb3d790e MAINT-4241 FIXED [Group Bans] Ban member(s) button is not greyed out for banning group owners. Viewer gives message that you ejected group owner.
by Andrey Kleshchev
5598f66
2014-07-21 23:11:53 -04:00
Inusaito Sayori
f62fc8ab15 Fix right clicking on lists of avatars and selecting ban/invite not working for nonfriends who aren't nearby.
Also touch up group invite floater to show names we can't get from voavatars in the user's global namesystem preference.
2014-07-21 23:11:03 -04:00
Inusaito Sayori
75e85701c6 Add Ban From Group option to right click menu of avatar lists.
Also missed two touchups for the Responder API merge in llfloaterperms.cpp
2014-07-21 22:56:18 -04:00
Shyotl
cd85afc9a5 Quick workaround to fix issue with simple geom not rendering in deferred 'underwater' pass. 2014-07-21 20:28:23 -05:00
Inusaito Sayori
b9ba472eda Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer
Conflicts:
	indra/newview/llspeakers.cpp
Compile fixes:
	indra/newview/llgroupmgr.cpp - uncomment new API for GroupBanDataResponder
2014-07-21 19:56:35 -04:00
Inusaito Sayori
bf9d3acf33 Factor in mAvatarOffset(hover) when calculating the legacy offset, though I doubt this helps. 2014-07-21 19:07:16 -04:00
Inusaito Sayori
bd7e291787 Debug output that was once useful to me. 2014-07-21 19:05:24 -04:00
Inusaito Sayori
73b34b6d89 When there is nothing selected in a media filter list, don't enable its remove button
Also missed xml parts from last commit.
2014-07-21 18:51:20 -04:00
Inusaito Sayori
f2c7290ee8 Touchups to Cinder's new media filter code! 2014-07-21 18:30:05 -04:00
Inusaito Sayori
6f6938f5bb Function removal in LFFloaterInvPanel, in favor of boost::bind function. 2014-07-21 18:04:20 -04:00
Inusaito Sayori
601ff92871 Address Issue 1570: Make comboboxes scrollable
Note: It appears that mLabel is never set by combo boxes, this should eventually be fixed.
Checking !getFirstSelected() is sufficient to test if we're in the list, however.
2014-07-21 18:00:43 -04:00
Cinder
f119986fad Remove orphaned media filter notifications 2014-07-21 14:49:39 -04:00
Cinder
402cd21f87 Hi. 2014-07-21 14:49:33 -04:00
Cinder
8cb694af89 Orphaned local function 2014-07-21 14:49:26 -04:00
Cinder
73d8cedf7e A few changes after code review from Liru 2014-07-21 14:49:18 -04:00
Cinder
b7e8d36cf8 I do things. 2014-07-21 14:49:09 -04:00
Cinder
45f5eb9671 Replace the media filter with something a little different 2014-07-21 14:48:57 -04:00
Shyotl
16fe6d0dcf Fix compile. Remove call to temporary matrix sanity check. 2014-07-21 01:27:45 -05:00
Inusaito Sayori
b633c3ffea Fix Issue 1593: "Attachment" button on Group Notices 2014-07-15 15:37:02 -04:00
Inusaito Sayori
ca1696823c French translation updates, by me~ 2014-07-14 03:20:48 -04:00
Inusaito Sayori
c1cc9d484a Add AlchemyConnectToNeighbors 2014-07-13 19:43:00 -04:00
Liru
db75cb3e17 Fix down arrow not working in inventory after the v-t sync, I must've missed this spot. 2014-07-13 12:51:11 -04:00
Liru
b8a17c8f22 Finish work on MAINT-3119 FIXED Return common chars for triggers that matches the prefix.
Makes the code cleaner too, upstream made this too messy.
2014-07-13 10:28:41 -04:00
Aleric Inglewood
74dff061ff Support for new LL Responder API.
This adds mStatus, mReason and mContent to ResponderBase
and fills those in instead of passing it to member functions.
The added danger here is that now code can accidently try
to access these variables while they didn't already get a
correct value.

Affected members of ResponderBase (that now have less arguments):
decode_llsd_body, decode_raw_body, completedHeaders,
completed -> httpCompleted, result -> httpSuccess,
errorWithContent and error -> httpFailure.

New API:

ResponderBase::setResult
ResponderBase::getStatus()
ResponderBase::getReason()
ResponderBase::getContent()
ResponderBase::getResponseHeaders() (returns AIHTTPReceivedHeaders though, not LLSD)
ResponderBase::dumpResponse()
ResponderWithCompleted::completeResult
ResponderWithResult::failureResult (previously pubErrorWithContent)
ResponderWithResult::successResult (previously pubResult)

Not implemented:

getHTTPMethod() - use getName() instead which returns the class name of the responder.

completedHeaders() is still called as usual, although you can ignore
it (not implement in a derived responder) and call getResponseHeaders()
instead, provided you implement needsHeaders() and have it return true.

However, classes derived from ResponderHeadersOnly do not have
completedHeaders(), so they still must implement completedHeaders(),
and then call getResponseHeaders() or just access mReceivedHeaders
directly, as usual.
2014-07-12 18:29:44 +02:00
Aleric Inglewood
3dd846b600 Stop people from wearing their whole root folder. 2014-07-12 14:38:54 +02:00
Inusaito Sayori
8a2e24ecd0 Sync with viewer-tiger~
Syncs up llmath stuffs.

Thanks to Shyotl for the CMakeLists fix for Wbemuuid.
2014-07-11 20:36:19 -04:00
Aleric Inglewood
6ccca51fee Compiler warning fixes.
g_thread_init is automatically called since 2.32 (and deprecated since 2.35).
g_type_init is automatically called since 2.36 and will be deprecated in the
future.
2014-07-11 17:10:27 +02:00
Aleric Inglewood
a4b3c3d1ad Remove self dependency of llwindow.
Needed to avoid an error message from cmake 2.8.12.1 and higher
(policy 0022).
2014-07-11 16:32:55 +02:00
Inusaito Sayori
bc8947289b Sync
Includes:
MAINT-3541 (crash in std::vector >::reserve)
MAINT-3364 FIXED Call clearSelection() from root_folder
MAINT-3621 FIXED Set name to "Unnamed" if object's name consists of whitespaces.
MAINT-3412 add gpu_table line with distinct Intel Iris Pro OpenGL regex to match new MBP with forced Intel graphics
MAINT-3119 FIXED Return common chars for triggers that matches the prefix.
MAINT-3661 Fix for crash when uploading corrupt .dae file.
MAINT-3671 FIXED Rename title when new tab is added.
MAINT-3465 FIXED Add check mark to selected entry.
BUG-5537 FIX reverting breaking changes to pectorals and belly.
MAINT-535 FIXED The teleport SLAPP is changed to UNTRUSTED_THROTTLE. Confirmation dialog for teleporting via slapp is added.
2014-07-11 09:31:51 -04:00
Inusaito Sayori
e7c506c6ec MAINT-3496 FIXED Disable "Allow group access" option if "Sell passes to: group" is selected(and vice versa). 2014-07-11 06:52:25 -04:00
Inusaito Sayori
8236964029 Missed the setting for joystick button on toolbar, oops. 2014-07-11 06:42:46 -04:00
Inusaito Sayori
aadecaf102 MAINT-3530 : Add viewer checkbox to extend parcel entry limits to a higher ceiling 2014-07-11 06:42:20 -04:00
Inusaito Sayori
b55e45eef6 Add a joystick on/off toggle to the new joystick toolbar button~ 2014-07-11 01:20:22 -04:00
Inusaito Sayori
adbc928148 Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer 2014-07-10 23:46:47 -04:00
Inusaito Sayori
c4c206076a Add the option to have a toolbar button for joystick configuration 2014-07-10 23:42:43 -04:00
Inusaito Sayori
5c077d7037 Suppress the annoying 404 notification from default perms 2014-07-10 22:43:36 -04:00
Inusaito Sayori
8583a2f4f7 Idea!: Set to defaults flyout button with options for all styles of joystick controller
The button portion does nothing if there is an unknown or no controller connected, otherwise it sets defaults for the controller's identified type.

Joystick buttons are still configured based on identification, however.
DS3 users will likely find that using Motion in Joy switchboards is much more effective, however.
2014-07-10 22:38:30 -04:00
Inusaito Sayori
ed8416ea10 Add a hack to make classified panel in search actually change
We cannot know the creator when we send the request, so use null to trigger the workaround.
2014-07-09 23:22:10 -04:00
Inusaito Sayori
deb7454cf7 Cure Issue 1586: Singularity crashes when adding classified adds on opensim grids (untested in SL)
Following as it is done upstream, no more requests on null ids.
2014-07-09 16:45:40 -04:00
Inusaito Sayori
8c40af5aee Sync up llpanelclassified.* a bit for easier diffings. 2014-07-09 16:18:19 -04:00
Inusaito Sayori
dd893bab41 Work towards curing Issue 1586: Singularity crashes when adding classified adds on opensim grids (untested in SL) 2014-07-09 15:29:38 -04:00
Lirusaito
759ee62e7c /open for opening avatar profiles by id~ 2014-07-09 03:18:08 -04:00
Lirusaito
1e9b79e2c1 Fix old namesystem code that broke initially setting Legacy (w/display) for everything in general.
Also cleans up old logic and directs the friends list to update when the user changes the namesystem for it specifically.
Thanks to um... I think it was Deltek, who discovered this bug.
2014-07-09 03:08:13 -04:00
Lirusaito
315883a28c Fix Issue 1577: Color yellow hard to read on Radar
Thanks to Carla Gomes
2014-07-09 03:00:38 -04:00
Lirusaito
19b85afe12 Allow gtp with implicit current height when z is not provided. 2014-07-09 02:56:09 -04:00
Inusaito Sayori
b2e8a31d68 Address Issue 1571: Newer OSSL functions not recognized by Script Editor 2014-07-08 19:15:19 -04:00
Inusaito Sayori
b4b12732cb Add new materials script constants to keywords.ini 2014-07-08 18:48:59 -04:00
Inusaito Sayori
c714c57bb2 Solve Issue 1572: Checkbox not saving its tick 2014-07-08 18:31:23 -04:00
Shyotl
4697216c5e Utilize vector_replace_with_last 2014-07-05 19:29:10 -05:00
Shyotl
e2fa94e2c3 Fixed water normals. 2014-07-05 19:09:21 -05:00
Siana Gearz
7578a27bf7 Fix RLVa in About floater 2014-07-05 14:11:26 +02:00
Siana Gearz
14e0b3c9e6 Latif's Breakpad from Replex 2014-07-05 04:14:58 +02:00
Shyotl
815acfc7da Don't use SHGetSpecialFolderPath since it's dead. Use SHGetFolderPath instead, as that still is supported on XP, and is merely deprecated, not removed from newer SDKs (yet). 2014-07-04 20:25:35 -05:00
Shyotl
7d8af7d413 Use one shared vbo to draw fullscreen rectangles in LLPipeline, for both deferred and non-deferred. Provides a nice bit of cleanup. 2014-07-03 17:09:27 -05:00
Shyotl
39810ed516 Removed several unused variables from LLPipeline 2014-07-03 02:34:10 -05:00
Shyotl
9cbcf8fe34 Removed glh_linear and glu dependencies from viewer. 2014-07-03 02:11:45 -05:00
Inusaito Sayori
02b476035b Correct Issue 1562: Environment Editor Floater not Opening Initially 2014-06-26 15:08:04 -04:00
Inusaito Sayori
9eb338f417 Merge up RLVa in llinventorybridge.cpp and remove old commented code
Just something I did to ease mergies.
Adds RLVaDebugDeprecateExplicitPoint

Ignore space changes
2014-06-25 15:23:04 -04:00
Inusaito Sayori
15e30604fc Feature Request: Add an option to bypass closing active viewers when (un)installing 2014-06-25 00:12:12 -04:00
Shyotl
21f677cf58 Remove glh::matrix4f variant of glh_get_current_modelview. 2014-06-24 01:23:08 -05:00
Shyotl
3ead892b1c Re-worked animated linden trees to reduce duplicate code and provide a cleaner diff. 2014-06-24 01:17:47 -05:00
Shyotl
a59e87a896 Added a gradient fade to the minimap viewcone visualization. 2014-06-22 03:55:29 -05:00
Shyotl
96df7b82de Change texture default to non-auto-alphamaskable, non-pickable. Only 'fetchable' textures may qualify for either. 2014-06-22 03:53:08 -05:00
Shyotl
5cb5d284c3 Initialize LLRender::mHasTextureSwizzle to false. 2014-06-22 03:44:48 -05:00
Shyotl
869517b9c6 Evidently a line in objectSkinV.glsl escaped earlier staging. 2014-06-22 03:43:43 -05:00
Shyotl
56cefce1cc Enable auto-alphamasking for attachments, and force to use V3 auto-alphamask algorithm for said attachments. 2014-06-22 03:42:37 -05:00
Shyotl
165af85894 Altered vector_replace_with_last to work around MSVC2010 compiler bug. 2014-06-22 03:40:12 -05:00
Shyotl
7c073c1db7 Explicit enforcement of alignment for all aligned types, including structures with aligned members. (Compiler handholding) 2014-06-22 03:39:33 -05:00
Shyotl
061178ad82 Migrated gl matrix stack to LLMatrix4a 2014-06-22 03:34:51 -05:00
Inusaito Sayori
dbc7c6e74d OUYA has different defaults, store its defaultification status uniquely.
Also code cleanup/simplification in the getDescriptiony areas.
2014-06-21 19:08:52 -04:00
Inusaito Sayori
d87a48ea06 Group Bans!
Thankies Baker Linden~

Ported Ansariel's mAvatarNameCacheConnection change to mAvatarNameCacheConnections to llpanelgroupbulkimpl.h

Adds setGroupID in places, in case we ever want to add that.. but for now we don't really need/use it
Adds Refresh_Off icon from upstream.

Viewer Interesting changes:
Moves LLGroupChange out of stdenums.h into llgroupmgr.h
Moves roles_constants.h from llcommon into newview

This looks like it's better without space changes...
2014-06-21 16:44:39 -04:00
Inusaito Sayori
b36bb8b5bb Increase the maximum range of finding avatars to invite near the user
Increased from 40 to 8192, so it works across sims and all the way up.
Also made the value editable, and the slider is now as wide as the list which looks nice.
2014-06-21 15:05:46 -04:00
Inusaito Sayori
2ed16c9736 Right click menus in avatar picker lists and in group invite avatar list. 2014-06-21 15:02:20 -04:00
Inusaito Sayori
c031649979 Added Eject avatar from group notification from v-r. 2014-06-20 18:01:59 -04:00
Inusaito Sayori
e0746fca12 Sync up llgroupactions with v-r/rlv. 2014-06-20 15:53:54 -04:00
Inusaito Sayori
2075042ba7 Fix key2name not working on the first try. Also make it comply with the name system choice. 2014-06-19 12:48:00 -04:00
Inusaito Sayori
499cd48763 More touches for DS3 support. 2014-06-19 11:29:18 -04:00
Inusaito Sayori
5d826b2b62 Use Nebadon's defaults for the Ouya game controller. 2014-06-18 21:32:31 -04:00
Inusaito Sayori
b20943d497 cd36a1fe16 had some mistakes/missing pieces 2014-06-18 21:07:15 -04:00
Inusaito Sayori
b4ab9a4e57 Fix cursorZoom being broken, my bad, forgot to add the increment line 2014-06-18 20:35:03 -04:00
Inusaito Sayori
cd36a1fe16 Add MotioninJoy detection, along with a whole new control set for it.. plus bonus buttons!
Tilt up to go up/jump, tilt down to go down/crouch (flying works nicely this way)
Turn left to roll left, turn right to roll right, while in flycam only.
Controls are mapped to the same buttons as with xbox controller.

Bonus buttons:
PS3 Logo button: Toggle Sit!
L2 and R2... no idea what to make these, I'll come up with something
2014-06-18 20:32:28 -04:00
Lirusaito
1cda80cbe7 Introduce function isXboxLike, to support Xbox-like controllers, even if they don't identify as Xbox.
Support for Ouya controller added.
2014-06-18 16:15:48 -04:00
Latif Khalifa
ffd0e6b79d [Branding] Linux scripts now made from template by cmake 2014-06-18 18:35:29 +02:00
Inusaito Sayori
a7728b87fc Touchup-fix for Issue 1549: Keyboard camera panning only works in 3 directions using WASD keys.
I didn't like the way Advanced menu flickered, so I provided a setting to prevent the toggle that way altogether.

Adds LiruUseAdvancedMenuShortcut
2014-06-18 09:47:08 -04:00
Inusaito Sayori
c218789abc Repeats per meter goes negative when flipping, let it be modified while in the negative without clamping to a positive minimum. 2014-06-18 09:32:59 -04:00
Inusaito Sayori
3656cb9fdb MAINT-4001 : Make Received Items not movable (protected), consolidate Received Items folders which may have been moved
Work by Merov Linden.
2014-06-18 08:05:49 -04:00
Sim Federal
e93fdf4615 Added region positions to the world map tiles
This feature added the setting 'SFMapShowRegionPositions'
2014-06-17 14:06:42 -05:00
Inusaito Sayori
6722e25cbe Fix Issue 1182: Script Window Resize Issue 2014-06-17 13:36:29 -04:00
Lirusaito
790db4283c STORM-2018: Group invite fails to let you join groups when groups maxed even when you leave group 2014-06-17 12:57:52 -04:00
Lirusaito
a0359473ff STORM-2011: Group member lists not loading properly
Work by Ansariel

For us, this is just to disconnect properly, we didn't have this because it was broken.
2014-06-17 12:56:43 -04:00
Lirusaito
ccfdcce5c1 MAINT-3187: Name list controls do not properly resolve avatar names
Work by Ansariel

For us, this is just to disconnect properly, we had this commented out because it was broken.
2014-06-17 12:54:26 -04:00
Lirusaito
811849fa23 Attempt to fix Issue 1154: Streaming Audio Display no longer stays enabled across relogs 2014-06-17 12:51:04 -04:00
Inusaito Sayori
1051fd9d42 Feature Request: Show how many scripts are actually running when doing a script count (also shows mono!) 2014-06-17 11:39:03 -04:00
Inusaito Sayori
5490a992ca Revert "[Preferences Refactor] Remove window size combo box from graphics preferences"
The issue wasn't the resolution box, and it apparently has its uses.
This reverts commit ac106b0aff.

Conflicts:
	indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml
2014-06-16 21:43:43 -04:00
Inusaito Sayori
2d29fb8d15 Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer 2014-06-16 16:09:29 -04:00
Aleric Inglewood
589035c1db Attempt to fix gray avatars on mobile networks.
Ported from
e879862791
2014-06-16 21:02:27 +02:00
Shyotl
8f6a578ec0 Migration to LLMatrix4a instead of glh::matrix4f 2014-06-15 22:42:32 -05:00
Inusaito Sayori
a2fcf4edac Touchup to export perm enablement in default permissions
(not convinced this feature is working, though)
2014-06-14 23:18:48 -04:00
Inusaito Sayori
f56ac5210c [Warnings] Fixed warnings that Friti reported, thanks friti! 2014-06-14 18:21:20 -04:00
Inusaito Sayori
576069a84d Fox knot 2014-06-14 16:26:29 -04:00
Inusaito Sayori
7ea7d4cf6c Fix any and all crashes relating to initialization of UI components that may need the name cache to be initialized already. 2014-06-14 15:40:36 -04:00
Inusaito Sayori
21e1359b37 Confirmation for removing users, also reposition the remove button icon 2014-06-14 15:38:33 -04:00
Inusaito Sayori
eebee9b7c1 [STORM-68b] Default permissions floater overhaul
Adds separated default permissions for Objects, Uploads, Scripts, Notecards, Gestures and Wearables.

Compatible with Export Permission
Backwards compatible with default permissions for objects on regions where AgentPreferences capability is not available (opensim users rejoice!)

These changes to llfloaterperms are made available under lgpl, if there's a v3 that wants to adopt default export permission for opensim.
2014-06-14 15:32:50 -04:00
Sim Federal
bfc986a97d Fixed the spamming of has left sim
Bumping into the edge of a region without
a neighboring simulator would spam has left
and has entered the sim. This will now check
if the position is a valid global, if position not valid
then it will assume you're still in the same simulator.
2014-06-13 04:20:17 -05:00
Inusaito Sayori
d65a52242e Fox a small mistake in the last commit. 2014-06-13 05:12:41 -04:00
Inusaito Sayori
c82c791061 Whoops, that was C++11, that won't work for Linux and Mac. (code change only) 2014-06-12 08:51:54 -04:00
Inusaito Sayori
bcd18a01d8 [Preferences Refactor] In vanity->tags, remove color swatch disable logic since it doesn't make much sense anymore and isn't refreshing soon enough. 2014-06-12 07:26:04 -04:00
Inusaito Sayori
53a4931974 Group feature request: add ability to not turn when right clicking on objects
Adds RightClickTurnsAvatar to debug settings, defaults to true.
2014-06-12 06:13:33 -04:00
Inusaito Sayori
1f7751618e Solve Issue 1541: Remove old Logins
Little trash button next to the username box added, as its tooltip explains, if you have a valid entry selected and you click it, that entry will be removed.
My test avatar was a fake entry by the name Garbage Tax
Just thought I'd give that to the googles... enjoy~
2014-06-12 01:27:54 -04:00
Inusaito Sayori
497babe8e9 Fix Issue 1540: SLURLs not openable from chat? 2014-06-11 20:52:47 -04:00
Inusaito Sayori
973a90a34d Address Issue 1063: Compatibility azerty
It's dynamic, no need to relog!
Look under input preferences for "Use azerty layout instead of qwerty layout"
2014-06-11 20:02:34 -04:00
Inusaito Sayori
3cff5cd1a8 Only determine DumpDir in one place, LLDir::getDumpDir, not in llcrashlogger.
Also spaces tabs in getDumpDir
2014-06-11 14:36:41 -04:00
Inusaito Sayori
8766335708 Up the maximum field of view to 320, from 175, on request from Tazy Scientist
Better for reallllly wide screens and multiscreen setups, apparently.

Also, let's merge with v-r while we're at it, since llcamera.h requires a large-ish recompile
Nothing functional though.
And some license updates to some identical files in llmath.
2014-06-11 03:24:46 -04:00
Inusaito Sayori
908fc939b1 Feature Request: Next owner perms for scripts
In System->Building preferences, on the top right side.
2014-06-10 11:23:27 -04:00
Inusaito Sayori
73c4557a45 STORM-1117 does not affect us, allow calling cards in prims
Issue was due to v2 name resolution, our calling cards are old school and don't do this.
2014-06-10 08:51:09 -04:00
Inusaito Sayori
accfcbbf5c Restore the old behavior of not derendering muted people
This can be switched off with LiruLegacyDisplayMuteds in debug settings.
People have been annoyed that muted avatars disappear, and since we have the derender system anyway..

Also Sync llvoavatar.cpp with v-r a bit
(okay, fine, alot)
2014-06-09 10:10:03 -04:00
Inusaito Sayori
5a36450e01 Allow multi-select for participant lists, for multi-user operations via right click menu. 2014-06-09 06:54:53 -04:00
Inusaito Sayori
839f4eab7e Feature Request: chatbar as commandline "/regionsay msg" to do region-wide messages without needing to go through the region/estate floater. 2014-06-09 06:50:48 -04:00
Inusaito Sayori
fec0559d11 Introduce debug setting, LiruNewMessageSoundIMsOn, for defaulting ding of new IMs on.
This setting is off by default and I don't intend to give it a gui yet.
It probably will go in Chat UI, eventually.
2014-06-09 00:02:54 -04:00
Inusaito Sayori
e46fc0a805 Portability Mode!
Just add --portable to the shortcut
or use the provided shortcut as a template,
though it's likely the provided shortcut will not work on other computers, because the drive letter will change
2014-06-09 00:00:43 -04:00
Inusaito Sayori
fb7751360c Update Windows 64-bit Hunspell, thankies Drake~ 2014-06-08 20:42:26 -04:00
Inusaito Sayori
0c2e7d7028 Pressing up on right stick should turn the camera up in flycam, logically. (xbox controller) 2014-06-08 09:05:39 -04:00
Inusaito Sayori
fe2e68b410 These defaults seem more effective for my DS3 in flycam.
If anyone has a real XBox 360 controller and doesn't like them, let me know, we can totally work together on this
2014-06-08 08:23:48 -04:00
Inusaito Sayori
166c4df0b3 No more gross grey bars on the sides of snapshot thumbnails!!
Also random snapshot floater code sync with upstream in small places because it'll need doing at some point..
2014-06-07 11:50:31 -04:00
Inusaito Sayori
68684855c6 Bump link num starting point from 0 to 1
Based on script testing, and the fact that the root prim is 1, not 0.
2014-06-07 06:30:52 -04:00
Inusaito Sayori
fa0de18ffe [Voice Update] Small sync, less warning spam is likely
Should fix group chats sometimes not showing anyone. (Seemed to for me! ^*^)
2014-06-07 06:27:36 -04:00
Shyotl
24ca32f9f7 Replace gluProjectf/gluUnprojectf with own versions. Also changed gGLModelView/gGLProjection and other related matrices to LLMatrix4a. 2014-06-06 01:59:04 -05:00
Inusaito Sayori
f63de0d0cc Feature Request: Make Inspect button a toggler~ 2014-06-05 23:54:15 -04:00
Inusaito Sayori
f6db6058e1 Mass fixup to appearance mode ui overhead!
Should contain no functional changes, ust that all ui in appearance mode is now cached instead of calling getChild per frame.
Switches from hiding min/max param text every frame to force-drawing in draw call and setting invisible (llscrollingpanelparam.cpp/the corresponding xml)
Cleans up some old commented out code.
Moves some simple, one-call functions into their calling bodies.
Also, for some reason I had to adjust the alpha checkboxes, totally confused why they were out of line... maybe they had been already? I don't see a changed line that did positioning.

Contains spaces to tabs fixes, please view without space changes (You have been warned!)
2014-06-05 21:41:59 -04:00
Inusaito Sayori
d23632ef46 [RLVa] Yay updates~
e4a6e0d257c1 - fixed : @recvim=n isn't actually blocking the incoming message
35869fc884e9 - internal : minor refactoring of the process of updating the navigation and top info bars when toggling @showloc

9688630000ad - changed : show a limited context menu in the nearby people panel when @shownames restricted
    -> "Offer/Request Teleport" (filtered)
    $ Singu Change: Adds Recording of teleport offers to chat (if sending less than 10), one day I'll get around to doing this right into IMs

Noticed RLV.EnableIfNot was not being used, so I plugged it in for windlight.
Future Note: This brings us up to 417d759f0fa9 on the RLVa tree.
2014-06-03 20:29:55 -04:00
Inusaito Sayori
1048f213c7 Fix maximized windows being repositioned to no longer maximized when applying graphics settings. 2014-06-03 00:56:24 -04:00
Inusaito Sayori
98d88bff94 [Preferences Refactor] Oops, that shouldn't be there. 2014-06-02 23:41:03 -04:00
Inusaito Sayori
861fccd2d6 Address Issue 1301: Depth of Field preferences
Thanks a lot to Niran for assistance in this. Tooltips are from Black Dragon's machinima panel.
Note: Moves Depth of Field checkbox into the new Depth of Field tab.
2014-06-02 23:40:35 -04:00
Inusaito Sayori
715c3b8510 [Preferences Refactor] Cleanup on llfloaterpreferences
Moves to calling refreshEnabledState directly from LLPanelDisplay instead of bouncing around in LLFloaterPreferences first or using static proxy functions
Cleans up unused cached button pointers and old style static callbacks.
2014-06-02 23:24:25 -04:00
Inusaito Sayori
3c6c7c4138 [Preferences Refactor] Further cleanup
Moves to visibility_control and enabled_control instead of using callbacks, this lightens the load on opening preferences, and makes them responsive even to debug settings changes
Removes the moving m for meter text with draw distance, I don't think anyone cares if it's a little to the side of the number.
Adjustment of tabs to spaces in xml.
Return early when disabling unavailable settings if shaders are unavailable.
Cuts back on single-call functions in favor of direct binds.
2014-06-02 23:20:30 -04:00
Inusaito Sayori
95106ca1c2 [Preferences Refactor] Handle Hardware tab earlier to avoid early return when custom isn't displayed 2014-06-02 20:25:01 -04:00
Inusaito Sayori
ac106b0aff [Preferences Refactor] Remove window size combo box from graphics preferences
Windows can be resized on their own, we do not need this box
This should also fix window resizing when applying preferences.
2014-06-02 20:22:15 -04:00
Inusaito Sayori
001e45627b Feature Request: Add an option to toggle Animating when going into Appearance Mode, option is in vanity->main preferences 2014-05-30 06:38:13 -04:00
Inusaito Sayori
b8c3457644 Set RenderTextureMemoryMultiple to 1.0 on Macs, because the people asked for it.
If this explodes, I'm sure we'll see issues reported against it soon,
but in private testing we've yielded nothing but good results.
2014-05-29 22:43:55 -04:00
Inusaito Sayori
5f6dcfa82a [UI Overhaul] Restore LLContextMenu::appendContextSubMenu definition, lost in last commit. (Thannks for catching this, Tazy!) 2014-05-29 20:12:31 -04:00
Inusaito Sayori
f2dd944acd [UI Overhaul] Migrate LLContextMenu (and LLPieMenu) to the bottom of llmenugl.cpp to better diff with upstream. 2014-05-28 23:33:53 -04:00
Inusaito Sayori
d0f69ebb75 [UI Overhaul] LLMenuGL sync: doIt() --> onCommit() 2014-05-28 23:03:00 -04:00
Inusaito Sayori
04737fb0e8 [UI Overhaul] Missed this in c640585 2014-05-28 22:59:52 -04:00
Inusaito Sayori
d78550e83e Introduce APP_SITE for easy rebranding of viewer website from strings.xml. 2014-05-28 22:54:40 -04:00
Inusaito Sayori
c640585bc3 [UI Overhaul] Introduce LLMenuGL::insert from upstream and remove append/addChild wrappers in favor of insert 2014-05-28 22:52:29 -04:00
Inusaito Sayori
a926cdc5be [UI Overhaul] LLMenuGL sync 2014-05-28 22:08:01 -04:00
Inusaito Sayori
43e66b57a0 [UI Overhaul] Scrollable Menus.. just the implementation for now, not actually used.
This worked initially(early testing yesterday), but since then it seems not to, either way, implementation part is out of the way, so committing.
2014-05-28 21:50:18 -04:00
Shyotl
ee60a9801b Appease some nVidia cards/driversets regarding skinned shaders. 2014-05-27 20:18:48 -05:00
Inusaito Sayori
fb69220b95 Merge branch 'master' of git://github.com/lkalif/SingularityViewer 2014-05-27 12:57:45 -04:00
Inusaito Sayori
1cf7f67af5 Viewer name branding fixes, make rebranding way easier.
Also fix up french menu leaving functions around..
2014-05-27 12:54:33 -04:00
Latif Khalifa
8497ba1898 Use @style@ cmake escapes for the linux wrapper script
This avoids cmake messing up shell variables
2014-05-27 17:39:37 +02:00
Lirusaito
234259da91 Fix Issue 1299: Default Build settings for transfer permission not applied to a newly rezzed box
Mostly a workaround for next owner transfer being on by default
2014-05-26 13:51:41 -04:00
Lirusaito
ef7f309012 Redundant check is redundant 2014-05-26 09:32:50 -04:00
Lirusaito
d372fa1a0f Whoops, fixup locally experienced crash with lookat beacons. 2014-05-25 14:47:45 -04:00
Lirusaito
ea9005868b Switch out bumpers being roll for bumpers being y axis (up/down) with the xbox controller
This seems more widely used, and roll does nothing in Avatar movement so this is more useful
If people want it the other way, they can just switch it themselves.
2014-05-25 12:57:48 -04:00
Lirusaito
0a3a4a51bd Feature Request: Add an option to "Make rightclick zoom instantaneous, not smooth" (in Input & Camera preferences) 2014-05-25 12:44:48 -04:00
Latif Khalifa
1dbd913d9d Branding: generate wrapper script with cmake 2014-05-25 18:18:47 +02:00
Latif Khalifa
22cded7ccc Made breakpad symbols generation branding neutral 2014-05-25 08:27:00 +02:00
Latif Khalifa
4851f1ad48 Branding support for Linux packaging 2014-05-25 04:07:34 +02:00
Inusaito Sayori
0d94dd7bf8 Pick up a few changes from Alchemy for LookAt beacons
Implements lines from avatar to their lookat beacons
Implements namesystem so that Display Names can also be shown with beacons instead of just legacy

New options are available in the Security & Privacy tab of System preferences
2014-05-24 05:26:32 -04:00
Inusaito Sayori
bbe7f6adfb Enable Multiselect in groups, and enable EditMenuHandler when a scrollable list is focused!
Allows Ctrl-A to select all in a list (Like for selecting all groups and unticking chat with a single click)
Ctrl-E to deselect
Ctrl-X/Ctrl-C to copy a list (useful for saving ban lists and such!)
2014-05-23 19:37:32 -04:00
Inusaito Sayori
828941a204 Meeting Request: Pick up LL's changes to land impact (Also introduces Land Impact floater)
Small change to lltextbox allowing us to use value attribute with <text/>'s YAY!!

Cleaned up in llfloatertools as well to better diff.
2014-05-23 06:19:43 -04:00
Inusaito Sayori
2ce3f2c131 Meeting Request: Display date not just time in Teleport History
Will not change old entries because of the stupid way teleport history is saved.
Seriously, this floater needs a rewrite... we should just use v3.
2014-05-23 03:39:35 -04:00
Inusaito Sayori
8943552c1c Meeting Request: Change System Preferences' Security tab to Security & Privacy 2014-05-22 19:58:16 -04:00
Inusaito Sayori
dadbb00b85 Introduce a setting for Automatically scrolling to the bottom of a chat when the chat gains focus
Preferences->Adv. Chat->Chat UI, Autoscroll to the end of chats when they regain focus.
This defaults to false, unlike the legacy behavior.

Partial revert of "Feature Removal!: Do not scroll to the end of chats when the corresponding chatbar regains focus!"
2014-05-22 19:46:15 -04:00
Inusaito Sayori
852a8407c8 Feature Removal!: Do not scroll to the end of chats when the corresponding chatbar regains focus!
Focus is given to chatbar on floater focus, so this got in the way.
This feature was never really worth it.
2014-05-21 22:57:08 -04:00
Inusaito Sayori
bfbbcad8e5 Feature Touchup: Add backup destination to Emergency Teleport out of region within last 20 seconds before restart feature
Falls back if first landmark is not in inventory or invalid, region is offline, or the current region is your location
Item drop target is right below the original one in System->Security prefs.

Thanks again to the citizens of Fluffy for enduring these restart tests.
2014-05-21 19:07:11 -04:00
Inusaito Sayori
c684987908 Fix bugs introduced in 77a13963bb
Fixes Shiny/Bumpy combo boxes being broken
Fixes UI warning for "label glossy" not existing, it was "label glossiness".
2014-05-20 23:37:59 -04:00
Melanie
d0c66e5efb Actually hide the export box on SL. Must have been asleep when I coded that. 2014-05-19 14:59:07 +02:00
Shyotl
53b8f70de8 Merge branch 'master' of git@github.com:Shyotl/SingularityViewer.git 2014-05-17 18:26:07 -05:00
Shyotl
a1eb30ae87 Keep old non-swizzle method around since GL_ARB_texture_swizzle has poor support prior to 3.3 (on osx especially) 2014-05-17 18:25:21 -05:00
Shyotl
c4cb9de44b Merge branch 'master' of git@github.com:singularity-viewer/SingularityViewer.git 2014-05-17 16:30:21 -05:00
Shyotl
0a89503edd Renamed glUniformMatrix3x4fvARB to glUniformMatrix3x4fv, since I don't think it ever had the ARB postfix. Also use its the properly named (although identical to the current) function pointer signature. 2014-05-17 04:04:33 -05:00
Shyotl
f12bd741e2 Merge branch 'master' of git@github.com:Shyotl/SingularityViewer.git
Conflicts:
	indra/newview/llvopartgroup.cpp
2014-05-17 03:40:10 -05:00
Shyotl
e35039faf7 Remove deprecated gl call in renderComplexityDisplay. 2014-05-17 03:34:33 -05:00
Shyotl
a756943628 Fix a LLVertexBuffer::validateRange call that I hosed up pretty badly. 2014-05-17 03:33:33 -05:00
Shyotl
a9c3e13e5e Removed some diagnostic spam pertaining to shaders. 2014-05-17 03:32:40 -05:00
Shyotl
67c8ac2b04 Skinned shaders were exceeding maximum amount of vertex uniforms on amd hardware.
-Changed the transform matrix uniform to a 3x4 matrix and packed translation into it to free up uniforms. (3x3 is converted to 3x4 internally, so we were needlessly eating 3*52 extra uniform slots. translationPalette might also have been treated as a vec4 internally too, wasting 52 more slots.)
-matrix3x4 requires opengl2.1 and newer, so added a new featuretable mask.
-Also added a featuretable mask to disable hardware skinning and deferred shading on hardware with less than 1024 vertex uniforms.
NOTE: On old old old amd hardware, evidently a 3x4 matrix might be upgraded to 4x4. I'm unsure, but I doubt such hardware has 1024+ uniform components available to begin with. 4x3 supposedly doesn't do this, but opengl is column-major, so this makes little sense.
2014-05-17 03:31:45 -05:00
Inusaito Sayori
82044399e4 Brought in Realistic Mouselook option from Black Dragon
Look at the top area of Input & Camera preferences
Aside from tweaks to the code, all credit to Niran.
2014-05-15 21:01:11 -04:00
Shyotl
fdcf2eda5a Decouple vbo validation from LLDrawInfo. Such required vbo's to be initialized before drawinfo creation/modification, which is no longer the case with llvovolume. ('RenderDelayVBUpdate'[although removed in Singu] also fails the same assumption.) 2014-05-15 18:44:10 -05:00
Shyotl
e0997f1f04 Decouple vbo validation from LLDrawInfo. Such required vbo's to be initialized before drawinfo creation/modification, which is no longer the case with llvovolume. ('RenderDelayVBUpdate'[although removed in Singu] also fails the same assumption.) 2014-05-15 18:39:35 -05:00
Inusaito Sayori
58859ee709 Minor touchups to spanish translation 2014-05-15 17:36:33 -04:00
Shyotl
c3771e2fd5 Removed unused preprocessor definition in objectSkinV.glsl 2014-05-15 16:23:14 -05:00
Inusaito Sayori
2e49365b0f Merge branch 'master' of https://github.com/DamianZhaoying/SingularityViewer 2014-05-15 15:37:42 -04:00
Inusaito Sayori
cd87aadab3 Missed a spot. 2014-05-15 00:42:22 -04:00
Inusaito Sayori
e58f8856f4 Add support for Controller Keys, inspired by similar code by CtrlAltStudio Viewer
Dear Alpha Users who are curious about this:
A = Alt
B = Shift
X = Ctrl
Y = Escape
Back = Toggle Flycam mode (Use this, it's fun!!!)
Start = Toggle Cursor mode
Right Stick Click = Toggle Mouselook
Left Stick Click = Jump/Fly

Enjoy, I know I do!
2014-05-14 23:48:27 -04:00
Inusaito Sayori
18a48e6609 Fix the inverted mouse issue. 2014-05-14 23:16:55 -04:00
Inusaito Sayori
929b75989c Sync with alchemy/v-r for flying instead of jumping on button press (Left Stick Click) 2014-05-14 22:58:16 -04:00
Shyotl
7d98030edc Use the right diffuse shader for skinned deferred diffuse simple object shader. 2014-05-14 19:43:03 -05:00
Shyotl
846d573dd0 Kill stray #endif that snuck into commit. 2014-05-14 16:45:55 -05:00
Shyotl
5805fe636a Determine if to stuff shiny data into alpha component a bit differently. Cuts out a lot of crazy logic and lets us choose based off of target renderpass. 2014-05-14 03:38:16 -05:00
Shyotl
3db9c6a9ff Try mask-based object shader configuration, instead of a bazillion hard-coded shader globals. Should be a bit more consistent. (non-deferred only, for now)
Also abuse discard in alpha shaders, instead of processing invisible fragments.
2014-05-14 03:30:02 -05:00
Shyotl
22bcf83cb9 Toyed with gl init ordering. Fixes adaptive vsync. May explode on linux, not that adaptive vsync works there, but it should in theory work there if we ever port to sdl2. If it does explode, I'll know shortly... probably. 2014-05-14 03:10:34 -05:00
Shyotl
117eca3c98 Try some swizzling instead of forcing everything to rgba8 with core profile. Avoids manual conversions with scratch buffers. Works for all pixel datatypes. Cleaner. Uses less vram.
Also, fixed textures when running core pofile.
2014-05-14 03:05:53 -05:00
Inusaito Sayori
81affe719f Add a setting to automatically decline and leave incoming conferences
Look under Communication preferences for "Block incoming conference chats" to activate.
2014-05-14 03:34:32 -04:00
Inusaito Sayori
3febec4aa4 Merge up CtrlAltStudio and Alchemy for XBox360 support
Can't seem to get scrollies working in cursor mode, odd.. need to look into that.
I need to figure out if inverted Y axis is just for me on my Dual Shock 3, though it seems to work usually... if this is the case I might flip it in the code.
More work needs to be done to get ctrl/alt/shift support from CAS, too.

I just wanted to get today's work out of the way and wrapped up, so here it is.
2014-05-14 02:23:55 -04:00
Inusaito Sayori
a78c6072ce Sync llviewerjoystick with upstream sources.
Replaces old constant of dividing by 3 with debug setting for multiplying: FlycamBuildModeScale
Relicenses to lgpl.
2014-05-13 21:27:18 -04:00
Lirusaito
aa6a57be63 Remove "wanna->want to" from auto replace, it is stylistic. 2014-05-12 19:26:16 -04:00
Inusaito Sayori
fd29dd9508 Spaces to Tabs for Last commit 2014-05-09 22:19:52 -04:00
Bob Shaffer II
5080ebf88f reverting some changes to llvovolume that seems to break animated textures
Signed-off-by: Siana Gearz <siana.sg@live.de>
2014-05-10 03:13:15 +02:00
Siana Gearz
873df7805b Merge branch 'master' of git://github.com/Lirusaito/SingularityViewer 2014-05-10 03:12:32 +02:00
Inusaito Sayori
009fb10927 Feature Request: Add AutoresponseOnlyIfAway to send autoresponses only if in AFK or FakeAway modes 2014-05-09 20:32:38 -04:00
Inusaito Sayori
3898d29741 [Preferences Refactor] Touchup on voice prefs borkage. 2014-05-09 20:31:05 -04:00
Siana Gearz
1c521a3743 Merge branch 'master' of https://github.com/lkalif/SingularityViewer 2014-05-09 22:18:10 +02:00
Siana Gearz
098d1b30ff Merge branch 'master' of git://github.com/Lirusaito/SingularityViewer 2014-05-09 22:15:38 +02:00
Siana Gearz
484108dafc Fix VS2012 64-bit debug build 2014-05-09 22:14:47 +02:00
Inusaito Sayori
029d260ad8 Feature Request: Persistent setting for AllowSelectAvatar (su useful!) 2014-05-09 10:39:07 -04:00
Inusaito Sayori
e6bc8f8583 Enable custom and window resolution for snapshots to inventory and set the max size to 1024, not 512. -- on request of Vivena (and the in-world group as a whole) 2014-05-09 09:30:13 -04:00
Inusaito Sayori
77a13963bb Joint effort with Alchemy Viewer to make build floater a lot lighter on FPS
Gets rid of all those pointless callbacks and static workarounds for legacy callback system.
Should massively improve FPS while build floater is open
Fixes getChild UI Warnings
Removes dumb func
2014-05-09 06:40:53 -04:00
Inusaito Sayori
656eacbb09 Merge branch 'master' of git://github.com/Shyotl/SingularityViewer 2014-05-08 19:57:01 -04:00
Shyotl
98f9a09b39 sunlight_color_copy need only be vec3. 2014-05-08 16:39:41 -05:00
Shyotl
7e8e8bdb26 Disable some diagnostic gunk eating memory. 2014-05-08 16:35:12 -05:00
Shyotl
e2a0f801b9 Have LLRender::color4ub fall back to uniform if bound vbo lacks color attribute. Fixed fixed-function call in LLFacePool::LLOverrideFaceColor::setColor. 2014-05-08 16:29:53 -05:00
Shyotl
75b31b4151 Fix a nullptr usage. 2014-05-08 16:24:24 -05:00
Shyotl
f0763fd31c Tweaked context-recreation logic to force a 0xAA context when fbos are in use. Should also handle toggling of fbo checkbox a bit gracefully as well. 2014-05-08 15:48:08 -05:00
Shyotl
162e7b7699 Fixed a silly mistake that was causing vsync to be enabled when it should have been. Also fix typo in objectSkinV.glsl previous commit 2014-05-08 15:30:02 -05:00
Shyotl
7158a3c83d Fixed an annoying showstopper regarding rigged attachment vertex corruption. Rigged meshes have can have poor weighting, causing potential div-by-zero issues. 2014-05-08 15:11:12 -05:00
Inusaito Sayori
1fa30dd337 Fix Issue 1502: The Builders' Brewery says our prim torture behavior is nonstandard
Our uictrl limits were in need of a quick tune-up.
2014-05-07 06:54:17 -04:00
Inusaito Sayori
250049537f Feature Request: Add option to autominimize the region restart floater And Allow changing/shutting off its sound (from gui)
These new options are at the bottom of System->Security preferences.
2014-05-07 06:53:35 -04:00
Inusaito Sayori
76e5311320 [Preferences Refactor] Cleanup of voice prefs code
Also attempt to add a local enablement control, it's not quite clear where these are supposed to hook in, so it's unused for now, but it would have replaced onCommitEnableVoiceCheck.
Also fix the location of the voice is disabled textytext, it was too on top of the next checkbox.
2014-05-07 03:52:14 -04:00
Inusaito Sayori
11098cd6d4 [Preferences Refactor] Clean up of useless code for enablement and callbacks.
This tag will be used for refactor and updating of most of our preferences panels:
  This will include code changes that remove or condense old code
  This will include preferences being moved around to more logical locations
  This may include splitting up and/or condensing of tabs and/or subtabs for more logical placement of preferences
  This may include code changes that allow making changes to preferences faster and easier
  This will not include adding preferences
2014-05-07 03:20:04 -04:00
Siana Gearz
78a0b347fc Fix 64-bit project generation under Cygwin 2014-05-04 08:05:05 +02:00
Latif Khalifa
08a23de051 Restore compiler warnings flags.
Previous work on enabling the build on the latest Mac OS and
Xcode compiler mistakenly took out compiler warning flags.

This restores previously used flags.

Issue noticed by Sovereign Engineer.
2014-04-30 07:29:23 -07:00
Inusaito Sayori
a02ad53c73 Fix bulk import of notes, scripts and gestures, and clarify file menu 2014-04-28 20:36:46 -04:00
Inusaito Sayori
9400701c96 Synced up llviewerobjectbackup with Cool VL Viewer
Benefits:
-Support for exporting Materials (Normal and Specular textures)
-Fixed support for Object Physics export
-Fixed support for Light Image export
-Switch to use of Boost unordered containers
-Checking for invalid perms on textures is now optimized by saving invalid ids to a container
-GravityMultiplier parameter is now Gravity because that just makes way more sense.
-We support export of legacy flag parameters again to be compatible with older viewers
-Code comments are now a little clearer
-We now wait a little if objects haven't loaded yet when we try to export them
-We no longer allow changing default texture ids via debug settings on opensim regions that support the export permission
-Bit of reordering to better diff with Cool VL Viewer, since it's essentially our only upstream.
-Removes dead code/commented codestuffs

Please view the diff without space changes, otherwise you'll lose your mind.

Merci Henri!
2014-04-28 17:48:39 -04:00
Latif Khalifa
aa983108e8 Possible fox for crash signature 5284 by Aleric 2014-04-28 21:12:37 +02:00
Damian Zhaoying
7dca333166 Update spanish translations. Add translations for news floaters, dinamyc toolbars, RLVa and autoreplace. 2014-04-28 15:51:48 -03:00
Lirusaito
0f1ecf66ab Possible Fix for Issue 1499: Login screen disappears on non-SL grids after logging failure
Also should fix when this would happen on poor/dead connections.
2014-04-27 18:50:37 -04:00
Lirusaito
74984b5a3c Further cleanup of im floater draw call due to last commit 2014-04-27 18:46:50 -04:00
Latif Khalifa
c5d5984885 Checking for ChatSessionRequest cap is not neccessary for establishing private voice calls.
Addresses issue 1293
2014-04-27 21:37:52 +02:00
Damian Zhaoying
c1ccfcb988 Merge remote-tracking branch 'Liru/master' 2014-04-27 13:53:47 -03:00
Lirusaito
51dc0550d5 Minimap mark colors touchup
Now shown in tag without tag color statuses needing to show.
2014-04-27 11:18:31 -04:00
Lirusaito
ac9e36549b Fix right clicking dots no longer working on the minimap, broken {} pair that slipped my eyes. 2014-04-26 18:08:19 -04:00
Lirusaito
009e9a598a Introduce ExodusMapRolloverCircleColor for controlling the color of the new minimap selection circle, turn the alpha to zero to make it disappear completely (it's already quite light now) 2014-04-26 18:07:28 -04:00
Lirusaito
1502ef2661 Fix for an internal crash, could only happen if settings were copied into install improperly, but better safe than sorry. 2014-04-26 10:19:04 -04:00
Lirusaito
40f9e12bdf Fix for Issue 1472, prevent what was probably a null pointer in a bind
Oddly, this only happened to some people, but on any OS, which leads me to believe that initialization order may need some looking at, but that's not terribly important now.

Removes toolbar toggle from floater dictionary, in favor of using setting toggle
Since we could always just hook up a control to a button if we wanted to add such a button somewhere anyhow, this has no effect on future either.
2014-04-26 10:17:47 -04:00
Lirusaito
2fc783e67e The people want link parsing on! Let them have links in all text editors that aren't allow_html="false"! 2014-04-26 09:47:56 -04:00
Inusaito Sayori
4f8e6a188a Bypass canClose check for new groups by calling onClose directly. (Fixes making new groups!) 2014-04-25 11:52:25 -04:00
Inusaito Sayori
b0e44ad1bd Solve Issue 624: minimap multiple selection tool
Adds a circle when you mouse over the minimap, beneath your cursor
-This circle is the effect range of your right click+mark
-Shift+scroll to change the size of this circle (ExodusMinimapAreaEffect)
-- Set the debug to 1 to have basically the same range as before (unless dots are stacked)
-This circle is also how many avatars are shown in the tooltip
-When this circle is over avatar dots, they change color (ExodusMapRolloverColor)
The menu functions still only work on the closest dot to your cursor on right click...
Thanks to Exodus for the majority of this code, the rest is my work and updates to be closer to LL in places.
2014-04-25 04:11:35 -04:00
Inusaito Sayori
4a630b1780 Make it clear that item drop targets are for items. 2014-04-24 22:12:20 -04:00
Inusaito Sayori
ffa5e6099d Address Issue 1290: Bumps recorded in chat window
Adds debug setting AnnounceBumps and a toggle in Preferences->System->Security
2014-04-24 21:46:57 -04:00
Inusaito Sayori
8d1cd7008f Fix bug of being unable to change group owned parcel's visibility in search. 2014-04-24 19:48:27 -04:00
Inusaito Sayori
31b5c5e9dd Enter Export subpiemenu, no longer part of Tools 2014-04-24 19:47:17 -04:00
Inusaito Sayori
0e21a16c1c [STORM-1980] Singu Special: Emergency Teleport out of region within last 20 seconds before restart
Look in System preferences under the Security tab, at the bottom.
Debug setting is EmergencyTeleportLandmark, reset to turn off.

Also, thanks to everyone in Fluffy who put up with the tests of region restart notifications today,
I know it was annoying, thanks especially to the EMs for allowing me a testbed.
2014-04-24 01:33:04 -04:00
Inusaito Sayori
f666384a1d [STORM-1980] Part 3: Region Restarting camera shake reset also pokies at sound trigger
Don't send sound through the region, it's logically a UI sound. What even is that otherwise?
2014-04-24 01:25:52 -04:00
Inusaito Sayori
afacfcee94 [STORM-1980] Part 2: Floater and shakeyshake
Shake is off by default, turn on AlchemyRegionRestartShake to activate
2014-04-23 23:54:59 -04:00
Inusaito Sayori
7262bf96b8 [STORM-1980] Part 1: Notifications with timestamp and sound 2014-04-23 10:58:14 -04:00
Inusaito Sayori
3db489f4df Feature Request: When someone is marked on the minimap have that color persist on the radar and their tags
Jus' look at dat color~
2014-04-23 02:50:51 -04:00
Inusaito Sayori
6526c28e47 Fixup for "Feature Request: On login, open Local Chat, Communicate, and/or Contacts" 2014-04-23 01:35:52 -04:00
Inusaito Sayori
e473b9bf10 Fix a common crash when people would upload invalid xmls
Ill-gotten xmls just don't parse the same way...
2014-04-23 01:05:32 -04:00
Inusaito Sayori
0bde458c27 Allow minimum Sun Size of 0.01 instead of 1, like Black Dragon. 2014-04-22 22:20:46 -04:00
Inusaito Sayori
66739ac820 Preferences touchup now that we have log launching on mac 2014-04-21 18:59:49 -04:00
Inusaito Sayori
4a3763d8d1 Feature Request/Bug Fix: On login, open Local Chat, Communicate, and Contacts if they were open last session. 2014-04-21 18:31:41 -04:00
Cinder
4230127459 De-brand currency exchange 2014-04-21 18:09:08 -04:00
Cinder
a4c672252d Launch transcripts in external text editor on mac too 2014-04-21 18:05:45 -04:00
Lirusaito
d5d0473487 [LLMeshRepo sync] Fix mesh not loading 2014-04-19 01:09:12 -04:00
Lirusaito
9bbad1f8f0 [Warnings] Fix trigraph warning. 2014-04-19 00:47:02 -04:00
Lirusaito
0523965822 [LLMeshRepo sync] relwithdebinfo compile fixes 2014-04-19 00:25:11 -04:00
Lirusaito
cb8cd702e1 [LLMeshRepo sync] Linux compile fixy
Note to self: Windows compiler does not care about file casing, be more careful.
2014-04-18 23:51:52 -04:00
Liru
86b5737d51 [Floater Flexibility] French Translation~ Danke Nomade. 2014-04-18 09:17:41 -04:00
Liru
4027ec7a67 [Floater Flexibility] Fix yet another broken button, this time group titles, thanks again to the french singularity group 2014-04-18 04:58:49 -04:00
Liru
c2748a2246 [LLMeshRepo sync] The rest of the changes from upstream 2014-04-18 04:43:46 -04:00
Inusaito Sayori
5c06afc977 [LLMeshRepo sync] AICurl updates toward LLCurl
LLHTTPClient::getByteRange no longer throws AICurlNoEasyHandle, instead it returns whether or not it threw, to match the true/false convention of LLCurl.
- In addition, the header param has been shifted to earlier in this function to ease diffings.
ResponderBase now has static bool isGoodStatus, introduced into the Responder base class of LLCurl
2014-04-17 20:23:48 -04:00
Inusaito Sayori
4c82a5660f [LLMeshRepo sync] Change camelcase LLConvexDecomp to lowercase, so mergetool is happy~ 2014-04-17 18:20:34 -04:00
Inusaito Sayori
beacb5c701 [Floater Flexibility] Fix that the preferences button wasn't working, thanks Nomade for pointing this one out. 2014-04-17 15:47:50 -04:00
Damian Zhaoying
8355331cbe Merge remote-tracking branch 'Liru/master' 2014-04-17 02:18:56 -03:00
Inusaito Sayori
dc9cb07a81 [Floater Flexibility] Part four: Added a floater to change buttons shown on the toolbar
View->Change toolbar buttons

Reuses the old FloaterUploadRect because I'm allowed to be lazy after creating this large control panel
2014-04-16 19:03:07 -04:00
Inusaito Sayori
57fe7d9ad0 [Radar] WHAT?! Why wasn't this committed last night? I know it was... what the heck... 2014-04-16 16:08:20 -04:00
Latif Khalifa
00336de59a Merge branch 'osx_xcode5' of github.com:lkalif/SingularityViewer 2014-04-16 16:44:31 +02:00
Inusaito Sayori
b37b48f039 [Radar] Code overhaul
Brings a new "voice status" column, showing voice use as active speakers floater does.
- Shown by default, look in Extras tab to hide it
Attempt to blend and fix the visibility of the yellow for shout range.
- Requires user feedback, looks good on default and gemini to me

Refactors pretty much all of the code in the avatar list
-Less duplicate vars, less wasted space, more consistent spacing conventions, eradication of BOOL use.
We no longer add (or even evaluate what should be in) icon columns that are hidden
- This prevents icons from showing up even when their columns are hidden.
Minor work on focusing out of draw avatars, though that still won't work, sadly.
2014-04-16 05:30:19 -04:00
Latif Khalifa
42ca1a8994 [clang] Force build with SDK 10.6 2014-04-16 10:55:36 +02:00
Latif Khalifa
db678238ef Merge branch 'master' into osx_xcode5 2014-04-16 09:56:57 +02:00
Lirusaito
861f88dd30 Awesomeness, yayayay! (allows XML changes in indra/newview/skins/ to count for viewer running from a directory in indra on Windows) 2014-04-15 20:06:08 -04:00
Lirusaito
77d42f1eb9 Attempt to cure stupid people being unable to untar properly over old versions without causing massive issues
(Gawd, that is not even proper installation process.... I need a drink)
2014-04-15 20:03:24 -04:00
Inusaito Sayori
364a13017c Merge remote-tracking branch 'fairydust/master' 2014-04-15 19:57:31 -04:00
Latif Khalifa
8183deeb30 [xcode5] WIP: rebuilt clang friendly boost 2014-04-14 21:17:22 +02:00
Latif Khalifa
bb56d0a752 [xcode5] WIP: clang build fix 2014-04-14 21:16:24 +02:00
Latif Khalifa
41eafa4ede [xcode5] WIP: build system changes 2014-04-14 21:14:42 +02:00
Inusaito Sayori
ce7629200f Object Import/Export improvements
Support exporting "material" "clickaction" "flags" and "ExtraPhysics"
Support export of Light Texture feature, the expansion to Light feature.
Initial work to support firestorm's format.
Switched from exporting individual flags fields in favor of exporting one U32 field
- We still support the old single flag fields though we no longer export them.
2014-04-09 20:24:15 -04:00
Inusaito Sayori
5dca06d3d4 So then I said, "Compile, are you crazy?!" 2014-04-08 04:51:18 -04:00
Inusaito Sayori
b1d18c7f29 Address Issue 1298: Add Auto-replace text feature, borrowed from LL~ 2014-04-08 02:12:51 -04:00
Inusaito Sayori
0b2d019e61 Latif's requested touch-ups for IM windows in concise mode.
Profile option for concise flyout.
Fix for ding in multi-user chats breaking button alignment.
2014-04-08 01:07:19 -04:00
Inusaito Sayori
ab0dde7fe8 [Floater Flexibility] Part three and a half: Toolbar code cleanup, toolbar in mouselook option
Go into Preferences->Input and Camera, to find the new option~

Thanks to Cinder for checking that the mac changes build and look nice.
2014-04-08 00:36:44 -04:00
Inusaito Sayori
ef01d2af82 Fix "zombie" lie and tabs/spaces inconsistency in xml. 2014-04-07 16:06:33 -04:00
Damian Zhaoying
08084799b9 Merge remote-tracking branch 'Liru/master' 2014-04-06 14:42:00 -03:00
Inusaito Sayori
3642e401da Fix About and Toolbar prefs buttons being mushed together, thanks for the heads-up Friti! 2014-04-04 19:57:32 -04:00
Inusaito Sayori
094d284e62 Missed a git mv, mac should build after this. 2014-04-04 17:28:19 -04:00
Latif Khalifa
2c7459e08d Supress bool/BOOL comparison warning 2014-04-04 21:29:41 +02:00
Latif Khalifa
315d2c4daf Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer 2014-04-04 21:21:00 +02:00
Aleric Inglewood
e61cabf1ce Remove compiler warning. 2014-04-04 21:13:57 +02:00
Aleric Inglewood
994f409291 Attempt 2 2014-04-04 21:06:30 +02:00
Aleric Inglewood
7d124012c2 First attempt to fix windows compile errors. 2014-04-04 20:58:33 +02:00
Latif Khalifa
4d3c80e273 Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer 2014-04-04 20:08:19 +02:00
Aleric Inglewood
a332a7fc35 Compile fix for motions backport. 2014-04-04 17:33:45 +02:00
Aleric Inglewood
2fb945a489 Fix floating point round off error bug that caused mAnimTime to be decreased in value.
Conflicts:
	indra/llcharacter/llmotioncontroller.cpp
2014-04-04 15:22:18 +02:00
Aleric Inglewood
4d2517d163 Freeze also synchronized avatars when editing an attachment.
On the removal of permYouOwner():

Calling permYouOwner() to determine if an attachment is yours is
not correct: grid gods (and that includes BEFORE requesting admin
status) are marked as owner of everything in their sim.

The reason for that is that otherwise,
  <Melanie_T> if they only had it when actually godding u, the viewer
  would have to have an option to either show the proper menus (it
  doesn't) or allow the sim to refresh the object flags without full
  object updates (it hasn't).
  <Melanie_T> gods often have to act fast, for instance with griefers.
  Having transition to god mode take as long as a full rez just isn't an
  option, apart from the sim load caused by resending all objects.
  <Melanie_T> Then i tried resending only the object that was selected
  but there the arriving object update would close the pie menu.
  So you right-click a prim and the pie menu would close again.

The result has always been that if you are on your own sim, in opensim,
and select an attachment on another avatar, then YOU would freeze, not
the selected avatar. This patch fixes that "opensim related" bug as
well.
2014-04-04 15:19:50 +02:00
Aleric Inglewood
b4848f308f Compile fix for Release 2014-04-04 15:19:39 +02:00
Aleric Inglewood
1c8876cead Synchronize looping animations that start at the same moment. 2014-04-04 15:19:28 +02:00
Aleric Inglewood
1bcb6ad20d Version 2 of AISyncClient et al.
A tool to synchronize objects:
Objects derived from AISyncClient can signal that they are
'ready' or 'not ready' for up to 32 events (using a bitmask)
at a time. Clients that are created at roughly the same time
as other clients, and which return the same 'key' (a virtual
function returning an AISyncKey object) will be grouped together
and receive events (by means of virtual functions being called)
to notify them of all clients being ready or not for one of the
events (the least significant bit)). The other events can be polled.

This new version does away with all the templates and explicitly
remembers what events each client is ready for instead of just
updating a counter of the number of clients. This was necessary
because a client is removed then the server needs to know if it
was ready or not when it has to be able to update those counters.
This time I chose to just run over all stored clients and AND
and OR the per-client-ready-masks because 1) that information
is available now and 2) the lists will normally contain only
one or two clients, so it's fast enough.
The new version also allows for real key comparison (and derived
keys) instead of just using "hash" value that is compared.
2014-04-04 15:19:18 +02:00
Aleric Inglewood
66aaa9cf80 Add LLMotionController* LLMotion::mMotionController
This is needed for synchronization: motions will have to start
(with a specific start time offset) from a point in the code where
only the motion object is available.

I added/used LLMotionController& in a previous commit, this was
now changed into a pointer. There is (obviously) not much reason
for that, but also no disadvantage: the diff relative to LLs code
doesn't get larger since the references where already added, too.

Conflicts:
	indra/llcharacter/llkeyframemotion.cpp
	indra/llcharacter/llkeyframemotion.h
2014-04-04 15:19:02 +02:00
Aleric Inglewood
61d365e957 Removed this again... 2014-04-04 15:15:36 +02:00
Aleric Inglewood
006b319c3a Add AISyncClient<> (and AISyncServer).
A tool to synchronize objects:
Objects derived from AISyncClient can signal that they are
'ready' or 'not ready' for up to 4 events (using a bitmask)
at a time. Clients that signal to be ready for anything
at roughly the same time as other clients, and which return
the same 'hash' (a virtual function returning a 64bit value)
will be grouped together and receive events (by means of
virtual functions being called) to notify them of all clients
being ready or not for one of the events (syncevent1).
The other three events can be polled.

The memory usage is low (one pointer per client that points
to its AISyncServer object), servers are released to a cache
after about 100 ms (unless there is actual need for synchronization),
so there aren't much of those either.

The CPU usage is extremely low: all events are handled in
parallel in a 32 bit value (6 bits per event to count the
number of registered clients and the number of ready clients
for each event, and the remaining 8 bits to count the
number of reference pointers (which should only be a constant
higher, so that is overkill). To signal to a server that
a client has become ready or not is mostly a function call,
which then takes 1 clock cycle or so before returning.
Registration of a client is slightly more expensive as it
requires a pointer to be added to the end of a std::list.
This tool could easily be used as part of the graphics engine
(not that I intend to do that :p).
2014-04-04 15:15:26 +02:00
Aleric Inglewood
e38ec797fd Fix lookat and pointat shared experience.
There was a bug that when people turned off sending viewer effects,
they'd also turn off sending LookAt, while there is a seperate
checkbox to turn THAT off, while still seeing their own avatar
happily look around, breaking shared experience (most notably, most
people will be complete oblivious of the fact that they look like
zombies to others and that their friends do not see the same thing
on their screen).

This patch fixes this: both parties now see the same thing. Lookat
and PointAt are only turned off by their respective checkboxes,
and no longer silently influenced by turning off other viewer
effects.
2014-04-04 15:15:15 +02:00
Aleric Inglewood
94b42e7a9b Speed up of particular inefficient part related to motions.
For these standard motions, the viewer likes to very frequently
flood-call startMotion/stopMotion sometimes, which at the very
least needs a LLUUID lookup in a std::map. In particular, this
is done for two of them for every avatar in the sim every frame.
This code makes it possible to test if that makes sense by
merely doing a bit test.

Conflicts:
	indra/llcharacter/llkeyframemotion.h
2014-04-04 15:14:54 +02:00
Aleric Inglewood
61097dac72 Auto clean up motion cache.
Conflicts:
	indra/llcharacter/llkeyframemotion.cpp
	indra/llcharacter/llkeyframemotion.h
	indra/newview/llfloaterbvhpreview.cpp
2014-04-04 15:10:52 +02:00
Aleric Inglewood
116fe01dee Add AIDebugInstanceCounter
Prints number of instances upon construction and destruction.
Usage:

class LLSomething : public AIDebugInstanceCounter<LLSomething>
...
2014-04-04 14:57:55 +02:00
Aleric Inglewood
ba2bf9f366 Get rid of unused and irrepairable code. 2014-04-04 14:57:41 +02:00
Aleric Inglewood
a5b68f2da2 Changes to llkeyframemotionparam.cpp as result of audit.
These changes were the result of my Motion leak audit.
However, there is a serious problem with LLKeyframeMotionParam
in that it stores plain pointers to objects that can and will be deleted
by other objects. Its the classicial LL example of coding
non-Object-Oriented badly maintainable and instable code.

I cannot make sure this won't go wrong for the simple fact
that LLKeyframeMotionParam is not used at ALL in our code.
Hence, the next commit will rather delete this file.
This commit is merely to have a record of this finding.
2014-04-04 14:57:31 +02:00
Inusaito Sayori
97edb0f954 [Floater Flexibility] Part three: Create the flexible toolbar and create the temporary settings for button visibility
Look in debug settings for settings that start with ToolbarVisible
This will have an official interface by part four.
2014-04-03 14:36:20 -04:00
Inusaito Sayori
a3531b931b Feature Request: Ding for groups and conference chats. 2014-04-03 01:27:27 -04:00
Aleric Inglewood
0438f070f7 Merge remote-tracking branch 'singu/master' 2014-04-01 01:28:55 +02:00
Inusaito Sayori
f53e36c430 Fix not being able to buy land because of inversed RLVa logic. 2014-03-31 13:12:33 -04:00
Inusaito Sayori
8889e2de64 Fix icon packaging on mac. 2014-03-31 12:22:12 -04:00
Shyotl
2d0b310e19 Framerate llinfos spew was clobbering cout decimal precision. 2014-03-29 02:19:14 -05:00
Shyotl
dfb465a11b Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2014-03-29 02:13:26 -05:00
Shyotl
9ed2dc755c Always set materials mask if deferred for materials/alpha pools. Fixes potential crash in LLDrawPoolAlpha::renderAlpha 2014-03-28 17:14:57 -05:00
Latif Khalifa
e70342b356 Removed duplicate check introduced in the last change 2014-03-28 16:42:27 +01:00
Latif Khalifa
ba0fd794d7 Compile fix 2014-03-28 16:20:38 +01:00
Latif Khalifa
dbd7de628f Fix compilation with gcc 2014-03-28 08:50:02 +01:00
Shyotl
d6fdaa93a4 Added adaptive vsync support (selectable in preferences->graphics->hardware, provided the driver supports it). Also hide 16x fsaa on amd hardware, as it is not supported on said hardware (unsure about intel). 2014-03-28 02:34:03 -05:00
Latif Khalifa
80076833d1 Fix compilation with gcc 2014-03-28 08:30:22 +01:00
Latif Khalifa
dc9d3fbf96 Fix build with SDL prior to 1.3.0 2014-03-28 08:29:30 +01:00
Latif Khalifa
e12548ab8c Merge branch 'master' of git://github.com/Shyotl/SingularityViewer 2014-03-28 08:45:40 +01:00
Shyotl
894261862d Tweaks to stencil handling to allow masking out of sky (or geometry).
Reset stencil clear value to 0 after done clearing.
2014-03-27 22:31:47 -05:00
Shyotl
07a261a259 A little bit of cleanup. 2014-03-27 22:04:30 -05:00
Shyotl
34a7bf4dbb Comment out unused shader. 2014-03-27 21:30:23 -05:00
Shyotl
5988f6cf88 Updated rigged mesh face batch/pool handling.
Fixed issue with fullbright and glow occlusion.
RenderTransparentWater toggling should work more gracefully.
Fixed some bugs in general drawpool classification for faces. Bump pool was superceding more than it should have.
2014-03-27 21:27:40 -05:00
Inusaito Sayori
039be1f8e9 Fix Issue 1413: Local Texture Default Texture Update Settings, Also fix the side issue of the More section not having visible ui at first.
Also I got fed up with the bad code and leaks so I did some refactoring of floaterlocalassetbrowse.*, but just a bit.
2014-03-27 21:33:21 -04:00
Inusaito Sayori
70e92a1cea More helpful fixes and touchups from Cinder 2014-03-27 20:10:06 -04:00
Inusaito Sayori
2af2e37dcd Right clicking folder with only gestures (no worn items) should still offer remove from outfit if any gesture in that folder is active.
Also follow linked folders when wearing folders, this will make linked folders a lot more useful!
Also fixes a warning and some spacing issues
2014-03-27 20:02:12 -04:00
Inusaito Sayori
a6559b1e51 [Floater Flexibility] Part two: Move floater dictionary into menu commands and use a common function to ShowFloaters between LLToolBar and menus. 2014-03-27 00:31:32 -04:00
Inusaito Sayori
361b8852df Fix Issue 1419: Moving a link to an inventory folder moves the pointed folder and not the link 2014-03-25 19:56:41 -04:00
Inusaito Sayori
ff201ce3f9 Fix Issue 1448: Hard crash when emptying the mute list. 2014-03-25 19:51:49 -04:00
Inusaito Sayori
de2ce83a8d Touchups to namesystem update 2014-03-25 19:39:02 -04:00
Inusaito Sayori
f37d83abe1 [Floater Flexibility] Part one: Refactor all floaters to work with the dictionary in one way or another. 2014-03-25 00:23:56 -04:00
Inusaito Sayori
ee610ceb3f The Name System update!
Adds name list specific name settings, Removes boolean for having lists of speakers with legacy names in favor of having a more flexible setting for them
Have a look at the combo boxes on Adv. Chat->Chat UI to customize these new settings.

There is now a fourth option for name display: LegaCy Name (D is play Name)
2014-03-24 17:52:13 -04:00
Inusaito Sayori
5affacab70 Fixes, mainly for Clang/Mac, from Cinder. 2014-03-24 16:56:10 -04:00
Latif Khalifa
924011f36e Merge branch 'master' of git://github.com/Lirusaito/SingularityViewer 2014-03-23 14:24:47 +01:00
Inusaito Sayori
70b5a6f05b Prevent Issue 1445, reassess enablement of asset browser buttons when selection may have changed 2014-03-23 06:03:20 -04:00
Inusaito Sayori
05c7270dcf Merge changes for STORM-2008
"Remove from outfit" should deactivate gestures in a folder as well as take off items
Credit to Lance Corrimal
2014-03-20 03:53:11 -04:00
Inusaito Sayori
a75e34d1c2 Feature Request: Allow "wear_folder" SLapps 2014-03-20 03:34:17 -04:00
Inusaito Sayori
f7139ac20e Fix Issue 1406: Create Landmark shows name twice, not description 2014-03-18 19:45:18 -04:00
Inusaito Sayori
e43d718e0f Sappadilli's fix for the mini button 2014-03-18 19:18:57 -04:00
Inusaito Sayori
cc0b5e660d Touch missed spots for picking rigged mesh 2014-03-18 18:38:30 -04:00
Latif Khalifa
8f525a37da Typofix 2014-03-17 00:20:32 +01:00
Latif Khalifa
5e62d2b104 Revert to using Vivox SDK 2 on Linux 2014-03-16 22:44:30 +01:00
Damian Zhaoying
6c373ee31e Update Spanish languages files 2014-03-15 05:14:07 -03:00
Lirusaito
d98c46beb0 Extend SGAllowRiggedMeshSelection to work in inspect and on others 2014-03-13 01:31:11 -04:00
Lirusaito
850772a4ce [RLVa] About floater version display adjustment 2014-03-12 22:21:55 -04:00
Latif Khalifa
08be65e649 Merge branch 'master' of git://github.com/Lirusaito/SingularityViewer 2014-03-13 02:04:59 +01:00
Lirusaito
ed8e37ed89 [RLVa] Updates thanks to Kitty
1ea7389, 49be412, ed4c8e6 & 7ce9521
- changed : "Give to #RLV" agent-to-agent and script-to-agent offers can contain subfolders
-> limited to 3 levels (e.g. #RLV/~FolderA/FolderB/FolderC)
-> #RLV folder is auto-created if it doesn't currently exist

8780d84 - Incremented version number to RLVa-1.4.10
f078067 - internal : boolean (custom) debug settings should have a boolean type
72a8ad8 & 401ca14 - internal : added supporting code for "Detach Folder" RLVa lock checks

05718b5
- fixed : RenderResolutionDivisor is non-functional
-> RenderResolutionDivisor isn't actually taken into account when checking the new screen resolution against the current screen buffer size

4fa138b
- fixed : viewer clips mouse to its rectangle when switching into mouselook while it's not the active application
-> Repro:
* rez a prim with a script to llForceMouseLook(TRUE) and force-sit when clicked (with a slight delay)
* click the prim and give focus to another application
=> the viewer will center the mouse cursor on itself and restrict movement to within its own rectangle (requires alt-tab to escape)
+ Singu Note: Thanks to Kitty for this, it is possible that this would happen in our last release

14132c9
- fixed : region name and global coordinates are shown on the About floater when @showloc restricted
+ Singu Note: RLV version is now shown in help->about

9a2af62 - changed : llRegionSayTo messages are no longer subject to @recvchat(from) or @recvemote(from)

2dc4b89
- fixed : @getstatus and @getstatusall should specify an (optional) separator
-> added support for both @getstatus:tp;|=123 and @getstatus:;|=123

fbb3fb1 - Incremented API version number to 2.8.0
92c39b9 - internal : quick and dirty hack fix for RlvUtil::filterNames() but there's no time to do a proper backport from RLVa-1.5
2580f1c - internal : remove hack for legacy viewers without multi-attachment support
2014-03-12 19:41:15 -04:00
Latif Khalifa
1732d6d427 [Voice Update] Sync default voice debug level with upstream. 2014-03-12 23:48:07 +01:00
Latif Khalifa
bb9a958a1e [Voice Update] Update SLVoice prebuilds and packaging script 2014-03-12 22:50:43 +01:00
Latif Khalifa
f1b8c36a28 Merge branch 'VoiceUpdate' of git://github.com/Lirusaito/SingularityViewer 2014-03-12 22:21:43 +01:00
Aleric Inglewood
03ed12a9b1 Merge remote-tracking branch 'singu/master' 2014-03-12 20:36:12 +01:00
Lirusaito
30f5a3a162 Update qtoolalign (Fixes issue 704)
- Removes shortcut ctrl-a for align tool
-- to avoid ctrl-a for select all text in UI controls messing up prim selection
- Adds llselectmgr select all function
-- to replace ctrl-a select all prims functionality that was a side effect of qtoolalign having this shortcut
- Adds toggle button (up/down arrow) to build floater for toggling display of the lower tab container area
-- This is to satisfy users who relied on ctrl-a to use align while the build floater was minimized and out of the way
- Syncs qtoolalign from Alchemy
2014-03-09 19:00:52 -04:00
Latif Khalifa
e4a3f76f55 Fixed an artifact of Root->Avatar Center rename (Sappadilli) 2014-03-02 20:05:49 +01:00
Drake Arconis
f5bdb56a7c Crash fixes in model upload 2014-03-01 18:53:51 -05:00
Drake Arconis
64d4a9e240 Add missing header guards 2014-03-01 18:00:59 -05:00
Drake Arconis
71d9084a95 Clean out old OGPX stuff 2014-03-01 17:34:22 -05:00
Latif Khalifa
9d6092faaa Merge branch 'master' of git://github.com/Shyotl/SingularityViewer 2014-02-21 09:30:08 +01:00
Shyotl
bb0f17ae6f Fix poor batching with mac/ancient drivers. Also, some minor tweaks to sorting algorithm. 2014-02-21 02:24:42 -06:00
Latif Khalifa
ebb46999d8 Merge branch 'master' of git://github.com/Shyotl/SingularityViewer 2014-02-20 10:31:47 +01:00
Shyotl
1c48aa8f97 Added missing can_batch_texture check. Fixes unbatchable faces occasionally getting batched with the last batchable face batch. This was mostly noticeable with animated faces. 2014-02-19 22:35:43 -06:00
Shyotl
bdc0ad2b8f Experimental volume face batching changes (Cursory testing shows: +~10% larger mean batch size).
-Drive pass selection by face pools. Doing such removes a fair bit of redundant (and often buggy) code.
-Ignore irrelivant batch breakers depending on pass/pool type.
-Face sorting algorithm modified to potentially allow larger batches.
-Removed a few unused/broken things (bake_sunlight/no_materials)
-Fullbright handling should hopefully be a little more consistent.
-Prevent fullbright faces from being placed in 'simple' pool. (They are already simple-er)

Fixed attribute error that popped up with bump faces when batching was disabled.
2014-02-18 11:43:50 -06:00
Shyotl
ac8d5e5ab3 Let shaders dictate vertex buffer attributes for alpha faces (if shaders are enabled) 2014-02-18 09:21:31 -06:00
Latif Khalifa
41416dcffe Merge branch 'master' of git://github.com/Shyotl/SingularityViewer 2014-02-11 03:23:21 +01:00
Shyotl
dda7cb5791 Lazy workaround avoiding undefined behavior for rigged meshes with invalid joints. 2014-02-10 20:20:03 -06:00
Shyotl
f7fdeeea9b Be super sure not to let rigged vert weights extend beyond actual joint count. 2014-02-10 20:18:39 -06:00
Shyotl
9d7d7590a7 Prevent debug visualizations from writing to the z-buffer (caused occlusion weirdness) 2014-02-09 23:40:03 -06:00
Inusaito Sayori
77848afc94 Tiny patch for Issue 1385: Use normal folders for outfits while still creating links for everything
Adds debug setting LiruLegacyOutfitAllLinks which overrides legacy outfit settings and forces the resulting folder to consist of only links
2014-02-09 14:42:19 -05:00
Inusaito Sayori
8f7e96e2a5 Minimap enhancements!!
Much of this patch comes from upstream and Kitty Barnett, or is inspired from their works
This commit applies the World-Minimap patches from Catznip.

Catznip stuffs:
- Issue 1383: Parcel lines on mini map
 - Show parcels on the minimap
 - Minimap menu: "Show" submenu: "Property Lines" "Parcels for Sale"
- Option to have world map textures on the minimap
 - Minimap menu: "World Map Textures"
 - Singular touch: Made this comply with hypergridding.

The minimap will now scroll zoom based on where your mouse is if centering on camera is off.

A lot of cruft was cleaned up in this merge, a lot of gSavedSettings lookups in draw were converted to LLCachedControls, some license updates were performed.

Finally: By myself, but inspired by upstream and requested in the group before:
- Option to show tracking circles around people selected on the radar while the radar is visible
 - Minimap menu: "Show" submenu: "Radar Tracking Circles"
2014-02-08 18:26:18 -05:00
Shyotl
eab807daeb Fix fullbright alpha in fixed-function. 2014-02-08 01:47:22 -06:00
Inusaito Sayori
c4bfdcbeac Address Issue 1381: Mouse look cross hair coloration
Adds debug setting LiruCrosshairColor
2014-02-07 14:59:03 -05:00
Inusaito Sayori
3801949887 Little bit more touching up to the italian XML, this time for overlay bar 2014-02-06 17:27:53 -05:00
Inusaito Sayori
29d5c951c5 [STORM-1981] Change tracking beacons to extend to the ground and (optionally) vertically indicate direction
Jonathan Yap's beacon enhancements, with a Singular twist!
2014-02-06 17:23:28 -05:00
Inusaito Sayori
eb4b0d630f [MAINT-2287] The rest of the updates so far to outbox. 2014-02-06 14:53:13 -05:00
Inusaito Sayori
b6225d1d9a [MAINT-2287] Handle refactor 2014-02-06 14:51:36 -05:00
Inusaito Sayori
32ec2be0b6 SimFeatures spew demoted to logcontrol debugs. 2014-02-05 21:39:50 -05:00
Inusaito Sayori
d7dfa91f6f Remove incorrect "You should upgrade your viewer." spew, and demote it to lldebugs. 2014-02-05 20:59:10 -05:00
Inusaito Sayori
c4cc9dd417 Stop leaking in object import! 2014-02-05 15:17:44 -05:00
Inusaito Sayori
884b707385 Hey toolbar, toolbar italiano! 2014-02-04 18:41:10 -05:00
Inusaito Sayori
acbc81c1ea Further Italian Translation purification, fixup, and touches. 2014-02-04 18:33:02 -05:00
Inusaito Sayori
cc60dcc8a4 Languages preferences in order with actual languages in the right place above, please, thank you? 2014-02-04 16:20:24 -05:00
Inusaito Sayori
275f85e7a6 Fix god chat not showing up in god color if the god is using a display name. 2014-02-04 15:21:13 -05:00
Latif Khalifa
24f99a2920 Merge remote-tracking branch 'lirusaito/master' 2014-02-04 01:40:42 +01:00
Inusaito Sayori
2acfbf12ed Fix Issue 1368: Camera viewing angle resets after mouselook.
Only reset FOV when right click was held or released just before leaving, now.
2014-02-03 17:20:25 -05:00
Inusaito Sayori
b0972de510 Address Issue 1371: Enhancement: in Edit object Positions X & Y for OpenSim VarRegion 2014-02-02 16:53:55 -05:00
Inusaito Sayori
af58636c7c Fix the Login Panel such that it persists until a successful login and maintains ui values between failed logins
When the login panel used to die, it now hides instead, we only truly kill it upon successful login.
Much of the opening and setting behaviors have been cleaned up to ensure fields are autofilled by the viewer without any user action once
Everything else like changing saved logins will still work the same.
2014-02-02 16:45:37 -05:00
Inusaito Sayori
7341ad5e6e Support the Script Message API 2014-02-02 16:36:05 -05:00
Inusaito Sayori
744e6c63b6 Fix Issue 1237: Last online says 01/01/1970 for group members
For real this time!
2014-02-02 16:29:06 -05:00
Inusaito Sayori
31aa30e3d0 Group Feature Request: Option to Copy SLURL for an avatar's profile
Added to avatar list menus and instant message drop down menu.
2014-02-02 16:27:20 -05:00
Aleric Inglewood
ebb4489c01 Merge remote-tracking branch 'singu/master' 2014-02-01 22:34:13 +01:00
Inusaito Sayori
31b3ae584e Feature request: menus on the region estate panel's scroll lists. 2014-01-31 00:52:59 -05:00
Inusaito Sayori
151afe4663 Translations fix ups 2014-01-31 00:52:16 -05:00
Inusaito Sayori
b03f7c1504 [RLVa] Version 1.4.9
Thanks to Trinity and, of course, her Kitty!
2014-01-31 00:50:45 -05:00
Inusaito Sayori
bceaee6e41 [RLVa] rlva strings floater!
Generalized toggle() visible() call pattern of rlv floaters to a template struct.
2014-01-31 00:47:19 -05:00
Inusaito Sayori
0c33c0de2e [RLVa] rlva_strings update.
rlva strings floater coming soon!

I highly doubt the translations work anymore
If they still can be translated, I leave it up to translators to decide if they should be
Contact me if you need translation code improved here.
2014-01-28 04:41:16 -05:00
Inusaito Sayori
1b32c79a5e [RLVa] Miscellaneous other touches to rlva code 2014-01-28 04:38:05 -05:00
Inusaito Sayori
dd35f1bd68 [RLVa] Missed sections of canStand update in that last commit. 2014-01-28 04:35:43 -05:00
Inusaito Sayori
9c0d8bbeb1 [RLVa] "blocked_wireframe"? Seems half baked, but it compiles. 2014-01-28 04:34:12 -05:00
Inusaito Sayori
02753bfc7d [RLVa] gRlvHandler.canStand --> RlvActions::canStand 2014-01-28 04:31:34 -05:00
Inusaito Sayori
88ae36f4e1 [RLVa] Forced TPRequest response is now supported! 2014-01-28 04:27:38 -05:00
Inusaito Sayori
4dcf8f3f45 [RLVa] Removal of z offset restrictions 2014-01-28 03:16:35 -05:00
Inusaito Sayori
9e82297303 [RLVa] rlvfloaterbehaviour.* -> rlvfloaters.* 2014-01-28 00:31:40 -05:00
Inusaito Sayori
14a885f8d0 [RLVa] Modernizations
License updates, comment updates, settings cleanup, macros cleanup, dead code removal, etc.
2014-01-27 23:43:16 -05:00
Inusaito Sayori
94aee52c64 [RLVa] b15fdd026026 ported
- internal : reviewed @recvim and @sendim for CHUI (SL-3.5)

Singu changes:
- Updated busy to be referred to as do_not_disturb in llviewermessage.cpp
- Don't send autoresponse if we can't send an IM by rlva
- Updated checks for from name being system to be to_id and from_id null checks.
- Minor compile fix in rlvui.cpp for last commit.
2014-01-27 23:42:09 -05:00
Inusaito Sayori
755d3be89b [RLVa] Disallow inventory floaters when inventory restricted.
Formatting eases the diff with rlva upstream
2014-01-27 20:14:02 -05:00
Inusaito Sayori
6a3ee5fac4 [RLVa] f9f8dbe23ec3 ported
- internal : reviewed @startim for CHUI (SL-3.5)
    -> fixed : "Start Conference Chat" on a selection of multiple calling cards opens an IM session
    -> fixed : actions that would result in an IM window opening shouldn't be blocked if the session is already open
    -> added : RlvActions class to mimick LLAvatarActions and lowering the rlvhandler.h include dependency
2014-01-27 13:54:13 -05:00
Aleric Inglewood
6547452136 Merge remote-tracking branch 'singu/master' 2014-01-25 20:29:46 +01:00
Inusaito Sayori
42bf70849c Fix Issue 1344: Weird mesh distorted bug
Animations require consistent names for points like Avatar Center between viewers
To fix this, we now use Avatar Center instead of Root at the lower levels,
but this is okay, we translate Avatar Center into Root at UI level!
2014-01-25 09:44:42 -05:00
Inusaito Sayori
236fa2a284 Fix Issue 870: Crouch toggle not reset when pressing "Fly" button, causes avatar to run/fly downhill.
Reimplements crouch toggle such that crouch is now tracked by the agent object
Fixes crouch being reset when restoring focus to the viewer window, as well.
2014-01-24 22:57:19 -05:00
Inusaito Sayori
2450b435a7 Combine commonly created scroll list menus into single menus identified by menu_num instead of their menu_file
sScrollListMenus is an array such that it will hold more menus in the future, such as groups.
fmenu_file still exists and will still exhibit its old behavior if used.
2014-01-24 21:41:56 -05:00
Inusaito Sayori
353e2977d6 [Voice Update] Further sync llvoiceclient and llvoicevivox with upstream
Mainly tiny motions to ease merging as viewer-vivox2 work continues
Condenses MultiVoice block
2013-07-27 16:48:35 -04:00
Inusaito Sayori
641067c399 [Voice Update] Apply updates from Viewer-Vivox2
Applies the following commits:
 4c13e7c - Interim version with SLIM removed from voice.
   4c13e7c753
 9cad21a - Thanks mercurial.
   9cad21adc1
   Only the changes that should have been in 4c13e7c (removal of LLVivoxVoiceClient::accountListBlockRulesSendMessage() and LLVivoxVoiceClient::accountListAutoAcceptRulesSendMessage())
 9c94b96 - Removed debugging.
   9c94b96ed3
 ec77595 - Turn off logging.
   ec775958ef
 857cab1 - Kill all the vivox logs
   857cab153e
2013-07-27 16:41:08 -04:00
1759 changed files with 58739 additions and 41173 deletions

6
.gitignore vendored
View File

@@ -29,3 +29,9 @@ qtcreator-build/
/indra/newview/res/viewerRes.rc
/indra/newview/res/viewerRes_bc.rc
/indra/newview/English.lproj/InfoPlist.strings
/indra/newview/linux_tools/handle_secondlifeprotocol.sh
/indra/newview/linux_tools/install.sh
/indra/newview/linux_tools/refresh_desktop_app_entry.sh
/indra/newview/linux_tools/wrapper.sh

View File

@@ -0,0 +1,29 @@
INTEL LICENSE AGREEMENT
IMPORTANT - READ BEFORE COPYING OR USING.
Do not use or load this library and any associated materials (collectively,
the "Software") until you have read the following terms and conditions. By
loading or using the Software, you agree to the terms of this Agreement. If
you do not wish to so agree, do not use the Software.
LICENSE: Subject to the restrictions below, Intel Corporation ("Intel")
grants to you the permission to use, copy, distribute and prepare derivative
works of this Software for any purpose and without fee, provided, that
Intel's copyright notice appear in all copies of the Software files.
The distribution of derivative works of the Software is also subject to the
following limitations: you (i) are solely responsible to your customers for
any liability which may arise from the distribution, (ii) do not make any
statement that your product is "certified", or that its performance is
guaranteed, by Intel, and (iii) do not use Intel's name or trademarks to
market your product without written permission.
EXCLUSION OF ALL WARRANTIES. The Software is provided "AS IS" without any
express or implies warranty of any kind including warranties of
merchantability, noninfringement, or fitness for a particular purpose.
Intel does not warrant or assume responsibility for the accuracy or
completeness of any information contained within the Software.
As this Software is given free of charge, in no event shall Intel be liable
for any damages whatsoever arising out of the use of or inability to use the
Software, even if Intel has been adviced of the possibility of such damages.
Intel does not assume any responsibility for any errors which may appear in
this Software nor any responsibility to update it.

View File

@@ -4,7 +4,7 @@
# other commands to guarantee full compatibility
# with the version specified
cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
# Eventually the third-party support modules (cmake/*.cmake) should
# know the full path to all libraries. Until that happens we need
@@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
# CMP0003 to OLD and link to one library (apr) on a per-configuration
# basis to convince CMake to add the proper link directory. This line
# can be removed when we use full paths for all libraries.
cmake_policy(SET CMP0003 OLD)
#cmake_policy(SET CMP0003 OLD)
set(ROOT_PROJECT_NAME "Singularity" CACHE STRING
"The root project/makefile/solution name. Defaults to Singularity.")
@@ -27,7 +27,6 @@ include(Variables)
# Load versions now. Install locations need them.
include(BuildVersion)
include(UnixInstall)
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
@@ -41,6 +40,9 @@ if(NOT STANDALONE)
# We prepare prebuilt binaries when not building standalone.
set(prepare_depends ${CMAKE_BINARY_DIR}/prepare/prebuilt)
endif(NOT STANDALONE)
if(WINDOWS)
set(prepare_depends ${prepare_depends} copy_win_libs)
endif(WINDOWS)
add_custom_target(prepare DEPENDS ${prepare_depends})
add_subdirectory(cmake)
@@ -107,3 +109,16 @@ add_custom_command(
DEPENDS ${CMAKE_SOURCE_DIR}/../install.xml
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
)
if(WINDOWS)
configure_file(${CMAKE_SOURCE_DIR}/cmake/CopyWinLibs.cmake.in
${CMAKE_BINARY_DIR}/CopyWinLibs.cmake @ONLY)
add_custom_command(
COMMENT "Copying prebuilt libraries to viewer executable directory"
OUTPUT ${CMAKE_BINARY_DIR}/CopyWinLibs
COMMAND ${CMAKE_COMMAND} -DCUR_CONFIG:STRING=${CMAKE_CFG_INTDIR} -P ${CMAKE_BINARY_DIR}/CopyWinLibs.cmake
DEPENDS ${CMAKE_BINARY_DIR}/prepare/prebuilt ${CMAKE_BINARY_DIR}/CopyWinLibs.cmake
)
add_custom_target(copy_win_libs DEPENDS ${CMAKE_BINARY_DIR}/CopyWinLibs)
endif(WINDOWS)

View File

@@ -293,7 +293,36 @@ void AIEngine::add(AIStateMachine* state_machine)
}
}
extern void print_statemachine_diagnostics(U64 total_clocks, U64 max_delta, AIEngine::queued_type::const_reference slowest_state_machine);
#if STATE_MACHINE_PROFILING
// Called from AIStateMachine::mainloop
void print_statemachine_diagnostics(U64 total_clocks, AIStateMachine::StateTimerBase::TimeData& slowest_timer, AIEngine::queued_type::const_reference slowest_element)
{
AIStateMachine const& slowest_state_machine = slowest_element.statemachine();
F64 const tfactor = 1000 / calc_clock_frequency();
std::ostringstream msg;
U64 max_delta = slowest_timer.GetDuration();
if (total_clocks > max_delta)
{
msg << "AIStateMachine::mainloop did run for " << (total_clocks * tfactor) << " ms. The slowest ";
}
else
{
msg << "AIStateMachine::mainloop: A ";
}
msg << "state machine " << "(" << slowest_state_machine.getName() << ") " << "ran for " << (max_delta * tfactor) << " ms";
if (slowest_state_machine.getRuntime() > max_delta)
{
msg << " (" << (slowest_state_machine.getRuntime() * tfactor) << " ms in total now)";
}
msg << ".\n";
AIStateMachine::StateTimerBase::DumpTimers(msg);
llwarns << msg.str() << llendl;
}
#endif
// MAIN-THREAD
void AIEngine::mainloop(void)
@@ -305,28 +334,33 @@ void AIEngine::mainloop(void)
queued_element = engine_state_w->list.begin();
}
U64 total_clocks = 0;
#ifndef LL_RELEASE_FOR_DOWNLOAD
U64 max_delta = 0;
#if STATE_MACHINE_PROFILING
queued_type::value_type slowest_element(NULL);
AIStateMachine::StateTimerRoot::TimeData slowest_timer;
#endif
while (queued_element != end)
{
AIStateMachine& state_machine(queued_element->statemachine());
U64 start = get_clock_count();
if (!state_machine.sleep(start))
AIStateMachine::StateTimerBase::TimeData time_data;
if (!state_machine.sleep(get_clock_count()))
{
state_machine.multiplex(AIStateMachine::normal_run);
AIStateMachine::StateTimerRoot timer(state_machine.getName());
state_machine.multiplex(AIStateMachine::normal_run);
time_data = timer.GetTimerData();
}
U64 delta = get_clock_count() - start;
state_machine.add(delta);
total_clocks += delta;
#ifndef LL_RELEASE_FOR_DOWNLOAD
if (delta > max_delta)
if (U64 delta = time_data.GetDuration())
{
max_delta = delta;
slowest_element = *queued_element;
}
state_machine.add(delta);
total_clocks += delta;
#if STATE_MACHINE_PROFILING
if (delta > slowest_timer.GetDuration())
{
slowest_element = *queued_element;
slowest_timer = time_data;
}
#endif
}
bool active = state_machine.active(this); // This locks mState shortly, so it must be called before locking mEngineState because add() locks mEngineState while holding mState.
engine_state_type_wat engine_state_w(mEngineState);
if (!active)
@@ -340,8 +374,8 @@ void AIEngine::mainloop(void)
}
if (total_clocks >= sMaxCount)
{
#ifndef LL_RELEASE_FOR_DOWNLOAD
print_statemachine_diagnostics(total_clocks, max_delta, slowest_element);
#if STATE_MACHINE_PROFILING
print_statemachine_diagnostics(total_clocks, slowest_timer, slowest_element);
#endif
Dout(dc::statemachine, "Sorting " << engine_state_w->list.size() << " state machines.");
engine_state_w->list.sort(QueueElementComp());
@@ -373,7 +407,7 @@ void AIEngine::setMaxCount(F32 StateMachineMaxTime)
sMaxCount = calc_clock_frequency() * StateMachineMaxTime / 1000;
}
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
#ifdef CWDEBUG
char const* AIStateMachine::event_str(event_type event)
{
switch(event)
@@ -406,7 +440,7 @@ void AIStateMachine::multiplex(event_type event)
// our need to run (by us having set need_run), so there is no need to run
// ourselves.
llassert(!mMultiplexMutex.isSelfLocked()); // We may never enter recursively!
if (!mMultiplexMutex.tryLock())
if (!mMultiplexMutex.try_lock())
{
Dout(dc::statemachine(mSMDebug), "Leaving because it is already being run [" << (void*)this << "]");
return;
@@ -728,7 +762,7 @@ void AIStateMachine::multiplex(event_type event)
//=========================================
// Release the lock on mMultiplexMutex *first*, before releasing the lock on mState,
// to avoid to ever call the tryLock() and fail, while this thread isn't still
// to avoid to ever call the try_lock() and fail, while this thread isn't still
// BEFORE the critical area of mState!
mMultiplexMutex.unlock();
@@ -752,6 +786,22 @@ void AIStateMachine::multiplex(event_type event)
}
}
#if STATE_MACHINE_PROFILING
std::vector<AIStateMachine::StateTimerBase*> AIStateMachine::StateTimerBase::mTimerStack;
AIStateMachine::StateTimerBase::TimeData AIStateMachine::StateTimerBase::TimeData::sRoot("");
void AIStateMachine::StateTimer::TimeData::DumpTimer(std::ostringstream& msg, std::string prefix)
{
F64 const tfactor = 1000 / calc_clock_frequency();
msg << prefix << mName << " " << (mEnd - mStart)*tfactor << "ms" << std::endl;
prefix.push_back(' ');
std::vector<TimeData>::iterator it;
for (it = mChildren.begin(); it != mChildren.end(); ++it)
{
it->DumpTimer(msg, prefix);
}
}
#endif
AIStateMachine::state_type AIStateMachine::begin_loop(base_state_type base_state)
{
DoutEntering(dc::statemachine(mSMDebug), "AIStateMachine::begin_loop(" << state_str(base_state) << ") [" << (void*)this << "]");
@@ -1212,7 +1262,7 @@ void AIStateMachine::abort(void)
multiplex(insert_abort);
}
// Block until the current run finished.
if (!mRunMutex.tryLock())
if (!mRunMutex.try_lock())
{
llwarns << "AIStateMachine::abort() blocks because the statemachine is still executing code in another thread." << llendl;
mRunMutex.lock();

View File

@@ -36,6 +36,7 @@
#include "aithreadsafe.h"
#include <llpointer.h>
#include "lltimer.h"
#include <list>
#include <boost/signals2.hpp>
@@ -98,11 +99,143 @@ class AIEngine
extern AIEngine gMainThreadEngine;
extern AIEngine gStateMachineThreadEngine;
#ifndef STATE_MACHINE_PROFILING
#ifndef LL_RELEASE_FOR_DOWNLOAD
#define STATE_MACHINE_PROFILING 1
#endif
#endif
class AIStateMachine : public LLThreadSafeRefCount
{
public:
typedef U32 state_type; //!< The type of run_state
// A simple timer class that will calculate time delta between ctor and GetTimerData call.
// Time data is stored as a nested TimeData object.
// If STATE_MACHINE_PROFILING is defined then a stack of all StateTimers from root is maintained for debug output.
class StateTimerBase
{
public:
class TimeData
{
friend class StateTimerBase;
public:
TimeData() : mStart(-1), mEnd(-1) {}
U64 GetDuration() { return mEnd - mStart; }
private:
U64 mStart, mEnd;
#if !STATE_MACHINE_PROFILING
TimeData(const std::string& name) : mStart(get_clock_count()), mEnd(get_clock_count()) {}
#else
TimeData(const std::string& name) : mName(name), mStart(get_clock_count()), mEnd(get_clock_count()) {}
void DumpTimer(std::ostringstream& msg, std::string prefix);
std::vector<TimeData> mChildren;
std::string mName;
static TimeData sRoot;
#endif
};
#if !STATE_MACHINE_PROFILING
StateTimerBase(const std::string& name) : mData(name) {}
~StateTimerBase() {}
protected:
TimeData mData;
// Return a copy of the underlying timer data.
// This allows the data live beyond the scope of the state timer.
public:
const TimeData GetTimerData()
{
mData.mEnd = get_clock_count(); //set mEnd to current time, since GetTimerData() will always be called before the dtor, obv.
return mData;
}
#else
protected:
// Ctors/dtors are hidden. Only StateTimerRoot and StateTimer are permitted to access them.
StateTimerBase() : mData(NULL) {}
~StateTimerBase()
{
// If mData is null then the timer was not registered due to being in the wrong thread or the root timer wasn't in the expected state.
if (!mData)
return;
mData->mEnd = get_clock_count();
mTimerStack.pop_back();
}
// Also hide internals from everything except StateTimerRoot and StateTimer
bool AddAsRoot(const std::string& name)
{
if (!is_main_thread())
return true; //Ignoring this timer, but pretending it was added.
if (!mTimerStack.empty())
return false;
TimeData::sRoot = TimeData(name);
mData = &TimeData::sRoot;
mData->mChildren.clear();
mTimerStack.push_back(this);
return true;
}
bool AddAsChild(const std::string& name)
{
if (!is_main_thread())
return true; //Ignoring this timer, but pretending it was added.
if (mTimerStack.empty())
return false;
mTimerStack.back()->mData->mChildren.push_back(TimeData(name));
mData = &mTimerStack.back()->mData->mChildren.back();
mTimerStack.push_back(this);
return true;
}
TimeData* mData;
static std::vector<StateTimerBase*> mTimerStack;
public:
// Debug spew
static void DumpTimers(std::ostringstream& msg)
{
TimeData::sRoot.DumpTimer(msg, "");
}
// Return a copy of the underlying timer data.
// This allows the data live beyond the scope of the state timer.
const TimeData GetTimerData() const
{
if (mData)
{
TimeData ret = *mData;
ret.mEnd = get_clock_count(); //set mEnd to current time, since GetTimerData() will always be called before the dtor, obv.
return ret;
}
return TimeData();
}
#endif
};
public:
#if !STATE_MACHINE_PROFILING
typedef StateTimerBase StateTimerRoot;
typedef StateTimerBase StateTimer;
#else
class StateTimerRoot : public StateTimerBase
{ //A StateTimerRoot can become a child if a root already exists.
public:
StateTimerRoot(const std::string& name)
{
if(!AddAsRoot(name))
AddAsChild(name);
}
};
class StateTimer : public StateTimerBase
{ //A StateTimer can never become a root
public:
StateTimer(const std::string& name)
{
AddAsChild(name);
}
};
#endif
protected:
// The type of event that causes multiplex() to be called.
enum event_type {
@@ -197,7 +330,7 @@ class AIStateMachine : public LLThreadSafeRefCount
bool mDebugAdvanceStatePending; // True while advance_state() was called by not handled yet.
bool mDebugRefCalled; // True when ref() is called (or will be called within the critial area of mMultiplexMutex).
#endif
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
#ifdef CWDEBUG
protected:
bool mSMDebug; // Print debug output only when true.
#endif
@@ -210,7 +343,7 @@ class AIStateMachine : public LLThreadSafeRefCount
mThreadId(AIThreadID::none), mDebugLastState(bs_killed), mDebugShouldRun(false), mDebugAborted(false), mDebugContPending(false),
mDebugSetStatePending(false), mDebugAdvanceStatePending(false), mDebugRefCalled(false),
#endif
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
#ifdef CWDEBUG
mSMDebug(debug),
#endif
mRuntime(0)
@@ -295,13 +428,16 @@ class AIStateMachine : public LLThreadSafeRefCount
// Return stringified state, for debugging purposes.
char const* state_str(base_state_type state);
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
#ifdef CWDEBUG
char const* event_str(event_type event);
#endif
void add(U64 count) { mRuntime += count; }
U64 getRuntime(void) const { return mRuntime; }
// For diagnostics. Every derived class must override this.
virtual const char* getName() const = 0;
protected:
virtual void initialize_impl(void) = 0;
virtual void multiplex_impl(state_type run_state) = 0;

View File

@@ -182,7 +182,7 @@ class AIStateMachineThreadBase : public AIStateMachine {
protected:
AIStateMachineThreadBase(CWD_ONLY(bool debug))
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
#ifdef CWDEBUG
: AIStateMachine(debug)
#endif
{ }
@@ -222,7 +222,7 @@ class AIStateMachineThread : public AIStateMachineThreadBase {
public:
// Constructor.
AIStateMachineThread(CWD_ONLY(bool debug))
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
#ifdef CWDEBUG
: AIStateMachineThreadBase(debug)
#endif
{
@@ -232,6 +232,13 @@ class AIStateMachineThread : public AIStateMachineThreadBase {
// Accessor.
THREAD_IMPL& thread_impl(void) { return mThreadImpl; }
/*virtual*/ const char* getName() const
{
#define STRIZE(arg) #arg
return "AIStateMachineThread<"STRIZE(THREAD_IMPL)">";
#undef STRIZE
}
protected:
/*virtual*/ AIThreadImpl& impl(void) { return mThreadImpl; }
};

View File

@@ -77,7 +77,7 @@ class AITimer : public AIStateMachine {
public:
AITimer(CWD_ONLY(bool debug = false)) :
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
#ifdef CWDEBUG
AIStateMachine(debug),
#endif
mInterval(0) { DoutEntering(dc::statemachine(mSMDebug), "AITimer(void) [" << (void*)this << "]"); }
@@ -98,6 +98,8 @@ class AITimer : public AIStateMachine {
*/
F64 getInterval(void) const { return mInterval; }
/*virtual*/ const char* getName() const { return "AITimer"; }
protected:
// Call finish() (or abort()), not delete.
/*virtual*/ ~AITimer() { DoutEntering(dc::statemachine(mSMDebug), "~AITimer() [" << (void*)this << "]"); mFrameTimer.cancel(); }

View File

@@ -45,15 +45,17 @@ if (WINDOWS)
if (MSVC10)
set(MSVC_DIR 10.0)
set(MSVC_SUFFIX 100)
elseif (MSVC12)
set(MSVC_DIR 12.0)
set(MSVC_SUFFIX 120)
endif (MSVC10)
if (MSVC11)
set(MSVC_DIR 11.0)
set(MSVC_SUFFIX 110)
endif (MSVC11)
# Remove default /Zm1000 flag that cmake inserts
string (REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Always use /Zm140
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm140")
# Don't build DLLs.
set(BUILD_SHARED_LIBS OFF)
@@ -82,21 +84,27 @@ if (WINDOWS)
/W3
/c
/Zc:forScope
/Zc:wchar_t-
/Zc:wchar_t-
/nologo
/Oy-
)
# SSE2 is implied on win64
if(WORD_SIZE EQUAL 32)
add_definitions(/arch:SSE2)
add_definitions(/arch:SSE2 /D_ATL_XP_TARGETING)
else(WORD_SIZE EQUAL 32)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4267 /wd4250 /wd4244")
endif(WORD_SIZE EQUAL 32)
# configure win32 API for windows XP+ compatibility
set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
if (MSVC12)
# configure win32 API for windows vista+ compatibility
set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
else (MSVC12)
# configure win32 API for windows XP+ compatibility
set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
endif (MSVC12)
# Are we using the crummy Visual Studio KDU build workaround?
if (NOT DISABLE_FATAL_WARNINGS)
@@ -246,30 +254,28 @@ endif (LINUX)
if (DARWIN)
add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
add_definitions(-DLL_DARWIN=1)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-no_compact_unwind -Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
# NOTE: it's critical that the optimization flag is put in front.
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# NOTE: it's critical that the optimization flag is put in front.
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -msse3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -msse3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 -msse3")
endif()
set(DARWIN_extra_cstar_flags "-g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -ftemplate-depth=256")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
# NOTE: it's critical that the optimization flag is put in front.
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS SSE3)
set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL -O3)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -msse3 ${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELEASE "-O3 -msse3 ${CMAKE_C_FLAGS_RELEASE}")
if (XCODE_VERSION GREATER 4.2)
set(ENABLE_SIGNING TRUE)
set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
endif (XCODE_VERSION GREATER 4.2)
endif (DARWIN)
if (LINUX OR DARWIN)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_definitions(-DLL_GNUC=1)
@@ -277,13 +283,11 @@ if (LINUX OR DARWIN)
set(UNIX_CXX_WARNINGS "${UNIX_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Woverloaded-virtual")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions(-DLL_CLANG=1)
set(UNIX_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-tautological-compare -Wno-char-subscripts -Wno-gnu -Wno-logical-op-parentheses -Wno-non-virtual-dtor")
set(UNIX_WARNINGS "${UNIX_WARNINGS} -Woverloaded-virtual -Wno-parentheses-equality -Wno-reorder -Wno-unused-function -Wno-unused-value -Wno-unused-variable")
set(UNIX_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-tautological-compare -Wno-char-subscripts -Wno-gnu -Wno-logical-op-parentheses -Wno-logical-not-parentheses -Wno-non-virtual-dtor -Wno-deprecated")
set(UNIX_WARNINGS "${UNIX_WARNINGS} -Woverloaded-virtual -Wno-parentheses-equality -Wno-reorder -Wno-unused-function -Wno-unused-value -Wno-unused-variable -Wno-unused-private-field -Wno-parentheses")
set(UNIX_CXX_WARNINGS "${UNIX_WARNINGS}")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
add_definitions(-DLL_ICC=1)
set(UNIX_WARNINGS "-wd327 -wd597 -wd858")
set(UNIX_CXX_WARNINGS "${UNIX_WARNINGS}")
endif ()
if (NOT DISABLE_FATAL_WARNINGS)

View File

@@ -14,25 +14,25 @@ else (STANDALONE)
use_prebuilt_binary(apr_suite)
if (WINDOWS)
set(APR_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.lib
debug libapr-1.lib
optimized libapr-1.lib
)
set(APRICONV_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib
debug libapriconv-1.lib
optimized libapriconv-1.lib
)
set(APRUTIL_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES}
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES}
debug libaprutil-1.lib
optimized libaprutil-1.lib
)
elseif (DARWIN)
set(APR_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.0.dylib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.0.dylib
debug libapr-1.0.dylib
optimized libapr-1.0.dylib
)
set(APRUTIL_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.dylib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.dylib
set(APRUTIL_LIBRARIES
debug libaprutil-1.dylib
optimized libaprutil-1.dylib
)
set(APRICONV_LIBRARIES iconv)
else (WINDOWS)
@@ -40,7 +40,10 @@ else (STANDALONE)
set(APRUTIL_LIBRARIES aprutil-1)
set(APRICONV_LIBRARIES iconv)
endif (WINDOWS)
set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1)
set(APR_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include/apr-1
${LIBS_PREBUILT_LEGACY_DIR}/include/apr-1
)
if (LINUX)
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES})

View File

@@ -9,7 +9,10 @@ if (STANDALONE)
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
else (STANDALONE)
use_prebuilt_binary(ogg-vorbis)
set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(VORBIS_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})

View File

@@ -13,5 +13,8 @@ else (STANDALONE)
else (LINUX)
set(DB_LIBRARIES db-4.2)
endif (LINUX)
set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(DB_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (STANDALONE)

View File

@@ -11,7 +11,10 @@ if (STANDALONE)
find_package(Boost 1.51.0 COMPONENTS date_time filesystem program_options regex system thread wave context)
else (STANDALONE)
use_prebuilt_binary(boost)
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(Boost_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
set(Boost_VERSION "1.52")
if (WINDOWS)

View File

@@ -38,11 +38,6 @@ if (WINDOWS)
${CMAKE_SOURCE_DIR}/newview/res/viewerRes.rc.in
${CMAKE_SOURCE_DIR}/newview/res/viewerRes.rc
)
configure_file(
${CMAKE_SOURCE_DIR}/newview/res/viewerRes_bc.rc.in
${CMAKE_SOURCE_DIR}/newview/res/viewerRes_bc.rc
)
endif (WINDOWS)
if (DARWIN)
@@ -52,13 +47,35 @@ if (DARWIN)
)
endif (DARWIN)
# Compose the version.
set(viewer_VERSION "${vMAJOR}.${vMINOR}.${vPATCH}.${vBUILD}")
if (viewer_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
message(STATUS "Version is ${viewer_VERSION}")
else (viewer_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
message(FATAL_ERROR "Could not determine version (${viewer_VERSION})")
endif (viewer_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
if (LINUX)
configure_file(
${CMAKE_SOURCE_DIR}/newview/linux_tools/wrapper.sh.in
${CMAKE_SOURCE_DIR}/newview/linux_tools/wrapper.sh
@ONLY
)
configure_file(
${CMAKE_SOURCE_DIR}/newview/linux_tools/handle_secondlifeprotocol.sh.in
${CMAKE_SOURCE_DIR}/newview/linux_tools/handle_secondlifeprotocol.sh
@ONLY
)
configure_file(
${CMAKE_SOURCE_DIR}/newview/linux_tools/install.sh.in
${CMAKE_SOURCE_DIR}/newview/linux_tools/install.sh
@ONLY
)
configure_file(
${CMAKE_SOURCE_DIR}/newview/linux_tools/refresh_desktop_app_entry.sh.in
${CMAKE_SOURCE_DIR}/newview/linux_tools/refresh_desktop_app_entry.sh
@ONLY
)
endif (LINUX)
# Compose the version.
set(${ROOT_PROJECT_NAME}_VERSION "${vMAJOR}.${vMINOR}.${vPATCH}.${vBUILD}")
if (${ROOT_PROJECT_NAME}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
message(STATUS "Version is ${${ROOT_PROJECT_NAME}_VERSION}")
else (${ROOT_PROJECT_NAME}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
message(FATAL_ERROR "Could not determine version (${${ROOT_PROJECT_NAME}_VERSION})")
endif (${ROOT_PROJECT_NAME}_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$")
# Report version to caller.
#set(viewer_VERSION "${viewer_VERSION}" PARENT_SCOPE)

View File

@@ -13,12 +13,15 @@ else (STANDALONE)
add_definitions("-DCARES_STATICLIB")
set(CARES_LIBRARIES areslib)
elseif (DARWIN)
set(CARES_LIBRARIES
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libcares.a
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libcares.a
set(CARES_LIBRARIES
debug libcares.a
optimized libcares.a
)
else (WINDOWS)
set(CARES_LIBRARIES cares)
endif (WINDOWS)
set(CARES_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/ares)
set(CARES_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include/ares
${LIBS_PREBUILT_LEGACY_DIR}/include/ares
)
endif (STANDALONE)

View File

@@ -29,8 +29,8 @@ set(cmake_SOURCE_FILES
ELFIO.cmake
EXPAT.cmake
ExamplePlugin.cmake
FMOD.cmake
FMODEX.cmake
FMODSTUDIO.cmake
FindAPR.cmake
FindBerkeleyDB.cmake
FindCARes.cmake

View File

@@ -18,5 +18,8 @@ else (STANDALONE)
list(APPEND CURL_LIBRARIES idn)
endif(LINUX AND WORD_SIZE EQUAL 64)
endif (WINDOWS)
set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(CURL_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (STANDALONE)

View File

@@ -1,6 +1,7 @@
# -*- cmake -*-
include(Prebuilt)
include(Boost)
set(COLLADADOM_FIND_QUIETLY OFF)
set(COLLADADOM_FIND_REQUIRED ON)
@@ -19,16 +20,33 @@ else (STANDALONE)
endif (NOT DARWIN AND NOT WINDOWS)
set(COLLADADOM_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/collada
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/collada/1.4
)
${LIBS_PREBUILT_DIR}/include/collada
${LIBS_PREBUILT_DIR}/include/collada/1.4
${LIBS_PREBUILT_LEGACY_DIR}/include/collada
${LIBS_PREBUILT_LEGACY_DIR}/include/collada/1.4
)
if (WINDOWS)
add_definitions(-DDOM_DYNAMIC)
set(COLLADADOM_LIBRARIES
debug libcollada14dom22-d
optimized libcollada14dom22
if(MSVC12)
use_prebuilt_binary(pcre)
use_prebuilt_binary(libxml)
set(COLLADADOM_LIBRARIES
debug libcollada14dom23-sd
optimized libcollada14dom23-s
libxml2_a
debug pcrecppd
optimized pcrecpp
debug pcred
optimized pcre
${BOOST_SYSTEM_LIBRARIES}
)
else(MSVC12)
add_definitions(-DDOM_DYNAMIC)
set(COLLADADOM_LIBRARIES
debug libcollada14dom22-d
optimized libcollada14dom22
)
endif(MSVC12)
else (WINDOWS)
set(COLLADADOM_LIBRARIES
collada14dom

View File

@@ -2,7 +2,7 @@
# Copies a binary back to the source directory
MACRO(COPY_BACK_TO_SOURCE target)
GET_TARGET_PROPERTY(FROM ${target} LOCATION)
SET(FROM $<TARGET_FILE:${target}>)
SET(TO ${CMAKE_CURRENT_SOURCE_DIR})
#MESSAGE("TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}")
ADD_CUSTOM_COMMAND(

View File

@@ -1,317 +0,0 @@
# -*- cmake -*-
# The copy_win_libs folder contains file lists and a script used to
# copy dlls, exes and such needed to run the SecondLife from within
# VisualStudio.
include(CMakeCopyIfDifferent)
if(WORD_SIZE EQUAL 32)
set(debug_libs_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
set(release_libs_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
else(WORD_SIZE EQUAL 32)
set(debug_libs_dir "${CMAKE_SOURCE_DIR}/../libraries/x86_64-win/lib/debug")
set(release_libs_dir "${CMAKE_SOURCE_DIR}/../libraries/x86_64-win/lib/release")
endif(WORD_SIZE EQUAL 32)
set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32")
set(vivox_files
SLVoice.exe
alut.dll
vivoxsdk.dll
ortp.dll
wrap_oal.dll
)
copy_if_different(
${vivox_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
out_targets
${vivox_files}
)
set(all_targets ${all_targets} ${out_targets})
set(debug_src_dir "${debug_libs_dir}")
set(debug_files
libhunspell.dll
libapr-1.dll
libaprutil-1.dll
libapriconv-1.dll
libeay32.dll
ssleay32.dll
libcollada14dom22-d.dll
glod.dll
)
copy_if_different(
${debug_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
out_targets
${debug_files}
)
set(all_targets ${all_targets} ${out_targets})
# Debug config runtime files required for the plugin test mule
set(plugintest_debug_src_dir "${debug_libs_dir}")
set(plugintest_debug_files
libeay32.dll
qtcored4.dll
qtguid4.dll
qtnetworkd4.dll
qtopengld4.dll
qtwebkitd4.dll
ssleay32.dll
)
copy_if_different(
${plugintest_debug_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug"
out_targets
${plugintest_debug_files}
)
set(all_targets ${all_targets} ${out_targets})
# Debug config runtime files required for the plugin test mule (Qt image format plugins)
set(plugintest_debug_src_dir "${debug_libs_dir}/imageformats")
set(plugintest_debug_files
qgifd4.dll
qicod4.dll
qjpegd4.dll
qmngd4.dll
qsvgd4.dll
qtiffd4.dll
)
copy_if_different(
${plugintest_debug_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug/imageformats"
out_targets
${plugintest_debug_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${plugintest_debug_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/llplugin/imageformats"
out_targets
${plugintest_debug_files}
)
set(all_targets ${all_targets} ${out_targets})
# Release & ReleaseDebInfo config runtime files required for the plugin test mule
set(plugintest_release_src_dir "${release_libs_dir}")
set(plugintest_release_files
libeay32.dll
qtcore4.dll
qtgui4.dll
qtnetwork4.dll
qtopengl4.dll
qtwebkit4.dll
ssleay32.dll
)
copy_if_different(
${plugintest_release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release"
out_targets
${plugintest_release_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${plugintest_release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo"
out_targets
${plugintest_release_files}
)
set(all_targets ${all_targets} ${out_targets})
# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
set(plugintest_release_src_dir "${release_libs_dir}/imageformats")
set(plugintest_release_files
qgif4.dll
qico4.dll
qjpeg4.dll
qmng4.dll
qsvg4.dll
qtiff4.dll
)
copy_if_different(
${plugintest_release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release/imageformats"
out_targets
${plugintest_release_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${plugintest_release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo/imageformats"
out_targets
${plugintest_release_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${plugintest_release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin/imageformats"
out_targets
${plugintest_release_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${plugintest_release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin/imageformats"
out_targets
${plugintest_release_files}
)
set(all_targets ${all_targets} ${out_targets})
# Debug config runtime files required for the plugins
set(plugins_debug_src_dir "${debug_libs_dir}")
set(plugins_debug_files
libeay32.dll
qtcored4.dll
qtguid4.dll
qtnetworkd4.dll
qtopengld4.dll
qtwebkitd4.dll
ssleay32.dll
)
copy_if_different(
${plugins_debug_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/Debug/llplugin"
out_targets
${plugins_debug_files}
)
set(all_targets ${all_targets} ${out_targets})
# Release & ReleaseDebInfo config runtime files required for the plugins
set(plugins_release_src_dir "${release_libs_dir}")
set(plugins_release_files
libeay32.dll
qtcore4.dll
qtgui4.dll
qtnetwork4.dll
qtopengl4.dll
qtwebkit4.dll
ssleay32.dll
)
copy_if_different(
${plugins_release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin"
out_targets
${plugins_release_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${plugins_release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin"
out_targets
${plugins_release_files}
)
set(all_targets ${all_targets} ${out_targets})
set(release_src_dir "${release_libs_dir}")
set(release_files
libhunspell.dll
libapr-1.dll
libaprutil-1.dll
libapriconv-1.dll
libeay32.dll
ssleay32.dll
libcollada14dom22.dll
glod.dll
)
if(WORD_SIZE EQUAL 32)
set(release_files ${release_files}
libtcmalloc_minimal.dll
)
endif(WORD_SIZE EQUAL 32)
if(FMODEX)
if (WORD_SIZE EQUAL 32)
set(fmodex_dll_file "fmodex.dll")
else (WORD_SIZE EQUAL 32)
set(fmodex_dll_file "fmodex64.dll")
endif (WORD_SIZE EQUAL 32)
find_path(FMODEX_BINARY_DIR "${fmodex_dll_file}"
"${release_src_dir}"
"${FMODEX_SDK_DIR}/api"
"${FMODEX_SDK_DIR}"
NO_DEFAULT_PATH
)
if(FMODEX_BINARY_DIR)
copy_if_different("${FMODEX_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/Release" out_targets "${fmodex_dll_file}")
set(all_targets ${all_targets} ${out_targets})
copy_if_different("${FMODEX_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo" out_targets "${fmodex_dll_file}")
set(all_targets ${all_targets} ${out_targets})
copy_if_different("${FMODEX_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/Debug" out_targets "${fmodex_dll_file}")
set(all_targets ${all_targets} ${out_targets})
endif(FMODEX_BINARY_DIR)
endif(FMODEX)
if(FMOD)
find_path(FMOD_BINARY_DIR fmod.dll
${release_src_dir}
${FMOD_SDK_DIR}/api
${FMOD_SDK_DIR}
)
if(FMOD_BINARY_DIR)
copy_if_different("${FMOD_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/Release" out_targets fmod.dll)
set(all_targets ${all_targets} ${out_targets})
copy_if_different("${FMOD_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo" out_targets fmod.dll)
set(all_targets ${all_targets} ${out_targets})
copy_if_different("${FMOD_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/Debug" out_targets fmod.dll)
set(all_targets ${all_targets} ${out_targets})
else(FMOD_BINARY_DIR)
list(APPEND release_files fmod.dll) #Required for compile. This will cause an error in copying binaries.
endif(FMOD_BINARY_DIR)
endif(FMOD)
copy_if_different(
${release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/Release"
out_targets
${release_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${vivox_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/Release"
out_targets
${vivox_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${release_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
out_targets
${release_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${vivox_src_dir}
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
out_targets
${vivox_files}
)
set(all_targets ${all_targets} ${out_targets})
add_custom_target(copy_win_libs ALL
DEPENDS
${all_targets}
${release_appconfig_file}
${relwithdebinfo_appconfig_file}
${debug_appconfig_file}
)
add_dependencies(copy_win_libs prepare)

View File

@@ -0,0 +1,181 @@
# -*- cmake -*-
# The copy_win_libs folder contains file lists and a script used to
# copy dlls, exes and such needed to run the SecondLife from within
# VisualStudio.
set(LIBS_PREBUILT_DIR "@LIBS_PREBUILT_DIR@")
set(LIBS_PREBUILT_LEGACY_DIR "@LIBS_PREBUILT_LEGACY_DIR@")
set(MSVC10 "@MSVC10@")
set(WORD_SIZE "@WORD_SIZE@")
set(LIBS_RELEASE_DIR
${LIBS_PREBUILT_DIR}/lib/release
${LIBS_PREBUILT_LEGACY_DIR}/lib/release
)
set(LIBS_DEBUG_DIR
${LIBS_PREBUILT_DIR}/lib/debug
${LIBS_PREBUILT_LEGACY_DIR}/lib/debug
)
function(copy_files paths names dest)
string(FIND ${dest} ${CUR_CONFIG} idx)
if(${idx} LESS 0)
return()
endif(${idx} LESS 0)
foreach(f ${names})
foreach(p ${paths})
set(from_file "${p}/${f}")
set(to_dest "${CMAKE_BINARY_DIR}/newview/${dest}/")
if(EXISTS ${from_file})
message("Copying ${from_file} to ${to_dest}")
if(NOT EXISTS ${to_dest})
execute_process(COMMAND md "${to_dest}")
endif(NOT EXISTS ${to_dest})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${from_file}" "${to_dest}${f}" RESULT_VARIABLE result)
if(${result})
message(SEND_ERROR "Unsuccessful.")
endif(${result})
set(found 1)
break()
endif(EXISTS ${from_file})
endforeach(p)
if(NOT found)
message(SEND_ERROR "Failed to find library: ${f}")
endif(NOT found)
endforeach(f)
endfunction(copy_files)
set(vivox_files
ca-bundle.crt
libsndfile-1.dll
ortp.dll
SLVoice.exe
vivoxoal.dll
vivoxplatform.dll
vivoxsdk.dll
zlib1.dll
)
copy_files("${LIBS_RELEASE_DIR}" "${vivox_files}" "Release" )
copy_files("${LIBS_RELEASE_DIR}" "${vivox_files}" "RelWithDebInfo")
copy_files("${LIBS_DEBUG_DIR}" "${vivox_files}" "Debug")
set(release_files
libhunspell.dll
libapr-1.dll
libaprutil-1.dll
libapriconv-1.dll
libeay32.dll
ssleay32.dll
glod.dll
qtcore4.dll
)
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "Release")
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "RelWithDebInfo")
copy_files("${LIBS_DEBUG_DIR}" "${release_files}" "Debug")
if(MSVC10)
copy_files("${LIBS_DEBUG_DIR}" "libcollada14dom22-d.dll" "Debug")
endif(MSVC10)
if(WORD_SIZE EQUAL 32)
set(release_files
libcollada14dom22.dll
libtcmalloc_minimal.dll
)
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "Release")
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "RelWithDebInfo")
endif(WORD_SIZE EQUAL 32)
set(plugins_release_files
libeay32.dll
qtcore4.dll
qtgui4.dll
qtnetwork4.dll
qtopengl4.dll
qtwebkit4.dll
ssleay32.dll
qtxmlpatterns4.dll
)
copy_files("${LIBS_RELEASE_DIR}" "${plugins_release_files}" "Release/llplugin")
copy_files("${LIBS_RELEASE_DIR}" "${plugins_release_files}" "RelWithDebInfo/llplugin")
if(0)
copy_files("${LIBS_RELEASE_DIR}" "${plugin_release_files}" "../test_apps/llplugintest/Release")
copy_files("${LIBS_RELEASE_DIR}" "${plugin_release_files}" "../test_apps/llplugintest/RelWithDebInfo")
endif(0)
# Debug config runtime files required for the plugins
set(plugins_debug_files
libeay32.dll
qtcored4.dll
qtguid4.dll
qtnetworkd4.dll
qtopengld4.dll
qtwebkitd4.dll
ssleay32.dll
qtxmlpatternsd4.dll
)
copy_files("${LIBS_DEBUG_DIR}" "${plugins_debug_files}" "Debug/llplugin")
if(0)
copy_files("${LIBS_DEBUG_DIR}" "${plugins_debug_files}" "../test_apps/llplugintest/Debug")
endif(0)
# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
set(plugin_image_release_files
qgif4.dll
qico4.dll
qjpeg4.dll
qmng4.dll
qsvg4.dll
qtiff4.dll
)
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "Release/llplugin/imageformats")
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "RelWithDebInfo/llplugin/imageformats")
if(0)
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "../test_apps/llplugintest/imageformats/Release")
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "../test_apps/llplugintest/imageformats/RelWithDebInfo")
endif(0)
# Debug config runtime files required for the plugin test mule (Qt image format plugins)
set(plugin_image_debug_files
qgifd4.dll
qicod4.dll
qjpegd4.dll
qmngd4.dll
qsvgd4.dll
qtiffd4.dll
)
copy_files("${LIBS_DEBUG_DIR}/imageformats" "${plugin_image_debug_files}" "Debug/llplugin/imageformats")
if(0)
copy_files("${LIBS_DEBUG_DIR}/imageformats" "${plugin_image_debug_files}" "../test_apps/llplugintest/imageformats/Debug")
endif(0)
# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
set(plugin_codec_release_files
qcncodecs4.dll
qjpcodecs4.dll
qkrcodecs4.dll
qtwcodecs4.dll
)
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "Release/llplugin/codecs")
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "RelWithDebInfo/llplugin/codecs")
if(0)
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "../test_apps/llplugintest/codecs/Release")
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "../test_apps/llplugintest/codecs/RelWithDebInfo")
endif(0)
# Debug config runtime files required for the plugin test mule (Qt image format plugins)
set(plugin_codec_debug_files
qcncodecsd4.dll
qjpcodecsd4.dll
qkrcodecsd4.dll
qtwcodecsd4.dll
)
copy_files("${LIBS_DEBUG_DIR}/codecs" "${plugin_codec_debug_files}" "Debug/llplugin/codecs")
if(0)
copy_files("${LIBS_DEBUG_DIR}/codecs" "${plugin_codec_debug_files}" "../test_apps/llplugintest/codecs/Debug")
endif(0)

View File

@@ -10,8 +10,9 @@ elseif (LINUX)
use_prebuilt_binary(dbusglib)
set(DBUSGLIB_FOUND ON FORCE BOOL)
set(DBUSGLIB_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/dbus
)
${LIBS_PREBUILT_DIR}/include/dbus
${LIBS_PREBUILT_LEGACY_DIR}/include/dbus
)
# We don't need to explicitly link against dbus-glib itself, because
# the viewer probes for the system's copy at runtime.
set(DBUSGLIB_LIBRARIES

View File

@@ -11,25 +11,32 @@ if (WINDOWS)
set (DIRECTX_ARCHITECTURE x86)
endif (WORD_SIZE EQUAL 32)
SET(program_files $ENV{ProgramW6432})
if(NOT program_files)
SET(program_files $ENV{ProgramFiles})
endif(NOT program_files)
SET(program_files_x86 "ProgramFiles(x86)")
SET(program_files_x86 $ENV{${program_files_x86}})
find_path(DIRECTX_ROOT_DIR Include/dxdiag.h
PATHS
"$ENV{DXSDK_DIR}"
"$ENV{ProgramFiles}/Microsoft DirectX SDK (June 2010)"
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (June 2010)"
"$ENV{ProgramFiles}/Microsoft DirectX SDK (February 2010)"
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (February 2010)"
"$ENV{ProgramFiles}/Microsoft DirectX SDK (March 2009)"
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (March 2009)"
"$ENV{ProgramFiles}/Microsoft DirectX SDK (August 2008)"
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (August 2008)"
"$ENV{ProgramFiles}/Microsoft DirectX SDK (June 2008)"
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (June 2008)"
"$ENV{ProgramFiles}/Microsoft DirectX SDK (March 2008)"
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (March 2008)"
"$ENV{ProgramFiles}/Microsoft DirectX SDK (November 2007)"
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (November 2007)"
"$ENV{ProgramFiles}/Microsoft DirectX SDK (August 2007)"
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (August 2007)"
"${program_files}/Microsoft DirectX SDK (June 2010)"
"${program_files_x86}/Microsoft DirectX SDK (June 2010)"
"${program_files}/Microsoft DirectX SDK (February 2010)"
"${program_files_x86}/Microsoft DirectX SDK (February 2010)"
"${program_files}/Microsoft DirectX SDK (March 2009)"
"${program_files_x86}/Microsoft DirectX SDK (March 2009)"
"${program_files}/Microsoft DirectX SDK (August 2008)"
"${program_files_x86}/Microsoft DirectX SDK (August 2008)"
"${program_files}/Microsoft DirectX SDK (June 2008)"
"${program_files_x86}/Microsoft DirectX SDK (June 2008)"
"${program_files}/Microsoft DirectX SDK (March 2008)"
"${program_files_x86}/Microsoft DirectX SDK (March 2008)"
"${program_files}/Microsoft DirectX SDK (November 2007)"
"${program_files_x86}/Microsoft DirectX SDK (November 2007)"
"${program_files}/Microsoft DirectX SDK (August 2007)"
"${program_files_x86}/Microsoft DirectX SDK (August 2007)"
)
if (DIRECTX_ROOT_DIR)
@@ -38,10 +45,10 @@ if (WINDOWS)
else (DIRECTX_ROOT_DIR)
find_path (WIN_KIT_ROOT_DIR Include/um/windows.h
PATHS
"$ENV{ProgramFiles}/Windows Kits/8.1"
"$ENV{ProgramFiles(x86)}/Windows Kits/8.1"
"$ENV{ProgramFiles}/Windows Kits/8.0"
"$ENV{ProgramFiles(x86)}/Windows Kits/8.0"
"${program_files}/Windows Kits/8.1"
"${program_files_x86}/Windows Kits/8.1"
"${program_files}/Windows Kits/8.0"
"${program_files_x86}/Windows Kits/8.0"
)
find_path (WIN_KIT_LIB_DIR dxguid.lib

View File

@@ -2,7 +2,7 @@
# The top-level CMakeLists.txt configures packages and tool locations.
set(packages "@PREBUILT_PACKAGES@")
set(python "@PYTHON_EXECUTABLE@")
set(install_dir "@CMAKE_SOURCE_DIR@/..")
set(install_dir "@CMAKE_BINARY_DIR@/packages")
set(scp "@SCP_EXECUTABLE@")
set(scripts_dir "@SCRIPTS_DIR@")
set(sentinel_dir "@CMAKE_BINARY_DIR@/prepare")
@@ -20,7 +20,7 @@ foreach(package ${packages})
# This package is missing or out of date.
message(STATUS "Obtaining${proprietary_message} prebuilt '${package}'")
execute_process(
COMMAND ${python} install.py -p${prebuilt_type} --install-dir=${install_dir} ${scp_option} ${package}
COMMAND ${python} install.py -p${prebuilt_type} --install-dir=${install_dir} --installed-manifest=${install_dir}/installed.xml ${scp_option} ${package}
WORKING_DIRECTORY ${scripts_dir}
RESULT_VARIABLE result
)

View File

@@ -8,7 +8,10 @@ if (STANDALONE)
elseif (LINUX)
use_prebuilt_binary(elfio)
set(ELFIO_LIBRARIES ELFIO)
set(ELFIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(ELFIO_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
set(ELFIO_FOUND "YES")
endif (STANDALONE)

View File

@@ -9,9 +9,16 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(expat)
if (WINDOWS)
set(EXPAT_LIBRARIES libexpatMT)
if (MSVC12)
set(EXPAT_LIBRARIES expat)
else (MSVC12)
set(EXPAT_LIBRARIES libexpatMT)
endif (MSVC12)
else (WINDOWS)
set(EXPAT_LIBRARIES expat)
endif (WINDOWS)
set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(EXPAT_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (STANDALONE)

View File

@@ -1,52 +0,0 @@
# -*- cmake -*-
include(Linking)
if(INSTALL_PROPRIETARY)
include(Prebuilt)
use_prebuilt_binary(fmod)
endif(INSTALL_PROPRIETARY)
find_library(FMOD_LIBRARY
NAMES fmod fmodvc fmod-3.75
PATHS
optimized ${ARCH_PREBUILT_DIRS_RELEASE}
debug ${ARCH_PREBUILT_DIRS_DEBUG}
)
if (NOT FMOD_LIBRARY)
set(FMOD_SDK_DIR CACHE PATH "Path to the FMOD SDK.")
if (FMOD_SDK_DIR)
find_library(FMOD_LIBRARY
NAMES fmodvc fmod-3.75 fmod
PATHS
${FMOD_SDK_DIR}/api/lib
${FMOD_SDK_DIR}/api
${FMOD_SDK_DIR}/lib
${FMOD_SDK_DIR}
)
endif (FMOD_SDK_DIR)
endif (NOT FMOD_LIBRARY)
find_path(FMOD_INCLUDE_DIR fmod.h
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include
${FMOD_SDK_DIR}/api/inc
${FMOD_SDK_DIR}/inc
${FMOD_SDK_DIR}
)
if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
set(FMOD ON CACHE BOOL "Use closed source FMOD sound library.")
else (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
set(FMOD_LIBRARY "")
set(FMOD_INCLUDE_DIR "")
if (FMOD)
message(STATUS "No support for FMOD audio (need to set FMOD_SDK_DIR?)")
endif (FMOD)
set(FMOD OFF CACHE BOOL "Use closed source FMOD sound library.")
endif (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
if (FMOD)
message(STATUS "Building with FMOD audio support")
endif (FMOD)

View File

@@ -2,81 +2,115 @@
include(Linking)
if (NOT FMODEX_LIBRARY)
set(FMODEX_SDK_DIR CACHE PATH "Path to the FMOD Ex SDK.")
if (FMODEX_SDK_DIR)
if(WORD_SIZE EQUAL 32)
find_library(FMODEX_LIBRARY
fmodex_vc fmodexL_vc fmodex fmodexL
PATHS
"${FMODEX_SDK_DIR}/api/lib"
"${FMODEX_SDK_DIR}/api"
"${FMODEX_SDK_DIR}/lib"
"${FMODEX_SDK_DIR}"
)
elseif(WORD_SIZE EQUAL 64)
find_library(FMODEX_LIBRARY
fmodex64_vc fmodexL64_vc fmodex64 fmodexL64
PATHS
"${FMODEX_SDK_DIR}/api/lib"
"${FMODEX_SDK_DIR}/api"
"${FMODEX_SDK_DIR}/lib"
"${FMODEX_SDK_DIR}"
)
endif(WORD_SIZE EQUAL 32)
endif(FMODEX_SDK_DIR)
if(WINDOWS AND NOT FMODEX_SDK_DIR)
GET_FILENAME_COMPONENT(FMODEX_PROG_DIR [HKEY_CURRENT_USER\\Software\\FMOD\ Programmers\ API\ Windows] ABSOLUTE CACHE)
if(WORD_SIZE EQUAL 32)
find_library(FMODEX_LIBRARY
fmodex_vc fmodexL_vc
PATHS
"${FMODEX_PROG_DIR}/api/lib"
"${FMODEX_PROG_DIR}/api"
"${FMODEX_PROG_DIR}"
)
else(WORD_SIZE EQUAL 32)
find_library(FMODEX_LIBRARY
fmodex64_vc fmodexL64_vc
PATHS
"${FMODEX_PROG_DIR}/api/lib"
"${FMODEX_PROG_DIR}/api"
"${FMODEX_PROG_DIR}"
)
endif(WORD_SIZE EQUAL 32)
if(FMODEX_LIBRARY)
message(STATUS "Found fmodex in ${FMODEX_PROG_DIR}")
set(FMODEX_SDK_DIR "${FMODEX_PROG_DIR}")
set(FMODEX_SDK_DIR "${FMODEX_PROG_DIR}" CACHE PATH "Path to the FMOD Ex SDK." FORCE)
endif(FMODEX_LIBRARY)
endif(WINDOWS AND NOT FMODEX_SDK_DIR)
endif (NOT FMODEX_LIBRARY)
if (FMODEX AND FMODSTUDIO)
message( FATAL_ERROR "You can not enable two FMOD variants at the same time." )
endif (FMODEX AND FMODSTUDIO)
find_path(FMODEX_INCLUDE_DIR fmod.hpp
"${LIBS_PREBUILT_DIR}/include/fmodex"
"${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/fmodex"
"${FMODEX_SDK_DIR}/api/inc"
"${FMODEX_SDK_DIR}/inc"
"${FMODEX_SDK_DIR}"
)
unset(FMOD_LIBRARY_RELEASE CACHE)
unset(FMOD_LIBRARY_DEBUG CACHE)
unset(FMOD_INCLUDE_DIR CACHE)
if(DARWIN)
set(FMODEX_ORIG_LIBRARY "${FMODEX_LIBRARY}")
set(FMODEX_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/libfmodex.dylib")
endif(DARWIN)
set(FMOD_EXTERNAL_LIB OFF)
if (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
set(FMODEX ON CACHE BOOL "Use closed source FMOD Ex sound library.")
else (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
set(FMODEX_LIBRARY "")
set(FMODEX_INCLUDE_DIR "")
if (FMODEX)
message(STATUS "No support for FMOD Ex audio (need to set FMODEX_SDK_DIR?)")
endif (FMODEX)
set(FMODEX OFF CACHE BOOL "Use closed source FMOD Ex sound library.")
if(STANDALONE OR WINDOWS)
if (NOT FMODEX_SDK_DIR AND WINDOWS)
GET_FILENAME_COMPONENT(REG_DIR [HKEY_CURRENT_USER\\Software\\FMOD\ Programmers\ API\ Windows] ABSOLUTE)
set(FMODEX_SDK_DIR ${REG_DIR} CACHE PATH "Path to the FMOD Ex SDK." FORCE)
endif (NOT FMODEX_SDK_DIR AND WINDOWS)
if(NOT FMODEX_SDK_DIR AND STANDALONE)
message(FATAL_ERROR "FMODEX_SDK_DIR not set!")
endif(NOT FMODEX_SDK_DIR AND STANDALONE)
endif(STANDALONE OR WINDOWS)
if(FMODEX_SDK_DIR)
set(fmod_lib_paths "${FMODEX_SDK_DIR}/api" "${FMODEX_SDK_DIR}/api/lib" )
set(fmod_inc_paths "${FMODEX_SDK_DIR}/api/inc")
if(WINDOWS)
set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES .dll)
endif(WINDOWS)
if(WORD_SIZE EQUAL 64)
find_library(FMOD_LIBRARY_RELEASE fmodex64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
find_library(FMOD_LIBRARY_DEBUG fmodexL64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
else(WORD_SIZE EQUAL 64)#Check if CMAKE_FIND_LIBRARY_PREFIXES is set to 'lib' for darwin.
find_library(FMOD_LIBRARY_RELEASE fmodex PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
find_library(FMOD_LIBRARY_DEBUG fmodexL PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
endif(WORD_SIZE EQUAL 64)
if(WINDOWS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
if(WORD_SIZE EQUAL 64)
find_library(FMOD_LINK_LIBRARY_RELEASE fmodex64_vc PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
find_library(FMOD_LINK_LIBRARY_DEBUG fmodexL64_vc PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
else(WORD_SIZE EQUAL 64)#Check if CMAKE_FIND_LIBRARY_PREFIXES is set to 'lib' for darwin.
find_library(FMOD_LINK_LIBRARY_RELEASE fmodex_vc PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
find_library(FMOD_LINK_LIBRARY_DEBUG fmodexL_vc PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
endif(WORD_SIZE EQUAL 64)
else(WINDOWS)
set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
endif(WINDOWS)
find_path(FMOD_INCLUDE_DIR fmod.hpp ${fmod_inc_paths})
if(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
if(STANDALONE)
message(FATAL_ERROR "Provided FMODEX_SDK_DIR path not found '{$FMODEX_SDK_DIR}'")
else(STANDALONE)
message(STATUS "Provided FMODEX_SDK_DIR path not found '${FMODEX_SDK_DIR}'. Falling back to prebuilts")
endif(STANDALONE)
else(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
message(STATUS "Using system-provided FMOD Ex Libraries")
set(FMOD_EXTERNAL_LIB ON)
endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
endif (FMODEX_SDK_DIR)
if (NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
if(WINDOWS)
set(lib_suffix .dll)
elseif(DARWIN)
set(lib_suffix .dylib)
else(WINDOWS)
set(lib_suffix .so)
endif(WINDOWS)
if(WINDOWS)
if(WORD_SIZE EQUAL 64)
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmodex64${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodexL64${lib_suffix})
else(WORD_SIZE EQUAL 64)
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmodex${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodexL${lib_suffix})
endif(WORD_SIZE EQUAL 64)
else(WINDOWS)
if(WORD_SIZE EQUAL 64)
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/libfmodex64${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/libfmodex64L${lib_suffix})
else(WORD_SIZE EQUAL 64)
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/libfmodex${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/libfmodexL${lib_suffix})
endif(WORD_SIZE EQUAL 64)
endif(WINDOWS)
set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
if(WINDOWS)
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
endif(WINDOWS)
use_prebuilt_binary(fmodex)
set(FMOD_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include/fmodex)
endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
if(FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
set(FMOD ON)
if (NOT FMOD_LIBRARY_DEBUG) #Use release library in debug configuration if debug library is absent.
set(FMOD_LIBRARY_DEBUG ${FMOD_LIBRARY_RELEASE})
endif (NOT FMOD_LIBRARY_DEBUG)
else (FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
message(STATUS "No support for FMOD EX audio (need to set FMODEX_SDK_DIR?)")
set(FMOD OFF)
set(FMODEX OFF)
endif (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
endif (FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
if (FMODEX)
if (FMOD)
message(STATUS "Building with FMOD Ex audio support")
endif (FMODEX)
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODEX")
endif (FMOD)

View File

@@ -0,0 +1,112 @@
# -*- cmake -*-
include(Linking)
if (FMODEX AND FMODSTUDIO)
message( FATAL_ERROR "You can not enable two FMOD variants at the same time." )
endif (FMODEX AND FMODSTUDIO)
unset(FMOD_LIBRARY_RELEASE CACHE)
unset(FMOD_LIBRARY_DEBUG CACHE)
unset(FMOD_INCLUDE_DIR CACHE)
set(FMOD_EXTERNAL_LIB OFF)
if(STANDALONE OR WINDOWS)
if (NOT FMODSTUDIO_SDK_DIR AND WINDOWS)
#GET_FILENAME_COMPONENT(REG_DIR [HKEY_CURRENT_USER\\Software\\FMOD\ Studio\ API\ Windows] ABSOLUTE)
#set(FMODSTUDIO_SDK_DIR ${REG_DIR} CACHE PATH "Path to the FMOD Studio SDK." FORCE)
endif (NOT FMODSTUDIO_SDK_DIR AND WINDOWS)
if(NOT FMODSTUDIO_SDK_DIR AND STANDALONE)
message(FATAL_ERROR "FMODSTUDIO_SDK_DIR not set!")
endif(NOT FMODSTUDIO_SDK_DIR AND STANDALONE)
endif(STANDALONE OR WINDOWS)
if(FMODSTUDIO_SDK_DIR)
if(LINUX AND WORD_SIZE EQUAL 32)
set(fmod_lib_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/lib/x86" )
elseif(LINUX)
set(fmod_lib_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/lib/x86_64")
else(LINUX AND WORD_SIZE EQUAL 32)
set(fmod_lib_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/lib")
endif(LINUX AND WORD_SIZE EQUAL 32)
set(fmod_inc_paths "${FMODSTUDIO_SDK_DIR}/api/lowlevel/inc")
if(WINDOWS)
set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES .dll)
endif(WINDOWS)
if(WORD_SIZE EQUAL 64 AND WINDOWS)
find_library(FMOD_LIBRARY_RELEASE fmod64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
find_library(FMOD_LIBRARY_DEBUG fmodL64 PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
else(WORD_SIZE EQUAL 64 AND WINDOWS)#Check if CMAKE_FIND_LIBRARY_PREFIXES is set to 'lib' for darwin.
find_library(FMOD_LIBRARY_RELEASE fmod PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
find_library(FMOD_LIBRARY_DEBUG fmodL PATHS ${fmod_lib_paths} NO_DEFAULT_PATH)
endif(WORD_SIZE EQUAL 64 AND WINDOWS)
if(WINDOWS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
else(WINDOWS)
set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
endif(WINDOWS)
find_path(FMOD_INCLUDE_DIR fmod.hpp ${fmod_inc_paths})
if(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
if(STANDALONE)
message(FATAL_ERROR "Provided FMODSTUDIO_SDK_DIR path not found '{$FMODSTUDIO_SDK_DIR}'")
else(STANDALONE)
message(STATUS "Provided FMODSTUDIO_SDK_DIR path not found '${FMODSTUDIO_SDK_DIR}'. Falling back to prebuilts")
endif(STANDALONE)
else(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
message(STATUS "Using system-provided FMOD Studio Libraries")
set(FMOD_EXTERNAL_LIB ON)
endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
endif (FMODSTUDIO_SDK_DIR)
if (NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
if(WINDOWS)
set(lib_suffix .dll)
elseif(DARWIN)
set(lib_suffix .dylib)
else(WINDOWS)
set(lib_suffix .so)
endif(WINDOWS)
if(WINDOWS)
if(WORD_SIZE EQUAL 64)
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmod64${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodL64${lib_suffix})
else(WORD_SIZE EQUAL 64)
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmod${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodL${lib_suffix})
endif(WORD_SIZE EQUAL 64)
else(WINDOWS)
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/libfmod${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/libfmodL${lib_suffix})
endif(WINDOWS)
set(FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
set(FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
if(WINDOWS)
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_RELEASE ${FMOD_LIBRARY_RELEASE})
string(REPLACE ".dll" "_vc.lib" FMOD_LINK_LIBRARY_DEBUG ${FMOD_LIBRARY_DEBUG})
endif(WINDOWS)
use_prebuilt_binary(fmodstudio)
set(FMOD_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include/fmodstudio)
endif(NOT FMOD_LIBRARY_RELEASE OR NOT FMOD_INCLUDE_DIR)
if(FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
set(FMOD ON)
if (NOT FMOD_LIBRARY_DEBUG) #Use release library in debug configuration if debug library is absent.
set(FMOD_LIBRARY_DEBUG ${FMOD_LIBRARY_RELEASE})
endif (NOT FMOD_LIBRARY_DEBUG)
else (FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
message(STATUS "No support for FMOD Studio audio (need to set FMODSTUDIO_SDK_DIR?)")
set(FMOD OFF)
set(FMODSTUDIO OFF)
endif (FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
if (FMOD)
message(STATUS "Building with FMOD Studio audio support")
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO")
endif (FMOD)

View File

@@ -7,12 +7,17 @@ if (STANDALONE)
pkg_check_modules(FREETYPE REQUIRED freetype2)
else (STANDALONE)
use_prebuilt_binary(freetype)
if (LINUX)
if(MSVC12)
set(FREETYPE_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
else (LINUX)
set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
endif (LINUX)
${LIBS_PREBUILT_DIR}/include/freetype2
${LIBS_PREBUILT_LEGACY_DIR}/include/freetype2
)
else(MSVC12)
set(FREETYPE_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (MSVC12)
set(FREETYPE_LIBRARIES freetype)
endif (STANDALONE)

View File

@@ -8,6 +8,9 @@ if (STANDALONE)
include(FindGLOD)
else (STANDALONE)
use_prebuilt_binary(GLOD)
set(GLOD_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(GLOD_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
set(GLOD_LIBRARIES glod)
endif (STANDALONE)

View File

@@ -16,10 +16,13 @@ else (STANDALONE)
set(GSTREAMER010_FOUND ON FORCE BOOL)
set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL)
set(GSTREAMER010_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2
)
${LIBS_PREBUILT_DIR}/include/gstreamer-0.10
${LIBS_PREBUILT_DIR}/includeg/lib-2.0
${LIBS_PREBUILT_DIR}/include/libxml2
${LIBS_PREBUILT_LEGACY_DIR}/include/gstreamer-0.10
${LIBS_PREBUILT_LEGACY_DIR}/include/glib-2.0
${LIBS_PREBUILT_LEGACY_DIR}/include/libxml2
)
endif (STANDALONE)

View File

@@ -17,5 +17,10 @@ else (STANDALONE)
endif (WINDOWS)
# yes, this does look dumb, no, it's not incorrect
# I think it's incorrect: the second one should go --Aleric
set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad/google_breakpad")
set(BREAKPAD_INCLUDE_DIRECTORIES
${LIBS_PREBUILT_DIR}/include/google_breakpad
${LIBS_PREBUILT_LEGACY_DIR}/include/google_breakpad
${LIBS_PREBUILT_DIR}/include/google_breakpad/google_breakpad
${LIBS_PREBUILT_LEGACY_DIR}/include/google_breakpad/google_breakpad
)
endif (STANDALONE)

View File

@@ -25,7 +25,9 @@ else (STANDALONE)
set(TCMALLOC_LIBRARIES tcmalloc_minimal)
endif()
set(GOOGLE_PERFTOOLS_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (LINUX)
endif (STANDALONE)

View File

@@ -6,7 +6,10 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(hunspell)
set(HUNSPELL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/hunspell)
set(HUNSPELL_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include/hunspell
${LIBS_PREBUILT_LEGACY_DIR}/include/hunspell
)
if (LINUX OR DARWIN)
set(HUNSPELL_LIBRARY hunspell-1.3)

View File

@@ -13,11 +13,14 @@ else (STANDALONE)
set(JPEG_LIBRARIES jpeg)
elseif (DARWIN)
set(JPEG_LIBRARIES
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libjpeg.a
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libjpeg.a
debug libjpeg.a
optimized libjpeg.a
)
elseif (WINDOWS)
set(JPEG_LIBRARIES jpeglib)
endif (LINUX)
set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(JPEG_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (STANDALONE)

View File

@@ -10,13 +10,22 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(jsoncpp)
if (WINDOWS)
set(JSONCPP_LIBRARIES
debug json_vc${MSVC_SUFFIX}d
optimized json_vc${MSVC_SUFFIX})
if(MSVC12)
set(JSONCPP_LIBRARIES
debug json_vc${MSVC_SUFFIX}debug_libmt.lib
optimized json_vc${MSVC_SUFFIX}_libmt)
else(MSVC12)
set(JSONCPP_LIBRARIES
debug json_vc${MSVC_SUFFIX}d
optimized json_vc${MSVC_SUFFIX})
endif(MSVC12)
elseif (DARWIN)
set(JSONCPP_LIBRARIES json_linux-gcc-4.0.1_libmt)
elseif (LINUX)
set(JSONCPP_LIBRARIES jsoncpp)
endif (WINDOWS)
set(JSONCPP_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/jsoncpp)
set(JSONCPP_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include/jsoncpp
${LIBS_PREBUILT_LEGACY_DIR}/include/jsoncpp
)
endif (STANDALONE)

View File

@@ -87,7 +87,7 @@ MACRO(ADD_BUILD_TEST_INTERNAL name parent libraries source_files)
${libraries}
)
GET_TARGET_PROPERTY(TEST_EXE ${name}_test LOCATION)
SET(TEST_EXE $<TARGET_FILE:${name}_test>)
SET(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}_test_ok.txt)
IF ("${wrapper}" STREQUAL "")

View File

@@ -1,17 +1,13 @@
# ll_deploy_sharedlibs_command
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
macro(ll_deploy_sharedlibs_command target_exe)
get_target_property(TARGET_LOCATION ${target_exe} LOCATION)
get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
SET(OUTPUT_PATH $<TARGET_FILE:${target_exe}>)
if(DARWIN)
SET_TEST_PATH(SEARCH_DIRS)
get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE)
if(IS_BUNDLE)
# If its a bundle the exe is not in the target location, this should find it.
get_filename_component(TARGET_FILE ${TARGET_LOCATION} NAME)
set(OUTPUT_PATH ${TARGET_LOCATION}.app/Contents/MacOS)
set(TARGET_LOCATION ${OUTPUT_PATH}/${TARGET_FILE})
set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources)
endif(IS_BUNDLE)
elseif(WINDOWS)
@@ -26,7 +22,7 @@ macro(ll_deploy_sharedlibs_command target_exe)
TARGET ${target_exe} POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS
"-DBIN_NAME=\"${TARGET_LOCATION}\""
"-DBIN_NAME=\"$<TARGET_FILE:${target_exe}>\""
"-DSEARCH_DIRS=\"${SEARCH_DIRS}\""
"-DDST_PATH=\"${OUTPUT_PATH}\""
"-P"
@@ -42,7 +38,8 @@ macro(ll_stage_sharedlib DSO_TARGET)
# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
if(NOT WINDOWS)
get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
SET(DSO_PATH $<TARGET_FILE:${DSO_TARGET}>)
get_filename_component(DSO_FILE ${DSO_PATH} NAME)
if(DARWIN)
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)

View File

@@ -17,7 +17,10 @@ else (STANDALONE)
use_prebuilt_binary(mesa)
use_prebuilt_binary(SDL)
set (SDL_FOUND TRUE)
set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR})
set (SDL_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
if(WORD_SIZE EQUAL 64)
set (SDL_LIBRARY SDL)
else(WORD_SIZE EQUAL 64)

View File

@@ -5,26 +5,35 @@ set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
include(Variables)
if (NOT STANDALONE)
set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib)
set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release)
set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug)
if(CMAKE_BUILD_TYPE)
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
endif(CMAKE_BUILD_TYPE)
if(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode")
# the cmake xcode and VS generators implicitly append ${CMAKE_CFG_INTDIR} to the library paths for us
# fortunately both windows and darwin are case insensitive filesystems so this works.
set(ARCH_PREBUILT_LINK_DIRS "${ARCH_PREBUILT_DIRS}")
set(ARCH_PREBUILT_LINK_DIRS
${LIBS_PREBUILT_DIR}/lib
${LIBS_PREBUILT_LEGACY_DIR}/lib
)
else(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode")
# else block is for linux and any other makefile based generators
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
set(ARCH_PREBUILT_LINK_DIRS ${ARCH_PREBUILT_DIRS}/${CMAKE_BUILD_TYPE_LOWER})
set(ARCH_PREBUILT_LINK_DIRS
${LIBS_PREBUILT_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}
${LIBS_PREBUILT_LEGACY_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}
)
endif(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode")
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
if (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "release")
# When we're building something other than Release, append the
# packages/lib/release directory to deal with autobuild packages that don't
# provide (e.g.) lib/debug libraries.
list(APPEND ARCH_PREBUILT_LINK_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
list(APPEND ARCH_PREBUILT_LINK_DIRS
${LIBS_PREBUILT_DIR}/lib/release
${LIBS_PREBUILT_LEGACY_DIR}/lib/release
)
endif (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "release")
endif (NOT STANDALONE)
link_directories(${ARCH_PREBUILT_LINK_DIRS})
@@ -37,7 +46,7 @@ else (LINUX)
set(PTHREAD_LIBRARY "")
endif (LINUX)
if (WINDOWS)
if (WINDOWS)
set(WINDOWS_LIBRARIES
advapi32
shell32

View File

@@ -15,7 +15,10 @@ else (STANDALONE)
set(NDOF_LIBRARY ndofdev)
endif (WINDOWS)
set(NDOF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/ndofdev)
set(NDOF_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include/ndofdev
${LIBS_PREBUILT_LEGACY_DIR}/include/ndofdev
)
set(NDOF_FOUND 1)
endif (STANDALONE)

View File

@@ -2,6 +2,7 @@
include(Linking)
include(Prebuilt)
if(NOT FMOD)
if (LINUX)
set(OPENAL ON CACHE BOOL "Enable OpenAL")
else (LINUX)
@@ -21,9 +22,14 @@ if (OPENAL)
openal
alut
)
set(OPENAL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(OPENAL_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (OPENAL)
if (OPENAL)
message(STATUS "Building with OpenAL audio support")
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL")
endif (OPENAL)
endif(NOT FMOD)

View File

@@ -3,5 +3,8 @@ include(Prebuilt)
if (NOT (STANDALONE OR DARWIN))
use_prebuilt_binary(glext)
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(GLEXT_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (NOT (STANDALONE OR DARWIN))

View File

@@ -13,9 +13,14 @@ else (STANDALONE OR USE_SYSTEM_OPENSSL)
else (WINDOWS)
set(OPENSSL_LIBRARIES ssl)
endif (WINDOWS)
set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(OPENSSL_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (STANDALONE OR USE_SYSTEM_OPENSSL)
if (LINUX OR DARWIN)
if (LINUX)
set(CRYPTO_LIBRARIES crypto dl)
elseif (DARWIN)
set(CRYPTO_LIBRARIES crypto)
endif (LINUX OR DARWIN)
endif (LINUX)

View File

@@ -9,11 +9,42 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(libpng)
if (WINDOWS)
set(PNG_LIBRARIES libpng15)
if(MSVC12)
set(PNG_LIBRARIES libpng16)
else(MSVC12)
set(PNG_LIBRARIES libpng15)
endif(MSVC12)
elseif(DARWIN)
set(PNG_LIBRARIES png15)
else(LINUX)
set(PNG_LIBRARIES png15)
if (CMAKE_SIZEOF_VOID_P EQUAL 4) # Singu TODO: update png
set(PNG_LIBRARIES png15)
else ()
#
# When we have updated static libraries in competition with older
# shared libraries and we want the former to win, we need to do some
# extra work. The *_PRELOAD_ARCHIVES settings are invoked early
# and will pull in the entire archive to the binary giving it
# priority in symbol resolution. Beware of cmake moving the
# achive load itself to another place on the link command line. If
# that happens, you can try something like -Wl,-lpng16 here to hide
# the archive. Also be aware that the linker will not tolerate a
# second whole-archive load of the archive. See viewer's
# CMakeLists.txt for more information.
#
set(PNG_PRELOAD_ARCHIVES -Wl,--whole-archive png16 -Wl,--no-whole-archive)
set(PNG_LIBRARIES png16)
endif ()
endif()
set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/)
if (WINDOWS)
set(PNG_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include/${PNG_LIBRARIES}
${LIBS_PREBUILT_LEGACY_DIR}/include/${PNG_LIBRARIES}
)
else (WINDOWS)
set(PNG_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include/lib${PNG_LIBRARIES}
${LIBS_PREBUILT_LEGACY_DIR}/include/lib${PNG_LIBRARIES}
)
endif (WINDOWS)
endif (STANDALONE)

View File

@@ -13,8 +13,9 @@ if (PULSEAUDIO)
use_prebuilt_binary(pulseaudio)
set(PULSEAUDIO_FOUND ON FORCE BOOL)
set(PULSEAUDIO_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include
)
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
# We don't need to explicitly link against pulseaudio itself, because
# the viewer probes for the system's copy at runtime.
set(PULSEAUDIO_LIBRARIES

View File

@@ -9,18 +9,29 @@ if (DARWIN)
include(CMakeFindFrameworks)
find_library(QUICKTIME_LIBRARY QuickTime)
elseif (WINDOWS AND WORD_SIZE EQUAL 32)
set(QUICKTIME_SDK_DIR "$ENV{PROGRAMFILES}/QuickTime SDK"
SET(program_files "ProgramFiles(x86)")
SET(program_files $ENV{${program_files}})
if(NOT program_files)
SET(program_files $ENV{ProgramW6432})
endif(NOT program_files)
if(NOT program_files)
SET(program_files $ENV{ProgramFiles})
endif(NOT program_files)
set(QUICKTIME_SDK_DIR "${program_files}/QuickTime SDK"
CACHE PATH "Location of the QuickTime SDK.")
find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient
PATHS
${ARCH_PREBUILT_DIRS_DEBUG}
${LIBS_PREBUILT_DIR}/lib/debug
${LIBS_PREBUILT_LEGACY_DIR}/lib/debug
"${QUICKTIME_SDK_DIR}\\libraries"
)
find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient
PATHS
${ARCH_PREBUILT_DIRS_RELEASE}
${LIBS_PREBUILT_DIR}/lib/release
${LIBS_PREBUILT_LEGACY_DIR}/lib/release
"${QUICKTIME_SDK_DIR}\\libraries"
)
@@ -33,7 +44,8 @@ elseif (WINDOWS AND WORD_SIZE EQUAL 32)
endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
include_directories(
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/quicktime
${LIBS_PREBUILT_DIR}/include/quicktime
${LIBS_PREBUILT_LEGACY_DIR}/include/quicktime
"${QUICKTIME_SDK_DIR}\\CIncludes"
)
endif (DARWIN)

View File

@@ -55,12 +55,18 @@ else (STANDALONE)
endif (LINUX)
include_directories (
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/cairo
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/pixman-1
${LIBS_PREBUILT_DIR}/packages/include
${LIBS_PREBUILT_DIR}/packages/include/cairo
${LIBS_PREBUILT_DIR}/packages/include/pixman-1
${LIBS_PREBUILT_LEGACY_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include/cairo
${LIBS_PREBUILT_LEGACY_DIR}/include/pixman-1
)
foreach(include ${${LL_ARCH}_INCLUDES})
include_directories(${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/${include})
include_directories(
${LIBS_PREBUILT_DIR}/include/${include}
${LIBS_PREBUILT_LEGACY_DIR}/include/${include}
)
endforeach(include)
endif (STANDALONE)

View File

@@ -11,6 +11,6 @@ if (INSTALL)
set(APP_BIN_DIR bin)
endif(NOT APP_BIN_DIR)
if(NOT APP_SHARE_DIR)
set(APP_SHARE_DIR share/secondlife-${viewer_VERSION})
set(APP_SHARE_DIR share/secondlife-${${ROOT_PROJECT_NAME}_VERSION})
endif(NOT APP_SHARE_DIR)
endif (INSTALL)

View File

@@ -32,9 +32,6 @@ set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds
set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.")
set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH
"Location of prebuilt libraries.")
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(WINDOWS ON BOOL FORCE)
if (WORD_SIZE EQUAL 32)
@@ -97,24 +94,54 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DARWIN 1)
if(${CMAKE_GENERATOR} MATCHES "Xcode")
#SDK Compiler and Deployment targets for XCode
if (${XCODE_VERSION} VERSION_LESS 4.0.0)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
else (${XCODE_VERSION} VERSION_LESS 4.0.0)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
endif (${XCODE_VERSION} VERSION_LESS 4.0.0)
else(${CMAKE_GENERATOR} MATCHES "Xcode")
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
endif(${CMAKE_GENERATOR} MATCHES "Xcode")
execute_process(
COMMAND sh -c "xcodebuild -version | grep Xcode | cut -d ' ' -f2 | cut -d'.' -f1-2"
OUTPUT_VARIABLE XCODE_VERSION )
string(REGEX REPLACE "(\r?\n)+$" "" XCODE_VERSION "${XCODE_VERSION}")
# # To support a different SDK update these Xcode settings:
# if (XCODE_VERSION GREATER 4.9) # (Which would be 5.0+)
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8)
# set(CMAKE_OSX_SYSROOT macosx10.9)
# else (XCODE_VERION GREATER 4.9)
# if (XCODE_VERSION GREATER 4.5)
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
# set(CMAKE_OSX_SYSROOT macosx10.8)
# else (XCODE_VERSION GREATER 4.5)
# if (XCODE_VERSION GREATER 4.2)
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
# set(CMAKE_OSX_SYSROOT macosx10.7)
# else (XCODE_VERSION GREATER 4.2)
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
# set(CMAKE_OSX_SYSROOT macosx10.7)
# endif (XCODE_VERSION GREATER 4.2)
# endif (XCODE_VERSION GREATER 4.5)
# endif (XCODE_VERSION GREATER 4.9)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
# Hardcode SDK we build against until we can test and allow newer ones
# as autodetected in the code above
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
set(CMAKE_OSX_SYSROOT macosx10.6)
# Support for Unix Makefiles generator
if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
execute_process(COMMAND xcodebuild -version -sdk "${CMAKE_OSX_SYSROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT)
string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
endif (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
# LLVM-GCC has been removed in Xcode5
if (XCODE_VERSION GREATER 4.9)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
else (XCODE_VERSION GREATER 4.9)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
endif (XCODE_VERSION GREATER 4.9)
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
message(STATUS "Xcode version: ${XCODE_VERSION}")
message(STATUS "OSX sysroot: ${CMAKE_OSX_SYSROOT}")
message(STATUS "OSX deployment target: ${CMAKE_OSX_DEPLOYMENT_TARGET}")
# Build only for i386 by default, system default on MacOSX 10.6 is x86_64
set(CMAKE_OSX_ARCHITECTURES i386)
set(ARCH i386)
@@ -124,6 +151,12 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(LL_ARCH_DIR universal-darwin)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(LIBS_PREBUILT_DIR ${CMAKE_BINARY_DIR}/packages CACHE PATH
"Location of prebuilt libraries.")
set(LIBS_PREBUILT_LEGACY_DIR ${CMAKE_BINARY_DIR}/packages/libraries/${LL_ARCH_DIR} CACHE PATH
"Legacy location of prebuilt libraries.")
if (WINDOWS AND WORD_SIZE EQUAL 32)
set(PREBUILT_TYPE windows)
elseif (WINDOWS AND WORD_SIZE EQUAL 64)

View File

@@ -32,8 +32,8 @@ if (WINDOWS)
)
elseif (DARWIN)
set(WEBKIT_PLUGIN_LIBRARIES
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libllqtwebkit.dylib
debug libllqtwebkit.dylib
optimized libllqtwebkit.dylib
)
elseif (LINUX)
if (STANDALONE)
@@ -50,7 +50,6 @@ elseif (LINUX)
ssl
# qgif
# qjpeg
jscore
jpeg
fontconfig
X11
@@ -58,5 +57,8 @@ elseif (LINUX)
Xext
GL
)
if (CMAKE_SIZEOF_VOID_P EQUAL 4) # Singu TODO: update webkit
set(WEBKIT_PLUGIN_LIBRARIES ${WEBKIT_PLUGIN_LIBRARIES} jscore)
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
endif (STANDALONE)
endif (WINDOWS)

View File

@@ -9,5 +9,8 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(xmlrpc-epi)
set(XMLRPCEPI_LIBRARIES xmlrpc-epi)
set(XMLRPCEPI_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
set(XMLRPCEPI_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_LEGACY_DIR}/include
)
endif (STANDALONE)

View File

@@ -17,6 +17,9 @@ else (STANDALONE)
set(ZLIB_LIBRARIES z)
endif (WINDOWS)
if (WINDOWS OR LINUX)
set(ZLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/zlib)
set(ZLIB_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include/zlib
${LIBS_PREBUILT_LEGACY_DIR}/include/zlib
)
endif (WINDOWS OR LINUX)
endif (STANDALONE)

View File

@@ -28,97 +28,16 @@
#ifndef CWDEBUG
#ifdef DEBUG_CURLIO
// If CWDEBUG is not defined, but DEBUG_CURLIO is, then replace
// some of the cwd macro's with something that generates viewer
// specific debug output. Note that this generates a LOT of
// output and should not normally be defined.
#include <string>
#include "llpreprocessor.h"
namespace debug {
namespace libcwd {
struct buf2str {
buf2str(char const* buf, int size) : mBuf(buf), mSize(size) { }
char const* mBuf;
int mSize;
};
struct libcwd_do_type {
void on() const { }
};
extern LL_COMMON_API libcwd_do_type const libcw_do;
} // namespace libcwd
enum print_thread_id_t { print_thread_id };
inline void init() { }
struct Indent {
int M_indent;
static ll_thread_local int S_indentation;
enum LL_COMMON_API print_nt { print };
LL_COMMON_API Indent(int indent);
LL_COMMON_API ~Indent();
};
extern LL_COMMON_API std::ostream& operator<<(std::ostream& os, libcwd::buf2str const& b2s);
extern LL_COMMON_API std::ostream& operator<<(std::ostream& os, Indent::print_nt);
extern LL_COMMON_API std::ostream& operator<<(std::ostream& os, print_thread_id_t);
namespace dc {
struct fake_channel {
int mOn;
char const* mLabel;
fake_channel(int on, char const* label) : mOn(on), mLabel(label) { }
fake_channel(void) : mOn(0) { }
fake_channel& operator()(bool) { return *this; }
fake_channel const& operator()(bool) const { return *this; }
bool is_on() const { return !!mOn; }
bool is_off() const { return !mOn; }
void on() const { }
void off() const { }
};
extern LL_COMMON_API fake_channel const warning;
extern LL_COMMON_API fake_channel const curl;
extern LL_COMMON_API fake_channel const curlio;
extern LL_COMMON_API fake_channel const curltr;
extern LL_COMMON_API fake_channel const statemachine;
extern LL_COMMON_API fake_channel const notice;
extern LL_COMMON_API fake_channel const snapshot;
} // namespace dc
} // namespace debug
#define LIBCWD_DEBUG_CHANNELS debug
#define LibcwDoutScopeBegin(a, b, c) do { using namespace debug; using namespace debug::libcwd; llinfos_nf << print_thread_id << (c).mLabel << ": " << Indent::print;
#define LibcwDoutStream llcont
#define LibcwDoutScopeEnd llcont << llendl; } while(0)
#define Debug(x) do { using namespace debug; using namespace debug::libcwd; x; } while(0)
#define Dout(a, b) do { using namespace debug; using namespace debug::libcwd; if ((a).mOn) { llinfos_nf << print_thread_id << (a).mLabel << ": " << Indent::print << b << llendl; } } while(0)
#define DoutEntering(a, b) \
int __slviewer_debug_indentation = 2; \
{ \
using namespace debug; \
using namespace debug::libcwd; \
if ((a).mOn) \
llinfos_nf << print_thread_id << (a).mLabel << ": " << Indent::print << "Entering " << b << llendl; \
else \
__slviewer_debug_indentation = 0; \
} \
debug::Indent __slviewer_debug_indent(__slviewer_debug_indentation);
#else // !DEBUG_CURLIO
#error DEBUG_CURLIO is not supported without libcwd.
// In order to use DEBUG_CURLIO you must install and use libcwd.
// Download libcwd:
// git clone https://github.com/CarloWood/libcwd.git
#endif
#define Debug(x)
#define Dout(a, b)
#define DoutEntering(a, b)
#endif // !DEBUG_CURLIO
#ifndef DOXYGEN // No need to document this. See http://libcwd.sourceforge.net/ for more info.
#include <iostream>
@@ -392,6 +311,40 @@ void InstanceTracker<T>::dump(void)
} // namespace debug
template<class T>
class AIDebugInstanceCounter
{
public:
static int sInstanceCount;
protected:
static void print_count(char const* name, int count, bool destruction);
AIDebugInstanceCounter()
{
print_count(typeid(T).name(), ++sInstanceCount, false);
}
AIDebugInstanceCounter(AIDebugInstanceCounter const&)
{
print_count(typeid(T).name(), ++sInstanceCount, false);
}
~AIDebugInstanceCounter()
{
print_count(typeid(T).name(), --sInstanceCount, true);
}
};
//static
template<class T>
int AIDebugInstanceCounter<T>::sInstanceCount;
//static
template<class T>
void AIDebugInstanceCounter<T>::print_count(char const* name, int count, bool destruction)
{
Dout(dc::notice, (destruction ? "Destructed " : "Constructing ") << name << ", now " << count << " instance" << ((count == 1) ? "." : "s."));
}
//! Debugging macro.
//
// Print "Entering " << \a data to channel \a cntrl and increment

View File

@@ -41,6 +41,7 @@ import shutil
import socket
import sys
import commands
import shlex
class CommandError(Exception):
pass
@@ -111,11 +112,15 @@ class PlatformSetup(object):
def build_dirs(self):
'''Return the top-level directories in which builds occur.
This can return more than one directory, e.g. if doing a
32-bit viewer and server build on Linux.'''
return ['build-' + self.platform()]
if(os.path.basename(os.path.normpath(os.getcwd())) == 'indra'):
prefix = '../'
else:
prefix = ''
return [prefix+'build-' + self.platform()]
def cmake_commandline(self, src_dir, build_dir, opts, simple):
'''Return the command line to run cmake with.'''
@@ -169,7 +174,7 @@ class PlatformSetup(object):
raise
def parse_build_opts(self, arguments):
opts, targets = getopt.getopt(arguments, 'o:', ['option='])
opts, targets = getopt.getopt(arguments, 'D:o:', ['option='])
build_opts = []
for o, a in opts:
if o in ('-o', '--option'):
@@ -221,6 +226,7 @@ class UnixSetup(PlatformSetup):
exe_suffixes = ('',)
def __init__(self):
PlatformSetup.__init__(self)
super(UnixSetup, self).__init__()
self.generator = 'Unix Makefiles'
@@ -263,6 +269,7 @@ class UnixSetup(PlatformSetup):
class LinuxSetup(UnixSetup):
def __init__(self):
UnixSetup.__init__(self)
super(LinuxSetup, self).__init__()
try:
self.debian_sarge = open('/etc/debian_version').read().strip() == '3.1'
@@ -273,9 +280,7 @@ class LinuxSetup(UnixSetup):
return 'linux'
def build_dirs(self):
platform_build = '%s-%s' % (self.platform(), self.build_type.lower())
return ['viewer-' + platform_build]
return [PlatformSetup.build_dirs(self)[0]+'-'+self.build_type.lower()]
def cmake_commandline(self, src_dir, build_dir, opts, simple):
args = dict(
@@ -384,6 +389,7 @@ class LinuxSetup(UnixSetup):
class DarwinSetup(UnixSetup):
def __init__(self):
UnixSetup.__init__(self)
super(DarwinSetup, self).__init__()
self.generator = 'Xcode'
@@ -396,6 +402,12 @@ class DarwinSetup(UnixSetup):
else:
return UnixSetup.arch(self)
def build_dirs(self):
if(self.generator == 'Xcode'):
return PlatformSetup.build_dirs(self)
else:
return [PlatformSetup.build_dirs(self)[0]+'-'+self.build_type.lower()]
def cmake_commandline(self, src_dir, build_dir, opts, simple):
args = dict(
dir=src_dir,
@@ -405,15 +417,17 @@ class DarwinSetup(UnixSetup):
word_size=self.word_size,
unattended=self.unattended,
project_name=self.project_name,
universal=self.universal,
type=self.build_type.upper(),
universal='',
type='',
)
if(self.generator != 'Xcode'):
args['type'] = '-DCMAKE_BUILD_TYPE=%s' % self.build_type.upper()
if self.universal == 'ON':
args['universal'] = '-DCMAKE_OSX_ARCHITECTURES:STRING=\'i386;ppc\''
#if simple:
# return 'cmake %(opts)s %(dir)r' % args
return ('cmake -G %(generator)r '
'-DCMAKE_BUILD_TYPE:STRING=%(type)s '
'%(type)s '
'-DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s '
@@ -422,6 +436,18 @@ class DarwinSetup(UnixSetup):
'%(opts)s %(dir)r' % args)
def run_build(self, opts, targets):
if(self.generator != 'Xcode'):
if targets:
targets = ' '.join(targets)
else:
targets = 'all'
for d in self.build_dirs():
cmd = 'make -C %r %s %s' % (d, ' '.join(opts), targets)
print 'Running %r' % cmd
self.run(cmd)
return
cwd = getcwd()
if targets:
targets = ' '.join(['-target ' + repr(t) for t in targets])
@@ -444,19 +470,20 @@ class WindowsSetup(PlatformSetup):
'gen' : r'Visual Studio 10',
'ver' : r'10.0'
},
'vc110' : {
'gen' : r'Visual Studio 11',
'ver' : r'11.0'
'vc120' : {
'gen' : r'Visual Studio 12',
'ver' : r'12.0'
}
}
gens['vs2010'] = gens['vc100']
gens['vs2012'] = gens['vc110']
gens['vs2013'] = gens['vc120']
search_path = r'C:\windows'
exe_suffixes = ('.exe', '.bat', '.com')
def __init__(self):
PlatformSetup.__init__(self)
super(WindowsSetup, self).__init__()
self._generator = None
self.incredibuild = False
@@ -493,11 +520,24 @@ class WindowsSetup(PlatformSetup):
generator = property(_get_generator, _set_generator)
def get_gen_str(self, gen):
if gen is None:
gen = self._generator
return self.gens[gen.lower()]['ver']
def os(self):
return 'win32'
def build_dirs(self):
return ['build-' + self.generator]
if(os.path.basename(os.path.normpath(os.getcwd())) == 'indra'):
prefix = '../'
else:
prefix = ''
if self.word_size == 64:
return [prefix+'build-' + self.generator + '-Win64']
else:
return [prefix+'build-' + self.generator]
def cmake_commandline(self, src_dir, build_dir, opts, simple):
args = dict(
@@ -518,7 +558,7 @@ class WindowsSetup(PlatformSetup):
'-DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s '
'-DROOT_PROJECT_NAME:STRING=%(project_name)s '
'-DROOT_PROJECT_NAME:STRING=\"%(project_name)s\" '
'%(opts)s "%(dir)s"' % args)
def get_HKLM_registry_value(self, key_str, value_str):
@@ -530,34 +570,53 @@ class WindowsSetup(PlatformSetup):
return value
def find_visual_studio(self, gen=None):
if gen is None:
gen = self._generator
gen = gen.lower()
gen = self.get_gen_str(gen)
value_str = (r'EnvironmentDirectory')
key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VS' %
self.gens[gen]['ver'])
gen)
print ('Reading VS environment from HKEY_LOCAL_MACHINE\%s\%s' %
(key_str, value_str))
try:
return self.get_HKLM_registry_value(key_str, value_str)
except WindowsError, err:
key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' %
self.gens[gen]['ver'])
gen)
try:
return self.get_HKLM_registry_value(key_str, value_str)
except:
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
return ''
def find_msbuild(self, gen=None):
gen = self.get_gen_str(gen)
key_str = (r'SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0')
print ('Checking MSBuild support for vs ver = %s' % gen)
if not self.get_HKLM_registry_value(key_str+'\\'+gen, "VCTargetsPath"):
return (None, None)
print ('Reading MSBuild location from HKEY_LOCAL_MACHINE\%s\MSBuildToolsPath' %
key_str)
print key_str
try:
return (self.get_HKLM_registry_value(key_str, 'MSBuildToolsPath'), gen)
except WindowsError, err:
key_str = (r'SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\%s' %
gen)
try:
return (self.get_HKLM_registry_value(key_str, 'MSBuildToolsPath'), gen)
except WindowsError, err:
print 'Didn\'t find msbuild'
return (None, None)
def find_visual_studio_express(self, gen=None):
if gen is None:
gen = self._generator
gen = gen.lower()
gen = self.get_gen_str(gen)
try:
import _winreg
key_str = (r'SOFTWARE\Microsoft\VCEXpress\%s\Setup\VC' %
self.gens[gen]['ver'])
gen)
value_str = (r'ProductDir')
print ('Reading VS environment from HKEY_LOCAL_MACHINE\%s\%s' %
(key_str, value_str))
@@ -569,17 +628,15 @@ class WindowsSetup(PlatformSetup):
print 'Found: %s' % value
return value
except WindowsError, err:
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
print >> sys.stderr, "Didn't find ", gen
return ''
def find_visual_studio_express_single(self, gen=None):
if gen is None:
gen = self._generator
gen = gen.lower()
gen = self.get_gen_str(gen)
try:
import _winreg
key_str = (r'SOFTWARE\Microsoft\VCEXpress\%s_Config\Setup\VC' %
self.gens[gen]['ver'])
gen)
value_str = (r'ProductDir')
print ('Reading VS environment from HKEY_CURRENT_USER\%s\%s' %
(key_str, value_str))
@@ -591,7 +648,7 @@ class WindowsSetup(PlatformSetup):
print 'Found: %s' % value
return value
except WindowsError, err:
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
print >> sys.stderr, "Didn't find ", gen
return ''
def get_build_cmd(self):
@@ -600,31 +657,38 @@ class WindowsSetup(PlatformSetup):
if self.gens[self.generator]['ver'] in [ r'8.0', r'9.0' ]:
config = '\"%s|Win32\"' % config
return "buildconsole %s.sln /build %s" % (self.project_name, config)
return "buildconsole \"%s.sln\" /build %s" % (self.project_name, config), None
environment = self.find_visual_studio()
if environment == '':
environment = self.find_visual_studio_express()
if environment == '':
environment = self.find_visual_studio_express_single()
if environment == '':
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
else:
build_dirs=self.build_dirs()
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
exit(0)
environment = self.find_visual_studio_express_single()
if environment == '':
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
else:
build_dirs=self.build_dirs()
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
exit(0)
msbuild_dir, tool_ver = self.find_msbuild()
if msbuild_dir is not None and tool_ver is not None:
return ('\"%smsbuild.exe\" \"%s.sln\" /p:configuration=%s /p:VisualStudioVersion=%s' %
(msbuild_dir, self.project_name, self.build_type, tool_ver)), True
# devenv.com is CLI friendly, devenv.exe... not so much.
return ('"%sdevenv.com" %s.sln /build %s' %
(self.find_visual_studio(), self.project_name, self.build_type))
return ('"%sdevenv.com" \"%s.sln\" /build %s' %
(self.find_visual_studio(), self.project_name, self.build_type)), None
def run(self, command, name=None):
'''Run a program. If the program fails, raise an exception.'''
ret = os.system(command)
ret = os.system('\"'+command+'\"')
if ret:
if name is None:
name = command.split(None, 1)[0]
name = os.path.normpath(shlex.split(command.encode('utf8'),posix=False)[0].strip('"'))
path = self.find_in_path(name)
if not path:
ret = 'was not found'
@@ -650,30 +714,40 @@ class WindowsSetup(PlatformSetup):
if prev_build == self.build_type:
# Only run vstool if the build type has changed.
continue
vstool_cmd = (os.path.join('tools','vstool','VSTool.exe') +
' --solution ' +
os.path.join(build_dir,'Singularity.sln') +
' --config ' + self.build_type +
if(os.path.basename(os.path.normpath(os.getcwd())) == 'indra'):
tool_path = os.path.join('tools','vstool','VSTool.exe')
else:
tool_path = os.path.join('indra','tools','vstool','VSTool.exe')
vstool_cmd = (tool_path +
' --solution \"' +
os.path.join(build_dir,'%s.sln' % self.project_name) +
'\" --config ' + self.build_type +
' --startup secondlife-bin')
print 'Running %r in %r' % (vstool_cmd, getcwd())
print 'Running vstool %r in %r' % (vstool_cmd, getcwd())
self.run(vstool_cmd)
print >> open(stamp, 'w'), self.build_type
def run_build(self, opts, targets):
cwd = getcwd()
build_cmd = self.get_build_cmd()
build_cmd, msbuild = self.get_build_cmd()
for d in self.build_dirs():
try:
os.chdir(d)
if targets:
for t in targets:
cmd = '%s /project %s %s' % (build_cmd, t, ' '.join(opts))
print 'Running %r in %r' % (cmd, d)
if msbuild:
cmd = '%s /target:%s %s' % (build_cmd, ';'.join(targets), ' '.join(opts))
print 'Running build(targets) %r in %r' % (cmd, d)
self.run(cmd)
else:
for t in targets:
cmd = '%s /project %s %s' % (build_cmd, t, ' '.join(opts))
print 'Running build(targets) %r in %r' % (cmd, d)
self.run(cmd)
else:
cmd = '%s %s' % (build_cmd, ' '.join(opts))
print 'Running %r in %r' % (cmd, d)
print 'Running build %r in %r' % (cmd, d)
self.run(cmd)
finally:
os.chdir(cwd)
@@ -694,6 +768,8 @@ class CygwinSetup(WindowsSetup):
project_name=self.project_name,
word_size=self.word_size,
)
if self.word_size == 64:
args["generator"] += r' Win64'
#if simple:
# return 'cmake %(opts)s "%(dir)s"' % args
return ('cmake -G "%(generator)s" '
@@ -739,10 +815,12 @@ Commands:
Command-options for "configure":
We use cmake variables to change the build configuration.
-DPACKAGE:BOOL=ON Create "package" target to make installers
-DLOCALIZESETUP:BOOL=ON Create one win_setup target per supported language
-DLL_TESTS:BOOL=OFF Don't generate unit test projects
-DEXAMPLEPLUGIN:BOOL=OFF Don't generate example plugin project
-DDISABLE_TCMALLOC:BOOL=ON Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)
-DRELEASE_CRASH_REPORTING:BOOL=ON Enable Google Breakpad crash reporting
-DFMODSTUDIO:BOOL=ON Use FMOD Studio audio libraries
-DFMODEX:BOOL=ON Use FMOD Ex audio libraries
Examples:
Set up a Visual Studio 2010 project with "package" target:

View File

@@ -2,19 +2,24 @@
@file __init__.py
@brief Initialization file for the indra module.
$LicenseInfo:firstyear=2006&license=internal$
$LicenseInfo:firstyear=2006&license=viewerlgpl$
Second Life Viewer Source Code
Copyright (C) 2006-2010, Linden Research, Inc.
Copyright (c) 2006-2009, Linden Research, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation;
version 2.1 of the License only.
The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
this source code is governed by the Linden Lab Source Code Disclosure
Agreement ("Agreement") previously entered between you and Linden
Lab. By accessing, using, copying, modifying or distributing this
software, you acknowledge that you have been informed of your
obligations under the Agreement and agree to abide by those obligations.
This library 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
Lesser General Public License for more details.
ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
COMPLETENESS OR PERFORMANCE.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
$/LicenseInfo$
"""

View File

@@ -1,3 +1,25 @@
#!/usr/bin/python
##
## $LicenseInfo:firstyear=2011&license=viewerlgpl$
## Second Life Viewer Source Code
## Copyright (C) 2011, Linden Research, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation;
## version 2.1 of the License only.
##
## This library 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
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
##
## Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
## $/LicenseInfo$
from indra.base import llsd, lluuid
from datetime import datetime
import cllsd
@@ -10,7 +32,7 @@ values = (
'&<>',
u'\u81acj',
llsd.uri('http://foo<'),
lluuid.LLUUID(),
lluuid.UUID(),
llsd.LLSD(['thing']),
1,
myint(31337),

View File

@@ -1,72 +0,0 @@
"""\
@file lllog.py
@brief Logging for event processing
$LicenseInfo:firstyear=2008&license=mit$
Copyright (c) 2008-2009, Linden Research, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
$/LicenseInfo$
"""
from indra.base.llsd import format_notation
try:
import syslog
except ImportError:
# Windows
import sys
class syslog(object):
_logfp = sys.stderr
def syslog(msg):
_logfp.write(msg)
if not msg.endswith('\n'):
_logfp.write('\n')
syslog = staticmethod(syslog)
class Logger(object):
def __init__(self, name='indra'):
self._sequence = 0
try:
syslog.openlog(name, syslog.LOG_CONS | syslog.LOG_PID,
syslog.LOG_LOCAL0)
except AttributeError:
# No syslog module on Windows
pass
def next(self):
self._sequence += 1
return self._sequence
def log(self, msg, llsd):
payload = 'INFO: log: LLLOGMESSAGE (%d) %s %s' % (self.next(), msg,
format_notation(llsd))
syslog.syslog(payload)
_logger = None
def log(msg, llsd):
global _logger
if _logger is None:
_logger = Logger()
_logger.log(msg, llsd)

View File

@@ -72,8 +72,11 @@ BOOL_FALSE = ('0', '0.0', 'false', '')
def format_datestr(v):
""" Formats a datetime object into the string format shared by xml and notation serializations."""
return v.isoformat() + 'Z'
""" Formats a datetime or date object into the string format shared by xml and notation serializations."""
if hasattr(v, 'microsecond'):
return v.isoformat() + 'Z'
else:
return v.strftime('%Y-%m-%dT%H:%M:%SZ')
def parse_datestr(datestr):
"""Parses a datetime object from the string format shared by xml and notation serializations."""
@@ -183,6 +186,7 @@ class LLSDXMLFormatter(object):
unicode : self.STRING,
uri : self.URI,
datetime.datetime : self.DATE,
datetime.date : self.DATE,
list : self.ARRAY,
tuple : self.ARRAY,
types.GeneratorType : self.ARRAY,
@@ -234,7 +238,7 @@ class LLSDXMLFormatter(object):
def MAP(self, v):
return self.elt(
'map',
''.join(["%s%s" % (self.elt('key', key), self.generate(value))
''.join(["%s%s" % (self.elt('key', self.xml_esc(str(key))), self.generate(value))
for key, value in v.items()]))
typeof = type
@@ -347,6 +351,7 @@ class LLSDNotationFormatter(object):
unicode : self.STRING,
uri : self.URI,
datetime.datetime : self.DATE,
datetime.date : self.DATE,
list : self.ARRAY,
tuple : self.ARRAY,
types.GeneratorType : self.ARRAY,
@@ -924,12 +929,13 @@ def _format_binary_recurse(something):
(type(something), something))
def parse_binary(something):
header = '<?llsd/binary?>\n'
if not something.startswith(header):
raise LLSDParseError('LLSD binary encoding header not found')
return LLSDBinaryParser().parse(something[len(header):])
def parse_binary(binary):
if binary.startswith('<?llsd/binary?>'):
just_binary = binary.split('\n', 1)[1]
else:
just_binary = binary
return LLSDBinaryParser().parse(just_binary)
def parse_xml(something):
try:
return to_python(fromstring(something)[0])

View File

@@ -28,13 +28,12 @@ $/LicenseInfo$
import random, socket, string, time, re
import uuid
# *HACK: Necessary for python 2.4. Consider replacing this code wart
# after python >=2.5 has deployed everywhere. 2009-10-05
try:
# Python 2.6
from hashlib import md5
except ImportError:
from md5 import md5
# Python 2.5 and earlier
from md5 import new as md5
def _int2binstr(i,l):
s=''
@@ -73,7 +72,7 @@ class UUID(object):
ip = ''
try:
ip = socket.gethostbyname(socket.gethostname())
except(socket.gaierror):
except(socket.gaierror, socket.error):
# no ip address, so just default to somewhere in 10.x.x.x
ip = '10'
for i in range(3):
@@ -164,7 +163,7 @@ class UUID(object):
def setFromMemoryDump(self, gdb_string):
"""
We expect to get gdb_string as four hex units. eg:
0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
Which will be translated to:
db547d14-1b3f4bc3-9b984f71-d22f890a
Returns self.
@@ -188,7 +187,7 @@ class UUID(object):
def getAsString(self):
"""
Return a different string representation of the form
AAAAAAAA-AAAABBBB-BBBBBBBB-BBCCCCCC (a 128-bit number in hex)
AAAAAAAA-AAAABBBB-BBBBBBBB-BBCCCCCC (a 128-bit number in hex)
where A=network address, B=timestamp, C=random.
"""
i1 = _binstr2int(self._bits[0:4])
@@ -234,7 +233,7 @@ NULL = UUID()
def printTranslatedMemory(four_hex_uints):
"""
We expect to get the string as four hex units. eg:
0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
Which will be translated to:
db547d14-1b3f4bc3-9b984f71-d22f890a
"""

View File

@@ -29,25 +29,93 @@ $/LicenseInfo$
"""
import sys
from indra.base import llsd
try:
import syslog
except ImportError:
# Windows
import sys
class syslog(object):
# wrap to a lame syslog for windows
_logfp = sys.stderr
def syslog(msg):
_logfp.write(msg)
if not msg.endswith('\n'):
_logfp.write('\n')
syslog = staticmethod(syslog)
_sequence_id = 0
from indra.base.llsd import format_notation
def record_metrics(table, stats, dest=None):
def record_metrics(table, stats):
"Write a standard metrics log"
_log("LLMETRICS", table, stats, dest)
_log("LLMETRICS", table, stats)
def record_event(table, data, dest=None):
def record_event(table, data):
"Write a standard logmessage log"
_log("LLLOGMESSAGE", table, data, dest)
_log("LLLOGMESSAGE", table, data)
def _log(header, table, data, dest):
def set_destination(dest):
"""Set the destination of metrics logs for this process.
If you do not call this function prior to calling a logging
method, that function will open sys.stdout as a destination.
Attempts to set dest to None will throw a RuntimeError.
@param dest a file-like object which will be the destination for logs."""
if dest is None:
# do this check here in case sys.stdout changes at some
# point. as a default parameter, it will never be
# re-evaluated.
dest = sys.stdout
raise RuntimeError("Attempt to unset metrics destination.")
global _destination
_destination = dest
def destination():
"""Get the destination of the metrics logs for this process.
Returns None if no destination is set"""
global _destination
return _destination
class SysLogger(object):
"A file-like object which writes to syslog."
def __init__(self, ident='indra', logopt = None, facility = None):
try:
if logopt is None:
logopt = syslog.LOG_CONS | syslog.LOG_PID
if facility is None:
facility = syslog.LOG_LOCAL0
syslog.openlog(ident, logopt, facility)
import atexit
atexit.register(syslog.closelog)
except AttributeError:
# No syslog module on Windows
pass
def write(str):
syslog.syslog(str)
write = staticmethod(write)
def flush():
pass
flush = staticmethod(flush)
#
# internal API
#
_sequence_id = 0
_destination = None
def _next_id():
global _sequence_id
print >>dest, header, "(" + str(_sequence_id) + ")",
print >>dest, table, llsd.format_notation(data)
next = _sequence_id
_sequence_id += 1
return next
def _dest():
global _destination
if _destination is None:
# this default behavior is documented in the metrics functions above.
_destination = sys.stdout
return _destination
def _log(header, table, data):
log_line = "%s (%d) %s %s" \
% (header, _next_id(), table, format_notation(data))
dest = _dest()
dest.write(log_line)
dest.flush()

View File

@@ -39,6 +39,12 @@ except:
pass
_g_builder = None
def _builder():
global _g_builder
if _g_builder is None:
_g_builder = ServiceBuilder()
return _g_builder
def build(name, context={}, **kwargs):
""" Convenience method for using a global, singleton, service builder. Pass arguments either via a dict or via python keyword arguments, or both!
@@ -56,6 +62,11 @@ def build(name, context={}, **kwargs):
_g_builder = ServiceBuilder()
return _g_builder.buildServiceURL(name, context, **kwargs)
def build_path(name, context={}, **kwargs):
context = context.copy() # shouldn't modify the caller's dictionary
context.update(kwargs)
return _builder().buildPath(name, context)
class ServiceBuilder(object):
def __init__(self, services_definition = services_config):
"""\
@@ -73,12 +84,21 @@ class ServiceBuilder(object):
continue
if isinstance(service_builder, dict):
# We will be constructing several builders
for name, builder in service_builder.items():
for name, builder in service_builder.iteritems():
full_builder_name = service['name'] + '-' + name
self.builders[full_builder_name] = builder
else:
self.builders[service['name']] = service_builder
def buildPath(self, name, context):
"""\
@brief given the environment on construction, return a service path.
@param name The name of the service.
@param context A dict of name value lookups for the service.
@returns Returns the
"""
return russ.format(self.builders[name], context)
def buildServiceURL(self, name, context={}, **kwargs):
"""\
@brief given the environment on construction, return a service URL.
@@ -108,7 +128,7 @@ def on_in(query_name, host_key, schema_key):
@param schema_key Logical name of destination schema. Will
be looked up in indra.xml.
"""
host_name = config.get(host_key)
schema_name = config.get(schema_key)
return '/'.join( ('on', host_name, 'in', schema_name, query_name.lstrip('/')) )
return "on/config:%s/in/config:%s/%s" % (host_key.strip('/'),
schema_key.strip('/'),
query_name.lstrip('/'))

View File

@@ -1,3 +1,32 @@
"""\
@file siesta.py
@brief A tiny llsd based RESTful web services framework
$LicenseInfo:firstyear=2008&license=mit$
Copyright (c) 2008, Linden Research, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
$/LicenseInfo$
"""
from indra.base import config
from indra.base import llsd
from webob import exc
import webob
@@ -37,11 +66,11 @@ def mime_type(content_type):
return content_type.split(';', 1)[0].strip().lower()
class BodyLLSD(object):
'''Give a webob Request or Response an llsd property.
'''Give a webob Request or Response an llsd based "content" property.
Getting the llsd property parses the body, and caches the result.
Getting the content property parses the body, and caches the result.
Setting the llsd property formats a payload, and the body property
Setting the content property formats a payload, and the body property
is set.'''
def _llsd__get(self):
@@ -80,7 +109,7 @@ class BodyLLSD(object):
if hasattr(self, '_llsd'):
del self._llsd
llsd = property(_llsd__get, _llsd__set, _llsd__del)
content = property(_llsd__get, _llsd__set, _llsd__del)
class Response(webob.Response, BodyLLSD):
@@ -114,10 +143,10 @@ class Request(webob.Request, BodyLLSD):
Sensible content type and accept headers are used by default.
Setting the llsd property also sets the body. Getting the llsd
Setting the content property also sets the body. Getting the content
property parses the body if necessary.
If you set the body property directly, the llsd property will be
If you set the body property directly, the content property will be
deleted.'''
default_content_type = 'application/llsd+xml'
@@ -149,11 +178,11 @@ class Request(webob.Request, BodyLLSD):
body = property(webob.Request._body__get, _body__set,
webob.Request._body__del, webob.Request._body__get.__doc__)
def create_response(self, llsd=None, status='200 OK',
def create_response(self, content=None, status='200 OK',
conditional_response=webob.NoDefault):
resp = self.ResponseClass(status=status, request=self,
conditional_response=conditional_response)
resp.llsd = llsd
resp.content = content
return resp
def curl(self):
@@ -196,12 +225,18 @@ llsd_formatters = {
'application/xml': llsd.format_xml,
}
formatter_qualities = (
('application/llsd+xml', 1.0),
('application/llsd+notation', 0.5),
('application/llsd+binary', 0.4),
('application/xml', 0.3),
('application/json', 0.2),
)
def formatter_for_mime_type(mime_type):
'''Return a formatter that encodes to the given MIME type.
The result is a pair of function and MIME type.'''
try:
return llsd_formatters[mime_type], mime_type
except KeyError:
@@ -214,21 +249,19 @@ def formatter_for_request(req):
'''Return a formatter that encodes to the preferred type of the client.
The result is a pair of function and actual MIME type.'''
for ctype in req.accept.best_matches('application/llsd+xml'):
try:
return llsd_formatters[ctype], ctype
except KeyError:
pass
else:
ctype = req.accept.best_match(formatter_qualities)
try:
return llsd_formatters[ctype], ctype
except KeyError:
raise exc.HTTPNotAcceptable().exception
def wsgi_adapter(func, environ, start_response):
'''Adapt a Siesta callable to act as a WSGI application.'''
# Process the request as appropriate.
try:
req = Request(environ)
#print req.urlvars
resp = func(req, **req.urlvars)
if not isinstance(resp, webob.Response):
try:
@@ -281,7 +314,8 @@ def llsd_class(cls):
allowed = [m for m in http11_methods
if hasattr(instance, 'handle_' + m.lower())]
raise exc.HTTPMethodNotAllowed(
headers={'Allowed': ', '.join(allowed)}).exception
headers={'Allow': ', '.join(allowed)}).exception
#print "kwargs: ", kwargs
return handler(req, **kwargs)
def replacement(environ, start_response):
@@ -336,7 +370,7 @@ def curl(reqs):
route_re = re.compile(r'''
\{ # exact character "{"
(\w+) # variable name (restricted to a-z, 0-9, _)
(\w*) # "config" or variable (restricted to a-z, 0-9, _)
(?:([:~])([^}]+))? # optional :type or ~regex part
\} # exact character "}"
''', re.VERBOSE)
@@ -344,27 +378,37 @@ route_re = re.compile(r'''
predefined_regexps = {
'uuid': r'[a-f0-9][a-f0-9-]{31,35}',
'int': r'\d+',
'host': r'[a-z0-9][a-z0-9\-\.]*',
}
def compile_route(route):
fp = StringIO()
last_pos = 0
for match in route_re.finditer(route):
#print "matches: ", match.groups()
fp.write(re.escape(route[last_pos:match.start()]))
var_name = match.group(1)
sep = match.group(2)
expr = match.group(3)
if expr:
if sep == ':':
expr = predefined_regexps[expr]
# otherwise, treat what follows '~' as a regexp
if var_name == 'config':
expr = re.escape(str(config.get(var_name)))
else:
expr = '[^/]+'
expr = '(?P<%s>%s)' % (var_name, expr)
if expr:
if sep == ':':
expr = predefined_regexps[expr]
# otherwise, treat what follows '~' as a regexp
else:
expr = '[^/]+'
if var_name != '':
expr = '(?P<%s>%s)' % (var_name, expr)
else:
expr = '(%s)' % (expr,)
fp.write(expr)
last_pos = match.end()
fp.write(re.escape(route[last_pos:]))
return '^%s$' % fp.getvalue()
compiled_route = '^%s$' % fp.getvalue()
#print route, "->", compiled_route
return compiled_route
class Router(object):
'''WSGI routing class. Parses a URL and hands off a request to
@@ -372,21 +416,43 @@ class Router(object):
responds with a 404.'''
def __init__(self):
self.routes = []
self.paths = []
self._new_routes = []
self._routes = []
self._paths = []
def add(self, route, app, methods=None):
self.paths.append(route)
self.routes.append((re.compile(compile_route(route)), app,
methods and dict.fromkeys(methods)))
self._new_routes.append((route, app, methods))
def _create_routes(self):
for route, app, methods in self._new_routes:
self._paths.append(route)
self._routes.append(
(re.compile(compile_route(route)),
app,
methods and dict.fromkeys(methods)))
self._new_routes = []
def __call__(self, environ, start_response):
# load up the config from the config file. Only needs to be
# done once per interpreter. This is the entry point of all
# siesta applications, so this is where we trap it.
_conf = config.get_config()
if _conf is None:
import os.path
fname = os.path.join(
environ.get('ll.config_dir', '/local/linden/etc'),
'indra.xml')
config.load(fname)
# proceed with handling the request
self._create_routes()
path_info = environ['PATH_INFO']
request_method = environ['REQUEST_METHOD']
allowed = []
for regex, app, methods in self.routes:
for regex, app, methods in self._routes:
m = regex.match(path_info)
if m:
#print "groupdict:",m.groupdict()
if not methods or request_method in methods:
environ['paste.urlvars'] = m.groupdict()
return app(environ, start_response)
@@ -396,7 +462,7 @@ class Router(object):
allowed = dict.fromkeys(allows).keys()
allowed.sort()
resp = exc.HTTPMethodNotAllowed(
headers={'Allowed': ', '.join(allowed)})
headers={'Allow': ', '.join(allowed)})
else:
resp = exc.HTTPNotFound()
return resp(environ, start_response)

View File

@@ -39,6 +39,7 @@ import shutil
import sys
import tarfile
import errno
import subprocess
def path_ancestors(path):
drive, path = os.path.splitdrive(os.path.normpath(path))
@@ -279,13 +280,14 @@ class LLManifest(object):
self.file_list = []
self.excludes = []
self.actions = []
self.src_prefix = [args['source']]
self.artwork_prefix = [args['artwork']]
self.build_prefix = [args['build']]
self.dst_prefix = [args['dest']]
self.src_prefix = list([args['source']])
self.artwork_prefix = list([args['artwork']])
self.build_prefix = list([args['build']])
self.alt_build_prefix = list([args['build']])
self.dst_prefix = list([args['dest']])
self.created_paths = []
self.package_name = "Unknown"
def default_grid(self):
return self.args.get('grid', None) == ''
def default_channel(self):
@@ -309,7 +311,7 @@ class LLManifest(object):
in the file list by path()."""
self.excludes.append(glob)
def prefix(self, src='', build=None, dst=None):
def prefix(self, src='', build=None, dst=None, alt_build=None):
""" Pushes a prefix onto the stack. Until end_prefix is
called, all relevant method calls (esp. to path()) will prefix
paths with the entire prefix stack. Source and destination
@@ -320,10 +322,15 @@ class LLManifest(object):
dst = src
if build is None:
build = src
if alt_build is None:
alt_build = build
self.src_prefix.append(src)
self.artwork_prefix.append(src)
self.build_prefix.append(build)
self.dst_prefix.append(dst)
self.alt_build_prefix.append(alt_build)
return True # so that you can wrap it in an if to get indentation
def end_prefix(self, descr=None):
@@ -336,25 +343,30 @@ class LLManifest(object):
src = self.src_prefix.pop()
artwork = self.artwork_prefix.pop()
build = self.build_prefix.pop()
alt_build_prefix = self.alt_build_prefix.pop()
dst = self.dst_prefix.pop()
if descr and not(src == descr or build == descr or dst == descr):
raise ValueError, "End prefix '" + descr + "' didn't match '" +src+ "' or '" +dst + "'"
def get_src_prefix(self):
""" Returns the current source prefix."""
return os.path.join(*self.src_prefix)
return os.path.relpath(os.path.normpath(os.path.join(*self.src_prefix)))
def get_artwork_prefix(self):
""" Returns the current artwork prefix."""
return os.path.join(*self.artwork_prefix)
return os.path.relpath(os.path.normpath(os.path.join(*self.artwork_prefix)))
def get_build_prefix(self):
""" Returns the current build prefix."""
return os.path.join(*self.build_prefix)
return os.path.relpath(os.path.normpath(os.path.join(*self.build_prefix)))
def get_alt_build_prefix(self):
""" Returns the current alternate source prefix."""
return os.path.relpath(os.path.normpath(os.path.join(*self.alt_build_prefix)))
def get_dst_prefix(self):
""" Returns the current destination prefix."""
return os.path.join(*self.dst_prefix)
return os.path.relpath(os.path.normpath(os.path.join(*self.dst_prefix)))
def src_path_of(self, relpath):
"""Returns the full path to a file or directory specified
@@ -371,42 +383,25 @@ class LLManifest(object):
relative to the destination directory."""
return os.path.join(self.get_dst_prefix(), relpath)
def ensure_src_dir(self, reldir):
"""Construct the path for a directory relative to the
source path, and ensures that it exists. Returns the
full path."""
path = os.path.join(self.get_src_prefix(), reldir)
self.cmakedirs(path)
return path
def ensure_dst_dir(self, reldir):
"""Construct the path for a directory relative to the
destination path, and ensures that it exists. Returns the
full path."""
path = os.path.join(self.get_dst_prefix(), reldir)
self.cmakedirs(path)
return path
def run_command(self, command):
""" Runs an external command, and returns the output. Raises
an exception if the command reurns a nonzero status code. For
debugging/informational purpoases, prints out the command's
output as it is received."""
print "Running command:", command
fd = os.popen(command, 'r')
fd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
lines = []
while True:
lines.append(fd.readline())
lines.append(fd.stdout.readline())
if lines[-1] == '':
break
else:
print lines[-1],
print lines[-1].rstrip('\n'),
output = ''.join(lines)
status = fd.close()
if status:
if fd.returncode:
raise RuntimeError(
"Command %s returned non-zero status (%s) \noutput:\n%s"
% (command, status, output) )
% (command, fd.returncode, output) )
return output
def created_path(self, path):
@@ -484,29 +479,30 @@ class LLManifest(object):
if method is not None:
method(src, dst)
self.file_list.append([src, dst])
return 1
return [dst]
else:
sys.stdout.write(" (excluding %r, %r)" % (src, dst))
sys.stdout.flush()
return 0
return []
def process_directory(self, src, dst):
if not self.includes(src, dst):
sys.stdout.write(" (excluding %r, %r)" % (src, dst))
sys.stdout.flush()
return 0
return []
names = os.listdir(src)
self.cmakedirs(dst)
errors = []
found_files = []
count = 0
for name in names:
srcname = os.path.join(src, name)
dstname = os.path.join(dst, name)
if os.path.isdir(srcname):
count += self.process_directory(srcname, dstname)
found_files.extend(self.process_directory(srcname, dstname))
else:
count += self.process_file(srcname, dstname)
return count
found_files.extend(self.process_file(srcname, dstname))
return found_files
def includes(self, src, dst):
if src:
@@ -586,25 +582,11 @@ class LLManifest(object):
if os.path.exists(f):
return f
# didn't find it, return last item in list
if len(list) > 0:
if list:
return list[-1]
else:
return None
def contents_of_tar(self, src_tar, dst_dir):
""" Extracts the contents of the tarfile (specified
relative to the source prefix) into the directory
specified relative to the destination directory."""
self.check_file_exists(src_tar)
tf = tarfile.open(self.src_path_of(src_tar), 'r')
for member in tf.getmembers():
tf.extract(member, self.ensure_dst_dir(dst_dir))
# TODO get actions working on these dudes, perhaps we should extract to a temporary directory and then process_directory on it?
self.file_list.append([src_tar,
self.dst_path_of(os.path.join(dst_dir,member.name))])
tf.close()
def wildcard_regex(self, src_glob, dst_glob):
src_re = re.escape(src_glob)
src_re = src_re.replace('\*', '([-a-zA-Z0-9._ ]*)')
@@ -615,12 +597,6 @@ class LLManifest(object):
i = i+1
return re.compile(src_re), dst_temp
def check_file_exists(self, path):
if not os.path.exists(path) and not os.path.islink(path):
raise RuntimeError("Path %s doesn't exist" % (
os.path.normpath(os.path.join(os.getcwd(), path)),))
wildcard_pattern = re.compile('\*')
def expand_globs(self, src, dst):
src_list = glob.glob(src)
@@ -630,40 +606,61 @@ class LLManifest(object):
d = src_re.sub(d_template, s.replace('\\', '/'))
yield os.path.normpath(s), os.path.normpath(d)
def path2basename(self, path, file):
"""
It is a common idiom to write:
self.path(os.path.join(somedir, somefile), somefile)
So instead you can write:
self.path2basename(somedir, somefile)
Note that this is NOT the same as:
self.path(os.path.join(somedir, somefile))
which is the same as:
temppath = os.path.join(somedir, somefile)
self.path(temppath, temppath)
"""
return self.path(os.path.join(path, file), file)
def path(self, src, dst=None):
sys.stdout.write("Processing %s => %s ... " % (src, dst))
sys.stdout.flush()
if src == None:
raise RuntimeError("No source file, dst is " + dst)
if dst == None:
dst = src
dst = os.path.join(self.get_dst_prefix(), dst)
sys.stdout.write("Processing %s => %s ... " % (src, dst))
count = 0
is_glob = False
found_files = []
# look under each prefix for matching paths
paths = set([os.path.join(self.get_src_prefix(), src),
os.path.join(self.get_artwork_prefix(), src),
os.path.join(self.get_build_prefix(), src)])
# look under each prefix for matching paths. Paths are normalized so './../blah' will match '../blah/../blah/'
paths = set([os.path.normpath(os.path.join(self.get_src_prefix(), src)),
os.path.normpath(os.path.join(self.get_artwork_prefix(), src)),
os.path.normpath(os.path.join(self.get_build_prefix(), src)),
os.path.normpath(os.path.join(self.get_alt_build_prefix(), src))]
)
for path in paths:
if self.wildcard_pattern.search(path):
is_glob = True
for s,d in self.expand_globs(path, dst):
assert(s != d)
count += self.process_file(s, d)
found_files.extend(self.process_file(s, d))
else:
# if it's a directory, recurse through it
if os.path.isdir(path):
count += self.process_directory(path, dst)
found_files.extend(self.process_directory(path, dst))
elif os.path.exists(path):
count += self.process_file(path, dst)
found_files.extend(self.process_file(path, dst))
# if we're specifying a single path (not a glob),
# we should error out if it doesn't exist
if count == 0 and not is_glob:
if not found_files and not is_glob:
raise RuntimeError("No files match %s\n" % str(paths))
print "%d files" % count
print "%d files" % len(found_files)
return found_files
def do(self, *actions):
self.actions = actions

View File

@@ -1,4 +1,28 @@
#!/usr/bin/python
#!/usr/bin/env python
"""\
@file llperformance.py
$LicenseInfo:firstyear=2010&license=viewerlgpl$
Second Life Viewer Source Code
Copyright (C) 2010-2011, Linden Research, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation;
version 2.1 of the License only.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
$/LicenseInfo$
"""
# ------------------------------------------------
# Sim metrics utility functions.

View File

@@ -90,6 +90,17 @@ all the output, and get the result.
child.tochild.close()
result = child.poll()
if result != -1:
# At this point, the child process has exited and result
# is the return value from the process. Between the time
# we called select() and poll() the process may have
# exited so read all the data left on the child process
# stdout and stderr.
last = child.fromchild.read()
if last:
out.append(last)
last = child.childerr.read()
if last:
err.append(last)
child.tochild.close()
child.fromchild.close()
child.childerr.close()

View File

@@ -1,95 +0,0 @@
"""@file llversion.py
@brief Utility for parsing llcommon/llversion${server}.h
for the version string and channel string
Utility that parses svn info for branch and revision
$LicenseInfo:firstyear=2006&license=mit$
Copyright (c) 2006-2009, Linden Research, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
$/LicenseInfo$
"""
import re, sys, os, commands
# Methods for gathering version information from
# llversionviewer.h and llversionserver.h
def get_src_root():
indra_lib_python_indra_path = os.path.dirname(__file__)
return os.path.abspath(os.path.realpath(indra_lib_python_indra_path + "/../../../../../"))
def get_version_file_contents(version_type):
filepath = get_src_root() + '/indra/llcommon/llversion%s.h' % version_type
file = open(filepath,"r")
file_str = file.read()
file.close()
return file_str
def get_version(version_type):
file_str = get_version_file_contents(version_type)
m = re.search('const S32 LL_VERSION_MAJOR = (\d+);', file_str)
VER_MAJOR = m.group(1)
m = re.search('const S32 LL_VERSION_MINOR = (\d+);', file_str)
VER_MINOR = m.group(1)
m = re.search('const S32 LL_VERSION_PATCH = (\d+);', file_str)
VER_PATCH = m.group(1)
m = re.search('const S32 LL_VERSION_BUILD = (\d+);', file_str)
VER_BUILD = m.group(1)
version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s" % locals()
return version
def get_channel(version_type):
file_str = get_version_file_contents(version_type)
m = re.search('const char \* const LL_CHANNEL = "(.+)";', file_str)
return m.group(1)
def get_viewer_version():
return get_version('viewer')
def get_server_version():
return get_version('server')
def get_viewer_channel():
return get_channel('viewer')
def get_server_channel():
return get_channel('server')
# Methods for gathering subversion information
def get_svn_status_matching(regular_expression):
# Get the subversion info from the working source tree
status, output = commands.getstatusoutput('svn info %s' % get_src_root())
m = regular_expression.search(output)
if not m:
print "Failed to parse svn info output, resultfollows:"
print output
raise Exception, "No matching svn status in "+src_root
return m.group(1)
def get_svn_branch():
branch_re = re.compile('URL: (\S+)')
return get_svn_status_matching(branch_re)
def get_svn_revision():
last_rev_re = re.compile('Last Changed Rev: (\d+)')
return get_svn_status_matching(last_rev_re)

View File

@@ -40,7 +40,6 @@ from indra.base import llsd
from indra.base import config
DEBUG = False
NQ_FILE_SUFFIX = config.get('named-query-file-suffix', '.nq')
NQ_FILE_SUFFIX_LEN = len(NQ_FILE_SUFFIX)
@@ -52,6 +51,11 @@ def _init_g_named_manager(sql_dir = None):
This function is intended entirely for testing purposes,
because it's tricky to control the config from inside a test."""
global NQ_FILE_SUFFIX
NQ_FILE_SUFFIX = config.get('named-query-file-suffix', '.nq')
global NQ_FILE_SUFFIX_LEN
NQ_FILE_SUFFIX_LEN = len(NQ_FILE_SUFFIX)
if sql_dir is None:
sql_dir = config.get('named-query-base-dir')
@@ -65,11 +69,11 @@ def _init_g_named_manager(sql_dir = None):
_g_named_manager = NamedQueryManager(
os.path.abspath(os.path.realpath(sql_dir)))
def get(name):
def get(name, schema = None):
"Get the named query object to be used to perform queries"
if _g_named_manager is None:
_init_g_named_manager()
return _g_named_manager.get(name)
return _g_named_manager.get(name).for_schema(schema)
def sql(connection, name, params):
# use module-global NamedQuery object to perform default substitution
@@ -280,7 +284,10 @@ class NamedQuery(object):
So, we need a vendor (or extention) for LIKE_STRING. Anyone
want to write it?"""
utf8_value = unicode(value, "utf-8")
if isinstance(value, unicode):
utf8_value = value
else:
utf8_value = unicode(value, "utf-8")
esc_list = []
remove_chars = set(u"%_")
for glyph in utf8_value:
@@ -317,6 +324,8 @@ class NamedQuery(object):
def for_schema(self, db_name):
"Look trough the alternates and return the correct query"
if db_name is None:
return self
try:
return self._alternative[db_name]
except KeyError, e:
@@ -341,21 +350,21 @@ class NamedQuery(object):
cursor = connection.cursor(MySQLdb.cursors.DictCursor)
else:
cursor = connection.cursor()
statement = self.sql(connection, params)
full_query, params = self._construct_sql(params)
if DEBUG:
print "SQL:", statement
rows = cursor.execute(statement)
print "SQL:", self.sql(connection, params)
rows = cursor.execute(full_query, params)
# *NOTE: the expect_rows argument is a very cheesy way to get some
# validation on the result set. If you want to add more expectation
# logic, do something more object-oriented and flexible. Or use an ORM.
# logic, do something more object-oriented and flexible. Or use an ORM.
if(self._return_as_map):
expect_rows = 1
if expect_rows is not None and rows != expect_rows:
cursor.close()
raise ExpectationFailed("Statement expected %s rows, got %s. Sql: %s" % (
expect_rows, rows, statement))
raise ExpectationFailed("Statement expected %s rows, got %s. Sql: '%s' %s" % (
expect_rows, rows, full_query, params))
# convert to dicts manually if we're not using a dictcursor
if use_dictcursor:
@@ -381,11 +390,9 @@ class NamedQuery(object):
return result_set[0]
return result_set
def sql(self, connection, params):
""" Generates an SQL statement from the named query document
and a dictionary of parameters.
"""
def _construct_sql(self, params):
""" Returns a query string and a dictionary of parameters,
suitable for directly passing to the execute() method."""
self.refresh()
# build the query from the options available and the params
@@ -431,10 +438,23 @@ class NamedQuery(object):
new_params[self._build_integer_key(key)] = int(params[key])
params.update(new_params)
return full_query, params
def sql(self, connection, params):
""" Generates an SQL statement from the named query document
and a dictionary of parameters.
*NOTE: Only use for debugging, because it uses the
non-standard MySQLdb 'literal' method.
"""
if not DEBUG:
import warnings
warnings.warn("Don't use named_query.sql() when not debugging. Used on %s" % self._location)
# do substitution using the mysql (non-standard) 'literal'
# function to do the escaping.
sql = full_query % connection.literal(params)
return sql
full_query, params = self._construct_sql(params)
return full_query % connection.literal(params)
def refresh(self):
""" Refresh self from the file on the filesystem.

View File

@@ -3,20 +3,27 @@
@file simperf_oprof_interface.py
@brief Manage OProfile data collection on a host
$LicenseInfo:firstyear=2008&license=internal$
$LicenseInfo:firstyear=2008&license=mit$
Copyright (c) 2008-2009, Linden Research, Inc.
The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
this source code is governed by the Linden Lab Source Code Disclosure
Agreement ("Agreement") previously entered between you and Linden
Lab. By accessing, using, copying, modifying or distributing this
software, you acknowledge that you have been informed of your
obligations under the Agreement and agree to abide by those obligations.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
COMPLETENESS OR PERFORMANCE.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
$/LicenseInfo$
"""

View File

@@ -1,4 +1,31 @@
#!/usr/bin/python
#!/usr/bin/env python
"""\
@file simperf_proc_interface.py
@brief Utility to extract log messages from *.<pid>.llsd files containing performance statistics.
$LicenseInfo:firstyear=2008&license=mit$
Copyright (c) 2008-2009, Linden Research, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
$/LicenseInfo$
"""
# ----------------------------------------------------
# Utility to extract log messages from *.<pid>.llsd

View File

@@ -0,0 +1,146 @@
#!/usr/bin/env python
"""\
@file test_win32_manifest.py
@brief Test an assembly binding version and uniqueness in a windows dll or exe.
$LicenseInfo:firstyear=2009&license=viewerlgpl$
Second Life Viewer Source Code
Copyright (C) 2009-2011, Linden Research, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation;
version 2.1 of the License only.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
$/LicenseInfo$
"""
import sys, os
import tempfile
from xml.dom.minidom import parse
class AssemblyTestException(Exception):
pass
class NoManifestException(AssemblyTestException):
pass
class MultipleBindingsException(AssemblyTestException):
pass
class UnexpectedVersionException(AssemblyTestException):
pass
class NoMatchingAssemblyException(AssemblyTestException):
pass
def get_HKLM_registry_value(key_str, value_str):
import _winreg
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
key = _winreg.OpenKey(reg, key_str)
value = _winreg.QueryValueEx(key, value_str)[0]
#print 'Found: %s' % value
return value
def find_vc_dir():
supported_versions = (r'8.0', r'9.0')
supported_products = (r'VisualStudio', r'VCExpress')
value_str = (r'ProductDir')
for product in supported_products:
for version in supported_versions:
key_str = (r'SOFTWARE\Microsoft\%s\%s\Setup\VC' %
(product, version))
try:
return get_HKLM_registry_value(key_str, value_str)
except WindowsError, err:
x64_key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' %
version)
try:
return get_HKLM_registry_value(x64_key_str, value_str)
except:
print >> sys.stderr, "Didn't find MS %s version %s " % (product,version)
raise
def find_mt_path():
vc_dir = find_vc_dir()
mt_path = '\"%sbin\\mt.exe\"' % vc_dir
return mt_path
def test_assembly_binding(src_filename, assembly_name, assembly_ver):
print "checking %s dependency %s..." % (src_filename, assembly_name)
(tmp_file_fd, tmp_file_name) = tempfile.mkstemp(suffix='.xml')
tmp_file = os.fdopen(tmp_file_fd)
tmp_file.close()
mt_path = find_mt_path()
resource_id = ""
if os.path.splitext(src_filename)[1].lower() == ".dll":
resource_id = ";#2"
system_call = '%s -nologo -inputresource:%s%s -out:%s > NUL' % (mt_path, src_filename, resource_id, tmp_file_name)
print "Executing: %s" % system_call
mt_result = os.system(system_call)
if mt_result == 31:
print "No manifest found in %s" % src_filename
raise NoManifestException()
manifest_dom = parse(tmp_file_name)
nodes = manifest_dom.getElementsByTagName('assemblyIdentity')
versions = list()
for node in nodes:
if node.getAttribute('name') == assembly_name:
versions.append(node.getAttribute('version'))
if len(versions) == 0:
print "No matching assemblies found in %s" % src_filename
raise NoMatchingAssemblyException()
elif len(versions) > 1:
print "Multiple bindings to %s found:" % assembly_name
print versions
print
raise MultipleBindingsException(versions)
elif versions[0] != assembly_ver:
print "Unexpected version found for %s:" % assembly_name
print "Wanted %s, found %s" % (assembly_ver, versions[0])
print
raise UnexpectedVersionException(assembly_ver, versions[0])
os.remove(tmp_file_name)
print "SUCCESS: %s OK!" % src_filename
print
if __name__ == '__main__':
print
print "Running test_win32_manifest.py..."
usage = 'test_win32_manfest <srcFileName> <assemblyName> <assemblyVersion>'
try:
src_filename = sys.argv[1]
assembly_name = sys.argv[2]
assembly_ver = sys.argv[3]
except:
print "Usage:"
print usage
print
raise
test_assembly_binding(src_filename, assembly_name, assembly_ver)

View File

@@ -45,13 +45,6 @@ Typical usage:
This module works with Python 2.3 or higher."""
# *HACK: Necessary for python 2.4. Consider replacing this code wart
# after python >=2.5 has deployed everywhere. 2009-10-05
try:
from hashlib import md5
except ImportError:
from md5 import md5
__author__ = 'Ka-Ping Yee <ping@zesty.ca>'
__date__ = '$Date: 2006/06/12 23:15:40 $'.split()[1].replace('/', '-')
__version__ = '$Revision: 1.30 $'.split()[1]
@@ -453,6 +446,13 @@ def uuid1(node=None, clock_seq=None):
def uuid3(namespace, name):
"""Generate a UUID from the MD5 hash of a namespace UUID and a name."""
try:
# Python 2.6
from hashlib import md5
except ImportError:
# Python 2.5 and earlier
from md5 import new as md5
hash = md5(namespace.bytes + name).digest()
return UUID(bytes=hash[:16], version=3)

View File

@@ -317,7 +317,7 @@ namespace HACD
bool m_addFacesPoints; //>! specifies whether to add faces points or not
bool m_addExtraDistPoints; //>! specifies whether to add extra points for concave shapes or not
friend HACD * const CreateHACD(HeapManager * heapManager = 0);
friend HACD * const CreateHACD(HeapManager * heapManager);
friend void DestroyHACD(HACD * const hacd);
};
inline HACD * const CreateHACD(HeapManager * heapManager)

View File

@@ -17,6 +17,10 @@
#include <assert.h>
#include <limits>
#include "hacdManifoldMesh.h"
#if _MSC_VER >= 1800
#include <algorithm>
#endif
namespace HACD
{
bool BBox::Raycast(const Vec3<Float> & origin, const Vec3<Float> & dir, Float & distMin) const

View File

@@ -7,7 +7,7 @@ include(00-Common)
include_directories(${LIBS_OPEN_DIR}/libhacd)
set (libndhacd_SOURCE_FILES
LLConvexDecomposition.cpp
llconvexdecomposition.cpp
nd_hacdConvexDecomposition.cpp
nd_hacdStructs.cpp
nd_hacdUtils.cpp
@@ -16,12 +16,12 @@ set (libndhacd_SOURCE_FILES
)
set (libndhacd_HEADER_FILES
LLConvexDecomposition.h
llconvexdecomposition.h
ndConvexDecomposition.h
nd_hacdConvexDecomposition.h
nd_hacdStructs.h
nd_StructTracer.h
LLConvexDecompositionStubImpl.h
llconvexdecompositionstubimpl.h
nd_EnterExitTracer.h
nd_hacdDefines.h
nd_hacdUtils.h

View File

@@ -1,5 +1,5 @@
/**
* @file LLConvexDecomposition.cpp
* @file llconvexdecomposition.cpp
* @author falcon@lindenlab.com
* @brief A stub implementation of LLConvexDecomposition interface
*
@@ -35,7 +35,7 @@
#include "nd_hacdConvexDecomposition.h"
#include "LLConvexDecomposition.h"
#include "llconvexdecomposition.h"
/*static */bool LLConvexDecomposition::s_isInitialized = false;

View File

@@ -1,5 +1,5 @@
/**
* @file LLConvexDecomposition.cpp
* @file llconvexdecomposition.cpp
* @brief LLConvexDecomposition interface definition
*
* $LicenseInfo:firstyear=2011&license=viewerlgpl$

View File

@@ -1,5 +1,5 @@
/**
* @file LLConvexDecompositionStubImpl.cpp
* @file llconvexdecompositionstubimpl.cpp
* @author falcon@lindenlab.com
* @brief A stub implementation of LLConvexDecomposition
*
@@ -28,7 +28,7 @@
#include <string.h>
#include <memory>
#include "LLConvexDecompositionStubImpl.h"
#include "llconvexdecompositionstubimpl.h"
LLConvexDecomposition* LLConvexDecompositionImpl::getInstance()
{

View File

@@ -1,5 +1,5 @@
/**
* @file LLConvexDecompositionStubImpl.h
* @file llconvexdecompositionstubimpl.h
* @author falcon@lindenlab.com
* @brief A stub implementation of LLConvexDecomposition
*
@@ -29,7 +29,7 @@
#ifndef LL_CONVEX_DECOMP_UTIL_H
#define LL_CONVEX_DECOMP_UTIL_H
#include "LLConvexDecomposition.h"
#include "llconvexdecomposition.h"
class LLConvexDecompositionImpl : public LLConvexDecomposition
{

View File

@@ -21,7 +21,7 @@
#include "ndConvexDecomposition.h"
#include "LLConvexDecomposition.h"
#include "llconvexdecomposition.h"
#include "nd_hacdStructs.h"
namespace ndStructTracer

View File

@@ -19,7 +19,7 @@
#ifndef ND_HACD_CONVEXDECOMP_H
#define ND_HACD_CONVEXDECOMP_H
#include "LLConvexDecomposition.h"
#include "llconvexdecomposition.h"
#include <map>
#include <vector>

View File

@@ -17,7 +17,6 @@
*/
#include "nd_hacdStructs.h"
#include "LLConvexDecomposition.h"
void DecompHull::clear()
{

View File

@@ -21,7 +21,7 @@
#include "nd_hacdDefines.h"
#include "hacdHACD.h"
#include "LLConvexDecomposition.h"
#include "llconvexdecomposition.h"
#include <vector>
struct LLCDHull;

View File

@@ -20,7 +20,6 @@
#define ND_HACD_UTILS_H
#include "nd_hacdStructs.h"
#include "LLConvexDecomposition.h"
tHACD* init( int nConcavity, int nClusters, int nMaxVerticesPerHull, double dMaxConnectDist, HACDDecoder *aData );
DecompData decompose( tHACD *aHACD );

View File

@@ -182,9 +182,6 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
}
mIsBuilt = FALSE;
mNumCollisionVolumes = 0;
mCollisionVolumes = NULL;
}
// virtual
@@ -294,7 +291,7 @@ LLAvatarAppearance::~LLAvatarAppearance()
mJointMap.clear();
clearSkeleton();
deleteAndClearArray(mCollisionVolumes);
clearCollisionVolumes();
std::for_each(mPolyMeshes.begin(), mPolyMeshes.end(), DeletePairedPointer());
mPolyMeshes.clear();
@@ -575,12 +572,12 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
}
else // collision volume
{
if (volume_num >= (S32)mNumCollisionVolumes)
if (volume_num >= (S32)mCollisionVolumes.size())
{
llwarns << "Too many bones" << llendl;
return FALSE;
}
joint = (&mCollisionVolumes[volume_num]);
joint = (mCollisionVolumes[volume_num]);
joint->setName( info->mName );
}
@@ -983,19 +980,19 @@ BOOL LLAvatarAppearance::loadSkeletonNode ()
mRoot->addChild(mMeshLOD[MESH_ID_SKIRT]);
mRoot->addChild(mMeshLOD[MESH_ID_HEAD]);
LLAvatarJoint *skull = (LLAvatarJoint*)mRoot->findJoint("mSkull");
LLJoint *skull = mRoot->findJoint("mSkull");
if (skull)
{
skull->addChild(mMeshLOD[MESH_ID_HAIR] );
}
LLAvatarJoint *eyeL = (LLAvatarJoint*)mRoot->findJoint("mEyeLeft");
LLJoint *eyeL = mRoot->findJoint("mEyeLeft");
if (eyeL)
{
eyeL->addChild( mMeshLOD[MESH_ID_EYEBALL_LEFT] );
}
LLAvatarJoint *eyeR = (LLAvatarJoint*)mRoot->findJoint("mEyeRight");
LLJoint *eyeR = mRoot->findJoint("mEyeRight");
if (eyeR)
{
eyeR->addChild( mMeshLOD[MESH_ID_EYEBALL_RIGHT] );
@@ -1250,12 +1247,12 @@ LLVector3 LLAvatarAppearance::getVolumePos(S32 joint_index, LLVector3& volume_of
return LLVector3::zero;
}
if (joint_index > mNumCollisionVolumes)
if (joint_index > (S32)mCollisionVolumes.size())
{
return LLVector3::zero;
}
return mCollisionVolumes[joint_index].getVolumePos(volume_offset);
return mCollisionVolumes[joint_index]->getVolumePos(volume_offset);
}
//-----------------------------------------------------------------------------
@@ -1266,12 +1263,12 @@ LLJoint* LLAvatarAppearance::findCollisionVolume(U32 volume_id)
//SNOW-488: As mNumCollisionVolumes is a S32 and we are casting from a U32 to a S32
//to compare we also need to be sure of the wrap around case producing (S32) <0
//or in terms of the U32 an out of bounds index in the array.
if ((S32)volume_id > mNumCollisionVolumes || (S32)volume_id<0)
if ((S32)volume_id > (S32)mCollisionVolumes.size() || (S32)volume_id<0)
{
return NULL;
}
return &mCollisionVolumes[volume_id];
return mCollisionVolumes[volume_id];
}
//-----------------------------------------------------------------------------
@@ -1279,9 +1276,9 @@ LLJoint* LLAvatarAppearance::findCollisionVolume(U32 volume_id)
//-----------------------------------------------------------------------------
S32 LLAvatarAppearance::getCollisionVolumeID(std::string &name)
{
for (S32 i = 0; i < mNumCollisionVolumes; i++)
for (S32 i = 0; i < (S32)mCollisionVolumes.size(); i++)
{
if (mCollisionVolumes[i].getName() == name)
if (mCollisionVolumes[i]->getName() == name)
{
return i;
}
@@ -1530,21 +1527,34 @@ LLTexLayerSet* LLAvatarAppearance::getAvatarLayerSet(EBakedTextureIndex baked_in
return mBakedTextureDatas[baked_index].mTexLayerSet;
}
void LLAvatarAppearance::clearCollisionVolumes()
{
std::for_each(mCollisionVolumes.begin(), mCollisionVolumes.end(),
DeletePointer());
mCollisionVolumes.clear();
}
//-----------------------------------------------------------------------------
// allocateCollisionVolumes()
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num )
{
deleteAndClearArray(mCollisionVolumes);
mNumCollisionVolumes = 0;
mCollisionVolumes.reserve(num);
mCollisionVolumes = new LLAvatarJointCollisionVolume[num];
if (!mCollisionVolumes)
LLAvatarJointCollisionVolume* cv;
for (U32 i = 0; i < num; ++i)
{
return FALSE;
cv = new LLAvatarJointCollisionVolume();
if (cv)
{
mCollisionVolumes.push_back(cv);
}
else
{
clearCollisionVolumes();
return false;
}
}
mNumCollisionVolumes = num;
return TRUE;
}

View File

@@ -337,9 +337,9 @@ protected:
// Collision volumes
//--------------------------------------------------------------------
public:
S32 mNumCollisionVolumes;
LLAvatarJointCollisionVolume* mCollisionVolumes;
std::vector<LLAvatarJointCollisionVolume*> mCollisionVolumes;
protected:
void clearCollisionVolumes();
BOOL allocateCollisionVolumes(U32 num);
/** Physics

View File

@@ -105,8 +105,9 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = (LLAvatarJoint*)(*iter);
joint->setValid(valid, TRUE);
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
if (joint)
joint->setValid(valid, TRUE);
}
}
@@ -124,7 +125,8 @@ void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive )
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
joint->setSkeletonComponents(comp, recursive);
if (joint)
joint->setSkeletonComponents(comp, recursive);
}
}
}
@@ -138,8 +140,9 @@ void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive)
for (child_list_t::iterator iter = mChildren.begin();
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = (LLAvatarJoint*)(*iter);
joint->setVisible(visible, recursive);
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
if(joint)
joint->setVisible(visible, recursive);
}
}
}
@@ -150,7 +153,8 @@ void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pix
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
joint->updateFaceSizes(num_vertices, num_indices, pixel_area);
if (joint)
joint->updateFaceSizes(num_vertices, num_indices, pixel_area);
}
}
@@ -160,7 +164,8 @@ void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind,
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
joint->updateFaceData(face, pixel_area, damp_wind, terse_update);
if (joint)
joint->updateFaceData(face, pixel_area, damp_wind, terse_update);
}
}
@@ -170,7 +175,8 @@ void LLAvatarJoint::updateJointGeometry()
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
joint->updateJointGeometry();
if (joint)
joint->updateJointGeometry();
}
}
@@ -184,6 +190,9 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate)
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
if (!joint)
continue;
F32 jointLOD = joint->getLOD();
if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD)
@@ -213,7 +222,8 @@ void LLAvatarJoint::dump()
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
joint->dump();
if (joint)
joint->dump();
}
}
@@ -260,7 +270,7 @@ void LLAvatarJointCollisionVolume::renderCollision()
updateWorldMatrix();
gGL.pushMatrix();
gGL.multMatrix( &mXform.getWorldMatrix().mMatrix[0][0] );
gGL.multMatrix( mXform.getWorldMatrix() );
gGL.diffuseColor3f( 0.f, 0.f, 1.f );

View File

@@ -127,6 +127,16 @@ public:
LLAvatarJointCollisionVolume();
virtual ~LLAvatarJointCollisionVolume() {};
void* operator new(size_t size)
{
return ll_aligned_malloc_16(size);
}
void operator delete(void* ptr)
{
ll_aligned_free_16(ptr);
}
/*virtual*/ BOOL inheritScale() { return TRUE; }
/*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE );

View File

@@ -83,30 +83,28 @@ LLSkinJoint::~LLSkinJoint()
//-----------------------------------------------------------------------------
// LLSkinJoint::setupSkinJoint()
//-----------------------------------------------------------------------------
BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint)
void LLSkinJoint::setupSkinJoint( LLJoint *joint)
{
mRootToJointSkinOffset.clearVec();
mRootToParentJointSkinOffset.clearVec();
// find the named joint
mJoint = joint;
if ( !mJoint )
if (!(mJoint = joint))
{
llinfos << "Can't find joint" << llendl;
return;
}
// compute the inverse root skin matrix
mRootToJointSkinOffset.clearVec();
LLVector3 rootSkinOffset;
while (joint)
do
{
rootSkinOffset += joint->getSkinOffset();
joint = (LLAvatarJoint*)joint->getParent();
}
mRootToJointSkinOffset -= joint->getSkinOffset();
} while (joint = joint->getParent());
mRootToJointSkinOffset = -rootSkinOffset;
mRootToParentJointSkinOffset = mRootToJointSkinOffset;
mRootToParentJointSkinOffset += mJoint->getSkinOffset();
return TRUE;
return;
}
@@ -307,15 +305,14 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
for (jn = 0; jn < numJointNames; jn++)
{
//llinfos << "Setting up joint " << jointNames[jn] << llendl;
LLAvatarJoint* joint = (LLAvatarJoint*)(getRoot()->findJoint(jointNames[jn]) );
mSkinJoints[jn].setupSkinJoint( joint );
mSkinJoints[jn].setupSkinJoint( getRoot()->findJoint(jointNames[jn]) );
}
}
// setup joint array
if (!mMesh->isLOD())
{
setupJoint((LLAvatarJoint*)getRoot());
setupJoint(getRoot());
}
// llinfos << "joint render entries: " << mMesh->mJointRenderData.count() << llendl;
@@ -324,7 +321,7 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
//-----------------------------------------------------------------------------
// setupJoint()
//-----------------------------------------------------------------------------
void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
void LLAvatarJointMesh::setupJoint(LLJoint* current_joint)
{
// llinfos << "Mesh: " << getName() << llendl;
@@ -345,7 +342,7 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
if(mMesh->mJointRenderData.count() && mMesh->mJointRenderData[mMesh->mJointRenderData.count() - 1]->mWorldMatrix == &current_joint->getParent()->getWorldMatrix())
{
// ...then just add ourselves
LLAvatarJoint* jointp = js.mJoint;
LLJoint* jointp = js.mJoint;
mMesh->mJointRenderData.put(new LLJointRenderData(&jointp->getWorldMatrix(), &js));
// llinfos << "joint " << joint_count << js.mJoint->getName() << llendl;
// joint_count++;
@@ -366,8 +363,9 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
for (LLJoint::child_list_t::iterator iter = current_joint->mChildren.begin();
iter != current_joint->mChildren.end(); ++iter)
{
LLAvatarJoint* child_joint = (LLAvatarJoint*)(*iter);
setupJoint(child_joint);
LLAvatarJoint* child_joint = dynamic_cast<LLAvatarJoint*>(*iter);
if(child_joint)
setupJoint(child_joint);
}
}

View File

@@ -49,9 +49,9 @@ class LLSkinJoint
public:
LLSkinJoint();
~LLSkinJoint();
BOOL setupSkinJoint( LLAvatarJoint *joint);
void setupSkinJoint( LLJoint *joint);
LLAvatarJoint *mJoint;
LLJoint* mJoint;
LLVector3 mRootToJointSkinOffset;
LLVector3 mRootToParentJointSkinOffset;
};
@@ -122,7 +122,7 @@ public:
void setMesh( LLPolyMesh *mesh );
// Sets up joint matrix data for rendering
void setupJoint(LLAvatarJoint* current_joint);
void setupJoint(LLJoint* current_joint);
// Sets ID for picking
void setMeshID( S32 id ) {mMeshID = id;}

View File

@@ -231,9 +231,9 @@ BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
mBaseCoords = (LLVector4a*) ll_aligned_malloc_16(numVertices*sizeof(LLVector4a));
mBaseNormals = (LLVector4a*) ll_aligned_malloc_16(numVertices*sizeof(LLVector4a));
mBaseBinormals = (LLVector4a*) ll_aligned_malloc_16(numVertices*sizeof(LLVector4a));
mTexCoords = (LLVector2*) ll_aligned_malloc_16(numVertices*sizeof(LLVector2));
mDetailTexCoords = (LLVector2*) ll_aligned_malloc_16(numVertices*sizeof(LLVector2));
mWeights = (F32*) ll_aligned_malloc_16(numVertices*sizeof(F32));
mTexCoords = (LLVector2*) ll_aligned_malloc_16((numVertices+numVertices%2)*sizeof(LLVector2));
mDetailTexCoords = (LLVector2*) ll_aligned_malloc_16((numVertices+numVertices%2)*sizeof(LLVector2));
mWeights = (F32*) ll_aligned_malloc_16(((numVertices)*sizeof(F32)+0xF) & ~0xF);
for (i = 0; i < numVertices; i++)
{
mBaseCoords[i].clear();

View File

@@ -146,10 +146,10 @@ public:
class LLJointRenderData
{
public:
LLJointRenderData(const LLMatrix4* world_matrix, LLSkinJoint* skin_joint) : mWorldMatrix(world_matrix), mSkinJoint(skin_joint) {}
LLJointRenderData(const LLMatrix4a* world_matrix, LLSkinJoint* skin_joint) : mWorldMatrix(world_matrix), mSkinJoint(skin_joint) {}
~LLJointRenderData(){}
const LLMatrix4* mWorldMatrix;
const LLMatrix4a* mWorldMatrix;
LLSkinJoint* mSkinJoint;
};

View File

@@ -647,11 +647,11 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
for (iter = getInfo()->mVolumeInfoList.begin(); iter != getInfo()->mVolumeInfoList.end(); iter++)
{
LLPolyVolumeMorphInfo *volume_info = &(*iter);
for (S32 i = 0; i < avatarp->mNumCollisionVolumes; i++)
for (S32 i = 0; i < (S32)avatarp->mCollisionVolumes.size(); i++)
{
if (avatarp->mCollisionVolumes[i].getName() == volume_info->mName)
if (avatarp->mCollisionVolumes[i]->getName() == volume_info->mName)
{
mVolumeMorphs.push_back(LLPolyVolumeMorph(&avatarp->mCollisionVolumes[i],
mVolumeMorphs.push_back(LLPolyVolumeMorph(avatarp->mCollisionVolumes[i],
volume_info->mScale,
volume_info->mPos));
break;

View File

@@ -163,6 +163,16 @@ public:
LLPolyMorphTarget(LLPolyMesh *poly_mesh);
~LLPolyMorphTarget();
void* operator new(size_t size)
{
return ll_aligned_malloc_16(size);
}
void operator delete(void* ptr)
{
ll_aligned_free_16(ptr);
}
// Special: These functions are overridden by child classes
LLPolyMorphTargetInfo* getInfo() const { return (LLPolyMorphTargetInfo*)mInfo; }
// This sets mInfo and calls initialization functions

View File

@@ -154,13 +154,13 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin();
iter != joint->mChildren.end(); ++iter)
{
LLAvatarJoint* child_joint = (LLAvatarJoint*)(*iter);
if (child_joint->inheritScale())
{
LLVector3 childDeformation = LLVector3(child_joint->getScale());
childDeformation.scaleVec(bone_info->mScaleDeformation);
mJointScales[child_joint] = childDeformation;
}
LLAvatarJoint* child_joint = dynamic_cast<LLAvatarJoint*>(*iter);
if (child_joint && child_joint->inheritScale())
{
LLVector3 childDeformation = LLVector3(child_joint->getScale());
childDeformation.scaleVec(bone_info->mScaleDeformation);
mJointScales[child_joint] = childDeformation;
}
}
if (bone_info->mHasPositionDeformation)

View File

@@ -68,7 +68,16 @@ class LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
{
friend class LLPolySkeletalDistortion;
public:
void* operator new(size_t size)
{
return ll_aligned_malloc_16(size);
}
void operator delete(void* ptr)
{
ll_aligned_free_16(ptr);
}
LLPolySkeletalDistortionInfo();
/*virtual*/ ~LLPolySkeletalDistortionInfo() {};
@@ -77,12 +86,12 @@ public:
protected:
typedef std::vector<LLPolySkeletalBoneInfo> bone_info_list_t;
bone_info_list_t mBoneInfoList;
};
} LL_ALIGN_POSTFIX(16);
//-----------------------------------------------------------------------------
// LLPolySkeletalDeformation
// A set of joint scale data for deforming the avatar mesh
//-----------------------------------------------------------------------------
LL_ALIGN_PREFIX(16)
class LLPolySkeletalDistortion : public LLViewerVisualParam
{
public:

View File

@@ -5,25 +5,21 @@ project(llaudio)
include(00-Common)
include(Audio)
include(LLAudio)
if (FMODSTUDIO)
include(FMODSTUDIO)
endif (FMODSTUDIO)
if (FMODEX)
include(FMODEX)
set(FMOD OFF)
endif (FMODEX)
if (NOT FMODEX)
include(FMOD)
endif (NOT FMODEX)
include(OPENAL)
include(LLCommon)
include(LLMath)
include(LLMessage)
include(LLVFS)
if (FMODEX)
include_directories(${FMODEX_INCLUDE_DIR})
endif(FMODEX)
if(FMOD)
if (FMOD)
include_directories(${FMOD_INCLUDE_DIR})
endif (FMOD)
endif(FMOD)
include_directories(
${LLAUDIO_INCLUDE_DIRS}
@@ -58,6 +54,20 @@ set(llaudio_HEADER_FILES
llwindgen.h
)
if (FMODSTUDIO)
list(APPEND llaudio_SOURCE_FILES
llaudioengine_fmodstudio.cpp
lllistener_fmodstudio.cpp
llstreamingaudio_fmodstudio.cpp
)
list(APPEND llaudio_HEADER_FILES
llaudioengine_fmodstudio.h
lllistener_fmodstudio.h
llstreamingaudio_fmodstudio.h
)
endif (FMODSTUDIO)
if (FMODEX)
list(APPEND llaudio_SOURCE_FILES
llaudioengine_fmodex.cpp
@@ -71,26 +81,6 @@ if (FMODEX)
llstreamingaudio_fmodex.h
)
endif (FMODEX)
if (FMOD)
list(APPEND llaudio_SOURCE_FILES
llaudioengine_fmod.cpp
lllistener_fmod.cpp
llstreamingaudio_fmod.cpp
)
list(APPEND llaudio_HEADER_FILES
llaudioengine_fmod.h
lllistener_fmod.h
llstreamingaudio_fmod.h
)
if (LINUX)
if (${CXX_VERSION} MATCHES "4.[23]")
set_source_files_properties(llaudioengine_fmod.cpp
COMPILE_FLAGS -Wno-error=write-strings)
endif (${CXX_VERSION} MATCHES "4.[23]")
endif (LINUX)
endif (FMOD)
if (OPENAL)
list(APPEND llaudio_SOURCE_FILES

View File

@@ -24,7 +24,7 @@
*/
#ifndef LL_LLAUDIODECODEMGR_H
#define LL_LLAUDIODECODEMG_H
#define LL_LLAUDIODECODEMGR_H
#include "stdtypes.h"

View File

@@ -174,6 +174,9 @@ void LLAudioEngine::shutdown()
delete mBuffers[i];
mBuffers[i] = NULL;
}
delete mStreamingAudioImpl;
mStreamingAudioImpl = NULL;
}

View File

@@ -1,789 +0,0 @@
/**
* @file audioengine_fmod.cpp
* @brief Implementation of LLAudioEngine class abstracting the audio support as a FMOD 3D implementation
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "linden_common.h"
#include "llstreamingaudio.h"
#include "llstreamingaudio_fmod.h"
#include "llaudioengine_fmod.h"
#include "lllistener_fmod.h"
#include "llerror.h"
#include "llmath.h"
#include "llrand.h"
#include "fmod.h"
#include "fmod_errors.h"
#include "lldir.h"
#include "llapr.h"
#include "sound_ids.h"
extern "C" {
void * F_CALLBACKAPI windCallback(void *originalbuffer, void *newbuffer, int length, void* userdata);
}
LLAudioEngine_FMOD::LLAudioEngine_FMOD()
{
mInited = false;
mWindGen = NULL;
mWindDSP = NULL;
}
LLAudioEngine_FMOD::~LLAudioEngine_FMOD()
{
}
bool LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
{
LLAudioEngine::init(num_channels, userdata);
// Reserve one extra channel for the http stream.
if (!FSOUND_SetMinHardwareChannels(num_channels + 1))
{
LL_WARNS("AppInit") << "FMOD::init[0](), error: " << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
}
LL_DEBUGS("AppInit") << "LLAudioEngine_FMOD::init() initializing FMOD" << LL_ENDL;
F32 version = FSOUND_GetVersion();
if (version < FMOD_VERSION)
{
LL_WARNS("AppInit") << "Error : You are using the wrong FMOD version (" << version
<< ")! You should be using FMOD " << FMOD_VERSION << LL_ENDL;
//return false;
}
U32 fmod_flags = 0x0;
#if LL_WINDOWS
// Windows needs to know which window is frontmost.
// This must be called before FSOUND_Init() per the FMOD docs.
// This could be used to let FMOD handle muting when we lose focus,
// but we don't actually want to do that because we want to distinguish
// between minimized and not-focused states.
if (!FSOUND_SetHWND(userdata))
{
LL_WARNS("AppInit") << "Error setting FMOD window: "
<< FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
return false;
}
// Play audio when we don't have focus.
// (For example, IM client on top of us.)
// This means we also try to play audio when minimized,
// so we manually handle muting in that case. JC
fmod_flags |= FSOUND_INIT_GLOBALFOCUS;
fmod_flags |= FSOUND_INIT_DSOUND_HRTF_FULL;
#endif
#if LL_LINUX
// initialize the FMOD engine
// This is a hack to use only FMOD's basic FPU mixer
// when the LL_VALGRIND environmental variable is set,
// otherwise valgrind will fall over on FMOD's MMX detection
if (getenv("LL_VALGRIND")) /*Flawfinder: ignore*/
{
LL_INFOS("AppInit") << "Pacifying valgrind in FMOD init." << LL_ENDL;
FSOUND_SetMixer(FSOUND_MIXER_QUALITY_FPU);
}
// If we don't set an output method, Linux FMOD always
// decides on OSS and fails otherwise. So we'll manually
// try ESD, then OSS, then ALSA.
// Why this order? See SL-13250, but in short, OSS emulated
// on top of ALSA is ironically more reliable than raw ALSA.
// Ack, and ESD has more reliable failure modes - but has worse
// latency - than all of them, so wins for now.
bool audio_ok = false;
if (!audio_ok)
{
if (NULL == getenv("LL_BAD_FMOD_ESD")) /*Flawfinder: ignore*/
{
LL_DEBUGS("AppInit") << "Trying ESD audio output..." << LL_ENDL;
if(FSOUND_SetOutput(FSOUND_OUTPUT_ESD) &&
FSOUND_Init(44100, num_channels, fmod_flags))
{
LL_DEBUGS("AppInit") << "ESD audio output initialized OKAY"
<< LL_ENDL;
audio_ok = true;
} else {
LL_WARNS("AppInit") << "ESD audio output FAILED to initialize: "
<< FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
}
} else {
LL_DEBUGS("AppInit") << "ESD audio output SKIPPED" << LL_ENDL;
}
}
if (!audio_ok)
{
if (NULL == getenv("LL_BAD_FMOD_OSS")) /*Flawfinder: ignore*/
{
LL_DEBUGS("AppInit") << "Trying OSS audio output..." << LL_ENDL;
if(FSOUND_SetOutput(FSOUND_OUTPUT_OSS) &&
FSOUND_Init(44100, num_channels, fmod_flags))
{
LL_DEBUGS("AppInit") << "OSS audio output initialized OKAY" << LL_ENDL;
audio_ok = true;
} else {
LL_WARNS("AppInit") << "OSS audio output FAILED to initialize: "
<< FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
}
} else {
LL_DEBUGS("AppInit") << "OSS audio output SKIPPED" << LL_ENDL;
}
}
if (!audio_ok)
{
if (NULL == getenv("LL_BAD_FMOD_ALSA")) /*Flawfinder: ignore*/
{
LL_DEBUGS("AppInit") << "Trying ALSA audio output..." << LL_ENDL;
if(FSOUND_SetOutput(FSOUND_OUTPUT_ALSA) &&
FSOUND_Init(44100, num_channels, fmod_flags))
{
LL_DEBUGS("AppInit") << "ALSA audio output initialized OKAY" << LL_ENDL;
audio_ok = true;
} else {
LL_WARNS("AppInit") << "ALSA audio output FAILED to initialize: "
<< FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
}
} else {
LL_DEBUGS("AppInit") << "OSS audio output SKIPPED" << LL_ENDL;
}
}
if (!audio_ok)
{
LL_WARNS("AppInit") << "Overall audio init failure." << LL_ENDL;
return false;
}
// On Linux, FMOD causes a SIGPIPE for some netstream error
// conditions (an FMOD bug); ignore SIGPIPE so it doesn't crash us.
// NOW FIXED in FMOD 3.x since 2006-10-01.
//signal(SIGPIPE, SIG_IGN);
// We're interested in logging which output method we
// ended up with, for QA purposes.
switch (FSOUND_GetOutput())
{
case FSOUND_OUTPUT_NOSOUND: LL_DEBUGS("AppInit") << "Audio output: NoSound" << LL_ENDL; break;
case FSOUND_OUTPUT_OSS: LL_DEBUGS("AppInit") << "Audio output: OSS" << LL_ENDL; break;
case FSOUND_OUTPUT_ESD: LL_DEBUGS("AppInit") << "Audio output: ESD" << LL_ENDL; break;
case FSOUND_OUTPUT_ALSA: LL_DEBUGS("AppInit") << "Audio output: ALSA" << LL_ENDL; break;
default: LL_INFOS("AppInit") << "Audio output: Unknown!" << LL_ENDL; break;
};
#else // LL_LINUX
// initialize the FMOD engine
if (!FSOUND_Init(44100, num_channels, fmod_flags))
{
LL_WARNS("AppInit") << "Error initializing FMOD: "
<< FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
return false;
}
#endif
// set up our favourite FMOD-native streaming audio implementation if none has already been added
if (!getStreamingAudioImpl()) // no existing implementation added
setStreamingAudioImpl(new LLStreamingAudio_FMOD());
LL_DEBUGS("AppInit") << "LLAudioEngine_FMOD::init() FMOD initialized correctly" << LL_ENDL;
mInited = true;
return true;
}
std::string LLAudioEngine_FMOD::getDriverName(bool verbose)
{
if (verbose)
{
F32 version = FSOUND_GetVersion();
return llformat("FMOD version %f", version);
}
else
{
return "FMOD";
}
}
void LLAudioEngine_FMOD::allocateListener(void)
{
mListenerp = (LLListener *) new LLListener_FMOD();
if (!mListenerp)
{
llwarns << "Listener creation failed" << llendl;
}
}
void LLAudioEngine_FMOD::shutdown()
{
if (mWindDSP)
{
FSOUND_DSP_SetActive(mWindDSP,false);
FSOUND_DSP_Free(mWindDSP);
}
stopInternetStream();
LLAudioEngine::shutdown();
llinfos << "LLAudioEngine_FMOD::shutdown() closing FMOD" << llendl;
FSOUND_Close();
llinfos << "LLAudioEngine_FMOD::shutdown() done closing FMOD" << llendl;
delete mListenerp;
mListenerp = NULL;
}
LLAudioBuffer * LLAudioEngine_FMOD::createBuffer()
{
return new LLAudioBufferFMOD();
}
LLAudioChannel * LLAudioEngine_FMOD::createChannel()
{
return new LLAudioChannelFMOD();
}
bool LLAudioEngine_FMOD::initWind()
{
if (!mWindGen)
{
bool enable;
switch (FSOUND_GetMixer())
{
case FSOUND_MIXER_MMXP5:
case FSOUND_MIXER_MMXP6:
case FSOUND_MIXER_QUALITY_MMXP5:
case FSOUND_MIXER_QUALITY_MMXP6:
enable = (typeid(MIXBUFFERFORMAT) == typeid(S16));
break;
case FSOUND_MIXER_BLENDMODE:
enable = (typeid(MIXBUFFERFORMAT) == typeid(S32));
break;
case FSOUND_MIXER_QUALITY_FPU:
enable = (typeid(MIXBUFFERFORMAT) == typeid(F32));
break;
default:
// FSOUND_GetMixer() does not return a valid mixer type on Darwin
LL_INFOS("AppInit") << "Unknown FMOD mixer type, assuming default" << LL_ENDL;
enable = true;
break;
}
if (enable)
{
mWindGen = new LLWindGen<MIXBUFFERFORMAT>(FSOUND_GetOutputRate());
}
else
{
LL_WARNS("AppInit") << "Incompatible FMOD mixer type, wind noise disabled" << LL_ENDL;
}
}
mNextWindUpdate = 0.0;
if (mWindGen && !mWindDSP)
{
mWindDSP = FSOUND_DSP_Create(&windCallback, FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT + 20, mWindGen);
}
if (mWindDSP)
{
FSOUND_DSP_SetActive(mWindDSP, true);
return true;
}
return false;
}
void LLAudioEngine_FMOD::cleanupWind()
{
if (mWindDSP)
{
FSOUND_DSP_SetActive(mWindDSP, false);
FSOUND_DSP_Free(mWindDSP);
mWindDSP = NULL;
}
delete mWindGen;
mWindGen = NULL;
}
//-----------------------------------------------------------------------
void LLAudioEngine_FMOD::updateWind(LLVector3 wind_vec, F32 camera_height_above_water)
{
LLVector3 wind_pos;
F64 pitch;
F64 center_freq;
if (!mEnableWind)
{
return;
}
if (mWindUpdateTimer.checkExpirationAndReset(LL_WIND_UPDATE_INTERVAL))
{
// wind comes in as Linden coordinate (+X = forward, +Y = left, +Z = up)
// need to convert this to the conventional orientation DS3D and OpenAL use
// where +X = right, +Y = up, +Z = backwards
wind_vec.setVec(-wind_vec.mV[1], wind_vec.mV[2], -wind_vec.mV[0]);
// cerr << "Wind update" << endl;
pitch = 1.0 + mapWindVecToPitch(wind_vec);
center_freq = 80.0 * pow(pitch,2.5*(mapWindVecToGain(wind_vec)+1.0));
mWindGen->mTargetFreq = (F32)center_freq;
mWindGen->mTargetGain = (F32)mapWindVecToGain(wind_vec) * mMaxWindGain;
mWindGen->mTargetPanGainR = (F32)mapWindVecToPan(wind_vec);
}
}
/*
//-----------------------------------------------------------------------
void LLAudioEngine_FMOD::setSourceMinDistance(U16 source_num, F64 distance)
{
if (!mInited)
{
return;
}
if (mBuffer[source_num])
{
mMinDistance[source_num] = (F32) distance;
if (!FSOUND_Sample_SetMinMaxDistance(mBuffer[source_num],mMinDistance[source_num], mMaxDistance[source_num]))
{
llwarns << "FMOD::setSourceMinDistance(" << source_num << "), error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
}
}
//-----------------------------------------------------------------------
void LLAudioEngine_FMOD::setSourceMaxDistance(U16 source_num, F64 distance)
{
if (!mInited)
{
return;
}
if (mBuffer[source_num])
{
mMaxDistance[source_num] = (F32) distance;
if (!FSOUND_Sample_SetMinMaxDistance(mBuffer[source_num],mMinDistance[source_num], mMaxDistance[source_num]))
{
llwarns << "FMOD::setSourceMaxDistance(" << source_num << "), error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
}
}
//-----------------------------------------------------------------------
void LLAudioEngine_FMOD::get3DParams(S32 source_num, S32 *volume, S32 *freq, S32 *inside, S32 *outside, LLVector3 *orient, S32 *out_volume, F32 *min_dist, F32 *max_dist)
{
*volume = 0;
*freq = 0;
*inside = 0;
*outside = 0;
*orient = LLVector3::zero;
*out_volume = 0;
*min_dist = 0.f;
*max_dist = 0.f;
}
*/
//-----------------------------------------------------------------------
void LLAudioEngine_FMOD::setInternalGain(F32 gain)
{
if (!mInited)
{
return;
}
gain = llclamp( gain, 0.0f, 1.0f );
FSOUND_SetSFXMasterVolume( llround( 255.0f * gain ) );
LLStreamingAudioInterface *saimpl = getStreamingAudioImpl();
if ( saimpl )
{
// fmod likes its streaming audio channel gain re-asserted after
// master volume change.
saimpl->setGain(saimpl->getGain());
}
}
//
// LLAudioChannelFMOD implementation
//
LLAudioChannelFMOD::LLAudioChannelFMOD() : LLAudioChannel(), mChannelID(0), mLastSamplePos(0)
{
}
LLAudioChannelFMOD::~LLAudioChannelFMOD()
{
cleanup();
}
bool LLAudioChannelFMOD::updateBuffer()
{
if (LLAudioChannel::updateBuffer())
{
// Base class update returned true, which means that we need to actually
// set up the channel for a different buffer.
LLAudioBufferFMOD *bufferp = (LLAudioBufferFMOD *)mCurrentSourcep->getCurrentBuffer();
// Grab the FMOD sample associated with the buffer
FSOUND_SAMPLE *samplep = bufferp->getSample();
if (!samplep)
{
// This is bad, there should ALWAYS be a sample associated with a legit
// buffer.
llerrs << "No FMOD sample!" << llendl;
return false;
}
// Actually play the sound. Start it off paused so we can do all the necessary
// setup.
mChannelID = FSOUND_PlaySoundEx(FSOUND_FREE, samplep, FSOUND_DSP_GetSFXUnit(), true);
//llinfos << "Setting up channel " << std::hex << mChannelID << std::dec << llendl;
}
// If we have a source for the channel, we need to update its gain.
if (mCurrentSourcep)
{
// SJB: warnings can spam and hurt framerate, disabling
if (!FSOUND_SetVolume(mChannelID, llround(getSecondaryGain() * mCurrentSourcep->getGain() * 255.0f)))
{
// llwarns << "LLAudioChannelFMOD::updateBuffer error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
if (!FSOUND_SetLoopMode(mChannelID, mCurrentSourcep->isLoop() ? FSOUND_LOOP_NORMAL : FSOUND_LOOP_OFF))
{
// llwarns << "Channel " << mChannelID << "Source ID: " << mCurrentSourcep->getID()
// << " at " << mCurrentSourcep->getPositionGlobal() << llendl;
// llwarns << "LLAudioChannelFMOD::updateBuffer error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
}
return true;
}
void LLAudioChannelFMOD::update3DPosition()
{
if (!mChannelID)
{
// We're not actually a live channel (i.e., we're not playing back anything)
return;
}
LLAudioBufferFMOD *bufferp = (LLAudioBufferFMOD *)mCurrentBufferp;
if (!bufferp)
{
// We don't have a buffer associated with us (should really have been picked up
// by the above if.
return;
}
if (mCurrentSourcep->isAmbient())
{
// Ambient sound, don't need to do any positional updates.
bufferp->set3DMode(false);
}
else
{
// Localized sound. Update the position and velocity of the sound.
bufferp->set3DMode(true);
LLVector3 float_pos;
float_pos.setVec(mCurrentSourcep->getPositionGlobal());
if (!FSOUND_3D_SetAttributes(mChannelID, float_pos.mV, mCurrentSourcep->getVelocity().mV))
{
LL_DEBUGS("FMOD") << "LLAudioChannelFMOD::update3DPosition error: " << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
}
}
}
void LLAudioChannelFMOD::updateLoop()
{
if (!mChannelID)
{
// May want to clear up the loop/sample counters.
return;
}
//
// Hack: We keep track of whether we looped or not by seeing when the
// sample position looks like it's going backwards. Not reliable; may
// yield false negatives.
//
U32 cur_pos = FSOUND_GetCurrentPosition(mChannelID);
if (cur_pos < (U32)mLastSamplePos)
{
mLoopedThisFrame = true;
}
mLastSamplePos = cur_pos;
}
void LLAudioChannelFMOD::cleanup()
{
LLAudioChannel::cleanup();
if (!mChannelID)
{
//llinfos << "Aborting cleanup with no channelID." << llendl;
return;
}
//llinfos << "Cleaning up channel: " << mChannelID << llendl;
if (!FSOUND_StopSound(mChannelID))
{
LL_DEBUGS("FMOD") << "LLAudioChannelFMOD::cleanup error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
mChannelID = 0;
mLastSamplePos = 0;
}
void LLAudioChannelFMOD::play()
{
if (!mChannelID)
{
llwarns << "Playing without a channelID, aborting" << llendl;
return;
}
if(!FSOUND_IsPaused(mChannelID))
{
FSOUND_SetPaused(mChannelID, true);
FSOUND_SetCurrentPosition(mChannelID, 0);
}
if (!FSOUND_SetPaused(mChannelID, false))
{
llwarns << "LLAudioChannelFMOD::play error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
getSource()->setPlayedOnce(true);
}
void LLAudioChannelFMOD::playSynced(LLAudioChannel *channelp)
{
LLAudioChannelFMOD *fmod_channelp = (LLAudioChannelFMOD*)channelp;
if (!(fmod_channelp->mChannelID && mChannelID))
{
// Don't have channels allocated to both the master and the slave
return;
}
U32 position = FSOUND_GetCurrentPosition(fmod_channelp->mChannelID) % mCurrentBufferp->getLength();
// Try to match the position of our sync master
if (!FSOUND_SetCurrentPosition(mChannelID, position))
{
llwarns << "LLAudioChannelFMOD::playSynced unable to set current position" << llendl;
}
// Start us playing
play();
}
bool LLAudioChannelFMOD::isPlaying()
{
if (!mChannelID)
{
return false;
}
return FSOUND_IsPlaying(mChannelID) && (!FSOUND_GetPaused(mChannelID));
}
//
// LLAudioBufferFMOD implementation
//
LLAudioBufferFMOD::LLAudioBufferFMOD() : LLAudioBuffer()
{
mSamplep = NULL;
}
LLAudioBufferFMOD::~LLAudioBufferFMOD()
{
if (mSamplep)
{
// Clean up the associated FMOD sample if it exists.
FSOUND_Sample_Free(mSamplep);
mSamplep = NULL;
}
}
bool LLAudioBufferFMOD::loadWAV(const std::string& filename)
{
// Try to open a wav file from disk. This will eventually go away, as we don't
// really want to block doing this.
if (filename.empty())
{
// invalid filename, abort.
return false;
}
if (!LLAPRFile::isExist(filename, LL_APR_RPB))
{
// File not found, abort.
return false;
}
if (mSamplep)
{
// If there's already something loaded in this buffer, clean it up.
FSOUND_Sample_Free(mSamplep);
mSamplep = NULL;
}
// Load up the wav file into an fmod sample
#if LL_WINDOWS
// MikeS. - Loading the sound file manually and then handing it over to FMOD,
// since FMOD uses posix IO internally,
// which doesn't work with unicode file paths.
LLFILE* sound_file = LLFile::fopen(filename,"rb"); /* Flawfinder: ignore */
if (sound_file)
{
fseek(sound_file,0,SEEK_END);
U32 file_length = ftell(sound_file); //Find the length of the file by seeking to the end and getting the offset
size_t read_count;
fseek(sound_file,0,SEEK_SET); //Seek back to the beginning
char* buffer = new char[file_length];
llassert(buffer);
read_count = fread((void*)buffer,file_length,1,sound_file);//Load it..
if(ferror(sound_file)==0 && (read_count == 1)){//No read error, and we got 1 chunk of our size...
unsigned int mode_flags = FSOUND_LOOP_NORMAL | FSOUND_LOADMEMORY;
//FSOUND_16BITS | FSOUND_MONO | FSOUND_LOADMEMORY | FSOUND_LOOP_NORMAL;
mSamplep = FSOUND_Sample_Load(FSOUND_UNMANAGED, buffer, mode_flags , 0, file_length);
}
delete[] buffer;
fclose(sound_file);
}
#else
mSamplep = FSOUND_Sample_Load(FSOUND_UNMANAGED, filename.c_str(), FSOUND_LOOP_NORMAL, 0, 0);
#endif
if (!mSamplep)
{
// We failed to load the file for some reason.
llwarns << "Could not load data '" << filename << "': "
<< FMOD_ErrorString(FSOUND_GetError()) << llendl;
//
// If we EVER want to load wav files provided by end users, we need
// to rethink this!
//
// file is probably corrupt - remove it.
LLFile::remove(filename);
return false;
}
// Everything went well, return true
return true;
}
U32 LLAudioBufferFMOD::getLength()
{
if (!mSamplep)
{
return 0;
}
return FSOUND_Sample_GetLength(mSamplep);
}
void LLAudioBufferFMOD::set3DMode(bool use3d)
{
U16 current_mode = FSOUND_Sample_GetMode(mSamplep);
if (use3d)
{
if (!FSOUND_Sample_SetMode(mSamplep, (current_mode & (~FSOUND_2D))))
{
llwarns << "LLAudioBufferFMOD::set3DMode error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
}
else
{
if (!FSOUND_Sample_SetMode(mSamplep, current_mode | FSOUND_2D))
{
llwarns << "LLAudioBufferFMOD::set3DMode error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
}
}
}
void * F_CALLBACKAPI windCallback(void *originalbuffer, void *newbuffer, int length, void* userdata)
{
// originalbuffer = fmod's original mixbuffer.
// newbuffer = the buffer passed from the previous DSP unit.
// length = length in samples at this mix time.
// userdata = user parameter passed through in FSOUND_DSP_Create.
LLWindGen<LLAudioEngine_FMOD::MIXBUFFERFORMAT> *windgen =
(LLWindGen<LLAudioEngine_FMOD::MIXBUFFERFORMAT> *)userdata;
newbuffer = windgen->windGenerate((LLAudioEngine_FMOD::MIXBUFFERFORMAT *)newbuffer, length);
return newbuffer;
}

Some files were not shown because too many files have changed in this diff Show More