Compare commits
258 Commits
animesh
...
sv-1.8.7.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31003f13af | ||
|
|
c1f39e167c | ||
|
|
0e28436aa9 | ||
|
|
bc1c816b99 | ||
|
|
32424e5640 | ||
|
|
760f1308f3 | ||
|
|
dfe8e364be | ||
|
|
33feeb0a01 | ||
|
|
50eb21ce23 | ||
|
|
d2052b9e4c | ||
|
|
2c5ad97697 | ||
|
|
8283422717 | ||
|
|
4a293ff1e1 | ||
|
|
828307ca96 | ||
|
|
a83901d2e4 | ||
|
|
878ba534b5 | ||
|
|
f17e6637d6 | ||
|
|
66b2ad5f30 | ||
|
|
463151c830 | ||
|
|
77b6a903ac | ||
|
|
1813a7bf8b | ||
|
|
6839cba56a | ||
|
|
f73fb6424b | ||
|
|
af2ae76ca2 | ||
|
|
a870534ea0 | ||
|
|
ba61314c32 | ||
|
|
d32e478456 | ||
|
|
1b29210f16 | ||
|
|
760f23b370 | ||
|
|
a7cba5f1a3 | ||
|
|
27033f4ebb | ||
|
|
c772179149 | ||
|
|
4c7eacf4fc | ||
|
|
672037d1f2 | ||
|
|
80cedb913a | ||
|
|
734621be82 | ||
|
|
dd3944161d | ||
|
|
1aabbb13c0 | ||
|
|
5574f263b1 | ||
|
|
2117c66c9a | ||
|
|
1fbfc498bf | ||
|
|
a02693e4dd | ||
|
|
24118e8e67 | ||
|
|
19ad64cc96 | ||
|
|
e81affce51 | ||
|
|
dec0bff972 | ||
|
|
5daf4aa777 | ||
|
|
2f24a53a01 | ||
|
|
28af96229b | ||
|
|
6d776632a9 | ||
|
|
1853500e10 | ||
|
|
8e01fcb7f0 | ||
|
|
3cddb0df2e | ||
|
|
37c4a4bbcb | ||
|
|
af8f0e1155 | ||
|
|
5df00a481d | ||
|
|
d299c55ea4 | ||
|
|
d9d83a6807 | ||
|
|
3fec94bb94 | ||
|
|
09926d12bb | ||
|
|
19bcdae6ac | ||
|
|
36025384f4 | ||
|
|
4bdbb89e6f | ||
|
|
e94314dc95 | ||
|
|
5dd68a4055 | ||
|
|
fff4e9b4b8 | ||
|
|
8a6f5b49a3 | ||
|
|
c8290b913e | ||
|
|
e6e6d811c6 | ||
|
|
cdc35b3c32 | ||
|
|
c68e00730e | ||
|
|
0496374328 | ||
|
|
6608dd0b8d | ||
|
|
432b4ab69d | ||
|
|
967b3646a6 | ||
|
|
4110d1975a | ||
|
|
b1862ce1c1 | ||
|
|
a432c3429c | ||
|
|
949190b48d | ||
|
|
6885bf6368 | ||
|
|
78f354925c | ||
|
|
a87b7603d1 | ||
|
|
1f3a232a9d | ||
|
|
99346d6486 | ||
|
|
067bd3cbd7 | ||
|
|
6e716fe3c5 | ||
|
|
831c7f53b2 | ||
|
|
1c5a829e82 | ||
|
|
4751949628 | ||
|
|
f8abafdefa | ||
|
|
4798d1e3b3 | ||
|
|
10140d143c | ||
|
|
f3609b06d7 | ||
|
|
f25577649a | ||
|
|
cf5586037e | ||
|
|
c6e3c31fae | ||
|
|
0c3e1f602a | ||
|
|
d3a35e3f8d | ||
|
|
b34bafc348 | ||
|
|
cdb316834a | ||
|
|
8b30e2e931 | ||
|
|
841bd0e515 | ||
|
|
90677188ec | ||
|
|
6d5df7c9af | ||
|
|
79e1830ba9 | ||
|
|
f0db784b46 | ||
|
|
ef5c9f0175 | ||
|
|
84081286f0 | ||
|
|
1b913443ad | ||
|
|
f5c19b9e5c | ||
|
|
5a561e03b8 | ||
|
|
ab207727fd | ||
|
|
b3231883f6 | ||
|
|
d9ff42ab3c | ||
|
|
fb20751330 | ||
|
|
c5bf72f0b3 | ||
|
|
cfdcb8b3df | ||
|
|
7d0cbf6d02 | ||
|
|
0b4f576c54 | ||
|
|
d93bed216a | ||
|
|
89abfe6f86 | ||
|
|
78fbc214ca | ||
|
|
fc649854ff | ||
|
|
60e71f5724 | ||
|
|
b78807e5ed | ||
|
|
4e39027958 | ||
|
|
b527918350 | ||
|
|
16a352c70a | ||
|
|
5035f9c3d6 | ||
|
|
a662318417 | ||
|
|
573934e505 | ||
|
|
927e86bdc9 | ||
|
|
cfa2c4e424 | ||
|
|
79bafbb943 | ||
|
|
36bfaf0f05 | ||
|
|
3d7da6e858 | ||
|
|
f81f374ab9 | ||
|
|
82050a5e46 | ||
|
|
9cf26e1fc2 | ||
|
|
fa869f21ad | ||
|
|
6af65004a5 | ||
|
|
d189aadd12 | ||
|
|
6048019926 | ||
|
|
021ba21b4f | ||
|
|
96b7612d73 | ||
|
|
7e8ebdb852 | ||
|
|
2e52fe64b8 | ||
|
|
8b367c8eab | ||
|
|
68481b8921 | ||
|
|
a5aeac312c | ||
|
|
d29d35ab23 | ||
|
|
20eb6a3eca | ||
|
|
54c4b1de83 | ||
|
|
d3572dd4ec | ||
|
|
696a5f967d | ||
|
|
3fa4f73b6f | ||
|
|
afbafbe689 | ||
|
|
18b02594cb | ||
|
|
8288de7f79 | ||
|
|
1693c97924 | ||
|
|
e3d69b4d8e | ||
|
|
f8eef33b7b | ||
|
|
d5af2588bc | ||
|
|
432bf03f0a | ||
|
|
2ba3ff852c | ||
|
|
76e9d912d6 | ||
|
|
29e71bec86 | ||
|
|
1d1857e5a7 | ||
|
|
8a2407ecbb | ||
|
|
05146faacf | ||
|
|
b7fb8fb0ca | ||
|
|
5ddab7d3b2 | ||
|
|
ebcbf79237 | ||
|
|
f5fd05a1e4 | ||
|
|
a644b2dee5 | ||
|
|
1d073cd0d9 | ||
|
|
a1e74c3286 | ||
|
|
a6cc7eda61 | ||
|
|
a36e128e57 | ||
|
|
daffb602bb | ||
|
|
0f28a1bd86 | ||
|
|
4043130f75 | ||
|
|
835083a741 | ||
|
|
daf63eb418 | ||
|
|
4d5e5e1635 | ||
|
|
15c3ff0544 | ||
|
|
68d19cd6fb | ||
|
|
ecc1730912 | ||
|
|
9c2d062886 | ||
|
|
7b3c3b9fab | ||
|
|
a37299b4ae | ||
|
|
0c2ec8cb71 | ||
|
|
7c2af68e3c | ||
|
|
c0ec1d2c9a | ||
|
|
28911f03a7 | ||
|
|
c65b0eb544 | ||
|
|
f11eb17313 | ||
|
|
453386a49a | ||
|
|
accd69386a | ||
|
|
610d592f5a | ||
|
|
2b955eb00d | ||
|
|
f38d200e93 | ||
|
|
0b1f605bba | ||
|
|
278b617290 | ||
|
|
27c259bf7c | ||
|
|
f520251935 | ||
|
|
aa888c704e | ||
|
|
bbd3cb3469 | ||
|
|
bd2c67e8ec | ||
|
|
b5afce0bbd | ||
|
|
c5f714def8 | ||
|
|
fdeb194d0e | ||
|
|
975f3b420e | ||
|
|
8d5f1191dd | ||
|
|
7c89a8b178 | ||
|
|
7c24e67c50 | ||
|
|
1cb9ea16da | ||
|
|
c4a9532784 | ||
|
|
43163b400d | ||
|
|
93e30f44c0 | ||
|
|
b6b44a2c86 | ||
|
|
cb53a4f923 | ||
|
|
85f147f679 | ||
|
|
17cb8bd764 | ||
|
|
b2eb4ea70c | ||
|
|
c6089637e7 | ||
|
|
2f72ed2e80 | ||
|
|
7b6a4d76a8 | ||
|
|
8c7e498861 | ||
|
|
9824cc7068 | ||
|
|
d16ff5cb5c | ||
|
|
0409a81e36 | ||
|
|
e0883b72dc | ||
|
|
b592b3c658 | ||
|
|
d277f1750d | ||
|
|
d54bf78c08 | ||
|
|
b1be8bb7f3 | ||
|
|
0b7061afb7 | ||
|
|
b132578692 | ||
|
|
c18bdddb60 | ||
|
|
6cd07b23f1 | ||
|
|
ab546f54ab | ||
|
|
11068eee38 | ||
|
|
f80e23ac5e | ||
|
|
513a4fd16c | ||
|
|
98b3c8a812 | ||
|
|
f5ffa65ea7 | ||
|
|
a559a09217 | ||
|
|
3cb831bb56 | ||
|
|
bce8a3b3cc | ||
|
|
65ee3a5345 | ||
|
|
3c8a8efc03 | ||
|
|
99facf6764 | ||
|
|
8f3b10875e | ||
|
|
33ef6cc3f7 | ||
|
|
d21e5db701 | ||
|
|
1c1e64f48f | ||
|
|
4b6d1934c3 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,10 +3,12 @@
|
|||||||
*.aps
|
*.aps
|
||||||
*.suo
|
*.suo
|
||||||
*.vshost.exe
|
*.vshost.exe
|
||||||
|
*/.vs
|
||||||
/bin/
|
/bin/
|
||||||
/bin-release/
|
/bin-release/
|
||||||
/bin
|
/bin
|
||||||
/bin-release
|
/bin-release
|
||||||
|
/indra/out/
|
||||||
/indra/viewer-*
|
/indra/viewer-*
|
||||||
/indra/newview/vivox-runtime/
|
/indra/newview/vivox-runtime/
|
||||||
/indra/newview/dbghelp.dll
|
/indra/newview/dbghelp.dll
|
||||||
|
|||||||
166
.gitlab-ci.yml
Normal file
166
.gitlab-ci.yml
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
variables:
|
||||||
|
VIEWER_USE_CRASHPAD: "TRUE"
|
||||||
|
VIEWER_CRASHPAD_URL: $SENTRY_DSN
|
||||||
|
|
||||||
|
.win_build: &win_build
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- autobuild
|
||||||
|
- windows
|
||||||
|
before_script:
|
||||||
|
- pipenv install
|
||||||
|
script:
|
||||||
|
- If ($env:VIEWER_CHANNEL_TYPE -eq 'Project')
|
||||||
|
{
|
||||||
|
$env:VIEWER_CHANNEL_CODENAME = $env:CI_COMMIT_REF_NAME[8..100] -join ''
|
||||||
|
}
|
||||||
|
- pipenv run autobuild configure -c Release -- -DUSE_FMODSTUDIO=ON -DUSE_NVAPI=ON -DUSE_LTO=ON -DVS_DISABLE_FATAL_WARNINGS=ON
|
||||||
|
- pipenv run autobuild build -c Release --no-configure
|
||||||
|
- If ($env:VIEWER_USE_CRASHPAD -eq 'TRUE') {
|
||||||
|
- Push-Location .\build-vc-*\newview\Release\
|
||||||
|
- sentry-cli upload-dif --include-sources singularity-bin.exe singularity-bin.pdb crashpad_handler.exe crashpad_handler.pdb fmod.dll libcrypto-1_1.dll libcrypto-1_1.pdb libssl-1_1.dll libssl-1_1.pdb libcrypto-1_1-x64.dll libcrypto-1_1-x64.pdb libssl-1_1-x64.dll libssl-1_1-x64.pdb vcruntime140.dll msvcp140.dll libhunspell.dll libhunspell.pdb glod.dll
|
||||||
|
- Pop-Location }
|
||||||
|
artifacts:
|
||||||
|
name: "$env:CI_COMMIT_REF_NAME-$env:CI_COMMIT_SHORT_SHA"
|
||||||
|
expire_in: 2 week
|
||||||
|
paths:
|
||||||
|
- build-vc-*/newview/Release/build_data.json
|
||||||
|
- build-vc-*/newview/Release/singularity-bin.pdb
|
||||||
|
- build-vc-*/newview/Release/Singularity_*_Setup.exe
|
||||||
|
|
||||||
|
.beta_rules: &beta_rules
|
||||||
|
only:
|
||||||
|
- /^.*-beta$/
|
||||||
|
except:
|
||||||
|
- branches
|
||||||
|
|
||||||
|
.release_rules: &release_rules
|
||||||
|
only:
|
||||||
|
- /^.*-release$/
|
||||||
|
except:
|
||||||
|
- branches
|
||||||
|
|
||||||
|
build:master:windows32:
|
||||||
|
<<: *win_build
|
||||||
|
interruptible: true
|
||||||
|
variables:
|
||||||
|
AUTOBUILD_ADDRSIZE: 32
|
||||||
|
VIEWER_CHANNEL_TYPE: Test
|
||||||
|
VIEWER_USE_CRASHPAD: "FALSE"
|
||||||
|
only:
|
||||||
|
- schedules
|
||||||
|
|
||||||
|
build:master:windows64:
|
||||||
|
<<: *win_build
|
||||||
|
interruptible: true
|
||||||
|
variables:
|
||||||
|
AUTOBUILD_ADDRSIZE: 64
|
||||||
|
VIEWER_CHANNEL_TYPE: Test
|
||||||
|
VIEWER_USE_CRASHPAD: "FALSE"
|
||||||
|
only:
|
||||||
|
- schedules
|
||||||
|
|
||||||
|
build:project:windows32:
|
||||||
|
<<: *win_build
|
||||||
|
interruptible: true
|
||||||
|
variables:
|
||||||
|
AUTOBUILD_ADDRSIZE: 32
|
||||||
|
VIEWER_CHANNEL_TYPE: Project
|
||||||
|
VIEWER_USE_CRASHPAD: "FALSE"
|
||||||
|
only:
|
||||||
|
- /^project-.*$/
|
||||||
|
|
||||||
|
build:project:windows64:
|
||||||
|
<<: *win_build
|
||||||
|
interruptible: true
|
||||||
|
variables:
|
||||||
|
AUTOBUILD_ADDRSIZE: 64
|
||||||
|
VIEWER_CHANNEL_TYPE: Project
|
||||||
|
only:
|
||||||
|
- /^project-.*$/
|
||||||
|
|
||||||
|
build:beta:windows32:
|
||||||
|
<<: *win_build
|
||||||
|
variables:
|
||||||
|
AUTOBUILD_ADDRSIZE: 32
|
||||||
|
VIEWER_CHANNEL_TYPE: Beta
|
||||||
|
VIEWER_USE_CRASHPAD: "FALSE"
|
||||||
|
<<: *beta_rules
|
||||||
|
|
||||||
|
build:beta:windows64:
|
||||||
|
<<: *win_build
|
||||||
|
variables:
|
||||||
|
AUTOBUILD_ADDRSIZE: 64
|
||||||
|
VIEWER_CHANNEL_TYPE: Beta
|
||||||
|
<<: *beta_rules
|
||||||
|
|
||||||
|
build:release:windows32:
|
||||||
|
<<: *win_build
|
||||||
|
variables:
|
||||||
|
AUTOBUILD_ADDRSIZE: 32
|
||||||
|
VIEWER_CHANNEL_TYPE: Release
|
||||||
|
VIEWER_USE_CRASHPAD: "FALSE"
|
||||||
|
<<: *release_rules
|
||||||
|
|
||||||
|
build:release:windows64:
|
||||||
|
<<: *win_build
|
||||||
|
variables:
|
||||||
|
AUTOBUILD_ADDRSIZE: 64
|
||||||
|
VIEWER_CHANNEL_TYPE: Release
|
||||||
|
<<: *release_rules
|
||||||
|
|
||||||
|
.deploy_template: &deploy_template
|
||||||
|
stage: deploy
|
||||||
|
tags:
|
||||||
|
- autobuild
|
||||||
|
- windows
|
||||||
|
script:
|
||||||
|
- $BuildData = Get-Content .\build-vc-64\newview\Release\build_data.json | ConvertFrom-Json
|
||||||
|
- $BuildChannelVersion = $BuildData."Channel" + ' ' + $BuildData."Version"
|
||||||
|
- $UploadDestViewerDir = $BuildChannelVersion.ToLower().Replace(" ", "/")
|
||||||
|
- $UploadDestURL = "https://pkg.alchemyviewer.org/repository/viewer/${UploadDestViewerDir}"
|
||||||
|
|
||||||
|
- $UploadParams = @{ UseBasicParsing = $true;
|
||||||
|
Method = "PUT";
|
||||||
|
Headers = @{
|
||||||
|
ContentType = "application/x-executable";
|
||||||
|
Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$env:AUTOBUILD_HTTP_USER`:$env:AUTOBUILD_HTTP_PASS")))"; };
|
||||||
|
Verbose = $true; };
|
||||||
|
|
||||||
|
- Push-Location .\build-vc-32\newview\Release\
|
||||||
|
- $FileNameWin32 = Get-ChildItem -Path . -Name -Include Singularity_*_Setup.exe
|
||||||
|
- Invoke-WebRequest @UploadParams -InFile .\$FileNameWin32 -Uri "${UploadDestURL}/${FileNameWin32}"
|
||||||
|
- Pop-Location
|
||||||
|
|
||||||
|
- Push-Location .\build-vc-64\newview\Release\
|
||||||
|
- $FileNameWin64 = Get-ChildItem -Path . -Name -Include Singularity_*_Setup.exe
|
||||||
|
- Invoke-WebRequest @UploadParams -InFile .\$FileNameWin64 -Uri "${UploadDestURL}/${FileNameWin64}"
|
||||||
|
- Pop-Location
|
||||||
|
|
||||||
|
- sentry-cli releases new $BuildChannelVersion
|
||||||
|
- sentry-cli releases set-commits --auto $BuildChannelVersion
|
||||||
|
- sentry-cli releases finalize $BuildChannelVersion
|
||||||
|
when: manual
|
||||||
|
|
||||||
|
deploy_project:
|
||||||
|
<<: *deploy_template
|
||||||
|
environment:
|
||||||
|
name: qa
|
||||||
|
only:
|
||||||
|
- /^project-.*$/
|
||||||
|
|
||||||
|
deploy_beta:
|
||||||
|
<<: *deploy_template
|
||||||
|
environment:
|
||||||
|
name: staging
|
||||||
|
<<: *beta_rules
|
||||||
|
|
||||||
|
deploy_release:
|
||||||
|
<<: *deploy_template
|
||||||
|
environment:
|
||||||
|
name: production
|
||||||
|
<<: *release_rules
|
||||||
289
autobuild.xml
289
autobuild.xml
@@ -47,40 +47,6 @@
|
|||||||
<key>version</key>
|
<key>version</key>
|
||||||
<string>1.2.15</string>
|
<string>1.2.15</string>
|
||||||
</map>
|
</map>
|
||||||
<key>abseil-cpp</key>
|
|
||||||
<map>
|
|
||||||
<key>canonical_repo</key>
|
|
||||||
<string>https://bitbucket.org/alchemyviewer/3p-abseil-src</string>
|
|
||||||
<key>copyright</key>
|
|
||||||
<string>Copyright 2018 The Abseil Authors.</string>
|
|
||||||
<key>description</key>
|
|
||||||
<string>Abseil Common Libraries</string>
|
|
||||||
<key>license</key>
|
|
||||||
<string>Apache 2.0</string>
|
|
||||||
<key>license_file</key>
|
|
||||||
<string>LICENSES/abseil-cpp.txt</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>abseil-cpp</string>
|
|
||||||
<key>platforms</key>
|
|
||||||
<map>
|
|
||||||
<key>common</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>b82d5aa8380926240f3415279480c831</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>md5</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/abseil-cpp/common/abseil_cpp-ac78ffc.1-common-1.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>common</string>
|
|
||||||
</map>
|
|
||||||
</map>
|
|
||||||
<key>version</key>
|
|
||||||
<string>ac78ffc.1</string>
|
|
||||||
</map>
|
|
||||||
<key>apr_suite</key>
|
<key>apr_suite</key>
|
||||||
<map>
|
<map>
|
||||||
<key>copyright</key>
|
<key>copyright</key>
|
||||||
@@ -423,6 +389,54 @@
|
|||||||
<key>version</key>
|
<key>version</key>
|
||||||
<string>2.3</string>
|
<string>2.3</string>
|
||||||
</map>
|
</map>
|
||||||
|
<key>crashpad</key>
|
||||||
|
<map>
|
||||||
|
<key>canonical_repo</key>
|
||||||
|
<string>https://git.alchemyviewer.org/alchemy/thirdparty/3p-crashpad</string>
|
||||||
|
<key>copyright</key>
|
||||||
|
<string>Copyright 2014 The Crashpad Authors. All rights reserved.</string>
|
||||||
|
<key>description</key>
|
||||||
|
<string>Crashpad is a crash-reporting system.</string>
|
||||||
|
<key>license</key>
|
||||||
|
<string>Apache 2.0</string>
|
||||||
|
<key>license_file</key>
|
||||||
|
<string>LICENSES/crashpad.txt</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>crashpad</string>
|
||||||
|
<key>platforms</key>
|
||||||
|
<map>
|
||||||
|
<key>windows</key>
|
||||||
|
<map>
|
||||||
|
<key>archive</key>
|
||||||
|
<map>
|
||||||
|
<key>hash</key>
|
||||||
|
<string>4614b29cc98021cf1770a8290171602b</string>
|
||||||
|
<key>hash_algorithm</key>
|
||||||
|
<string>md5</string>
|
||||||
|
<key>url</key>
|
||||||
|
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows/crashpad-ce32d093.7-windows-7.tar.bz2</string>
|
||||||
|
</map>
|
||||||
|
<key>name</key>
|
||||||
|
<string>windows</string>
|
||||||
|
</map>
|
||||||
|
<key>windows64</key>
|
||||||
|
<map>
|
||||||
|
<key>archive</key>
|
||||||
|
<map>
|
||||||
|
<key>hash</key>
|
||||||
|
<string>d801461b7a6a40fffab828aa1e01e3e6</string>
|
||||||
|
<key>hash_algorithm</key>
|
||||||
|
<string>md5</string>
|
||||||
|
<key>url</key>
|
||||||
|
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows64/crashpad-ce32d093.7-windows64-7.tar.bz2</string>
|
||||||
|
</map>
|
||||||
|
<key>name</key>
|
||||||
|
<string>windows64</string>
|
||||||
|
</map>
|
||||||
|
</map>
|
||||||
|
<key>version</key>
|
||||||
|
<string>ce32d093.7</string>
|
||||||
|
</map>
|
||||||
<key>curl</key>
|
<key>curl</key>
|
||||||
<map>
|
<map>
|
||||||
<key>copyright</key>
|
<key>copyright</key>
|
||||||
@@ -899,51 +913,7 @@
|
|||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
<key>version</key>
|
<key>version</key>
|
||||||
<string>1.10.10.190360453</string>
|
<string>2.00.03.192211300</string>
|
||||||
</map>
|
|
||||||
<key>fontconfig</key>
|
|
||||||
<map>
|
|
||||||
<key>copyright</key>
|
|
||||||
<string>Copyright (C) 2000,2001,2002,2003,2004,2006,2007 Keith Packard, 2005 Patrick Lam, 2009 Roozbeh Pournader, 2008,2009 Red Hat, Inc., 2008 Danilo Šegan, 2012 Google, Inc.</string>
|
|
||||||
<key>description</key>
|
|
||||||
<string>Fontconfig is a library for configuring and customizing font access.</string>
|
|
||||||
<key>license</key>
|
|
||||||
<string>bsd</string>
|
|
||||||
<key>license_file</key>
|
|
||||||
<string>LICENSES/fontconfig.txt</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>fontconfig</string>
|
|
||||||
<key>platforms</key>
|
|
||||||
<map>
|
|
||||||
<key>linux</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>2843c48e6c84a51e3d6aa05dace4c8c0</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3pl_3p-fontconfig-update/rev/290569/arch/Linux/installer/fontconfig-2.11.0-linux-20140602.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>linux</string>
|
|
||||||
</map>
|
|
||||||
<key>linux64</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>25726244f5bcd05f412514b030098c3c</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>md5</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>http://depot.alchemyviewer.org/pub/linux64/lib-trusty/fontconfig-2.11.0-linux64-201603241804.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>linux64</string>
|
|
||||||
</map>
|
|
||||||
</map>
|
|
||||||
<key>version</key>
|
|
||||||
<string>2.11.0</string>
|
|
||||||
</map>
|
</map>
|
||||||
<key>fonts</key>
|
<key>fonts</key>
|
||||||
<map>
|
<map>
|
||||||
@@ -1051,32 +1021,6 @@
|
|||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>darwin</string>
|
<string>darwin</string>
|
||||||
</map>
|
</map>
|
||||||
<key>linux</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>52f87a65cc61ec4b05721c079d015b19</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3pl_3p-freetype-update/rev/290557/arch/Linux/installer/freetype-2.4.4-linux-20140602.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>linux</string>
|
|
||||||
</map>
|
|
||||||
<key>linux64</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>b10ba0775b9f1033daf580a2cb55789d</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>md5</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>http://depot.alchemyviewer.org/pub/linux64/lib-trusty/freetype-2.6.3-linux64-201603241755.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>linux64</string>
|
|
||||||
</map>
|
|
||||||
<key>windows</key>
|
<key>windows</key>
|
||||||
<map>
|
<map>
|
||||||
<key>archive</key>
|
<key>archive</key>
|
||||||
@@ -1271,104 +1215,6 @@
|
|||||||
<key>version</key>
|
<key>version</key>
|
||||||
<string>1.0pre3.190390340</string>
|
<string>1.0pre3.190390340</string>
|
||||||
</map>
|
</map>
|
||||||
<key>google_breakpad</key>
|
|
||||||
<map>
|
|
||||||
<key>copyright</key>
|
|
||||||
<string>Copyright (c) 2006, Google Inc.</string>
|
|
||||||
<key>description</key>
|
|
||||||
<string>Breakpad is a crossplatform library for capturing crash callstacks and runtime data.</string>
|
|
||||||
<key>license</key>
|
|
||||||
<string>bsd</string>
|
|
||||||
<key>license_file</key>
|
|
||||||
<string>LICENSES/google_breakpad.txt</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>google_breakpad</string>
|
|
||||||
<key>platforms</key>
|
|
||||||
<map>
|
|
||||||
<key>darwin</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>9f963eb1728e6d5077d4feba805d4896</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>md5</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/google_breakpad-9e60a27-darwin-201511222009.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>darwin</string>
|
|
||||||
</map>
|
|
||||||
<key>darwin64</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>2d43c6a149cd9c89ba19e884579b1e25</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/1836/4096/google_breakpad-1413.501824-darwin64-501824.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>darwin64</string>
|
|
||||||
</map>
|
|
||||||
<key>linux</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>52257e5eb166a0b69c9c0c38f6e1920e</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-breakpad/rev/273079/arch/Linux/installer/google_breakpad-0.0.0-rev1099-linux-20130329.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>linux</string>
|
|
||||||
</map>
|
|
||||||
<key>linux64</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>3709a51d4d5dff5ec0c4656623eaa05d</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>md5</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>http://depot.alchemyviewer.org/pub/linux64/lib-trusty/google_breakpad-9e60a27-linux64-201603240004.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>linux64</string>
|
|
||||||
</map>
|
|
||||||
<key>windows</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>fa7f683ba4ddd7db777c78c8213d2e46</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>md5</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://depot.alchemyviewer.org/pub/windows/lib-vc141/google_breakpad-7398ce15b79da-windows-201703090621.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>windows</string>
|
|
||||||
</map>
|
|
||||||
<key>windows64</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>71ffc5cae4da7e2e7aac856da44cb8c4</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>md5</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://depot.alchemyviewer.org/pub/windows64/lib-vc141/google_breakpad-7398ce15b79da-windows64-201703081616.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>windows64</string>
|
|
||||||
</map>
|
|
||||||
</map>
|
|
||||||
<key>version</key>
|
|
||||||
<string>9e60a27</string>
|
|
||||||
</map>
|
|
||||||
<key>gperftools</key>
|
<key>gperftools</key>
|
||||||
<map>
|
<map>
|
||||||
<key>copyright</key>
|
<key>copyright</key>
|
||||||
@@ -2925,7 +2771,7 @@
|
|||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
|
<string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
|
||||||
<string>-DWORD_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
|
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
|
||||||
<string>-DROOT_PROJECT_NAME:STRING=Singularity</string>
|
<string>-DROOT_PROJECT_NAME:STRING=Singularity</string>
|
||||||
<string>-DINSTALL_PROPRIETARY=FALSE</string>
|
<string>-DINSTALL_PROPRIETARY=FALSE</string>
|
||||||
</array>
|
</array>
|
||||||
@@ -2946,7 +2792,7 @@
|
|||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-DCMAKE_BUILD_TYPE:STRING=Release</string>
|
<string>-DCMAKE_BUILD_TYPE:STRING=Release</string>
|
||||||
<string>-DWORD_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
|
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
|
||||||
<string>-DROOT_PROJECT_NAME:STRING=Singularity</string>
|
<string>-DROOT_PROJECT_NAME:STRING=Singularity</string>
|
||||||
<string>-DINSTALL_PROPRIETARY=FALSE</string>
|
<string>-DINSTALL_PROPRIETARY=FALSE</string>
|
||||||
</array>
|
</array>
|
||||||
@@ -3029,10 +2875,10 @@
|
|||||||
<key>build</key>
|
<key>build</key>
|
||||||
<map>
|
<map>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>make</string>
|
<string>ninja</string>
|
||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-j 7</string>
|
<string>-v</string>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>configure</key>
|
<key>configure</key>
|
||||||
@@ -3040,7 +2886,7 @@
|
|||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-G</string>
|
<string>-G</string>
|
||||||
<string>Unix Makefiles</string>
|
<string>Ninja</string>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>default</key>
|
<key>default</key>
|
||||||
@@ -3053,10 +2899,10 @@
|
|||||||
<key>build</key>
|
<key>build</key>
|
||||||
<map>
|
<map>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>make</string>
|
<string>ninja</string>
|
||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-j 7</string>
|
<string>-v</string>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>configure</key>
|
<key>configure</key>
|
||||||
@@ -3064,7 +2910,7 @@
|
|||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-G</string>
|
<string>-G</string>
|
||||||
<string>Unix Makefiles</string>
|
<string>Ninja</string>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
@@ -3085,10 +2931,10 @@
|
|||||||
<key>build</key>
|
<key>build</key>
|
||||||
<map>
|
<map>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>make</string>
|
<string>ninja</string>
|
||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-j 7</string>
|
<string>-v</string>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>configure</key>
|
<key>configure</key>
|
||||||
@@ -3096,8 +2942,8 @@
|
|||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-G</string>
|
<string>-G</string>
|
||||||
<string>Unix Makefiles</string>
|
<string>Ninja</string>
|
||||||
<string>-DWORD_SIZE:STRING=64</string>
|
<string>-DADDRESS_SIZE:STRING=64</string>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>default</key>
|
<key>default</key>
|
||||||
@@ -3110,10 +2956,10 @@
|
|||||||
<key>build</key>
|
<key>build</key>
|
||||||
<map>
|
<map>
|
||||||
<key>command</key>
|
<key>command</key>
|
||||||
<string>make</string>
|
<string>ninja</string>
|
||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-j 7</string>
|
<string>-v</string>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>configure</key>
|
<key>configure</key>
|
||||||
@@ -3121,8 +2967,8 @@
|
|||||||
<key>options</key>
|
<key>options</key>
|
||||||
<array>
|
<array>
|
||||||
<string>-G</string>
|
<string>-G</string>
|
||||||
<string>Unix Makefiles</string>
|
<string>Ninja</string>
|
||||||
<string>-DWORD_SIZE:STRING=64</string>
|
<string>-DADDRESS_SIZE:STRING=64</string>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
@@ -3135,7 +2981,7 @@
|
|||||||
<key>windows</key>
|
<key>windows</key>
|
||||||
<map>
|
<map>
|
||||||
<key>build_directory</key>
|
<key>build_directory</key>
|
||||||
<string>build-vc${AUTOBUILD_WIN_VSVER|161}-$AUTOBUILD_ADDRSIZE</string>
|
<string>build-vc-$AUTOBUILD_ADDRSIZE</string>
|
||||||
<key>configurations</key>
|
<key>configurations</key>
|
||||||
<map>
|
<map>
|
||||||
<key>RelWithDebInfo</key>
|
<key>RelWithDebInfo</key>
|
||||||
@@ -3194,6 +3040,7 @@
|
|||||||
<string>/p:Configuration=Release</string>
|
<string>/p:Configuration=Release</string>
|
||||||
<string>/p:Platform=${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
|
<string>/p:Platform=${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
|
||||||
<string>/t:Build</string>
|
<string>/t:Build</string>
|
||||||
|
<string>/p:PreferredToolArchitecture=x64</string>
|
||||||
<string>/p:useenv=true</string>
|
<string>/p:useenv=true</string>
|
||||||
<string>/verbosity:normal</string>
|
<string>/verbosity:normal</string>
|
||||||
<string>/m</string>
|
<string>/m</string>
|
||||||
@@ -3221,7 +3068,7 @@
|
|||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>windows64</string>
|
<string>windows</string>
|
||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
<key>version_file</key>
|
<key>version_file</key>
|
||||||
|
|||||||
@@ -3,12 +3,7 @@
|
|||||||
# cmake_minimum_required should appear before any
|
# cmake_minimum_required should appear before any
|
||||||
# other commands to guarantee full compatibility
|
# other commands to guarantee full compatibility
|
||||||
# with the version specified
|
# with the version specified
|
||||||
## prior to 2.8, the add_custom_target commands used in setting the version did not work correctly
|
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||||
if(WIN32)
|
|
||||||
cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
|
|
||||||
else()
|
|
||||||
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(ROOT_PROJECT_NAME "Singularity" CACHE STRING
|
set(ROOT_PROJECT_NAME "Singularity" CACHE STRING
|
||||||
"The root project/makefile/solution name. Defaults to Singularity.")
|
"The root project/makefile/solution name. Defaults to Singularity.")
|
||||||
@@ -16,10 +11,6 @@ project(${ROOT_PROJECT_NAME})
|
|||||||
|
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
include(Variables)
|
|
||||||
include(00-Common)
|
|
||||||
include(BuildVersion)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
@@ -28,9 +19,13 @@ if (NOT CMAKE_BUILD_TYPE)
|
|||||||
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
|
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
|
||||||
endif (NOT CMAKE_BUILD_TYPE)
|
endif (NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
include(Abseil-CPP)
|
include(Variables)
|
||||||
# Dependencies
|
include(00-Common)
|
||||||
add_subdirectory(${ABSEIL_SRC_DIR} ${ABSEIL_BIN_DIR})
|
include(BuildVersion)
|
||||||
|
include(CTest)
|
||||||
|
|
||||||
|
add_subdirectory(deps)
|
||||||
|
|
||||||
add_subdirectory(cmake)
|
add_subdirectory(cmake)
|
||||||
add_subdirectory(${LIBS_OPEN_PREFIX}aistatemachine)
|
add_subdirectory(${LIBS_OPEN_PREFIX}aistatemachine)
|
||||||
add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)
|
add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)
|
||||||
@@ -65,8 +60,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}plugins)
|
|||||||
|
|
||||||
add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
|
add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
|
||||||
add_subdirectory(${VIEWER_PREFIX}newview)
|
add_subdirectory(${VIEWER_PREFIX}newview)
|
||||||
add_dependencies(viewer ${VIEWER_BRANDING_ID}-bin)
|
add_dependencies(viewer ${VIEWER_BINARY_NAME})
|
||||||
|
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${VIEWER_BRANDING_ID}-bin)
|
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
PROPERTY VS_STARTUP_PROJECT ${VIEWER_BINARY_NAME})
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||||
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
||||||
|
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
include(Variables)
|
include(Variables)
|
||||||
|
|
||||||
# Portable compilation flags.
|
# Portable compilation flags.
|
||||||
@@ -17,19 +18,6 @@ set(CMAKE_C_FLAGS_RELEASE
|
|||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
"-DLL_RELEASE=1 -D_SECURE_SCL=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
|
"-DLL_RELEASE=1 -D_SECURE_SCL=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
|
||||||
|
|
||||||
# Configure crash reporting
|
|
||||||
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
|
|
||||||
set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
|
|
||||||
|
|
||||||
if(RELEASE_CRASH_REPORTING)
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DLL_SEND_CRASH_REPORTS=1")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NON_RELEASE_CRASH_REPORTING)
|
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DLL_SEND_CRASH_REPORTS=1")
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Don't bother with a MinSizeRel build.
|
# Don't bother with a MinSizeRel build.
|
||||||
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
|
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
|
||||||
"Supported build types." FORCE)
|
"Supported build types." FORCE)
|
||||||
@@ -51,9 +39,17 @@ if (WINDOWS)
|
|||||||
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /fp:fast"
|
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /fp:fast"
|
||||||
CACHE STRING "C compiler release options" FORCE)
|
CACHE STRING "C compiler release options" FORCE)
|
||||||
|
|
||||||
if (WORD_SIZE EQUAL 32)
|
if (ADDRESS_SIZE EQUAL 32)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||||
endif (WORD_SIZE EQUAL 32)
|
endif (ADDRESS_SIZE EQUAL 32)
|
||||||
|
|
||||||
|
if (FULL_DEBUG_SYMS OR USE_CRASHPAD)
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG:FULL")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG:FULL")
|
||||||
|
else ()
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG:FASTLINK")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG:FASTLINK")
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (USE_LTO)
|
if (USE_LTO)
|
||||||
if(INCREMENTAL_LINK)
|
if(INCREMENTAL_LINK)
|
||||||
@@ -107,9 +103,9 @@ if (WINDOWS)
|
|||||||
)
|
)
|
||||||
endif (USE_LTO)
|
endif (USE_LTO)
|
||||||
|
|
||||||
if (WORD_SIZE EQUAL 32)
|
if (ADDRESS_SIZE EQUAL 32)
|
||||||
add_compile_options(/arch:SSE2)
|
add_compile_options(/arch:SSE2)
|
||||||
endif (WORD_SIZE EQUAL 32)
|
endif (ADDRESS_SIZE EQUAL 32)
|
||||||
|
|
||||||
if (NOT DISABLE_FATAL_WARNINGS)
|
if (NOT DISABLE_FATAL_WARNINGS)
|
||||||
add_definitions(/WX)
|
add_definitions(/WX)
|
||||||
@@ -199,10 +195,13 @@ if (LINUX)
|
|||||||
|
|
||||||
# End of hacks.
|
# End of hacks.
|
||||||
|
|
||||||
if (NOT STANDALONE)
|
CHECK_C_COMPILER_FLAG(-fstack-protector-strong HAS_STRONG_STACK_PROTECTOR)
|
||||||
# this stops us requiring a really recent glibc at runtime
|
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
||||||
add_definitions(-fno-stack-protector)
|
if(HAS_STRONG_STACK_PROTECTOR)
|
||||||
endif (NOT STANDALONE)
|
add_compile_options(-fstack-protector-strong)
|
||||||
|
endif(HAS_STRONG_STACK_PROTECTOR)
|
||||||
|
endif (${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
||||||
|
|
||||||
if (${ARCH} STREQUAL "x86_64")
|
if (${ARCH} STREQUAL "x86_64")
|
||||||
add_definitions(-pipe)
|
add_definitions(-pipe)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math")
|
||||||
@@ -293,19 +292,26 @@ if (LINUX OR DARWIN)
|
|||||||
|
|
||||||
set(CMAKE_C_FLAGS "${UNIX_WARNINGS} ${CMAKE_C_FLAGS}")
|
set(CMAKE_C_FLAGS "${UNIX_WARNINGS} ${CMAKE_C_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${UNIX_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${UNIX_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
|
||||||
if (WORD_SIZE EQUAL 32)
|
if (ADDRESS_SIZE EQUAL 32)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||||
elseif (WORD_SIZE EQUAL 64)
|
elseif (ADDRESS_SIZE EQUAL 64)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
||||||
endif (WORD_SIZE EQUAL 32)
|
endif (ADDRESS_SIZE EQUAL 32)
|
||||||
endif (LINUX OR DARWIN)
|
endif (LINUX OR DARWIN)
|
||||||
|
|
||||||
|
|
||||||
if (STANDALONE)
|
if (STANDALONE)
|
||||||
add_definitions(-DLL_STANDALONE=1)
|
add_definitions(-DLL_STANDALONE=1)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
|
#Enforce compile-time correctness for fmt strings
|
||||||
|
add_definitions(-DFMT_STRING_ALIAS=1)
|
||||||
|
|
||||||
|
if(USE_CRASHPAD)
|
||||||
|
add_definitions(-DUSE_CRASHPAD=1 -DCRASHPAD_URL="${CRASHPAD_URL}")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(${ARCH}_linux_INCLUDES
|
set(${ARCH}_linux_INCLUDES
|
||||||
atk-1.0
|
atk-1.0
|
||||||
cairo
|
cairo
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
include(Prebuilt)
|
|
||||||
|
|
||||||
set(BUILD_TESTING OFF)
|
|
||||||
use_prebuilt_binary(abseil-cpp)
|
|
||||||
set(ABSEIL_SRC_DIR ${LIBS_PREBUILT_DIR}/abseil-cpp)
|
|
||||||
set(ABSEIL_BIN_DIR ${CMAKE_BINARY_DIR}/abseil-cpp)
|
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ include(Variables)
|
|||||||
# building in an IDE, it probably isn't. Set it explicitly using
|
# building in an IDE, it probably isn't. Set it explicitly using
|
||||||
# run_build_test.py.
|
# run_build_test.py.
|
||||||
add_custom_command(OUTPUT packages-info.txt
|
add_custom_command(OUTPUT packages-info.txt
|
||||||
COMMENT Generating packages-info.txt for the about box
|
COMMENT "Generating packages-info.txt for the about box"
|
||||||
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml
|
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml
|
||||||
DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py
|
DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py
|
||||||
${CMAKE_SOURCE_DIR}/../autobuild.xml
|
${CMAKE_SOURCE_DIR}/../autobuild.xml
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ set(cmake_SOURCE_FILES
|
|||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
|
|
||||||
00-Common.cmake
|
00-Common.cmake
|
||||||
Abseil-CPP.cmake
|
|
||||||
AIStateMachine.cmake
|
AIStateMachine.cmake
|
||||||
APR.cmake
|
APR.cmake
|
||||||
Audio.cmake
|
Audio.cmake
|
||||||
@@ -23,6 +22,7 @@ set(cmake_SOURCE_FILES
|
|||||||
ConfigurePkgConfig.cmake
|
ConfigurePkgConfig.cmake
|
||||||
CURL.cmake
|
CURL.cmake
|
||||||
Copy3rdPartyLibs.cmake
|
Copy3rdPartyLibs.cmake
|
||||||
|
CrashPad.cmake
|
||||||
Cwdebug.cmake
|
Cwdebug.cmake
|
||||||
DBusGlib.cmake
|
DBusGlib.cmake
|
||||||
DeploySharedLibs.cmake
|
DeploySharedLibs.cmake
|
||||||
@@ -33,7 +33,6 @@ set(cmake_SOURCE_FILES
|
|||||||
FindCARes.cmake
|
FindCARes.cmake
|
||||||
FindColladadom.cmake
|
FindColladadom.cmake
|
||||||
FindGLOD.cmake
|
FindGLOD.cmake
|
||||||
FindGoogleBreakpad.cmake
|
|
||||||
FindGooglePerfTools.cmake
|
FindGooglePerfTools.cmake
|
||||||
FindHunSpell.cmake
|
FindHunSpell.cmake
|
||||||
FindNDOF.cmake
|
FindNDOF.cmake
|
||||||
@@ -43,11 +42,11 @@ set(cmake_SOURCE_FILES
|
|||||||
FindXmlRpcEpi.cmake
|
FindXmlRpcEpi.cmake
|
||||||
FMODSTUDIO.cmake
|
FMODSTUDIO.cmake
|
||||||
FreeType.cmake
|
FreeType.cmake
|
||||||
|
GeneratePrecompiledHeader.cmake
|
||||||
GLOD.cmake
|
GLOD.cmake
|
||||||
GStreamer010Plugin.cmake
|
GStreamer010Plugin.cmake
|
||||||
Glui.cmake
|
Glui.cmake
|
||||||
Glut.cmake
|
Glut.cmake
|
||||||
GoogleBreakpad.cmake
|
|
||||||
GooglePerfTools.cmake
|
GooglePerfTools.cmake
|
||||||
Hunspell.cmake
|
Hunspell.cmake
|
||||||
JPEG.cmake
|
JPEG.cmake
|
||||||
|
|||||||
@@ -6,17 +6,17 @@ SET(DEBUG_PKG_CONFIG "YES")
|
|||||||
IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
|
IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
|
||||||
|
|
||||||
# Guess at architecture-specific system library paths.
|
# Guess at architecture-specific system library paths.
|
||||||
if (WORD_SIZE EQUAL 32)
|
if (ADDRESS_SIZE EQUAL 32)
|
||||||
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib)
|
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib)
|
||||||
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib)
|
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib)
|
||||||
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu)
|
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu)
|
||||||
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu)
|
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu)
|
||||||
else (WORD_SIZE EQUAL 32)
|
else (ADDRESS_SIZE EQUAL 32)
|
||||||
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib)
|
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib)
|
||||||
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib)
|
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib)
|
||||||
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/x86_64-linux-gnu)
|
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/x86_64-linux-gnu)
|
||||||
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu)
|
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu)
|
||||||
endif (WORD_SIZE EQUAL 32)
|
endif (ADDRESS_SIZE EQUAL 32)
|
||||||
|
|
||||||
# Use DPKG architecture, if available.
|
# Use DPKG architecture, if available.
|
||||||
IF (${DPKG_ARCH})
|
IF (${DPKG_ARCH})
|
||||||
|
|||||||
@@ -82,14 +82,19 @@ if(WINDOWS)
|
|||||||
endif(ADDRESS_SIZE EQUAL 64)
|
endif(ADDRESS_SIZE EQUAL 64)
|
||||||
|
|
||||||
if(NOT DISABLE_TCMALLOC)
|
if(NOT DISABLE_TCMALLOC)
|
||||||
set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)
|
list(APPEND debug_files libtcmalloc_minimal-debug.dll)
|
||||||
set(release_files ${release_files} libtcmalloc_minimal.dll)
|
list(APPEND release_files libtcmalloc_minimal.dll)
|
||||||
endif(NOT DISABLE_TCMALLOC)
|
endif(NOT DISABLE_TCMALLOC)
|
||||||
|
|
||||||
if (FMODSTUDIO)
|
if(OPENAL)
|
||||||
set(debug_files ${debug_files} fmodL.dll)
|
list(APPEND debug_files alut.dll OpenAL32.dll)
|
||||||
set(release_files ${release_files} fmod.dll)
|
list(APPEND release_files alut.dll OpenAL32.dll)
|
||||||
endif (FMODSTUDIO)
|
endif(OPENAL)
|
||||||
|
|
||||||
|
if (USE_FMODSTUDIO)
|
||||||
|
list(APPEND debug_files fmodL.dll)
|
||||||
|
list(APPEND release_files fmod.dll)
|
||||||
|
endif (USE_FMODSTUDIO)
|
||||||
|
|
||||||
foreach(redistfullfile IN LISTS CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
|
foreach(redistfullfile IN LISTS CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
|
||||||
get_filename_component(redistfilepath ${redistfullfile} DIRECTORY )
|
get_filename_component(redistfilepath ${redistfullfile} DIRECTORY )
|
||||||
@@ -179,26 +184,20 @@ elseif(LINUX)
|
|||||||
libatk-1.0.so
|
libatk-1.0.so
|
||||||
libexpat.so
|
libexpat.so
|
||||||
libexpat.so.1
|
libexpat.so.1
|
||||||
libfreetype.so.6.12.3
|
|
||||||
libfreetype.so.6
|
|
||||||
libfreetype.so
|
|
||||||
libGLOD.so
|
libGLOD.so
|
||||||
libgmodule-2.0.so
|
libgmodule-2.0.so
|
||||||
libgobject-2.0.so
|
libgobject-2.0.so
|
||||||
libopenal.so
|
libopenal.so
|
||||||
libfontconfig.so.1.8.0
|
|
||||||
libfontconfig.so.1
|
|
||||||
libfontconfig.so
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (USE_TCMALLOC)
|
if (USE_TCMALLOC)
|
||||||
set(release_files ${release_files} "libtcmalloc_minimal.so")
|
list(APPEND release_files "libtcmalloc_minimal.so")
|
||||||
endif (USE_TCMALLOC)
|
endif (USE_TCMALLOC)
|
||||||
|
|
||||||
if (FMODSTUDIO)
|
if (USE_FMODSTUDIO)
|
||||||
set(debug_files ${debug_files} "libfmodL.so")
|
list(APPEND debug_files "libfmodL.so")
|
||||||
set(release_files ${release_files} "libfmod.so")
|
list(APPEND release_files "libfmod.so")
|
||||||
endif (FMODSTUDIO)
|
endif (USE_FMODSTUDIO)
|
||||||
|
|
||||||
else(WINDOWS)
|
else(WINDOWS)
|
||||||
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
|
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
|
||||||
|
|||||||
22
indra/cmake/CrashPad.cmake
Normal file
22
indra/cmake/CrashPad.cmake
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
include(Prebuilt)
|
||||||
|
include(Variables)
|
||||||
|
|
||||||
|
if(USE_CRASHPAD)
|
||||||
|
|
||||||
|
if (USESYSTEMLIBS)
|
||||||
|
else (USESYSTEMLIBS)
|
||||||
|
use_prebuilt_binary(crashpad)
|
||||||
|
if (WINDOWS)
|
||||||
|
set(CRASHPAD_LIBRARIES
|
||||||
|
debug client.lib util.lib base.lib
|
||||||
|
optimized client.lib util.lib base.lib)
|
||||||
|
elseif (LINUX)
|
||||||
|
|
||||||
|
else (DARWIN)
|
||||||
|
|
||||||
|
endif ()
|
||||||
|
set(CRASHPAD_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/crashpad)
|
||||||
|
endif (USESYSTEMLIBS)
|
||||||
|
|
||||||
|
endif()
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
|
|
||||||
include(Variables)
|
include(Variables)
|
||||||
if (FMODSTUDIO)
|
if (USE_FMODSTUDIO)
|
||||||
use_prebuilt_binary(fmodstudio)
|
use_prebuilt_binary(fmodstudio)
|
||||||
if(WINDOWS)
|
if(WINDOWS)
|
||||||
set(lib_suffix .dll)
|
set(lib_suffix .dll)
|
||||||
@@ -30,22 +30,21 @@ if (FMODSTUDIO)
|
|||||||
optimized ${FMOD_LINK_LIBRARY_RELEASE}
|
optimized ${FMOD_LINK_LIBRARY_RELEASE}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio)
|
set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio)
|
||||||
endif(FMODSTUDIO)
|
endif(USE_FMODSTUDIO)
|
||||||
|
|
||||||
if(FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
|
if(FMOD_LIBRARY_RELEASE AND FMODSTUDIO_INCLUDE_DIR)
|
||||||
set(FMOD ON)
|
set(FMOD ON)
|
||||||
if (NOT FMOD_LIBRARY_DEBUG) #Use release library in debug configuration if debug library is absent.
|
if (NOT FMOD_LIBRARY_DEBUG) #Use release library in debug configuration if debug library is absent.
|
||||||
set(FMOD_LIBRARY_DEBUG ${FMOD_LIBRARY_RELEASE})
|
set(FMOD_LIBRARY_DEBUG ${FMOD_LIBRARY_RELEASE})
|
||||||
endif (NOT FMOD_LIBRARY_DEBUG)
|
endif (NOT FMOD_LIBRARY_DEBUG)
|
||||||
else (FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
|
else (FMOD_LIBRARY_RELEASE AND FMODSTUDIO_INCLUDE_DIR)
|
||||||
message(STATUS "No support for FMOD Studio audio (need to set FMODSTUDIO_SDK_DIR?)")
|
message(STATUS "No support for FMOD Studio audio (need to set FMODSTUDIO_SDK_DIR?)")
|
||||||
set(FMOD OFF)
|
set(FMOD OFF)
|
||||||
set(FMODSTUDIO OFF)
|
set(USE_FMODSTUDIO OFF)
|
||||||
endif (FMOD_LIBRARY_RELEASE AND FMOD_INCLUDE_DIR)
|
endif (FMOD_LIBRARY_RELEASE AND FMODSTUDIO_INCLUDE_DIR)
|
||||||
|
|
||||||
if (FMOD)
|
if (FMOD)
|
||||||
message(STATUS "Building with FMOD Studio audio support")
|
message(STATUS "Building with FMOD Studio audio support")
|
||||||
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO=1")
|
|
||||||
endif (FMOD)
|
endif (FMOD)
|
||||||
|
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
|
|
||||||
# - Find Google BreakPad
|
|
||||||
# Find the Google BreakPad includes and library
|
|
||||||
# This module defines
|
|
||||||
# BREAKPAD_INCLUDE_DIRECTORIES, where to find the Goole BreakPad includes.
|
|
||||||
# BREAKPAD_EXCEPTION_HANDLER_LIBRARIES, the libraries needed to use Google BreakPad.
|
|
||||||
# BREAKPAD_EXCEPTION_HANDLER_FOUND, If false, do not try to use Google BreakPad.
|
|
||||||
# also defined, but not for general use are
|
|
||||||
# BREAKPAD_EXCEPTION_HANDLER_LIBRARY, where to find the Google BreakPad library.
|
|
||||||
|
|
||||||
FIND_PATH(BREAKPAD_INCLUDE_DIRECTORIES common/using_std_string.h PATH_SUFFIXES google_breakpad)
|
|
||||||
|
|
||||||
SET(BREAKPAD_EXCEPTION_HANDLER_NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} breakpad_client)
|
|
||||||
FIND_LIBRARY(BREAKPAD_EXCEPTION_HANDLER_LIBRARY
|
|
||||||
NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES}
|
|
||||||
)
|
|
||||||
|
|
||||||
IF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_INCLUDE_DIRECTORIES)
|
|
||||||
SET(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY})
|
|
||||||
SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "YES")
|
|
||||||
ELSE (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_INCLUDE_DIRECTORIES)
|
|
||||||
SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "NO")
|
|
||||||
ENDIF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_INCLUDE_DIRECTORIES)
|
|
||||||
|
|
||||||
|
|
||||||
IF (BREAKPAD_EXCEPTION_HANDLER_FOUND)
|
|
||||||
IF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY)
|
|
||||||
MESSAGE(STATUS "Found Google BreakPad: ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}")
|
|
||||||
ENDIF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY)
|
|
||||||
ELSE (BREAKPAD_EXCEPTION_HANDLER_FOUND)
|
|
||||||
IF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED)
|
|
||||||
MESSAGE(FATAL_ERROR "Could not find Google BreakPad library")
|
|
||||||
ENDIF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED)
|
|
||||||
ENDIF (BREAKPAD_EXCEPTION_HANDLER_FOUND)
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
|
||||||
BREAKPAD_EXCEPTION_HANDLER_LIBRARY
|
|
||||||
BREAKPAD_INCLUDE_DIRECTORIES
|
|
||||||
)
|
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
|
||||||
if (STANDALONE)
|
if (LINUX)
|
||||||
include(FindPkgConfig)
|
include(FindPkgConfig)
|
||||||
|
|
||||||
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
||||||
else (STANDALONE)
|
else (LINUX)
|
||||||
use_prebuilt_binary(freetype)
|
use_prebuilt_binary(freetype)
|
||||||
set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/freetype2)
|
set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/freetype2)
|
||||||
set(FREETYPE_LIBRARIES freetype)
|
set(FREETYPE_LIBRARIES freetype)
|
||||||
endif (STANDALONE)
|
endif (LINUX)
|
||||||
|
|
||||||
link_directories(${FREETYPE_LIBRARY_DIRS})
|
link_directories(${FREETYPE_LIBRARY_DIRS})
|
||||||
|
|||||||
116
indra/cmake/GeneratePrecompiledHeader.cmake
Normal file
116
indra/cmake/GeneratePrecompiledHeader.cmake
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
|
||||||
|
# Distributed under the MIT Software License
|
||||||
|
# Copyright (c) 2015-2017 Borislav Stanimirov
|
||||||
|
# Modifications Copyright (c) 2019 Cinder Roxley. All rights reserved.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# target_precompiled_header
|
||||||
|
#
|
||||||
|
# Sets a precompiled header for a given target
|
||||||
|
# Args:
|
||||||
|
# TARGET_NAME - Name of the target. Only valid after add_library or add_executable
|
||||||
|
# PRECOMPILED_HEADER - Header file to precompile
|
||||||
|
# PRECOMPILED_SOURCE - MSVC specific source to do the actual precompilation. Ignored on other platforms
|
||||||
|
#
|
||||||
|
|
||||||
|
macro(target_precompiled_header TARGET_NAME PRECOMPILED_HEADER PRECOMPILED_SOURCE)
|
||||||
|
get_filename_component(PRECOMPILED_HEADER_NAME ${PRECOMPILED_HEADER} NAME)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
get_filename_component(PRECOMPILED_SOURCE_NAME ${PRECOMPILED_SOURCE} NAME)
|
||||||
|
get_filename_component(PRECOMPILED_HEADER_PATH ${PRECOMPILED_HEADER} DIRECTORY)
|
||||||
|
target_include_directories(${TARGET_NAME} PRIVATE ${PRECOMPILED_HEADER_PATH}) # fixes occasional IntelliSense glitches
|
||||||
|
|
||||||
|
get_filename_component(PRECOMPILED_HEADER_WE ${PRECOMPILED_HEADER} NAME_WE)
|
||||||
|
if(GEN_IS_MULTI_CONFIG)
|
||||||
|
set(PRECOMPILED_BINARY "$(IntDir)/${PRECOMPILED_HEADER_WE}.pch")
|
||||||
|
else()
|
||||||
|
set(PRECOMPILED_BINARY "${CMAKE_CURRENT_BINARY_DIR}/${PRECOMPILED_HEADER_WE}.pch")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_source_files_properties(${PRECOMPILED_SOURCE} PROPERTIES
|
||||||
|
COMPILE_OPTIONS "/Yc${PRECOMPILED_HEADER_NAME};/Fp${PRECOMPILED_BINARY}"
|
||||||
|
OBJECT_OUTPUTS "${PRECOMPILED_BINARY}")
|
||||||
|
|
||||||
|
get_target_property(TARGET_SOURCES ${TARGET_NAME} SOURCES)
|
||||||
|
foreach(src ${TARGET_SOURCES})
|
||||||
|
if(${src} MATCHES \\.\(cpp|cxx|cc\)$)
|
||||||
|
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${src}" PROPERTIES
|
||||||
|
COMPILE_OPTIONS "/Yu${PRECOMPILED_HEADER_NAME};/FI${PRECOMPILED_HEADER_NAME};/Fp${PRECOMPILED_BINARY}"
|
||||||
|
OBJECT_DEPENDS "${PRECOMPILED_BINARY}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
#set_target_properties(${TARGET_NAME} PROPERTIES
|
||||||
|
# COMPILE_OPTIONS "/Yu${PRECOMPILED_HEADER_NAME};/FI${PRECOMPILED_HEADER_NAME};/Fp${PRECOMPILED_BINARY}")
|
||||||
|
|
||||||
|
target_sources(${TARGET_NAME} PRIVATE ${PRECOMPILED_SOURCE} ${PRECOMPILED_HEADER})
|
||||||
|
elseif(CMAKE_GENERATOR STREQUAL Xcode)
|
||||||
|
set_target_properties(
|
||||||
|
${TARGET_NAME}
|
||||||
|
PROPERTIES
|
||||||
|
XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${PRECOMPILED_HEADER}"
|
||||||
|
XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES"
|
||||||
|
)
|
||||||
|
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
# Create and set output directory.
|
||||||
|
set(OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${PRECOMPILED_HEADER_NAME}.gch")
|
||||||
|
make_directory(${OUTPUT_DIR})
|
||||||
|
set(OUTPUT_NAME "${OUTPUT_DIR}/${PRECOMPILED_HEADER_NAME}.gch")
|
||||||
|
|
||||||
|
# Export compiler flags via a generator to a response file
|
||||||
|
set(PCH_FLAGS_FILE "${OUTPUT_DIR}/${PRECOMPILED_HEADER_NAME}.rsp")
|
||||||
|
set(_include_directories "$<TARGET_PROPERTY:${TARGET_NAME},INCLUDE_DIRECTORIES>")
|
||||||
|
set(_compile_definitions "$<TARGET_PROPERTY:${TARGET_NAME},COMPILE_DEFINITIONS>")
|
||||||
|
set(_compile_flags "$<TARGET_PROPERTY:${TARGET_NAME},COMPILE_FLAGS>")
|
||||||
|
set(_compile_options "$<TARGET_PROPERTY:${TARGET_NAME},COMPILE_OPTIONS>")
|
||||||
|
set(_include_directories "$<$<BOOL:${_include_directories}>:-I$<JOIN:${_include_directories},\n-I>\n>")
|
||||||
|
set(_compile_definitions "$<$<BOOL:${_compile_definitions}>:-D$<JOIN:${_compile_definitions},\n-D>\n>")
|
||||||
|
set(_compile_flags "$<$<BOOL:${_compile_flags}>:$<JOIN:${_compile_flags},\n>\n>")
|
||||||
|
set(_compile_options "$<$<BOOL:${_compile_options}>:$<JOIN:${_compile_options},\n>\n>")
|
||||||
|
file(GENERATE OUTPUT "${PCH_FLAGS_FILE}" CONTENT "${_compile_definitions}${_include_directories}${_compile_flags}${_compile_options}\n")
|
||||||
|
|
||||||
|
# Gather global compiler options, definitions, etc.
|
||||||
|
string(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" CXX_FLAGS)
|
||||||
|
set(COMPILER_FLAGS "${${CXX_FLAGS}} ${CMAKE_CXX_FLAGS}")
|
||||||
|
separate_arguments(COMPILER_FLAGS)
|
||||||
|
|
||||||
|
# Add a custom target for building the precompiled header.
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${OUTPUT_NAME}
|
||||||
|
COMMAND ${CMAKE_CXX_COMPILER} @${PCH_FLAGS_FILE} ${COMPILER_FLAGS} -x c++-header -o ${OUTPUT_NAME} ${PRECOMPILED_HEADER}
|
||||||
|
DEPENDS ${PRECOMPILED_HEADER})
|
||||||
|
add_custom_target(${TARGET_NAME}_gch DEPENDS ${OUTPUT_NAME})
|
||||||
|
add_dependencies(${TARGET_NAME} ${TARGET_NAME}_gch)
|
||||||
|
|
||||||
|
# set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_FLAGS "-include ${PRECOMPILED_HEADER_NAME} -Winvalid-pch")
|
||||||
|
get_target_property(SOURCE_FILES ${TARGET_NAME} SOURCES)
|
||||||
|
get_target_property(asdf ${TARGET_NAME} COMPILE_FLAGS)
|
||||||
|
foreach(SOURCE_FILE ${SOURCE_FILES})
|
||||||
|
if(SOURCE_FILE MATCHES \\.\(c|cc|cxx|cpp\)$)
|
||||||
|
set_source_files_properties(${SOURCE_FILE} PROPERTIES
|
||||||
|
COMPILE_FLAGS "-include ${OUTPUT_DIR}/${PRECOMPILED_HEADER_NAME} -Winvalid-pch"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Unknown generator for target_precompiled_header. [${CMAKE_CXX_COMPILER_ID}]")
|
||||||
|
endif()
|
||||||
|
endmacro(target_precompiled_header)
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# -*- cmake -*-
|
|
||||||
include(Prebuilt)
|
|
||||||
|
|
||||||
if (STANDALONE)
|
|
||||||
set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON)
|
|
||||||
include(FindGoogleBreakpad)
|
|
||||||
else (STANDALONE)
|
|
||||||
use_prebuilt_binary(google_breakpad)
|
|
||||||
if (DARWIN)
|
|
||||||
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler)
|
|
||||||
endif (DARWIN)
|
|
||||||
if (LINUX)
|
|
||||||
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES breakpad_client)
|
|
||||||
endif (LINUX)
|
|
||||||
if (WINDOWS)
|
|
||||||
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler crash_generation_client crash_generation_server common)
|
|
||||||
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}/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)
|
|
||||||
@@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
|
||||||
if(WORD_SIZE EQUAL 64)
|
if(ADDRESS_SIZE EQUAL 64)
|
||||||
set(DISABLE_TCMALLOC TRUE)
|
set(DISABLE_TCMALLOC TRUE)
|
||||||
endif(WORD_SIZE EQUAL 64)
|
endif(ADDRESS_SIZE EQUAL 64)
|
||||||
|
|
||||||
if (STANDALONE)
|
if (STANDALONE)
|
||||||
include(FindGooglePerfTools)
|
include(FindGooglePerfTools)
|
||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
if (LINUX OR WINDOWS AND NOT WORD_SIZE EQUAL 64)
|
if (LINUX OR WINDOWS AND NOT ADDRESS_SIZE EQUAL 64)
|
||||||
use_prebuilt_binary(gperftools)
|
use_prebuilt_binary(gperftools)
|
||||||
endif (LINUX OR WINDOWS AND NOT WORD_SIZE EQUAL 64)
|
endif (LINUX OR WINDOWS AND NOT ADDRESS_SIZE EQUAL 64)
|
||||||
if (WINDOWS AND NOT DISABLE_TCMALLOC)
|
if (WINDOWS AND NOT DISABLE_TCMALLOC)
|
||||||
set(TCMALLOC_LIBRARIES libtcmalloc_minimal.lib)
|
set(TCMALLOC_LIBRARIES libtcmalloc_minimal.lib)
|
||||||
set(TCMALLOC_LINKER_FLAGS "/INCLUDE:\"__tcmalloc\"")
|
set(TCMALLOC_LINKER_FLAGS "/INCLUDE:\"__tcmalloc\"")
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ if (DARWIN)
|
|||||||
find_library(CORESERVICES_LIBRARY CoreServices)
|
find_library(CORESERVICES_LIBRARY CoreServices)
|
||||||
endif (DARWIN)
|
endif (DARWIN)
|
||||||
|
|
||||||
|
|
||||||
set(LLCOMMON_INCLUDE_DIRS
|
set(LLCOMMON_INCLUDE_DIRS
|
||||||
${LIBS_OPEN_DIR}/cwdebug
|
${LIBS_OPEN_DIR}/cwdebug
|
||||||
${LIBS_OPEN_DIR}/llcommon
|
${LIBS_OPEN_DIR}/llcommon
|
||||||
@@ -19,14 +18,7 @@ set(LLCOMMON_INCLUDE_DIRS
|
|||||||
${Boost_INCLUDE_DIRS}
|
${Boost_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
set(LLCOMMON_LIBRARIES llcommon)
|
||||||
# In order to support using ld.gold on linux, we need to explicitely
|
|
||||||
# specify all libraries that llcommon uses.
|
|
||||||
# llcommon uses `clock_gettime' which is provided by librt on linux.
|
|
||||||
set(LLCOMMON_LIBRARIES llcommon rt)
|
|
||||||
else (LINUX)
|
|
||||||
set(LLCOMMON_LIBRARIES llcommon)
|
|
||||||
endif (LINUX)
|
|
||||||
|
|
||||||
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
|
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
|
||||||
if(LLCOMMON_LINK_SHARED)
|
if(LLCOMMON_LINK_SHARED)
|
||||||
|
|||||||
@@ -5,10 +5,4 @@ set(LLPLUGIN_INCLUDE_DIRS
|
|||||||
${LIBS_OPEN_DIR}/llplugin
|
${LIBS_OPEN_DIR}/llplugin
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
set(LLPLUGIN_LIBRARIES llplugin)
|
||||||
# In order to support using ld.gold on linux, we need to explicitely
|
|
||||||
# specify all libraries that llplugin uses.
|
|
||||||
set(LLPLUGIN_LIBRARIES llplugin pthread)
|
|
||||||
else (LINUX)
|
|
||||||
set(LLPLUGIN_LIBRARIES llplugin)
|
|
||||||
endif (LINUX)
|
|
||||||
|
|||||||
@@ -27,15 +27,15 @@ endif (WINDOWS)
|
|||||||
# windows) and CMAKE_BUILD_TYPE on Makefile based generators (like linux). The reason for this is
|
# windows) and CMAKE_BUILD_TYPE on Makefile based generators (like linux). The reason for this is
|
||||||
# that CMAKE_BUILD_TYPE is essentially meaningless at configuration time for IDE generators and
|
# that CMAKE_BUILD_TYPE is essentially meaningless at configuration time for IDE generators and
|
||||||
# CMAKE_CFG_INTDIR is meaningless at build time for Makefile generators
|
# CMAKE_CFG_INTDIR is meaningless at build time for Makefile generators
|
||||||
if(WINDOWS OR DARWIN)
|
if(GEN_IS_MULTI_CONFIG)
|
||||||
# the cmake xcode and VS generators implicitly append ${CMAKE_CFG_INTDIR} to the library paths for us
|
# 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.
|
# fortunately both windows and darwin are case insensitive filesystems so this works.
|
||||||
set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/")
|
set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/")
|
||||||
else(WINDOWS OR DARWIN)
|
else()
|
||||||
# else block is for linux and any other makefile based generators
|
# else block is for linux and any other makefile based generators
|
||||||
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
|
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
|
||||||
set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER})
|
set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER})
|
||||||
endif(WINDOWS OR DARWIN)
|
endif()
|
||||||
|
|
||||||
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||||
# When we're building something other than Release, append the
|
# When we're building something other than Release, append the
|
||||||
@@ -48,10 +48,14 @@ link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})
|
|||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
set(DL_LIBRARY dl)
|
set(DL_LIBRARY dl)
|
||||||
|
set(RT_LIBRARY rt)
|
||||||
set(PTHREAD_LIBRARY pthread)
|
set(PTHREAD_LIBRARY pthread)
|
||||||
|
set(FMT_LIBRARY "")
|
||||||
else (LINUX)
|
else (LINUX)
|
||||||
set(DL_LIBRARY "")
|
set(DL_LIBRARY "")
|
||||||
|
set(RT_LIBRARY "")
|
||||||
set(PTHREAD_LIBRARY "")
|
set(PTHREAD_LIBRARY "")
|
||||||
|
set(FMT_LIBRARY fmt::fmt)
|
||||||
endif (LINUX)
|
endif (LINUX)
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
@@ -73,6 +77,6 @@ else (WINDOWS)
|
|||||||
set(WINDOWS_LIBRARIES "")
|
set(WINDOWS_LIBRARIES "")
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
mark_as_advanced(DL_LIBRARY PTHREAD_LIBRARY WINDOWS_LIBRARIES)
|
mark_as_advanced(DL_LIBRARY RT_LIBRARY PTHREAD_LIBRARY FMT_LIBRARY WINDOWS_LIBRARIES)
|
||||||
|
|
||||||
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
include(Variables)
|
include(Variables)
|
||||||
|
|
||||||
if (NVAPI)
|
if (USE_NVAPI)
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
use_prebuilt_binary(nvapi)
|
use_prebuilt_binary(nvapi)
|
||||||
if (WORD_SIZE EQUAL 32)
|
if (ADDRESS_SIZE EQUAL 32)
|
||||||
set(NVAPI_LIBRARY nvapi)
|
set(NVAPI_LIBRARY nvapi)
|
||||||
elseif (WORD_SIZE EQUAL 64)
|
elseif (ADDRESS_SIZE EQUAL 64)
|
||||||
set(NVAPI_LIBRARY nvapi64)
|
set(NVAPI_LIBRARY nvapi64)
|
||||||
endif (WORD_SIZE EQUAL 32)
|
endif (ADDRESS_SIZE EQUAL 32)
|
||||||
else (WINDOWS)
|
else (WINDOWS)
|
||||||
set(NVAPI_LIBRARY "")
|
set(NVAPI_LIBRARY "")
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
else (NVAPI)
|
else (USE_NVAPI)
|
||||||
set(NVAPI_LIBRARY "")
|
set(NVAPI_LIBRARY "")
|
||||||
endif (NVAPI)
|
endif (USE_NVAPI)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
include(Linking)
|
include(Linking)
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
|
||||||
if(NOT FMOD)
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
set(OPENAL ON CACHE BOOL "Enable OpenAL")
|
set(OPENAL ON CACHE BOOL "Enable OpenAL")
|
||||||
else (LINUX)
|
else (LINUX)
|
||||||
@@ -10,6 +9,7 @@ else (LINUX)
|
|||||||
endif (LINUX)
|
endif (LINUX)
|
||||||
|
|
||||||
if (OPENAL)
|
if (OPENAL)
|
||||||
|
set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL")
|
||||||
if (STANDALONE)
|
if (STANDALONE)
|
||||||
include(FindPkgConfig)
|
include(FindPkgConfig)
|
||||||
include(FindOpenAL)
|
include(FindOpenAL)
|
||||||
@@ -18,15 +18,16 @@ if (OPENAL)
|
|||||||
else (STANDALONE)
|
else (STANDALONE)
|
||||||
use_prebuilt_binary(openal)
|
use_prebuilt_binary(openal)
|
||||||
endif (STANDALONE)
|
endif (STANDALONE)
|
||||||
|
if(WINDOWS)
|
||||||
set(OPENAL_LIBRARIES
|
set(OPENAL_LIBRARIES
|
||||||
openal
|
OpenAL32
|
||||||
alut
|
alut
|
||||||
)
|
)
|
||||||
set(OPENAL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
else()
|
||||||
endif (OPENAL)
|
set(OPENAL_LIBRARIES
|
||||||
|
openal
|
||||||
if (OPENAL)
|
alut
|
||||||
|
)
|
||||||
|
endif()
|
||||||
message(STATUS "Building with OpenAL audio support")
|
message(STATUS "Building with OpenAL audio support")
|
||||||
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL")
|
|
||||||
endif (OPENAL)
|
endif (OPENAL)
|
||||||
endif(NOT FMOD)
|
|
||||||
|
|||||||
@@ -17,24 +17,59 @@ if(NOT DEFINED COMMON_CMAKE_DIR)
|
|||||||
set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake")
|
set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
endif(NOT DEFINED COMMON_CMAKE_DIR)
|
endif(NOT DEFINED COMMON_CMAKE_DIR)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
# https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
|
||||||
|
set(CMAKE_MACOSX_RPATH ON)
|
||||||
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||||
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF)
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
|
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
|
option(GEN_IS_MULTI_CONFIG "" ${_isMultiConfig})
|
||||||
|
mark_as_advanced(GEN_IS_MULTI_CONFIG)
|
||||||
|
|
||||||
set(LIBS_CLOSED_PREFIX)
|
set(LIBS_CLOSED_PREFIX)
|
||||||
set(LIBS_OPEN_PREFIX)
|
set(LIBS_OPEN_PREFIX)
|
||||||
set(SCRIPTS_PREFIX ../scripts)
|
set(SCRIPTS_PREFIX ../scripts)
|
||||||
set(VIEWER_PREFIX)
|
set(VIEWER_PREFIX)
|
||||||
set(INTEGRATION_TESTS_PREFIX)
|
set(INTEGRATION_TESTS_PREFIX)
|
||||||
option(LL_TESTS "Build and run unit and integration tests (disable for build timing runs to reduce variation" OFF)
|
|
||||||
|
|
||||||
|
option(LL_TESTS "Build and run unit and integration tests (disable for build timing runs to reduce variation" OFF)
|
||||||
|
option(BUILD_TESTING "Build test suite" OFF)
|
||||||
|
option(UNATTENDED "Disable use of uneeded tooling for automated builds" OFF)
|
||||||
|
|
||||||
|
# Compiler and toolchain options
|
||||||
|
option(USESYSTEMLIBS "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF)
|
||||||
|
option(STANDALONE "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF)
|
||||||
|
if (USESYSTEMLIBS)
|
||||||
|
set(STANDALONE ON)
|
||||||
|
elseif (STANDALONE)
|
||||||
|
set(USESYSTEMLIBS ON)
|
||||||
|
endif (USESYSTEMLIBS)
|
||||||
option(INCREMENTAL_LINK "Use incremental linking on win32 builds (enable for faster links on some machines)" OFF)
|
option(INCREMENTAL_LINK "Use incremental linking on win32 builds (enable for faster links on some machines)" OFF)
|
||||||
option(USE_PRECOMPILED_HEADERS "Enable use of precompiled header directives where supported." ON)
|
option(USE_PRECOMPILED_HEADERS "Enable use of precompiled header directives where supported." ON)
|
||||||
option(USE_LTO "Enable Whole Program Optimization and related folding and binary reduction routines" OFF)
|
option(USE_LTO "Enable global and interprocedural optimizations" OFF)
|
||||||
option(UNATTENDED "Disable use of uneeded tooling for automated builds" OFF)
|
|
||||||
|
# Configure crash reporting
|
||||||
|
option(USE_CRASHPAD "Build support for crashpad reporting engine" OFF)
|
||||||
|
if (DEFINED ENV{VIEWER_USE_CRASHPAD})
|
||||||
|
set(USE_CRASHPAD $ENV{VIEWER_USE_CRASHPAD})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (DEFINED ENV{VIEWER_CRASHPAD_URL})
|
||||||
|
set(CRASHPAD_URL $ENV{VIEWER_CRASHPAD_URL} CACHE STRING "Viewer Channel Base Name")
|
||||||
|
else()
|
||||||
|
set(CRASHPAD_URL "" CACHE STRING "Crashpad endpoint url")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(VIEWER_SYMBOL_FILE "" CACHE STRING "Name of tarball into which to place symbol files")
|
||||||
|
|
||||||
# Media Plugins
|
# Media Plugins
|
||||||
option(ENABLE_MEDIA_PLUGINS "Turn off building media plugins if they are imported by third-party library mechanism" ON)
|
option(ENABLE_MEDIA_PLUGINS "Turn off building media plugins if they are imported by third-party library mechanism" ON)
|
||||||
option(LIBVLCPLUGIN "Turn off building support for libvlc plugin" ON)
|
option(LIBVLCPLUGIN "Turn off building support for libvlc plugin" ON)
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
set(LIBVLCPLUGIN OFF)
|
set(LIBVLCPLUGIN OFF)
|
||||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
@@ -44,13 +79,11 @@ set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds
|
|||||||
set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.")
|
set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.")
|
||||||
|
|
||||||
# Audio Engines
|
# Audio Engines
|
||||||
option(FMODSTUDIO "Build with support for the FMOD Studio audio engine" ON)
|
option(USE_FMODSTUDIO "Build with support for the FMOD Studio audio engine" OFF)
|
||||||
|
|
||||||
# Window implementation
|
|
||||||
option(LLWINDOW_SDL2 "Use SDL2 for window and input handling" OFF)
|
|
||||||
|
|
||||||
# Proprietary Library Features
|
# Proprietary Library Features
|
||||||
option(NVAPI "Use nvapi driver interface library" OFF)
|
option(USE_NVAPI "Use nvapi driver interface library" OFF)
|
||||||
|
|
||||||
|
|
||||||
if(LIBS_CLOSED_DIR)
|
if(LIBS_CLOSED_DIR)
|
||||||
file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR)
|
file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR)
|
||||||
@@ -77,7 +110,7 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
|
|||||||
set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
|
set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
|
||||||
endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
|
endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
|
||||||
set(TEMPLATE_VERIFIER_OPTIONS "" CACHE STRING "Options for scripts/template_verifier.py")
|
set(TEMPLATE_VERIFIER_OPTIONS "" CACHE STRING "Options for scripts/template_verifier.py")
|
||||||
set(TEMPLATE_VERIFIER_MASTER_URL "https://forge.alchemyviewer.org/alchemy/tools/Master-Message-Template/raw/master/message_template.msg" CACHE STRING "Location of the master message template")
|
set(TEMPLATE_VERIFIER_MASTER_URL "https://git.alchemyviewer.org/alchemy/master-message-template/raw/master/message_template.msg" CACHE STRING "Location of the master message template")
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||||
@@ -86,7 +119,6 @@ endif (NOT CMAKE_BUILD_TYPE)
|
|||||||
|
|
||||||
# If someone has specified an address size, use that to determine the
|
# If someone has specified an address size, use that to determine the
|
||||||
# architecture. Otherwise, let the architecture specify the address size.
|
# architecture. Otherwise, let the architecture specify the address size.
|
||||||
set(ADDRESS_SIZE ${WORD_SIZE})
|
|
||||||
if (ADDRESS_SIZE EQUAL 32)
|
if (ADDRESS_SIZE EQUAL 32)
|
||||||
#message(STATUS "ADDRESS_SIZE is 32")
|
#message(STATUS "ADDRESS_SIZE is 32")
|
||||||
set(ARCH i686)
|
set(ARCH i686)
|
||||||
@@ -94,34 +126,32 @@ elseif (ADDRESS_SIZE EQUAL 64)
|
|||||||
#message(STATUS "ADDRESS_SIZE is 64")
|
#message(STATUS "ADDRESS_SIZE is 64")
|
||||||
set(ARCH x86_64)
|
set(ARCH x86_64)
|
||||||
else (ADDRESS_SIZE EQUAL 32)
|
else (ADDRESS_SIZE EQUAL 32)
|
||||||
#message(STATUS "ADDRESS_SIZE is UNRECOGNIZED: '${ADDRESS_SIZE}'")
|
#message(STATUS "ADDRESS_SIZE is UNDEFINED")
|
||||||
# Use Python's platform.machine() since uname -m isn't available everywhere.
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
# Even if you can assume cygwin uname -m, the answer depends on whether
|
message(STATUS "Size of void pointer is detected as 8; ARCH is 64-bit")
|
||||||
# you're running 32-bit cygwin or 64-bit cygwin! But even 32-bit Python will
|
set(ARCH x86_64)
|
||||||
# report a 64-bit processor.
|
set(ADDRESS_SIZE 64)
|
||||||
execute_process(COMMAND
|
elseif (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
"${Python2_EXECUTABLE}" "-c"
|
message(STATUS "Size of void pointer is detected as 4; ARCH is 32-bit")
|
||||||
"import platform; print platform.machine()"
|
set(ADDRESS_SIZE 32)
|
||||||
OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
set(ARCH i686)
|
||||||
# We expect values of the form i386, i686, x86_64, AMD64.
|
else()
|
||||||
# In CMake, expressing ARCH.endswith('64') is awkward:
|
message(FATAL_ERROR "Unkown Architecture!")
|
||||||
string(LENGTH "${ARCH}" ARCH_LENGTH)
|
endif()
|
||||||
math(EXPR ARCH_LEN_2 "${ARCH_LENGTH} - 2")
|
|
||||||
string(SUBSTRING "${ARCH}" ${ARCH_LEN_2} 2 ARCH_LAST_2)
|
|
||||||
if (ARCH_LAST_2 STREQUAL 64)
|
|
||||||
#message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}")
|
|
||||||
set(ADDRESS_SIZE 64)
|
|
||||||
else()
|
|
||||||
#message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}")
|
|
||||||
set(ADDRESS_SIZE 32)
|
|
||||||
endif ()
|
|
||||||
endif (ADDRESS_SIZE EQUAL 32)
|
endif (ADDRESS_SIZE EQUAL 32)
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
set(WINDOWS ON BOOL FORCE)
|
set(WINDOWS ON BOOL FORCE)
|
||||||
|
if (ADDRESS_SIZE EQUAL 64)
|
||||||
|
set(LL_ARCH ${ARCH}_win64)
|
||||||
|
set(LL_ARCH_DIR ${ARCH}-win64)
|
||||||
|
elseif (ADDRESS_SIZE EQUAL 32)
|
||||||
set(LL_ARCH ${ARCH}_win32)
|
set(LL_ARCH ${ARCH}_win32)
|
||||||
set(LL_ARCH_DIR ${ARCH}-win32)
|
set(LL_ARCH_DIR ${ARCH}-win32)
|
||||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
else()
|
||||||
|
message(FATAL_ERROR "Unkown Architecture!")
|
||||||
|
endif ()
|
||||||
|
endif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set(LINUX ON BOOL FORCE)
|
set(LINUX ON BOOL FORCE)
|
||||||
@@ -152,7 +182,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|||||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
set(DARWIN 1)
|
set(DARWIN ON BOOL FORCE)
|
||||||
|
|
||||||
# Architecture
|
# Architecture
|
||||||
set(CMAKE_OSX_SYSROOT macosx10.14)
|
set(CMAKE_OSX_SYSROOT macosx10.14)
|
||||||
@@ -192,57 +222,60 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||||||
set(LL_ARCH_DIR universal-darwin)
|
set(LL_ARCH_DIR universal-darwin)
|
||||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
|
||||||
|
# Platform specific
|
||||||
|
if (WINDOWS)
|
||||||
|
option(LLWINDOW_SDL2 "Use SDL2 for window and input handling. Windows only" OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Default deploy grid
|
# Default deploy grid
|
||||||
set(GRID agni CACHE STRING "Target Grid")
|
set(GRID agni CACHE STRING "Target Grid")
|
||||||
|
|
||||||
set(VIEWER_PRODUCT_NAME "Singularity" CACHE STRING "Viewer Base Name")
|
if (DEFINED ENV{VIEWER_CHANNEL_BASE})
|
||||||
string(TOLOWER ${VIEWER_PRODUCT_NAME} VIEWER_PRODUCT_NAME_LOWER)
|
set(VIEWER_CHANNEL_BASE $ENV{VIEWER_CHANNEL_BASE} CACHE STRING "Viewer Channel Base Name" FORCE)
|
||||||
|
else()
|
||||||
|
set(VIEWER_CHANNEL_BASE "Singularity" CACHE STRING "Viewer Channel Base Name")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (DEFINED ENV{VIEWER_CHANNEL_TYPE})
|
||||||
|
set(VIEWER_CHANNEL_TYPE $ENV{VIEWER_CHANNEL_TYPE} CACHE STRING "Viewer Channel Type Name" FORCE)
|
||||||
|
else()
|
||||||
|
set(VIEWER_CHANNEL_TYPE "Test" CACHE STRING "Viewer Channel Type Name")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (DEFINED ENV{VIEWER_CHANNEL_CODENAME})
|
||||||
|
set(VIEWER_CHANNEL_CODENAME $ENV{VIEWER_CHANNEL_CODENAME} CACHE STRING "Viewer Channel Code Name for Project type" FORCE)
|
||||||
|
else()
|
||||||
|
set(VIEWER_CHANNEL_CODENAME "Default" CACHE STRING "Viewer Channel Code Name for Project type")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("${VIEWER_CHANNEL_TYPE}" STREQUAL "Project")
|
||||||
|
set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE} ${VIEWER_CHANNEL_CODENAME}")
|
||||||
|
else()
|
||||||
|
set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
string(TOLOWER "${VIEWER_CHANNEL_BASE}" VIEWER_BRANDING_ID)
|
||||||
|
string(REPLACE " " "-" VIEWER_BRANDING_ID ${VIEWER_BRANDING_ID})
|
||||||
|
set(VIEWER_BINARY_NAME "${VIEWER_BRANDING_ID}-bin" CACHE STRING
|
||||||
|
"The name of the viewer executable to create.")
|
||||||
|
|
||||||
set(VIEWER_CHANNEL_BASE "Test" CACHE STRING "Viewer Channel Name")
|
|
||||||
set(VIEWER_CHANNEL "${VIEWER_PRODUCT_NAME} ${VIEWER_CHANNEL_BASE}")
|
|
||||||
string(TOLOWER ${VIEWER_CHANNEL} VIEWER_CHANNEL_LOWER)
|
|
||||||
string(REPLACE " " "" VIEWER_CHANNEL_ONEWORD ${VIEWER_CHANNEL})
|
string(REPLACE " " "" VIEWER_CHANNEL_ONEWORD ${VIEWER_CHANNEL})
|
||||||
|
set(VIEWER_CHANNEL_NOSPACE ${VIEWER_CHANNEL_ONEWORD} CACHE STRING "Prefix used for resulting artifacts.")
|
||||||
|
|
||||||
option(VIEWER_CHANNEL_GRK "Greek character(s) to represent the viewer channel for support purposes, override only for special branches" "")
|
option(VIEWER_CHANNEL_GRK "Greek character(s) to represent the viewer channel for support purposes, override only for special branches" "")
|
||||||
if (NOT VIEWER_CHANNEL_GRK)
|
if (NOT VIEWER_CHANNEL_GRK)
|
||||||
if (VIEWER_CHANNEL_BASE MATCHES "Test")
|
if (VIEWER_CHANNEL_TYPE MATCHES "Test")
|
||||||
set(VIEWER_CHANNEL_GRK "\\u03C4") # "τ"
|
set(VIEWER_CHANNEL_GRK "\\u03C4") # "τ"
|
||||||
elseif (VIEWER_CHANNEL_BASE MATCHES "Alpha")
|
elseif (VIEWER_CHANNEL_TYPE MATCHES "Alpha")
|
||||||
set(VIEWER_CHANNEL_GRK "\\u03B1") # "α"
|
set(VIEWER_CHANNEL_GRK "\\u03B1") # "α"
|
||||||
elseif (VIEWER_CHANNEL_BASE MATCHES "Beta")
|
elseif (VIEWER_CHANNEL_TYPE MATCHES "Beta")
|
||||||
set(VIEWER_CHANNEL_GRK "\\u03B2") # "β"
|
set(VIEWER_CHANNEL_GRK "\\u03B2") # "β"
|
||||||
endif ()
|
endif ()
|
||||||
endif (NOT VIEWER_CHANNEL_GRK)
|
endif (NOT VIEWER_CHANNEL_GRK)
|
||||||
|
|
||||||
if(VIEWER_CHANNEL_LOWER MATCHES "^${VIEWER_PRODUCT_NAME_LOWER} release")
|
|
||||||
set(VIEWER_PACKAGE_ID "${VIEWER_PRODUCT_NAME}Release")
|
|
||||||
set(VIEWER_EXE_STRING "${VIEWER_PRODUCT_NAME}Viewer")
|
|
||||||
set(VIEWER_SHORTCUT_STRING "${VIEWER_PRODUCT_NAME} Viewer")
|
|
||||||
else()
|
|
||||||
set(VIEWER_PACKAGE_ID ${VIEWER_CHANNEL_ONEWORD})
|
|
||||||
set(VIEWER_EXE_STRING ${VIEWER_CHANNEL_ONEWORD})
|
|
||||||
set(VIEWER_SHORTCUT_STRING ${VIEWER_CHANNEL})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(VIEWER_CHANNEL_NOSPACE ${VIEWER_CHANNEL_ONEWORD} CACHE STRING "Prefix used for resulting artifacts.")
|
|
||||||
|
|
||||||
set(VIEWER_BRANDING_ID "singularity" CACHE STRING "Viewer branding id")
|
|
||||||
|
|
||||||
option(ENABLE_SIGNING "Enable signing the viewer" OFF)
|
option(ENABLE_SIGNING "Enable signing the viewer" OFF)
|
||||||
set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
|
set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
|
||||||
|
|
||||||
set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
|
|
||||||
# Compiler and toolchain options
|
|
||||||
option(USESYSTEMLIBS "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF)
|
|
||||||
option(STANDALONE "Use libraries from your system rather than Linden-supplied prebuilt libraries." OFF)
|
|
||||||
if (USESYSTEMLIBS)
|
|
||||||
set(STANDALONE ON)
|
|
||||||
elseif (STANDALONE)
|
|
||||||
set(USESYSTEMLIBS ON)
|
|
||||||
endif (USESYSTEMLIBS)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
source_group("CMake Rules" FILES CMakeLists.txt)
|
source_group("CMake Rules" FILES CMakeLists.txt)
|
||||||
|
|
||||||
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ include(Prebuilt)
|
|||||||
|
|
||||||
if (NOT STANDALONE)
|
if (NOT STANDALONE)
|
||||||
use_prebuilt_binary(slvoice)
|
use_prebuilt_binary(slvoice)
|
||||||
if(LINUX)
|
|
||||||
use_prebuilt_binary(fontconfig)
|
|
||||||
endif(LINUX)
|
|
||||||
else (NOT STANDALONE)
|
else (NOT STANDALONE)
|
||||||
# Download there even when using standalone.
|
# Download there even when using standalone.
|
||||||
set(STANDALONE OFF)
|
set(STANDALONE OFF)
|
||||||
@@ -16,4 +13,9 @@ else (NOT STANDALONE)
|
|||||||
set(STANDALONE ON)
|
set(STANDALONE ON)
|
||||||
endif(NOT STANDALONE)
|
endif(NOT STANDALONE)
|
||||||
|
|
||||||
|
if(LINUX)
|
||||||
|
include(FindPkgConfig)
|
||||||
|
pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
|
||||||
|
endif(LINUX)
|
||||||
|
|
||||||
use_prebuilt_binary(fonts)
|
use_prebuilt_binary(fonts)
|
||||||
|
|||||||
48
indra/deps/CMakeLists.txt
Normal file
48
indra/deps/CMakeLists.txt
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
project(deps)
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
set(CMAKE_FOLDER "Third Party")
|
||||||
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
Catch2
|
||||||
|
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||||
|
GIT_TAG v2.11.0
|
||||||
|
)
|
||||||
|
FetchContent_Declare(
|
||||||
|
fmt
|
||||||
|
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
||||||
|
GIT_TAG 6.1.2
|
||||||
|
)
|
||||||
|
FetchContent_Declare(
|
||||||
|
absl
|
||||||
|
GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
|
||||||
|
GIT_TAG 29235139149790f5afc430c11cec8f1eb1677607
|
||||||
|
)
|
||||||
|
|
||||||
|
# This is a hack because absl has dumb cmake
|
||||||
|
set(OLD_BUILD_TEST ${BUILD_TESTING})
|
||||||
|
set(BUILD_TESTING OFF)
|
||||||
|
FetchContent_MakeAvailable(absl)
|
||||||
|
set(BUILD_TESTING ${OLD_BUILD_TEST})
|
||||||
|
|
||||||
|
# Supress warnings inside abseil under MSVC
|
||||||
|
if(WINDOWS)
|
||||||
|
target_compile_options(absl_strings PRIVATE /wd4018)
|
||||||
|
target_compile_options(absl_str_format_internal PRIVATE /wd4018)
|
||||||
|
target_compile_options(absl_flags_usage_internal PRIVATE /wd4018)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if (BUILD_TESTING)
|
||||||
|
FetchContent_MakeAvailable(Catch2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#Download the rest of the libraries
|
||||||
|
if(WINDOWS)
|
||||||
|
FetchContent_MakeAvailable(fmt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
unset(CMAKE_FOLDER)
|
||||||
|
unset(CMAKE_POSITION_INDEPENDENT_CODE)
|
||||||
@@ -1565,6 +1565,21 @@ BOOL LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name )
|
|||||||
param_name[1] = 1072; //"tattoo_green";
|
param_name[1] = 1072; //"tattoo_green";
|
||||||
param_name[2] = 1073; //"tattoo_blue";
|
param_name[2] = 1073; //"tattoo_blue";
|
||||||
break;
|
break;
|
||||||
|
case TEX_HEAD_UNIVERSAL_TATTOO:
|
||||||
|
case TEX_UPPER_UNIVERSAL_TATTOO:
|
||||||
|
case TEX_LOWER_UNIVERSAL_TATTOO:
|
||||||
|
case TEX_SKIRT_TATTOO:
|
||||||
|
case TEX_HAIR_TATTOO:
|
||||||
|
case TEX_EYES_TATTOO:
|
||||||
|
case TEX_LEFT_ARM_TATTOO:
|
||||||
|
case TEX_LEFT_LEG_TATTOO:
|
||||||
|
case TEX_AUX1_TATTOO:
|
||||||
|
case TEX_AUX2_TATTOO:
|
||||||
|
case TEX_AUX3_TATTOO:
|
||||||
|
param_name[0] = 1238; //"tattoo_universal_red";
|
||||||
|
param_name[1] = 1239; //"tattoo_universal_green";
|
||||||
|
param_name[2] = 1240; //"tattoo_universal_blue";
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
llassert(0);
|
llassert(0);
|
||||||
|
|||||||
@@ -27,8 +27,11 @@
|
|||||||
#include "linden_common.h"
|
#include "linden_common.h"
|
||||||
#include "llavatarappearancedefines.h"
|
#include "llavatarappearancedefines.h"
|
||||||
|
|
||||||
const S32 LLAvatarAppearanceDefines::SCRATCH_TEX_WIDTH = 512;
|
#include "indra_constants.h"
|
||||||
const S32 LLAvatarAppearanceDefines::SCRATCH_TEX_HEIGHT = 512;
|
#include <utility>
|
||||||
|
|
||||||
|
const S32 LLAvatarAppearanceDefines::SCRATCH_TEX_WIDTH = 1024;
|
||||||
|
const S32 LLAvatarAppearanceDefines::SCRATCH_TEX_HEIGHT = 1024;
|
||||||
const S32 LLAvatarAppearanceDefines::IMPOSTOR_PERIOD = 2;
|
const S32 LLAvatarAppearanceDefines::IMPOSTOR_PERIOD = 2;
|
||||||
|
|
||||||
using namespace LLAvatarAppearanceDefines;
|
using namespace LLAvatarAppearanceDefines;
|
||||||
@@ -65,12 +68,30 @@ LLAvatarAppearanceDictionary::Textures::Textures()
|
|||||||
addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
|
addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
|
||||||
addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
|
addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
|
||||||
|
|
||||||
|
addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
|
||||||
|
|
||||||
|
|
||||||
addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD, "head"));
|
addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD, "head"));
|
||||||
addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER, "upper"));
|
addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER, "upper"));
|
||||||
addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", FALSE, BAKED_LOWER, "lower"));
|
addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", FALSE, BAKED_LOWER, "lower"));
|
||||||
addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", FALSE, BAKED_EYES, "eyes"));
|
addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", FALSE, BAKED_EYES, "eyes"));
|
||||||
addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", FALSE, BAKED_HAIR, "hair"));
|
addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", FALSE, BAKED_HAIR, "hair"));
|
||||||
addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", FALSE, BAKED_SKIRT, "skirt"));
|
addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", FALSE, BAKED_SKIRT, "skirt"));
|
||||||
|
addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", FALSE, BAKED_LEFT_ARM, "leftarm"));
|
||||||
|
addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", FALSE, BAKED_LEFT_LEG, "leftleg"));
|
||||||
|
addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", FALSE, BAKED_AUX1, "aux1"));
|
||||||
|
addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", FALSE, BAKED_AUX2, "aux2"));
|
||||||
|
addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", FALSE, BAKED_AUX3, "aux3"));
|
||||||
}
|
}
|
||||||
|
|
||||||
LLAvatarAppearanceDictionary::BakedTextures::BakedTextures()
|
LLAvatarAppearanceDictionary::BakedTextures::BakedTextures()
|
||||||
@@ -78,35 +99,60 @@ LLAvatarAppearanceDictionary::BakedTextures::BakedTextures()
|
|||||||
// Baked textures
|
// Baked textures
|
||||||
addEntry(BAKED_HEAD, new BakedEntry(TEX_HEAD_BAKED,
|
addEntry(BAKED_HEAD, new BakedEntry(TEX_HEAD_BAKED,
|
||||||
"head", "a4b9dc38-e13b-4df9-b284-751efb0566ff",
|
"head", "a4b9dc38-e13b-4df9-b284-751efb0566ff",
|
||||||
3, TEX_HEAD_BODYPAINT, TEX_HEAD_TATTOO, TEX_HEAD_ALPHA,
|
4, TEX_HEAD_BODYPAINT, TEX_HEAD_TATTOO, TEX_HEAD_ALPHA, TEX_HEAD_UNIVERSAL_TATTOO,
|
||||||
5, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_HAIR, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA));
|
6, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_HAIR, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA, LLWearableType::WT_UNIVERSAL));
|
||||||
|
|
||||||
addEntry(BAKED_UPPER, new BakedEntry(TEX_UPPER_BAKED,
|
addEntry(BAKED_UPPER, new BakedEntry(TEX_UPPER_BAKED,
|
||||||
"upper_body", "5943ff64-d26c-4a90-a8c0-d61f56bd98d4",
|
"upper_body", "5943ff64-d26c-4a90-a8c0-d61f56bd98d4",
|
||||||
7, TEX_UPPER_SHIRT,TEX_UPPER_BODYPAINT, TEX_UPPER_JACKET,
|
8, TEX_UPPER_SHIRT,TEX_UPPER_BODYPAINT, TEX_UPPER_JACKET,
|
||||||
TEX_UPPER_GLOVES, TEX_UPPER_UNDERSHIRT, TEX_UPPER_TATTOO, TEX_UPPER_ALPHA,
|
TEX_UPPER_GLOVES, TEX_UPPER_UNDERSHIRT, TEX_UPPER_TATTOO, TEX_UPPER_ALPHA, TEX_UPPER_UNIVERSAL_TATTOO,
|
||||||
8, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_SHIRT, LLWearableType::WT_JACKET, LLWearableType::WT_GLOVES, LLWearableType::WT_UNDERSHIRT, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA));
|
9, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_SHIRT, LLWearableType::WT_JACKET, LLWearableType::WT_GLOVES, LLWearableType::WT_UNDERSHIRT, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA, LLWearableType::WT_UNIVERSAL));
|
||||||
|
|
||||||
addEntry(BAKED_LOWER, new BakedEntry(TEX_LOWER_BAKED,
|
addEntry(BAKED_LOWER, new BakedEntry(TEX_LOWER_BAKED,
|
||||||
"lower_body", "2944ee70-90a7-425d-a5fb-d749c782ed7d",
|
"lower_body", "2944ee70-90a7-425d-a5fb-d749c782ed7d",
|
||||||
8, TEX_LOWER_PANTS,TEX_LOWER_BODYPAINT,TEX_LOWER_SHOES, TEX_LOWER_SOCKS,
|
9, TEX_LOWER_PANTS,TEX_LOWER_BODYPAINT,TEX_LOWER_SHOES, TEX_LOWER_SOCKS,
|
||||||
TEX_LOWER_JACKET, TEX_LOWER_UNDERPANTS, TEX_LOWER_TATTOO, TEX_LOWER_ALPHA,
|
TEX_LOWER_JACKET, TEX_LOWER_UNDERPANTS, TEX_LOWER_TATTOO, TEX_LOWER_ALPHA, TEX_LOWER_UNIVERSAL_TATTOO,
|
||||||
9, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_PANTS, LLWearableType::WT_SHOES, LLWearableType::WT_SOCKS, LLWearableType::WT_JACKET, LLWearableType::WT_UNDERPANTS, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA));
|
10, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_PANTS, LLWearableType::WT_SHOES, LLWearableType::WT_SOCKS, LLWearableType::WT_JACKET, LLWearableType::WT_UNDERPANTS, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA, LLWearableType::WT_UNIVERSAL));
|
||||||
|
|
||||||
addEntry(BAKED_EYES, new BakedEntry(TEX_EYES_BAKED,
|
addEntry(BAKED_EYES, new BakedEntry(TEX_EYES_BAKED,
|
||||||
"eyes", "27b1bc0f-979f-4b13-95fe-b981c2ba9788",
|
"eyes", "27b1bc0f-979f-4b13-95fe-b981c2ba9788",
|
||||||
2, TEX_EYES_IRIS, TEX_EYES_ALPHA,
|
3, TEX_EYES_IRIS, TEX_EYES_TATTOO, TEX_EYES_ALPHA,
|
||||||
2, LLWearableType::WT_EYES, LLWearableType::WT_ALPHA));
|
3, LLWearableType::WT_EYES, LLWearableType::WT_UNIVERSAL, LLWearableType::WT_ALPHA));
|
||||||
|
|
||||||
addEntry(BAKED_SKIRT, new BakedEntry(TEX_SKIRT_BAKED,
|
addEntry(BAKED_SKIRT, new BakedEntry(TEX_SKIRT_BAKED,
|
||||||
"skirt", "03e7e8cb-1368-483b-b6f3-74850838ba63",
|
"skirt", "03e7e8cb-1368-483b-b6f3-74850838ba63",
|
||||||
1, TEX_SKIRT,
|
2, TEX_SKIRT, TEX_SKIRT_TATTOO,
|
||||||
1, LLWearableType::WT_SKIRT));
|
2, LLWearableType::WT_SKIRT, LLWearableType::WT_UNIVERSAL ));
|
||||||
|
|
||||||
addEntry(BAKED_HAIR, new BakedEntry(TEX_HAIR_BAKED,
|
addEntry(BAKED_HAIR, new BakedEntry(TEX_HAIR_BAKED,
|
||||||
"hair", "a60e85a9-74e8-48d8-8a2d-8129f28d9b61",
|
"hair", "a60e85a9-74e8-48d8-8a2d-8129f28d9b61",
|
||||||
2, TEX_HAIR, TEX_HAIR_ALPHA,
|
3, TEX_HAIR, TEX_HAIR_TATTOO, TEX_HAIR_ALPHA,
|
||||||
2, LLWearableType::WT_HAIR, LLWearableType::WT_ALPHA));
|
3, LLWearableType::WT_HAIR, LLWearableType::WT_UNIVERSAL, LLWearableType::WT_ALPHA));
|
||||||
|
|
||||||
|
addEntry(BAKED_LEFT_ARM, new BakedEntry(TEX_LEFT_ARM_BAKED,
|
||||||
|
"leftarm", "9f39febf-22d7-0087-79d1-e9e8c6c9ed19",
|
||||||
|
1, TEX_LEFT_ARM_TATTOO,
|
||||||
|
1, LLWearableType::WT_UNIVERSAL));
|
||||||
|
|
||||||
|
addEntry(BAKED_LEFT_LEG, new BakedEntry(TEX_LEFT_LEG_BAKED,
|
||||||
|
"leftleg", "054a7a58-8ed5-6386-0add-3b636fb28b78",
|
||||||
|
1, TEX_LEFT_LEG_TATTOO,
|
||||||
|
1, LLWearableType::WT_UNIVERSAL));
|
||||||
|
|
||||||
|
addEntry(BAKED_AUX1, new BakedEntry(TEX_AUX1_BAKED,
|
||||||
|
"aux1", "790c11be-b25c-c17e-b4d2-6a4ad786b752",
|
||||||
|
1, TEX_AUX1_TATTOO,
|
||||||
|
1, LLWearableType::WT_UNIVERSAL));
|
||||||
|
|
||||||
|
addEntry(BAKED_AUX2, new BakedEntry(TEX_AUX2_BAKED,
|
||||||
|
"aux2", "d78c478f-48c7-5928-5864-8d99fb1f521e",
|
||||||
|
1, TEX_AUX2_TATTOO,
|
||||||
|
1, LLWearableType::WT_UNIVERSAL));
|
||||||
|
|
||||||
|
addEntry(BAKED_AUX3, new BakedEntry(TEX_AUX3_BAKED,
|
||||||
|
"aux3", "6a95dd53-edd9-aac8-f6d3-27ed99f3c3eb",
|
||||||
|
1, TEX_AUX3_TATTOO,
|
||||||
|
1, LLWearableType::WT_UNIVERSAL));
|
||||||
}
|
}
|
||||||
|
|
||||||
LLAvatarAppearanceDictionary::MeshEntries::MeshEntries()
|
LLAvatarAppearanceDictionary::MeshEntries::MeshEntries()
|
||||||
@@ -267,3 +313,112 @@ LLWearableType::EType LLAvatarAppearanceDictionary::getTEWearableType(ETextureIn
|
|||||||
return getInstance()->getTexture(index)->mWearableType;
|
return getInstance()->getTexture(index)->mWearableType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
BOOL LLAvatarAppearanceDictionary::isBakedImageId(const LLUUID& id)
|
||||||
|
{
|
||||||
|
if ((id == IMG_USE_BAKED_EYES) || (id == IMG_USE_BAKED_HAIR) || (id == IMG_USE_BAKED_HEAD) || (id == IMG_USE_BAKED_LOWER) || (id == IMG_USE_BAKED_SKIRT) || (id == IMG_USE_BAKED_UPPER)
|
||||||
|
|| (id == IMG_USE_BAKED_LEFTARM) || (id == IMG_USE_BAKED_LEFTLEG) || (id == IMG_USE_BAKED_AUX1) || (id == IMG_USE_BAKED_AUX2) || (id == IMG_USE_BAKED_AUX3) )
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
EBakedTextureIndex LLAvatarAppearanceDictionary::assetIdToBakedTextureIndex(const LLUUID& id)
|
||||||
|
{
|
||||||
|
if (id == IMG_USE_BAKED_EYES)
|
||||||
|
{
|
||||||
|
return BAKED_EYES;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_HAIR)
|
||||||
|
{
|
||||||
|
return BAKED_HAIR;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_HEAD)
|
||||||
|
{
|
||||||
|
return BAKED_HEAD;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_LOWER)
|
||||||
|
{
|
||||||
|
return BAKED_LOWER;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_SKIRT)
|
||||||
|
{
|
||||||
|
return BAKED_SKIRT;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_UPPER)
|
||||||
|
{
|
||||||
|
return BAKED_UPPER;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_LEFTARM)
|
||||||
|
{
|
||||||
|
return BAKED_LEFT_ARM;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_LEFTLEG)
|
||||||
|
{
|
||||||
|
return BAKED_LEFT_LEG;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_AUX1)
|
||||||
|
{
|
||||||
|
return BAKED_AUX1;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_AUX2)
|
||||||
|
{
|
||||||
|
return BAKED_AUX2;
|
||||||
|
}
|
||||||
|
else if (id == IMG_USE_BAKED_AUX3)
|
||||||
|
{
|
||||||
|
return BAKED_AUX3;
|
||||||
|
}
|
||||||
|
|
||||||
|
return BAKED_NUM_INDICES;
|
||||||
|
}
|
||||||
|
|
||||||
|
//static
|
||||||
|
LLUUID LLAvatarAppearanceDictionary::localTextureIndexToMagicId(ETextureIndex t)
|
||||||
|
{
|
||||||
|
LLUUID id = LLUUID::null;
|
||||||
|
|
||||||
|
switch (t)
|
||||||
|
{
|
||||||
|
case LLAvatarAppearanceDefines::TEX_HEAD_BAKED:
|
||||||
|
id = IMG_USE_BAKED_HEAD;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_UPPER_BAKED:
|
||||||
|
id = IMG_USE_BAKED_UPPER;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_LOWER_BAKED:
|
||||||
|
id = IMG_USE_BAKED_LOWER;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_EYES_BAKED:
|
||||||
|
id = IMG_USE_BAKED_EYES;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_SKIRT_BAKED:
|
||||||
|
id = IMG_USE_BAKED_SKIRT;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_HAIR_BAKED:
|
||||||
|
id = IMG_USE_BAKED_HAIR;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_LEFT_ARM_BAKED:
|
||||||
|
id = IMG_USE_BAKED_LEFTARM;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_LEFT_LEG_BAKED:
|
||||||
|
id = IMG_USE_BAKED_LEFTLEG;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_AUX1_BAKED:
|
||||||
|
id = IMG_USE_BAKED_AUX1;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_AUX2_BAKED:
|
||||||
|
id = IMG_USE_BAKED_AUX2;
|
||||||
|
break;
|
||||||
|
case LLAvatarAppearanceDefines::TEX_AUX3_BAKED:
|
||||||
|
id = IMG_USE_BAKED_AUX3;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @file llavatarappearancedefines.h
|
* @file llavatarappearancedefines.h
|
||||||
* @brief Various LLAvatarAppearance related definitions
|
* @brief Various LLAvatarAppearance related definitions
|
||||||
@@ -78,6 +79,22 @@ enum ETextureIndex
|
|||||||
TEX_HEAD_TATTOO,
|
TEX_HEAD_TATTOO,
|
||||||
TEX_UPPER_TATTOO,
|
TEX_UPPER_TATTOO,
|
||||||
TEX_LOWER_TATTOO,
|
TEX_LOWER_TATTOO,
|
||||||
|
TEX_HEAD_UNIVERSAL_TATTOO,
|
||||||
|
TEX_UPPER_UNIVERSAL_TATTOO,
|
||||||
|
TEX_LOWER_UNIVERSAL_TATTOO,
|
||||||
|
TEX_SKIRT_TATTOO,
|
||||||
|
TEX_HAIR_TATTOO,
|
||||||
|
TEX_EYES_TATTOO,
|
||||||
|
TEX_LEFT_ARM_TATTOO,
|
||||||
|
TEX_LEFT_LEG_TATTOO,
|
||||||
|
TEX_AUX1_TATTOO,
|
||||||
|
TEX_AUX2_TATTOO,
|
||||||
|
TEX_AUX3_TATTOO,
|
||||||
|
TEX_LEFT_ARM_BAKED, // Pre-composited
|
||||||
|
TEX_LEFT_LEG_BAKED, // Pre-composited
|
||||||
|
TEX_AUX1_BAKED, // Pre-composited
|
||||||
|
TEX_AUX2_BAKED, // Pre-composited
|
||||||
|
TEX_AUX3_BAKED, // Pre-composited
|
||||||
TEX_NUM_INDICES
|
TEX_NUM_INDICES
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -89,6 +106,11 @@ enum EBakedTextureIndex
|
|||||||
BAKED_EYES,
|
BAKED_EYES,
|
||||||
BAKED_SKIRT,
|
BAKED_SKIRT,
|
||||||
BAKED_HAIR,
|
BAKED_HAIR,
|
||||||
|
BAKED_LEFT_ARM,
|
||||||
|
BAKED_LEFT_LEG,
|
||||||
|
BAKED_AUX1,
|
||||||
|
BAKED_AUX2,
|
||||||
|
BAKED_AUX3,
|
||||||
BAKED_NUM_INDICES
|
BAKED_NUM_INDICES
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -224,6 +246,9 @@ public:
|
|||||||
// Given a texture entry, determine which wearable type owns it.
|
// Given a texture entry, determine which wearable type owns it.
|
||||||
static LLWearableType::EType getTEWearableType(ETextureIndex index);
|
static LLWearableType::EType getTEWearableType(ETextureIndex index);
|
||||||
|
|
||||||
|
static BOOL isBakedImageId(const LLUUID& id);
|
||||||
|
static EBakedTextureIndex assetIdToBakedTextureIndex(const LLUUID& id);
|
||||||
|
static LLUUID localTextureIndexToMagicId(ETextureIndex t);
|
||||||
}; // End LLAvatarAppearanceDictionary
|
}; // End LLAvatarAppearanceDictionary
|
||||||
|
|
||||||
} // End namespace LLAvatarAppearanceDefines
|
} // End namespace LLAvatarAppearanceDefines
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp)
|
|||||||
{
|
{
|
||||||
LLTexLayerSet *layer_set = NULL;
|
LLTexLayerSet *layer_set = NULL;
|
||||||
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)te);
|
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)te);
|
||||||
if (texture_dict->mIsUsedByBakedTexture)
|
if (texture_dict && texture_dict->mIsUsedByBakedTexture)
|
||||||
{
|
{
|
||||||
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
|
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LL_ERRS() << "could not find layerset for LTO in wearable!" << LL_ENDL;
|
LL_WARNS() << "could not find layerset for LTO in wearable!" << LL_ENDL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,6 +438,12 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
|
|||||||
return LLWearable::FAILURE;
|
return LLWearable::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (te >= ETextureIndex::TEX_NUM_INDICES) //createLayers() converts to ETextureIndex
|
||||||
|
{
|
||||||
|
LL_WARNS() << "Bad Wearable asset: bad texture index: " << te << LL_ENDL;
|
||||||
|
return LLWearable::FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
if( !LLUUID::validate( uuid_buffer ) )
|
if( !LLUUID::validate( uuid_buffer ) )
|
||||||
{
|
{
|
||||||
LL_WARNS() << "Bad Wearable asset: bad texture uuid: "
|
LL_WARNS() << "Bad Wearable asset: bad texture uuid: "
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ LLWearableDictionary::LLWearableDictionary()
|
|||||||
addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
|
addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
|
||||||
addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
|
addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
|
||||||
addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
|
addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
|
||||||
|
addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry("universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE));
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6)
|
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6)
|
||||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
|
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
|
||||||
|
|||||||
@@ -54,10 +54,12 @@ public:
|
|||||||
WT_ALPHA = 13,
|
WT_ALPHA = 13,
|
||||||
WT_TATTOO = 14,
|
WT_TATTOO = 14,
|
||||||
WT_PHYSICS = 15,
|
WT_PHYSICS = 15,
|
||||||
WT_UNKNOWN = 16, // Singu note: used for corrupt wearables that do not have their type set in the inventory database.
|
WT_UNIVERSAL = 16,
|
||||||
|
WT_UNKNOWN = 17, // Singu note: used for corrupt wearables that do not have their type set in the inventory database.
|
||||||
// While all the above values are serialized and stored in the database, this value is local only:
|
// While all the above values are serialized and stored in the database, this value is local only:
|
||||||
// When a new item with value 16 is added by upstream, just increase this value to 17 (and WT_COUNT to 18).
|
// When a new item with value 17 is added by upstream, just increase this value to 18 (and WT_COUNT to 19).
|
||||||
WT_COUNT = 17,
|
// Keep WT_UNKNOWN and WT_COUNT in sync with llinventory.cpp
|
||||||
|
WT_COUNT = 18,
|
||||||
|
|
||||||
WT_INVALID = 255,
|
WT_INVALID = 255,
|
||||||
WT_NONE = -1,
|
WT_NONE = -1,
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
project(llaudio)
|
project(llaudio)
|
||||||
|
|
||||||
include(00-Common)
|
include(00-Common)
|
||||||
include(Audio)
|
|
||||||
include(LLAudio)
|
|
||||||
include(FMODSTUDIO)
|
include(FMODSTUDIO)
|
||||||
include(OPENAL)
|
include(OPENAL)
|
||||||
include(LLCommon)
|
include(LLCommon)
|
||||||
@@ -12,10 +10,6 @@ include(LLMath)
|
|||||||
include(LLMessage)
|
include(LLMessage)
|
||||||
include(LLVFS)
|
include(LLVFS)
|
||||||
|
|
||||||
if (FMOD)
|
|
||||||
include_directories(${FMOD_INCLUDE_DIR})
|
|
||||||
endif(FMOD)
|
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${LLAUDIO_INCLUDE_DIRS}
|
${LLAUDIO_INCLUDE_DIRS}
|
||||||
${LLCOMMON_INCLUDE_DIRS}
|
${LLCOMMON_INCLUDE_DIRS}
|
||||||
@@ -26,7 +20,7 @@ include_directories(
|
|||||||
${VORBISENC_INCLUDE_DIRS}
|
${VORBISENC_INCLUDE_DIRS}
|
||||||
${VORBISFILE_INCLUDE_DIRS}
|
${VORBISFILE_INCLUDE_DIRS}
|
||||||
${VORBIS_INCLUDE_DIRS}
|
${VORBIS_INCLUDE_DIRS}
|
||||||
${OPENAL_INCLUDE_DIRS}
|
${OPENAL_LIB_INCLUDE_DIRS}
|
||||||
${FREEAULT_LIB_INCLUDE_DIRS}
|
${FREEAULT_LIB_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -49,7 +43,10 @@ set(llaudio_HEADER_FILES
|
|||||||
llwindgen.h
|
llwindgen.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if (FMODSTUDIO)
|
if (USE_FMODSTUDIO)
|
||||||
|
include_directories(
|
||||||
|
${FMODSTUDIO_INCLUDE_DIR}
|
||||||
|
)
|
||||||
list(APPEND llaudio_SOURCE_FILES
|
list(APPEND llaudio_SOURCE_FILES
|
||||||
llaudioengine_fmodstudio.cpp
|
llaudioengine_fmodstudio.cpp
|
||||||
lllistener_fmodstudio.cpp
|
lllistener_fmodstudio.cpp
|
||||||
@@ -61,7 +58,7 @@ if (FMODSTUDIO)
|
|||||||
lllistener_fmodstudio.h
|
lllistener_fmodstudio.h
|
||||||
llstreamingaudio_fmodstudio.h
|
llstreamingaudio_fmodstudio.h
|
||||||
)
|
)
|
||||||
endif (FMODSTUDIO)
|
endif (USE_FMODSTUDIO)
|
||||||
|
|
||||||
if (OPENAL)
|
if (OPENAL)
|
||||||
list(APPEND llaudio_SOURCE_FILES
|
list(APPEND llaudio_SOURCE_FILES
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ include(Boost)
|
|||||||
include(OpenSSL)
|
include(OpenSSL)
|
||||||
include(LLSharedLibs)
|
include(LLSharedLibs)
|
||||||
include(Json)
|
include(Json)
|
||||||
include(GoogleBreakpad)
|
|
||||||
include(Copy3rdPartyLibs)
|
include(Copy3rdPartyLibs)
|
||||||
include(ZLIB)
|
include(ZLIB)
|
||||||
include(URIPARSER)
|
include(URIPARSER)
|
||||||
@@ -270,12 +269,6 @@ list(APPEND llcommon_SOURCE_FILES ${cwdebug_SOURCE_FILES})
|
|||||||
|
|
||||||
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
|
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
|
||||||
|
|
||||||
if(NOT WORD_SIZE EQUAL 32)
|
|
||||||
if(NOT WINDOWS)
|
|
||||||
add_definitions(-fPIC)
|
|
||||||
endif(NOT WINDOWS)
|
|
||||||
endif(NOT WORD_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
if(LLCOMMON_LINK_SHARED)
|
if(LLCOMMON_LINK_SHARED)
|
||||||
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
|
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
|
||||||
if(WINDOWS)
|
if(WINDOWS)
|
||||||
@@ -287,11 +280,12 @@ else(LLCOMMON_LINK_SHARED)
|
|||||||
add_library (llcommon ${llcommon_SOURCE_FILES})
|
add_library (llcommon ${llcommon_SOURCE_FILES})
|
||||||
endif(LLCOMMON_LINK_SHARED)
|
endif(LLCOMMON_LINK_SHARED)
|
||||||
|
|
||||||
|
set_target_properties(llcommon PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
llcommon
|
llcommon
|
||||||
PUBLIC
|
PUBLIC
|
||||||
absl::hash
|
absl::hash
|
||||||
${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}
|
|
||||||
${APRUTIL_LIBRARIES}
|
${APRUTIL_LIBRARIES}
|
||||||
${APR_LIBRARIES}
|
${APR_LIBRARIES}
|
||||||
${EXPAT_LIBRARIES}
|
${EXPAT_LIBRARIES}
|
||||||
@@ -306,6 +300,7 @@ target_link_libraries(
|
|||||||
${Boost_SYSTEM_LIBRARY}
|
${Boost_SYSTEM_LIBRARY}
|
||||||
${CORESERVICES_LIBRARY}
|
${CORESERVICES_LIBRARY}
|
||||||
${URIPARSER_LIBRARY}
|
${URIPARSER_LIBRARY}
|
||||||
|
${RT_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (DARWIN)
|
if (DARWIN)
|
||||||
|
|||||||
@@ -45,3 +45,15 @@ const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
|
|||||||
const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
|
const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
|
||||||
// Maintenance's group id.
|
// Maintenance's group id.
|
||||||
const LLUUID MAINTENANCE_GROUP_ID("dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd");
|
const LLUUID MAINTENANCE_GROUP_ID("dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd");
|
||||||
|
|
||||||
|
const LLUUID IMG_USE_BAKED_HEAD ("5a9f4a74-30f2-821c-b88d-70499d3e7183");
|
||||||
|
const LLUUID IMG_USE_BAKED_UPPER ("ae2de45c-d252-50b8-5c6e-19f39ce79317");
|
||||||
|
const LLUUID IMG_USE_BAKED_LOWER ("24daea5f-0539-cfcf-047f-fbc40b2786ba");
|
||||||
|
const LLUUID IMG_USE_BAKED_EYES ("52cc6bb6-2ee5-e632-d3ad-50197b1dcb8a");
|
||||||
|
const LLUUID IMG_USE_BAKED_SKIRT ("43529ce8-7faa-ad92-165a-bc4078371687");
|
||||||
|
const LLUUID IMG_USE_BAKED_HAIR ("09aac1fb-6bce-0bee-7d44-caac6dbb6c63");
|
||||||
|
const LLUUID IMG_USE_BAKED_LEFTARM ("ff62763f-d60a-9855-890b-0c96f8f8cd98");
|
||||||
|
const LLUUID IMG_USE_BAKED_LEFTLEG ("8e915e25-31d1-cc95-ae08-d58a47488251");
|
||||||
|
const LLUUID IMG_USE_BAKED_AUX1 ("9742065b-19b5-297c-858a-29711d539043");
|
||||||
|
const LLUUID IMG_USE_BAKED_AUX2 ("03642e83-2bd1-4eb9-34b4-4c47ed586d2d");
|
||||||
|
const LLUUID IMG_USE_BAKED_AUX3 ("edd51b77-fc10-ce7a-4b3d-011dfc349e4f");
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @file indra_constants.h
|
* @file indra_constants.h
|
||||||
* @brief some useful short term constants for Indra
|
* @brief some useful short term constants for Indra
|
||||||
@@ -294,6 +295,19 @@ const U32 START_LOCATION_ID_COUNT = 6;
|
|||||||
// group constants
|
// group constants
|
||||||
const U32 GROUP_MIN_SIZE = 2;
|
const U32 GROUP_MIN_SIZE = 2;
|
||||||
|
|
||||||
|
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_HEAD;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_UPPER;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_LOWER;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_EYES;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_SKIRT;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_HAIR;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_LEFTARM;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_LEFTLEG;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX1;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX2;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX3;
|
||||||
|
|
||||||
// radius within which a chat message is fully audible
|
// radius within which a chat message is fully audible
|
||||||
const F32 CHAT_WHISPER_RADIUS = 10.f;
|
const F32 CHAT_WHISPER_RADIUS = 10.f;
|
||||||
const F32 CHAT_NORMAL_RADIUS = 20.f;
|
const F32 CHAT_NORMAL_RADIUS = 20.f;
|
||||||
@@ -354,13 +368,6 @@ const U32 MAP_ITEM_CLASSIFIED = 0x08;
|
|||||||
const U32 MAP_ITEM_ADULT_EVENT = 0x09;
|
const U32 MAP_ITEM_ADULT_EVENT = 0x09;
|
||||||
const U32 MAP_ITEM_LAND_FOR_SALE_ADULT = 0x0a;
|
const U32 MAP_ITEM_LAND_FOR_SALE_ADULT = 0x0a;
|
||||||
|
|
||||||
// Crash reporter behavior
|
|
||||||
const char* const CRASH_SETTINGS_FILE = "settings_crash_behavior.xml";
|
|
||||||
const char* const CRASH_BEHAVIOR_SETTING = "CrashSubmitBehavior";
|
|
||||||
const S32 CRASH_BEHAVIOR_ASK = 0;
|
|
||||||
const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1;
|
|
||||||
const S32 CRASH_BEHAVIOR_NEVER_SEND = 2;
|
|
||||||
|
|
||||||
// Export/Import return values
|
// Export/Import return values
|
||||||
const S32 EXPORT_SUCCESS = 0;
|
const S32 EXPORT_SUCCESS = 0;
|
||||||
const S32 EXPORT_ERROR_PERMISSIONS = -1;
|
const S32 EXPORT_ERROR_PERMISSIONS = -1;
|
||||||
|
|||||||
@@ -25,9 +25,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "linden_common.h"
|
#include "linden_common.h"
|
||||||
#include "llapp.h"
|
|
||||||
|
|
||||||
#include <cstdlib>
|
#include "llapp.h"
|
||||||
|
|
||||||
#ifdef LL_DARWIN
|
#ifdef LL_DARWIN
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -45,7 +44,6 @@
|
|||||||
#include "llstl.h" // for DeletePointer()
|
#include "llstl.h" // for DeletePointer()
|
||||||
#include "llstring.h"
|
#include "llstring.h"
|
||||||
#include "lleventtimer.h"
|
#include "lleventtimer.h"
|
||||||
#include "exception_handler.h"
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Signal handling
|
// Signal handling
|
||||||
@@ -57,12 +55,6 @@
|
|||||||
|
|
||||||
LONG WINAPI default_windows_exception_handler(struct _EXCEPTION_POINTERS *exception_infop);
|
LONG WINAPI default_windows_exception_handler(struct _EXCEPTION_POINTERS *exception_infop);
|
||||||
BOOL ConsoleCtrlHandler(DWORD fdwCtrlType);
|
BOOL ConsoleCtrlHandler(DWORD fdwCtrlType);
|
||||||
bool windows_post_minidump_callback(const wchar_t* dump_path,
|
|
||||||
const wchar_t* minidump_id,
|
|
||||||
void* context,
|
|
||||||
EXCEPTION_POINTERS* exinfo,
|
|
||||||
MDRawAssertionInfo* assertion,
|
|
||||||
bool succeeded);
|
|
||||||
#else
|
#else
|
||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
# include <unistd.h> // for fork()
|
# include <unistd.h> // for fork()
|
||||||
@@ -70,18 +62,6 @@ bool windows_post_minidump_callback(const wchar_t* dump_path,
|
|||||||
void setup_signals();
|
void setup_signals();
|
||||||
void default_unix_signal_handler(int signum, siginfo_t *info, void *);
|
void default_unix_signal_handler(int signum, siginfo_t *info, void *);
|
||||||
|
|
||||||
#if LL_LINUX
|
|
||||||
#include "client/linux/handler/minidump_descriptor.h"
|
|
||||||
static bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc,
|
|
||||||
void* context,
|
|
||||||
bool succeeded);
|
|
||||||
#else
|
|
||||||
// Called by breakpad exception handler after the minidump has been generated.
|
|
||||||
bool unix_post_minidump_callback(const char *dump_dir,
|
|
||||||
const char *minidump_id,
|
|
||||||
void *context, bool succeeded);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# if LL_DARWIN
|
# if LL_DARWIN
|
||||||
/* OSX doesn't support SIGRT* */
|
/* OSX doesn't support SIGRT* */
|
||||||
S32 LL_SMACKDOWN_SIGNAL = SIGUSR1;
|
S32 LL_SMACKDOWN_SIGNAL = SIGUSR1;
|
||||||
@@ -98,7 +78,7 @@ S32 LL_HEARTBEAT_SIGNAL = (SIGRTMAX >= 0) ? (SIGRTMAX-0) : SIGUSR2;
|
|||||||
#endif // LL_WINDOWS
|
#endif // LL_WINDOWS
|
||||||
|
|
||||||
// the static application instance
|
// the static application instance
|
||||||
LLApp* LLApp::sApplication = NULL;
|
LLApp* LLApp::sApplication = nullptr;
|
||||||
|
|
||||||
// Allows the generation of core files for post mortem under gdb
|
// Allows the generation of core files for post mortem under gdb
|
||||||
// and disables crashlogger
|
// and disables crashlogger
|
||||||
@@ -110,7 +90,7 @@ BOOL LLApp::sLogInSignal = FALSE;
|
|||||||
|
|
||||||
// static
|
// static
|
||||||
LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status
|
LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status
|
||||||
LLAppErrorHandler LLApp::sErrorHandler = NULL;
|
LLAppErrorHandler LLApp::sErrorHandler = nullptr;
|
||||||
BOOL LLApp::sErrorThreadRunning = FALSE;
|
BOOL LLApp::sErrorThreadRunning = FALSE;
|
||||||
#if !LL_WINDOWS
|
#if !LL_WINDOWS
|
||||||
LLApp::child_map LLApp::sChildMap;
|
LLApp::child_map LLApp::sChildMap;
|
||||||
@@ -119,13 +99,12 @@ LLAppChildCallback LLApp::sDefaultChildCallback = NULL;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
LLApp::LLApp() : mThreadErrorp(NULL)
|
LLApp::LLApp()
|
||||||
|
: mThreadErrorp(nullptr)
|
||||||
{
|
{
|
||||||
commonCtor();
|
commonCtor();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* sCrashLoggerReserve = NULL;
|
|
||||||
|
|
||||||
void LLApp::commonCtor()
|
void LLApp::commonCtor()
|
||||||
{
|
{
|
||||||
// Set our status to running
|
// Set our status to running
|
||||||
@@ -150,34 +129,11 @@ void LLApp::commonCtor()
|
|||||||
// Set the application to this instance.
|
// Set the application to this instance.
|
||||||
sApplication = this;
|
sApplication = this;
|
||||||
|
|
||||||
mExceptionHandler = 0;
|
|
||||||
|
|
||||||
#if LL_WINDOWS
|
|
||||||
sCrashLoggerReserve = VirtualAlloc(NULL, 512*1024, MEM_COMMIT|MEM_RESERVE, PAGE_NOACCESS);
|
|
||||||
#else
|
|
||||||
sCrashLoggerReserve = malloc(512*1024);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// initialize the buffer to write the minidump filename to
|
// initialize the buffer to write the minidump filename to
|
||||||
// (this is used to avoid allocating memory in the crash handler)
|
// (this is used to avoid allocating memory in the crash handler)
|
||||||
memset(mMinidumpPath, 0, MAX_MINDUMP_PATH_LENGTH);
|
|
||||||
mCrashReportPipeStr = L"\\\\.\\pipe\\LLCrashReporterPipe";
|
mCrashReportPipeStr = L"\\\\.\\pipe\\LLCrashReporterPipe";
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LL_WINDOWS
|
|
||||||
static bool clear_CrashLoggerReserve_callback(void* context, EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion)
|
|
||||||
{
|
|
||||||
VirtualFree(sCrashLoggerReserve, 0, MEM_RELEASE);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static bool clear_CrashLoggerReserve_callback(void* context)
|
|
||||||
{
|
|
||||||
free(sCrashLoggerReserve);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LLApp::LLApp(LLErrorThread *error_thread) :
|
LLApp::LLApp(LLErrorThread *error_thread) :
|
||||||
mThreadErrorp(error_thread)
|
mThreadErrorp(error_thread)
|
||||||
{
|
{
|
||||||
@@ -198,11 +154,9 @@ LLApp::~LLApp()
|
|||||||
if (mThreadErrorp)
|
if (mThreadErrorp)
|
||||||
{
|
{
|
||||||
delete mThreadErrorp;
|
delete mThreadErrorp;
|
||||||
mThreadErrorp = NULL;
|
mThreadErrorp = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mExceptionHandler != 0) delete mExceptionHandler;
|
|
||||||
|
|
||||||
LLCommon::cleanupClass();
|
LLCommon::cleanupClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,8 +170,8 @@ LLApp* LLApp::instance()
|
|||||||
LLSD LLApp::getOption(const std::string& name) const
|
LLSD LLApp::getOption(const std::string& name) const
|
||||||
{
|
{
|
||||||
LLSD rv;
|
LLSD rv;
|
||||||
LLSD::array_const_iterator iter = mOptions.beginArray();
|
auto iter = mOptions.beginArray();
|
||||||
LLSD::array_const_iterator end = mOptions.endArray();
|
auto end = mOptions.endArray();
|
||||||
for(; iter != end; ++iter)
|
for(; iter != end; ++iter)
|
||||||
{
|
{
|
||||||
rv = (*iter)[name];
|
rv = (*iter)[name];
|
||||||
@@ -264,9 +218,9 @@ bool LLApp::parseCommandOptions(int argc, char** argv)
|
|||||||
|
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
//Windows changed command line parsing. Deal with it.
|
//Windows changed command line parsing. Deal with it.
|
||||||
S32 slen = value.length() - 1;
|
size_t slen = value.length() - 1;
|
||||||
S32 start = 0;
|
size_t start = 0;
|
||||||
S32 end = slen;
|
size_t end = slen;
|
||||||
if (argv[ii][start]=='"')start++;
|
if (argv[ii][start]=='"')start++;
|
||||||
if (argv[ii][end]=='"')end--;
|
if (argv[ii][end]=='"')end--;
|
||||||
if (start!=0 || end!=slen)
|
if (start!=0 || end!=slen)
|
||||||
@@ -343,92 +297,17 @@ void LLApp::setupErrorHandling()
|
|||||||
// Error handling is done by starting up an error handling thread, which just sleeps and
|
// Error handling is done by starting up an error handling thread, which just sleeps and
|
||||||
// occasionally checks to see if the app is in an error state, and sees if it needs to be run.
|
// occasionally checks to see if the app is in an error state, and sees if it needs to be run.
|
||||||
|
|
||||||
#if LL_WINDOWS
|
#if !LL_WINDOWS
|
||||||
|
|
||||||
#if LL_SEND_CRASH_REPORTS
|
|
||||||
EnableCrashingOnCrashes();
|
|
||||||
|
|
||||||
// This sets a callback to handle w32 signals to the console window.
|
|
||||||
// The viewer shouldn't be affected, sicne its a windowed app.
|
|
||||||
SetConsoleCtrlHandler( (PHANDLER_ROUTINE) ConsoleCtrlHandler, TRUE);
|
|
||||||
|
|
||||||
// Install the Google Breakpad crash handler for Windows
|
|
||||||
if(mExceptionHandler == 0)
|
|
||||||
{
|
|
||||||
mExceptionHandler = new google_breakpad::ExceptionHandler(
|
|
||||||
std::wstring(mDumpPath.begin(),mDumpPath.end()), //Dump path
|
|
||||||
clear_CrashLoggerReserve_callback,
|
|
||||||
windows_post_minidump_callback,
|
|
||||||
0,
|
|
||||||
google_breakpad::ExceptionHandler::HANDLER_ALL);
|
|
||||||
if (mExceptionHandler)
|
|
||||||
{
|
|
||||||
mExceptionHandler->set_handle_debug_exceptions(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
//
|
//
|
||||||
// Start up signal handling.
|
// Start up signal handling.
|
||||||
//
|
//
|
||||||
// There are two different classes of signals. Synchronous signals are delivered to a specific
|
// There are two different classes of signals. Synchronous signals are delivered to a specific
|
||||||
// thread, asynchronous signals can be delivered to any thread (in theory)
|
// thread, asynchronous signals can be delivered to any thread (in theory)
|
||||||
//
|
//
|
||||||
|
|
||||||
setup_signals();
|
setup_signals();
|
||||||
|
#endif // ! LL_WINDOWS
|
||||||
// Add google breakpad exception handler configured for Darwin/Linux.
|
#if !defined(USE_CRASHPAD)
|
||||||
bool installHandler = true;
|
startErrorThread();
|
||||||
#if LL_DARWIN
|
|
||||||
// For the special case of Darwin, we do not want to install the handler if
|
|
||||||
// the process is being debugged as the app will exit with value ABRT (6) if
|
|
||||||
// we do. Unfortunately, the code below which performs that test relies on
|
|
||||||
// the structure kinfo_proc which has been tagged by apple as an unstable
|
|
||||||
// API. We disable this test for shipping versions to avoid conflicts with
|
|
||||||
// future releases of Darwin. This test is really only needed for developers
|
|
||||||
// starting the app from a debugger anyway.
|
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
|
||||||
int mib[4];
|
|
||||||
mib[0] = CTL_KERN;
|
|
||||||
mib[1] = KERN_PROC;
|
|
||||||
mib[2] = KERN_PROC_PID;
|
|
||||||
mib[3] = getpid();
|
|
||||||
|
|
||||||
struct kinfo_proc info;
|
|
||||||
memset(&info, 0, sizeof(info));
|
|
||||||
|
|
||||||
size_t size = sizeof(info);
|
|
||||||
int result = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
|
|
||||||
if((result == 0) || (errno == ENOMEM))
|
|
||||||
{
|
|
||||||
// P_TRACED flag is set, so this process is being debugged; do not install
|
|
||||||
// the handler
|
|
||||||
if(info.kp_proc.p_flag & P_TRACED) installHandler = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Failed to discover if the process is being debugged; default to
|
|
||||||
// installing the handler.
|
|
||||||
installHandler = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(installHandler && (mExceptionHandler == 0))
|
|
||||||
{
|
|
||||||
mExceptionHandler = new google_breakpad::ExceptionHandler(mDumpPath, clear_CrashLoggerReserve_callback, &unix_post_minidump_callback, 0, true, 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#elif LL_LINUX
|
|
||||||
if(installHandler && (mExceptionHandler == 0))
|
|
||||||
{
|
|
||||||
if (mDumpPath.empty())
|
|
||||||
{
|
|
||||||
mDumpPath = "/tmp";
|
|
||||||
}
|
|
||||||
google_breakpad::MinidumpDescriptor desc(mDumpPath);
|
|
||||||
mExceptionHandler = new google_breakpad::ExceptionHandler(desc, clear_CrashLoggerReserve_callback, unix_minidump_callback, NULL, true, -1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -466,7 +345,6 @@ void LLApp::setErrorHandler(LLAppErrorHandler handler)
|
|||||||
LLApp::sErrorHandler = handler;
|
LLApp::sErrorHandler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLApp::runErrorHandler()
|
void LLApp::runErrorHandler()
|
||||||
{
|
{
|
||||||
@@ -479,7 +357,6 @@ void LLApp::runErrorHandler()
|
|||||||
LLApp::setStopped();
|
LLApp::setStopped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLApp::setStatus(EAppStatus status)
|
void LLApp::setStatus(EAppStatus status)
|
||||||
{
|
{
|
||||||
@@ -494,43 +371,12 @@ void LLApp::setError()
|
|||||||
setStatus(APP_STATUS_ERROR);
|
setStatus(APP_STATUS_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLApp::setMiniDumpDir(const std::string &path)
|
|
||||||
{
|
|
||||||
if (path.empty())
|
|
||||||
{
|
|
||||||
mDumpPath = "/tmp";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mDumpPath = path;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(mExceptionHandler == 0) return;
|
|
||||||
#ifdef LL_WINDOWS
|
|
||||||
wchar_t buffer[MAX_MINDUMP_PATH_LENGTH];
|
|
||||||
mbstowcs(buffer, mDumpPath.c_str(), MAX_MINDUMP_PATH_LENGTH);
|
|
||||||
mExceptionHandler->set_dump_path(std::wstring(buffer));
|
|
||||||
#elif LL_LINUX
|
|
||||||
//google_breakpad::MinidumpDescriptor desc("/tmp"); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.
|
|
||||||
google_breakpad::MinidumpDescriptor desc(mDumpPath); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.
|
|
||||||
mExceptionHandler->set_minidump_descriptor(desc);
|
|
||||||
#else
|
|
||||||
mExceptionHandler->set_dump_path(mDumpPath);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLApp::setDebugFileNames(const std::string &path)
|
void LLApp::setDebugFileNames(const std::string &path)
|
||||||
{
|
{
|
||||||
mStaticDebugFileName = path + "static_debug_info.log";
|
mStaticDebugFileName = path + "static_debug_info.log";
|
||||||
mDynamicDebugFileName = path + "dynamic_debug_info.log";
|
mDynamicDebugFileName = path + "dynamic_debug_info.log";
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLApp::writeMiniDump()
|
|
||||||
{
|
|
||||||
if(mExceptionHandler == 0) return;
|
|
||||||
mExceptionHandler->WriteMinidump();
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLApp::setQuitting()
|
void LLApp::setQuitting()
|
||||||
{
|
{
|
||||||
@@ -585,13 +431,6 @@ bool LLApp::isExiting()
|
|||||||
|
|
||||||
void LLApp::disableCrashlogger()
|
void LLApp::disableCrashlogger()
|
||||||
{
|
{
|
||||||
// Disable Breakpad exception handler.
|
|
||||||
if (mExceptionHandler != 0)
|
|
||||||
{
|
|
||||||
delete mExceptionHandler;
|
|
||||||
mExceptionHandler = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
sDisableCrashlogger = TRUE;
|
sDisableCrashlogger = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -660,12 +499,6 @@ LONG WINAPI default_windows_exception_handler(struct _EXCEPTION_POINTERS *except
|
|||||||
ms_sleep(10);
|
ms_sleep(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Generate a minidump if we can.
|
|
||||||
//
|
|
||||||
// TODO: This needs to be ported over form the viewer-specific
|
|
||||||
// LLWinDebug class
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// At this point, we always want to exit the app. There's no graceful
|
// At this point, we always want to exit the app. There's no graceful
|
||||||
// recovery for an unhandled exception.
|
// recovery for an unhandled exception.
|
||||||
@@ -965,150 +798,4 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LL_LINUX
|
|
||||||
bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc, void* context, bool succeeded)
|
|
||||||
{
|
|
||||||
// Copy minidump file path into fixed buffer in the app instance to avoid
|
|
||||||
// heap allocations in a crash handler.
|
|
||||||
|
|
||||||
// path format: <dump_dir>/<minidump_id>.dmp
|
|
||||||
|
|
||||||
//HACK: *path points to the buffer in getMiniDumpFilename which has already allocated space
|
|
||||||
//to avoid doing allocation during crash.
|
|
||||||
char * path = LLApp::instance()->getMiniDumpFilename();
|
|
||||||
int dir_path_len = strlen(path);
|
|
||||||
|
|
||||||
// The path must not be truncated.
|
|
||||||
S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH - dir_path_len;
|
|
||||||
|
|
||||||
llassert( (remaining - strlen(minidump_desc.path())) > 5);
|
|
||||||
|
|
||||||
path += dir_path_len;
|
|
||||||
|
|
||||||
if (dir_path_len > 0 && path[-1] != '/')
|
|
||||||
{
|
|
||||||
*path++ = '/';
|
|
||||||
--remaining;
|
|
||||||
}
|
|
||||||
|
|
||||||
strncpy(path, minidump_desc.path(), remaining);
|
|
||||||
|
|
||||||
LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
|
|
||||||
LLApp::runErrorHandler();
|
|
||||||
|
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
|
||||||
clear_signals();
|
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
bool unix_post_minidump_callback(const char *dump_dir,
|
|
||||||
const char *minidump_id,
|
|
||||||
void *context, bool succeeded)
|
|
||||||
{
|
|
||||||
// Copy minidump file path into fixed buffer in the app instance to avoid
|
|
||||||
// heap allocations in a crash handler.
|
|
||||||
|
|
||||||
// path format: <dump_dir>/<minidump_id>.dmp
|
|
||||||
int dirPathLength = strlen(dump_dir);
|
|
||||||
int idLength = strlen(minidump_id);
|
|
||||||
|
|
||||||
// The path must not be truncated.
|
|
||||||
llassert((dirPathLength + idLength + 5) <= LLApp::MAX_MINDUMP_PATH_LENGTH);
|
|
||||||
|
|
||||||
char * path = LLApp::instance()->getMiniDumpFilename();
|
|
||||||
S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH;
|
|
||||||
strncpy(path, dump_dir, remaining);
|
|
||||||
remaining -= dirPathLength;
|
|
||||||
path += dirPathLength;
|
|
||||||
if (remaining > 0 && dirPathLength > 0 && path[-1] != '/')
|
|
||||||
{
|
|
||||||
*path++ = '/';
|
|
||||||
--remaining;
|
|
||||||
}
|
|
||||||
if (remaining > 0)
|
|
||||||
{
|
|
||||||
strncpy(path, minidump_id, remaining);
|
|
||||||
remaining -= idLength;
|
|
||||||
path += idLength;
|
|
||||||
strncpy(path, ".dmp", remaining);
|
|
||||||
}
|
|
||||||
|
|
||||||
LL_INFOS() << "generated minidump: " << path << LL_ENDL;
|
|
||||||
LLApp::runErrorHandler();
|
|
||||||
|
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
|
||||||
clear_signals();
|
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif // !WINDOWS
|
#endif // !WINDOWS
|
||||||
|
|
||||||
#ifdef LL_WINDOWS
|
|
||||||
bool windows_post_minidump_callback(const wchar_t* dump_path,
|
|
||||||
const wchar_t* minidump_id,
|
|
||||||
void* context,
|
|
||||||
EXCEPTION_POINTERS* exinfo,
|
|
||||||
MDRawAssertionInfo* assertion,
|
|
||||||
bool succeeded)
|
|
||||||
{
|
|
||||||
char * path = LLApp::instance()->getMiniDumpFilename();
|
|
||||||
S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH;
|
|
||||||
size_t bytesUsed;
|
|
||||||
|
|
||||||
bytesUsed = wcstombs(path, dump_path, static_cast<size_t>(remaining));
|
|
||||||
remaining -= bytesUsed;
|
|
||||||
path += bytesUsed;
|
|
||||||
if(remaining > 0 && bytesUsed > 0 && path[-1] != '\\')
|
|
||||||
{
|
|
||||||
*path++ = '\\';
|
|
||||||
--remaining;
|
|
||||||
}
|
|
||||||
if(remaining > 0)
|
|
||||||
{
|
|
||||||
bytesUsed = wcstombs(path, minidump_id, static_cast<size_t>(remaining));
|
|
||||||
remaining -= bytesUsed;
|
|
||||||
path += bytesUsed;
|
|
||||||
}
|
|
||||||
if(remaining > 0)
|
|
||||||
{
|
|
||||||
strncpy(path, ".dmp", remaining);
|
|
||||||
}
|
|
||||||
|
|
||||||
LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL;
|
|
||||||
// *NOTE:Mani - this code is stolen from LLApp, where its never actually used.
|
|
||||||
//OSMessageBox("Attach Debugger Now", "Error", OSMB_OK);
|
|
||||||
// *TODO: Translate the signals/exceptions into cross-platform stuff
|
|
||||||
// Windows implementation
|
|
||||||
LL_INFOS() << "Entering Windows Exception Handler..." << LL_ENDL;
|
|
||||||
|
|
||||||
if (LLApp::isError())
|
|
||||||
{
|
|
||||||
LL_WARNS() << "Got another fatal signal while in the error handler, die now!" << LL_ENDL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flag status to error, so thread_error starts its work
|
|
||||||
LLApp::setError();
|
|
||||||
|
|
||||||
// Block in the exception handler until the app has stopped
|
|
||||||
// This is pretty sketchy, but appears to work just fine
|
|
||||||
while (!LLApp::isStopped())
|
|
||||||
{
|
|
||||||
ms_sleep(10);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -60,10 +60,6 @@ public:
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace google_breakpad {
|
|
||||||
class ExceptionHandler; // See exception_handler.h
|
|
||||||
}
|
|
||||||
|
|
||||||
class LL_COMMON_API LLApp : public LLOptionInterface
|
class LL_COMMON_API LLApp : public LLOptionInterface
|
||||||
{
|
{
|
||||||
friend class LLErrorThread;
|
friend class LLErrorThread;
|
||||||
@@ -233,22 +229,11 @@ public:
|
|||||||
static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred.
|
static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred.
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
// the maximum length of the minidump filename returned by getMiniDumpFilename()
|
|
||||||
static const U32 MAX_MINDUMP_PATH_LENGTH = 256;
|
|
||||||
|
|
||||||
// change the directory where Breakpad minidump files are written to
|
|
||||||
void setMiniDumpDir(const std::string &path);
|
|
||||||
void setDebugFileNames(const std::string &path);
|
void setDebugFileNames(const std::string &path);
|
||||||
|
|
||||||
// Return the Google Breakpad minidump filename after a crash.
|
|
||||||
char *getMiniDumpFilename() { return mMinidumpPath; }
|
|
||||||
std::string* getStaticDebugFile() { return &mStaticDebugFileName; }
|
std::string* getStaticDebugFile() { return &mStaticDebugFileName; }
|
||||||
std::string* getDynamicDebugFile() { return &mDynamicDebugFileName; }
|
std::string* getDynamicDebugFile() { return &mDynamicDebugFileName; }
|
||||||
|
|
||||||
// Write out a Google Breakpad minidump file.
|
|
||||||
void writeMiniDump();
|
|
||||||
|
|
||||||
|
|
||||||
#if !LL_WINDOWS
|
#if !LL_WINDOWS
|
||||||
//
|
//
|
||||||
// Child process handling (Unix only for now)
|
// Child process handling (Unix only for now)
|
||||||
@@ -281,8 +266,6 @@ protected:
|
|||||||
static BOOL sDisableCrashlogger; // Let the OS handle crashes for us.
|
static BOOL sDisableCrashlogger; // Let the OS handle crashes for us.
|
||||||
std::wstring mCrashReportPipeStr; //Name of pipe to use for crash reporting.
|
std::wstring mCrashReportPipeStr; //Name of pipe to use for crash reporting.
|
||||||
|
|
||||||
std::string mDumpPath; //output path for google breakpad. Dependency workaround.
|
|
||||||
|
|
||||||
#if !LL_WINDOWS
|
#if !LL_WINDOWS
|
||||||
static LLAtomicU32* sSigChildCount; // Number of SIGCHLDs received.
|
static LLAtomicU32* sSigChildCount; // Number of SIGCHLDs received.
|
||||||
typedef std::map<pid_t, LLChildInfo> child_map; // Map key is a PID
|
typedef std::map<pid_t, LLChildInfo> child_map; // Map key is a PID
|
||||||
@@ -290,16 +273,13 @@ protected:
|
|||||||
static LLAppChildCallback sDefaultChildCallback;
|
static LLAppChildCallback sDefaultChildCallback;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void startErrorThread();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This method is called at the end, just prior to deinitializing curl.
|
* @brief This method is called at the end, just prior to deinitializing curl.
|
||||||
*/
|
*/
|
||||||
void stopErrorThread();
|
void stopErrorThread();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Contains the filename of the minidump file after a crash.
|
void startErrorThread();
|
||||||
char mMinidumpPath[MAX_MINDUMP_PATH_LENGTH];
|
|
||||||
|
|
||||||
std::string mStaticDebugFileName;
|
std::string mStaticDebugFileName;
|
||||||
std::string mDynamicDebugFileName;
|
std::string mDynamicDebugFileName;
|
||||||
@@ -323,11 +303,8 @@ private:
|
|||||||
std::vector<LLLiveFile*> mLiveFiles;
|
std::vector<LLLiveFile*> mLiveFiles;
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
private:
|
|
||||||
// the static application instance if it was created.
|
// the static application instance if it was created.
|
||||||
static LLApp* sApplication;
|
static LLApp* sApplication;
|
||||||
google_breakpad::ExceptionHandler * mExceptionHandler;
|
|
||||||
|
|
||||||
|
|
||||||
#if !LL_WINDOWS
|
#if !LL_WINDOWS
|
||||||
friend void default_unix_signal_handler(int signum, siginfo_t *info, void *);
|
friend void default_unix_signal_handler(int signum, siginfo_t *info, void *);
|
||||||
|
|||||||
@@ -1338,7 +1338,7 @@ namespace LLError
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
// VC80 was optimizing the error away.
|
// MSVC is optimizing the error away.
|
||||||
#pragma optimize("", off)
|
#pragma optimize("", off)
|
||||||
#endif
|
#endif
|
||||||
void crashAndLoop(const std::string& message)
|
void crashAndLoop(const std::string& message)
|
||||||
@@ -1347,9 +1347,8 @@ namespace LLError
|
|||||||
DoutFatal(dc::core, message);
|
DoutFatal(dc::core, message);
|
||||||
#else
|
#else
|
||||||
// Now, we go kaboom!
|
// Now, we go kaboom!
|
||||||
int* make_me_crash = NULL;
|
int* make_me_crash = nullptr;
|
||||||
|
*make_me_crash = 0xDEADBEEF;
|
||||||
*make_me_crash = 0;
|
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,38 +103,46 @@ void LLMemory::initMaxHeapSizeGB(F32Gigabytes max_heap_size, BOOL prevent_heap_f
|
|||||||
void LLMemory::updateMemoryInfo()
|
void LLMemory::updateMemoryInfo()
|
||||||
{
|
{
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
HANDLE self = GetCurrentProcess();
|
PROCESS_MEMORY_COUNTERS_EX counters;
|
||||||
PROCESS_MEMORY_COUNTERS counters;
|
counters.cb = sizeof(counters);
|
||||||
|
|
||||||
if (!GetProcessMemoryInfo(self, &counters, sizeof(counters)))
|
if (!GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS*) &counters, sizeof(counters)))
|
||||||
{
|
{
|
||||||
LL_WARNS() << "GetProcessMemoryInfo failed" << LL_ENDL;
|
LL_WARNS() << "GetProcessMemoryInfo failed" << LL_ENDL;
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sAllocatedMemInKB = (U32Bytes)(counters.WorkingSetSize) ;
|
sAllocatedMemInKB = U64Bytes(counters.WorkingSetSize);
|
||||||
sAllocatedPageSizeInKB = (U32Bytes)(counters.PagefileUsage) ;
|
sAllocatedPageSizeInKB = (counters.PagefileUsage != 0) ? U64Bytes(counters.PagefileUsage) : U64Bytes(counters.PrivateUsage);
|
||||||
|
|
||||||
U32Kilobytes avail_phys, avail_virtual;
|
MEMORYSTATUSEX memorystat;
|
||||||
LLMemoryInfo::getAvailableMemoryKB(avail_phys, avail_virtual) ;
|
memorystat.dwLength = sizeof(memorystat);
|
||||||
sMaxPhysicalMemInKB = llmin(avail_phys + sAllocatedMemInKB, sMaxHeapSizeInKB);
|
if (!GlobalMemoryStatusEx(&memorystat))
|
||||||
|
|
||||||
if(sMaxPhysicalMemInKB > sAllocatedMemInKB)
|
|
||||||
{
|
{
|
||||||
sAvailPhysicalMemInKB = sMaxPhysicalMemInKB - sAllocatedMemInKB ;
|
LL_WARNS() << "GlobalMemoryStatusEx failed" << LL_ENDL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#if (defined(_WIN64) || defined(__amd64__) || defined(__x86_64__))
|
||||||
|
sMaxPhysicalMemInKB = U64Bytes(memorystat.ullTotalPhys);
|
||||||
|
sAvailPhysicalMemInKB = U64Bytes(memorystat.ullAvailPhys);
|
||||||
|
#else
|
||||||
|
sMaxPhysicalMemInKB = llmin(U32Kilobytes(U64Bytes(memorystat.ullTotalPhys)), sMaxHeapSizeInKB);
|
||||||
|
if (sMaxPhysicalMemInKB > sAllocatedMemInKB)
|
||||||
|
{
|
||||||
|
sAvailPhysicalMemInKB = U64Bytes(memorystat.ullAvailPhys);;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sAvailPhysicalMemInKB = U32Kilobytes(0);
|
sAvailPhysicalMemInKB = U32Kilobytes(0);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
//not valid for other systems for now.
|
|
||||||
sAllocatedMemInKB = (U32Bytes)LLMemory::getCurrentRSS();
|
|
||||||
sMaxPhysicalMemInKB = (U32Bytes)U32_MAX ;
|
|
||||||
sAvailPhysicalMemInKB = (U32Bytes)U32_MAX ;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ;
|
#else
|
||||||
|
//not valid for other systems for now.
|
||||||
|
sAllocatedMemInKB = U64Bytes(LLMemory::getCurrentRSS());
|
||||||
|
sMaxPhysicalMemInKB = U64Bytes(U32_MAX);
|
||||||
|
sAvailPhysicalMemInKB = U64Bytes(U32_MAX);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -233,31 +241,31 @@ bool LLMemory::isMemoryPoolLow()
|
|||||||
//static
|
//static
|
||||||
U32Kilobytes LLMemory::getAvailableMemKB()
|
U32Kilobytes LLMemory::getAvailableMemKB()
|
||||||
{
|
{
|
||||||
return sAvailPhysicalMemInKB ;
|
return sAvailPhysicalMemInKB;
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
U32Kilobytes LLMemory::getMaxMemKB()
|
U32Kilobytes LLMemory::getMaxMemKB()
|
||||||
{
|
{
|
||||||
return sMaxPhysicalMemInKB ;
|
return sMaxPhysicalMemInKB;
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
U32Kilobytes LLMemory::getAllocatedMemKB()
|
U32Kilobytes LLMemory::getAllocatedMemKB()
|
||||||
{
|
{
|
||||||
return sAllocatedMemInKB ;
|
return sAllocatedMemInKB;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(LL_WINDOWS)
|
#if defined(LL_WINDOWS)
|
||||||
|
|
||||||
|
//static
|
||||||
U64 LLMemory::getCurrentRSS()
|
U64 LLMemory::getCurrentRSS()
|
||||||
{
|
{
|
||||||
HANDLE self = GetCurrentProcess();
|
|
||||||
PROCESS_MEMORY_COUNTERS counters;
|
PROCESS_MEMORY_COUNTERS counters;
|
||||||
|
|
||||||
if (!GetProcessMemoryInfo(self, &counters, sizeof(counters)))
|
if (!GetProcessMemoryInfo(GetCurrentProcess(), &counters, sizeof(counters)))
|
||||||
{
|
{
|
||||||
LL_WARNS() << "GetProcessMemoryInfo failed" << LL_ENDL;
|
LL_WARNS() << "GetProcessMemoryInfo failed" << LL_ENDL;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -266,35 +274,7 @@ U64 LLMemory::getCurrentRSS()
|
|||||||
return counters.WorkingSetSize;
|
return counters.WorkingSetSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
|
||||||
U32 LLMemory::getWorkingSetSize()
|
|
||||||
{
|
|
||||||
PROCESS_MEMORY_COUNTERS pmc ;
|
|
||||||
U32 ret = 0 ;
|
|
||||||
|
|
||||||
if (GetProcessMemoryInfo( GetCurrentProcess(), &pmc, sizeof(pmc)) )
|
|
||||||
{
|
|
||||||
ret = pmc.WorkingSetSize ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret ;
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(LL_DARWIN)
|
#elif defined(LL_DARWIN)
|
||||||
|
|
||||||
/*
|
|
||||||
The API used here is not capable of dealing with 64-bit memory sizes, but is available before 10.4.
|
|
||||||
|
|
||||||
Once we start requiring 10.4, we can use the updated API, which looks like this:
|
|
||||||
|
|
||||||
task_basic_info_64_data_t basicInfo;
|
|
||||||
mach_msg_type_number_t basicInfoCount = TASK_BASIC_INFO_64_COUNT;
|
|
||||||
if (task_info(mach_task_self(), TASK_BASIC_INFO_64, (task_info_t)&basicInfo, &basicInfoCount) == KERN_SUCCESS)
|
|
||||||
|
|
||||||
Of course, this doesn't gain us anything unless we start building the viewer as a 64-bit executable, since that's the only way
|
|
||||||
for our memory allocation to exceed 2^32.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// if (sysctl(ctl, 2, &page_size, &size, NULL, 0) == -1)
|
// if (sysctl(ctl, 2, &page_size, &size, NULL, 0) == -1)
|
||||||
// {
|
// {
|
||||||
// LL_WARNS() << "Couldn't get page size" << LL_ENDL;
|
// LL_WARNS() << "Couldn't get page size" << LL_ENDL;
|
||||||
@@ -307,16 +287,15 @@ U32 LLMemory::getWorkingSetSize()
|
|||||||
U64 LLMemory::getCurrentRSS()
|
U64 LLMemory::getCurrentRSS()
|
||||||
{
|
{
|
||||||
U64 residentSize = 0;
|
U64 residentSize = 0;
|
||||||
task_basic_info_data_t basicInfo;
|
mach_task_basic_info_data_t basicInfo;
|
||||||
mach_msg_type_number_t basicInfoCount = TASK_BASIC_INFO_COUNT;
|
mach_msg_type_number_t basicInfoCount = MACH_TASK_BASIC_INFO_COUNT;
|
||||||
if (task_info(mach_task_self(), TASK_BASIC_INFO, (task_info_t)&basicInfo, &basicInfoCount) == KERN_SUCCESS)
|
if (task_info(mach_task_self(), MACH_TASK_BASIC_INFO, (task_info_t)&basicInfo, &basicInfoCount) == KERN_SUCCESS)
|
||||||
{
|
{
|
||||||
residentSize = basicInfo.resident_size;
|
// residentSize = basicInfo.resident_size;
|
||||||
|
// Although this method is defined to return the "resident set size,"
|
||||||
// If we ever wanted it, the process virtual size is also available as:
|
// in fact what callers want from it is the total virtual memory
|
||||||
// virtualSize = basicInfo.virtual_size;
|
// consumed by the application.
|
||||||
|
residentSize = basicInfo.virtual_size;
|
||||||
// LL_INFOS() << "resident size is " << residentSize << LL_ENDL;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -326,11 +305,6 @@ U64 LLMemory::getCurrentRSS()
|
|||||||
return residentSize;
|
return residentSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 LLMemory::getWorkingSetSize()
|
|
||||||
{
|
|
||||||
return 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(LL_LINUX)
|
#elif defined(LL_LINUX)
|
||||||
|
|
||||||
U64 LLMemory::getCurrentRSS()
|
U64 LLMemory::getCurrentRSS()
|
||||||
@@ -342,7 +316,7 @@ U64 LLMemory::getCurrentRSS()
|
|||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
{
|
{
|
||||||
LL_WARNS() << "couldn't open " << statPath << LL_ENDL;
|
LL_WARNS() << "couldn't open " << statPath << LL_ENDL;
|
||||||
goto bail;
|
return rss;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Eee-yew! See Documentation/filesystems/proc.txt in your
|
// Eee-yew! See Documentation/filesystems/proc.txt in your
|
||||||
@@ -361,49 +335,8 @@ U64 LLMemory::getCurrentRSS()
|
|||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
bail:
|
|
||||||
return rss;
|
return rss;
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 LLMemory::getWorkingSetSize()
|
|
||||||
{
|
|
||||||
return 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif LL_SOLARIS
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#define _STRUCTURED_PROC 1
|
|
||||||
#include <sys/procfs.h>
|
|
||||||
|
|
||||||
U64 LLMemory::getCurrentRSS()
|
|
||||||
{
|
|
||||||
char path [LL_MAX_PATH]; /* Flawfinder: ignore */
|
|
||||||
|
|
||||||
sprintf(path, "/proc/%d/psinfo", (int)getpid());
|
|
||||||
int proc_fd = -1;
|
|
||||||
if((proc_fd = open(path, O_RDONLY)) == -1){
|
|
||||||
LL_WARNS() << "LLmemory::getCurrentRSS() unable to open " << path << ". Returning 0 RSS!" << LL_ENDL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
psinfo_t proc_psinfo;
|
|
||||||
if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
|
|
||||||
LL_WARNS() << "LLmemory::getCurrentRSS() Unable to read from " << path << ". Returning 0 RSS!" << LL_ENDL;
|
|
||||||
close(proc_fd);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
close(proc_fd);
|
|
||||||
|
|
||||||
return((U64)proc_psinfo.pr_rssize * 1024);
|
|
||||||
}
|
|
||||||
|
|
||||||
U32 LLMemory::getWorkingSetSize()
|
|
||||||
{
|
|
||||||
return 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
U64 LLMemory::getCurrentRSS()
|
U64 LLMemory::getCurrentRSS()
|
||||||
@@ -411,11 +344,6 @@ U64 LLMemory::getCurrentRSS()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 LLMemory::getWorkingSetSize()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -427,7 +355,7 @@ LLMemTracker* LLMemTracker::sInstance = NULL ;
|
|||||||
|
|
||||||
LLMemTracker::LLMemTracker()
|
LLMemTracker::LLMemTracker()
|
||||||
{
|
{
|
||||||
mLastAllocatedMem = LLMemory::getWorkingSetSize() ;
|
mLastAllocatedMem = LLMemory::getCurrentRSS() ;
|
||||||
mCapacity = 128 ;
|
mCapacity = 128 ;
|
||||||
mCurIndex = 0 ;
|
mCurIndex = 0 ;
|
||||||
mCounter = 0 ;
|
mCounter = 0 ;
|
||||||
@@ -480,7 +408,7 @@ void LLMemTracker::track(const char* function, const int line)
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 allocated_mem = LLMemory::getWorkingSetSize() ;
|
U64 allocated_mem = LLMemory::getCurrentRSS() ;
|
||||||
|
|
||||||
LLMutexLock lock(mMutexp) ;
|
LLMutexLock lock(mMutexp) ;
|
||||||
|
|
||||||
|
|||||||
@@ -133,11 +133,15 @@ template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)
|
|||||||
#if defined(LL_WINDOWS)
|
#if defined(LL_WINDOWS)
|
||||||
return _aligned_malloc(size, align);
|
return _aligned_malloc(size, align);
|
||||||
#else
|
#else
|
||||||
|
char* aligned = NULL;
|
||||||
void* mem = malloc( size + (align - 1) + sizeof(void*) );
|
void* mem = malloc( size + (align - 1) + sizeof(void*) );
|
||||||
char* aligned = ((char*)mem) + sizeof(void*);
|
if (mem)
|
||||||
aligned += align - ((uintptr_t)aligned & (align - 1));
|
{
|
||||||
|
aligned = ((char*)mem) + sizeof(void*);
|
||||||
|
aligned += align - ((uintptr_t)aligned & (align - 1));
|
||||||
|
|
||||||
((void**)aligned)[-1] = mem;
|
((void**)aligned)[-1] = mem;
|
||||||
|
}
|
||||||
return aligned;
|
return aligned;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -365,7 +369,6 @@ public:
|
|||||||
// Return the resident set size of the current process, in bytes.
|
// Return the resident set size of the current process, in bytes.
|
||||||
// Return value is zero if not known.
|
// Return value is zero if not known.
|
||||||
static U64 getCurrentRSS();
|
static U64 getCurrentRSS();
|
||||||
static U32 getWorkingSetSize();
|
|
||||||
static void* tryToAlloc(void* address, U32 size);
|
static void* tryToAlloc(void* address, U32 size);
|
||||||
static void initMaxHeapSizeGB(F32Gigabytes max_heap_size, BOOL prevent_heap_failure);
|
static void initMaxHeapSizeGB(F32Gigabytes max_heap_size, BOOL prevent_heap_failure);
|
||||||
static void updateMemoryInfo() ;
|
static void updateMemoryInfo() ;
|
||||||
|
|||||||
@@ -385,9 +385,9 @@ public:
|
|||||||
using an arbitrary pointer or scalar type to std::string.
|
using an arbitrary pointer or scalar type to std::string.
|
||||||
*/
|
*/
|
||||||
//@{
|
//@{
|
||||||
LLSD(const void*); ///< construct from aribrary pointers
|
LLSD(const void*) = delete; ///< construct from aribrary pointers
|
||||||
void assign(const void*); ///< assign from arbitrary pointers
|
void assign(const void*) = delete; ///< assign from arbitrary pointers
|
||||||
LLSD& operator=(const void*); ///< assign from arbitrary pointers
|
LLSD& operator=(const void*) = delete; ///< assign from arbitrary pointers
|
||||||
|
|
||||||
bool has(Integer) const; ///< has() only works for Maps
|
bool has(Integer) const; ///< has() only works for Maps
|
||||||
//@}
|
//@}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
|
|||||||
fail_if_not_legacy = true;
|
fail_if_not_legacy = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strncasecmp(LEGACY_NON_HEADER, hdr_buf, strlen(LEGACY_NON_HEADER))) /* Flawfinder: ignore */
|
if (!strnicmp(LEGACY_NON_HEADER, hdr_buf, strlen(LEGACY_NON_HEADER))) /* Flawfinder: ignore */
|
||||||
{
|
{
|
||||||
legacy_no_header = true;
|
legacy_no_header = true;
|
||||||
inbuf = (int)str.gcount();
|
inbuf = (int)str.gcount();
|
||||||
@@ -141,9 +141,8 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
|
|||||||
}
|
}
|
||||||
header = hdr_buf;
|
header = hdr_buf;
|
||||||
|
|
||||||
std::string::size_type start = std::string::npos;
|
std::string::size_type start = header.find_first_not_of("<? ");
|
||||||
std::string::size_type end = std::string::npos;
|
std::string::size_type end = std::string::npos;
|
||||||
start = header.find_first_not_of("<? ");
|
|
||||||
if (start != std::string::npos)
|
if (start != std::string::npos)
|
||||||
{
|
{
|
||||||
end = header.find_first_of(" ?", start);
|
end = header.find_first_of(" ?", start);
|
||||||
@@ -1304,8 +1303,8 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool need_comma = false;
|
bool need_comma = false;
|
||||||
LLSD::map_const_iterator iter = data.beginMap();
|
auto iter = data.beginMap();
|
||||||
LLSD::map_const_iterator end = data.endMap();
|
auto end = data.endMap();
|
||||||
for(; iter != end; ++iter)
|
for(; iter != end; ++iter)
|
||||||
{
|
{
|
||||||
if(need_comma) ostr << ",";
|
if(need_comma) ostr << ",";
|
||||||
@@ -1323,8 +1322,8 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
|
|||||||
{
|
{
|
||||||
ostr << post << pre << "[";
|
ostr << post << pre << "[";
|
||||||
bool need_comma = false;
|
bool need_comma = false;
|
||||||
LLSD::array_const_iterator iter = data.beginArray();
|
auto iter = data.beginArray();
|
||||||
LLSD::array_const_iterator end = data.endArray();
|
auto end = data.endArray();
|
||||||
for(; iter != end; ++iter)
|
for(; iter != end; ++iter)
|
||||||
{
|
{
|
||||||
if(need_comma) ostr << ",";
|
if(need_comma) ostr << ",";
|
||||||
@@ -1392,22 +1391,22 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
|
|||||||
// *FIX: memory inefficient.
|
// *FIX: memory inefficient.
|
||||||
const std::vector<U8>& buffer = data.asBinary();
|
const std::vector<U8>& buffer = data.asBinary();
|
||||||
ostr << "b(" << buffer.size() << ")\"";
|
ostr << "b(" << buffer.size() << ")\"";
|
||||||
if(buffer.size())
|
if(!buffer.empty())
|
||||||
{
|
{
|
||||||
if (options & LLSDFormatter::OPTIONS_PRETTY_BINARY)
|
if (options & LLSDFormatter::OPTIONS_PRETTY_BINARY)
|
||||||
{
|
{
|
||||||
std::ios_base::fmtflags old_flags = ostr.flags();
|
std::ios_base::fmtflags old_flags = ostr.flags();
|
||||||
ostr.setf( std::ios::hex, std::ios::basefield );
|
ostr.setf( std::ios::hex, std::ios::basefield );
|
||||||
ostr << "0x";
|
ostr << "0x";
|
||||||
for (size_t i = 0; i < buffer.size(); i++)
|
for (unsigned char i : buffer)
|
||||||
{
|
{
|
||||||
ostr << (int) buffer[i];
|
ostr << static_cast<int>(i);
|
||||||
}
|
}
|
||||||
ostr.flags(old_flags);
|
ostr.flags(old_flags);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ostr.write((const char*)&buffer[0], buffer.size());
|
ostr.write(reinterpret_cast<const char*>(&buffer[0]), buffer.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ostr << "\"";
|
ostr << "\"";
|
||||||
@@ -1444,9 +1443,9 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
|
|||||||
{
|
{
|
||||||
ostr.put('{');
|
ostr.put('{');
|
||||||
U32 size_nbo = htonl(data.size());
|
U32 size_nbo = htonl(data.size());
|
||||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
ostr.write(reinterpret_cast<const char*>(&size_nbo), sizeof(U32));
|
||||||
LLSD::map_const_iterator iter = data.beginMap();
|
auto iter = data.beginMap();
|
||||||
LLSD::map_const_iterator end = data.endMap();
|
auto end = data.endMap();
|
||||||
for(; iter != end; ++iter)
|
for(; iter != end; ++iter)
|
||||||
{
|
{
|
||||||
ostr.put('k');
|
ostr.put('k');
|
||||||
@@ -1461,9 +1460,9 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
|
|||||||
{
|
{
|
||||||
ostr.put('[');
|
ostr.put('[');
|
||||||
U32 size_nbo = htonl(data.size());
|
U32 size_nbo = htonl(data.size());
|
||||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
ostr.write(reinterpret_cast<const char*>(&size_nbo), sizeof(U32));
|
||||||
LLSD::array_const_iterator iter = data.beginArray();
|
auto iter = data.beginArray();
|
||||||
LLSD::array_const_iterator end = data.endArray();
|
auto end = data.endArray();
|
||||||
for(; iter != end; ++iter)
|
for(; iter != end; ++iter)
|
||||||
{
|
{
|
||||||
format_count += format(*iter, ostr);
|
format_count += format(*iter, ostr);
|
||||||
@@ -1529,7 +1528,7 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
|
|||||||
const std::vector<U8>& buffer = data.asBinary();
|
const std::vector<U8>& buffer = data.asBinary();
|
||||||
U32 size_nbo = htonl(buffer.size());
|
U32 size_nbo = htonl(buffer.size());
|
||||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||||
if(buffer.size()) ostr.write((const char*)&buffer[0], buffer.size());
|
if(!buffer.empty()) ostr.write((const char*)&buffer[0], buffer.size());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1706,12 +1705,12 @@ int deserialize_string_raw(
|
|||||||
// *FIX: This is memory inefficient.
|
// *FIX: This is memory inefficient.
|
||||||
S32 len = strtol(buf + 1, NULL, 0);
|
S32 len = strtol(buf + 1, NULL, 0);
|
||||||
if((max_bytes>0)&&(len>max_bytes)) return LLSDParser::PARSE_FAILURE;
|
if((max_bytes>0)&&(len>max_bytes)) return LLSDParser::PARSE_FAILURE;
|
||||||
std::vector<char> buf;
|
std::vector<char> buf2;
|
||||||
if(len)
|
if(len)
|
||||||
{
|
{
|
||||||
buf.resize(len);
|
buf2.resize(len);
|
||||||
count += (int)fullread(istr, (char *)&buf[0], len);
|
count += (int)fullread(istr, (char *)&buf2[0], len);
|
||||||
value.assign(buf.begin(), buf.end());
|
value.assign(buf2.begin(), buf2.end());
|
||||||
}
|
}
|
||||||
c = istr.get();
|
c = istr.get();
|
||||||
++count;
|
++count;
|
||||||
@@ -2095,7 +2094,18 @@ std::string zip_llsd(LLSD& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
have = CHUNK-strm.avail_out;
|
have = CHUNK-strm.avail_out;
|
||||||
output = (U8*) realloc(output, cur_size+have);
|
U8* new_output = (U8*) realloc(output, cur_size+have);
|
||||||
|
if (new_output == NULL)
|
||||||
|
{
|
||||||
|
LL_WARNS() << "Failed to compress LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
|
||||||
|
deflateEnd(&strm);
|
||||||
|
if (output)
|
||||||
|
{
|
||||||
|
free(output);
|
||||||
|
}
|
||||||
|
return std::string();
|
||||||
|
}
|
||||||
|
output = new_output;
|
||||||
memcpy(output+cur_size, out, have);
|
memcpy(output+cur_size, out, have);
|
||||||
cur_size += have;
|
cur_size += have;
|
||||||
}
|
}
|
||||||
@@ -2114,15 +2124,6 @@ std::string zip_llsd(LLSD& data)
|
|||||||
deflateEnd(&strm);
|
deflateEnd(&strm);
|
||||||
free(output);
|
free(output);
|
||||||
|
|
||||||
#if 0 //verify results work with unzip_llsd
|
|
||||||
std::istringstream test(result);
|
|
||||||
LLSD test_sd;
|
|
||||||
if (!unzip_llsd(test_sd, test, result.size()))
|
|
||||||
{
|
|
||||||
LL_ERRS() << "Invalid compression result!" << LL_ENDL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2173,7 +2174,19 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
|
|||||||
|
|
||||||
U32 have = CHUNK-strm.avail_out;
|
U32 have = CHUNK-strm.avail_out;
|
||||||
|
|
||||||
result = (U8*) realloc(result, cur_size + have);
|
U8* new_result = (U8*)realloc(result, cur_size + have);
|
||||||
|
if (new_result == NULL)
|
||||||
|
{
|
||||||
|
LL_WARNS() << "Failed to unzip LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
|
||||||
|
inflateEnd(&strm);
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
free(result);
|
||||||
|
}
|
||||||
|
delete in;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
result = new_result;
|
||||||
memcpy(result+cur_size, out, have);
|
memcpy(result+cur_size, out, have);
|
||||||
cur_size += have;
|
cur_size += have;
|
||||||
|
|
||||||
@@ -2219,6 +2232,11 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
|
|||||||
//and trailers are different for the formats.
|
//and trailers are different for the formats.
|
||||||
U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32 size )
|
U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32 size )
|
||||||
{
|
{
|
||||||
|
if (size == 0)
|
||||||
|
{
|
||||||
|
LL_WARNS() << "No data to unzip." << LL_ENDL;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
U8* result = NULL;
|
U8* result = NULL;
|
||||||
U32 cur_size = 0;
|
U32 cur_size = 0;
|
||||||
z_stream strm;
|
z_stream strm;
|
||||||
@@ -2258,7 +2276,23 @@ U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32
|
|||||||
}
|
}
|
||||||
U32 have = CHUNK-strm.avail_out;
|
U32 have = CHUNK-strm.avail_out;
|
||||||
|
|
||||||
result = (U8*) realloc(result, cur_size + have);
|
U8* new_result = (U8*) realloc(result, cur_size + have);
|
||||||
|
if (new_result == NULL)
|
||||||
|
{
|
||||||
|
LL_WARNS() << "Failed to unzip LLSD NavMesh block: can't reallocate memory, current size: " << cur_size
|
||||||
|
<< " bytes; requested " << cur_size + have
|
||||||
|
<< " bytes; total syze: ." << size << " bytes."
|
||||||
|
<< LL_ENDL;
|
||||||
|
inflateEnd(&strm);
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
free(result);
|
||||||
|
}
|
||||||
|
delete [] in;
|
||||||
|
valid = false;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
result = new_result;
|
||||||
memcpy(result+cur_size, out, have);
|
memcpy(result+cur_size, out, have);
|
||||||
cur_size += have;
|
cur_size += have;
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int key_index = 1;
|
size_t key_index = 1;
|
||||||
while ( key_index < key_length
|
while ( key_index < key_length
|
||||||
&& keyword[key_index - 1] == c
|
&& keyword[key_index - 1] == c
|
||||||
&& input_stream.good())
|
&& input_stream.good())
|
||||||
|
|||||||
@@ -577,7 +577,7 @@ std::string utf8str_truncate(const std::string& utf8str, const S32 max_len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: RLVa-2.1.0
|
// [RLVa:KB] - Checked: RLVa-2.1.0
|
||||||
std::string utf8str_substr(const std::string& utf8str, const S32 index, const S32 max_len)
|
std::string utf8str_substr(const std::string& utf8str, const size_t index, const size_t max_len)
|
||||||
{
|
{
|
||||||
if (0 == max_len)
|
if (0 == max_len)
|
||||||
{
|
{
|
||||||
@@ -589,7 +589,7 @@ std::string utf8str_substr(const std::string& utf8str, const S32 index, const S3
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
S32 cur_char = max_len;
|
size_t cur_char = max_len;
|
||||||
|
|
||||||
// If we're ASCII, we don't need to do anything
|
// If we're ASCII, we don't need to do anything
|
||||||
if ((U8)utf8str[index + cur_char] > 0x7f)
|
if ((U8)utf8str[index + cur_char] > 0x7f)
|
||||||
@@ -648,7 +648,7 @@ void utf8str_split(std::list<std::string>& split_list, const std::string& utf8st
|
|||||||
}
|
}
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
|
||||||
std::string utf8str_symbol_truncate(const std::string& utf8str, const S32 symbol_len)
|
std::string utf8str_symbol_truncate(const std::string& utf8str, const size_t symbol_len)
|
||||||
{
|
{
|
||||||
if (0 == symbol_len)
|
if (0 == symbol_len)
|
||||||
{
|
{
|
||||||
@@ -660,7 +660,7 @@ std::string utf8str_symbol_truncate(const std::string& utf8str, const S32 symbol
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int len = 0, byteIndex = 0;
|
size_t len = 0, byteIndex = 0;
|
||||||
const char* aStr = utf8str.c_str();
|
const char* aStr = utf8str.c_str();
|
||||||
size_t origSize = utf8str.size();
|
size_t origSize = utf8str.size();
|
||||||
|
|
||||||
|
|||||||
@@ -702,28 +702,10 @@ LLMemoryInfo::LLMemoryInfo()
|
|||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LL_WINDOWS
|
|
||||||
static U32Kilobytes LLMemoryAdjustKBResult(U32Kilobytes inKB)
|
|
||||||
{
|
|
||||||
// Moved this here from llfloaterabout.cpp
|
|
||||||
|
|
||||||
//! \bug
|
|
||||||
// For some reason, the reported amount of memory is always wrong.
|
|
||||||
// The original adjustment assumes it's always off by one meg, however
|
|
||||||
// errors of as much as 2520 KB have been observed in the value
|
|
||||||
// returned from the GetMemoryStatusEx function. Here we keep the
|
|
||||||
// original adjustment from llfoaterabout.cpp until this can be
|
|
||||||
// fixed somehow.
|
|
||||||
inKB += U32Megabytes(1);
|
|
||||||
|
|
||||||
return inKB;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
|
U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
|
||||||
{
|
{
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
return LLMemoryAdjustKBResult(U32Kilobytes(mStatsMap["Total Physical KB"].asInteger()));
|
return U32Kilobytes(mStatsMap["Total Physical KB"].asInteger());
|
||||||
|
|
||||||
#elif LL_DARWIN
|
#elif LL_DARWIN
|
||||||
// This might work on Linux as well. Someone check...
|
// This might work on Linux as well. Someone check...
|
||||||
@@ -740,43 +722,22 @@ U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
|
|||||||
phys = (U64)(getpagesize()) * (U64)(get_phys_pages());
|
phys = (U64)(getpagesize()) * (U64)(get_phys_pages());
|
||||||
return U64Bytes(phys);
|
return U64Bytes(phys);
|
||||||
|
|
||||||
#elif LL_SOLARIS
|
|
||||||
U64 phys = 0;
|
|
||||||
phys = (U64)(getpagesize()) * (U64)(sysconf(_SC_PHYS_PAGES));
|
|
||||||
return U64Bytes(phys);
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
U32Bytes LLMemoryInfo::getPhysicalMemoryClamped() const
|
|
||||||
{
|
|
||||||
// Return the total physical memory in bytes, but clamp it
|
|
||||||
// to no more than U32_MAX
|
|
||||||
|
|
||||||
U32Kilobytes phys_kb = getPhysicalMemoryKB();
|
|
||||||
if (phys_kb >= U32Gigabytes(4))
|
|
||||||
{
|
|
||||||
return U32Bytes(U32_MAX);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return phys_kb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//static
|
//static
|
||||||
void LLMemoryInfo::getAvailableMemoryKB(U32Kilobytes& avail_physical_mem_kb, U32Kilobytes& avail_virtual_mem_kb)
|
void LLMemoryInfo::getAvailableMemoryKB(U32Kilobytes& avail_physical_mem_kb, U32Kilobytes& avail_virtual_mem_kb)
|
||||||
{
|
{
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
// Sigh, this shouldn't be a static method, then we wouldn't have to
|
MEMORYSTATUSEX state;
|
||||||
// reload this data separately from refresh()
|
state.dwLength = sizeof(state);
|
||||||
LLSD statsMap(loadStatsMap());
|
GlobalMemoryStatusEx(&state);
|
||||||
|
|
||||||
avail_physical_mem_kb = (U32Kilobytes)statsMap["Avail Physical KB"].asInteger();
|
avail_physical_mem_kb = U64Bytes(state.ullAvailPhys);
|
||||||
avail_virtual_mem_kb = (U32Kilobytes)statsMap["Avail Virtual KB"].asInteger();
|
avail_virtual_mem_kb = U64Bytes(state.ullAvailVirtual);
|
||||||
|
|
||||||
#elif LL_DARWIN
|
#elif LL_DARWIN
|
||||||
// mStatsMap is derived from vm_stat, look for (e.g.) "kb free":
|
// mStatsMap is derived from vm_stat, look for (e.g.) "kb free":
|
||||||
@@ -924,7 +885,7 @@ LLSD LLMemoryInfo::loadStatsMap()
|
|||||||
|
|
||||||
DWORDLONG div = 1024;
|
DWORDLONG div = 1024;
|
||||||
|
|
||||||
stats.add("Percent Memory use", state.dwMemoryLoad/div);
|
stats.add("Percent Memory use", state.dwMemoryLoad);
|
||||||
stats.add("Total Physical KB", state.ullTotalPhys/div);
|
stats.add("Total Physical KB", state.ullTotalPhys/div);
|
||||||
stats.add("Avail Physical KB", state.ullAvailPhys/div);
|
stats.add("Avail Physical KB", state.ullAvailPhys/div);
|
||||||
stats.add("Total page KB", state.ullTotalPageFile/div);
|
stats.add("Total page KB", state.ullTotalPageFile/div);
|
||||||
@@ -973,27 +934,33 @@ LLSD LLMemoryInfo::loadStatsMap()
|
|||||||
stats.add("PrivateUsage KB", pmem.PrivateUsage/div);
|
stats.add("PrivateUsage KB", pmem.PrivateUsage/div);
|
||||||
|
|
||||||
#elif LL_DARWIN
|
#elif LL_DARWIN
|
||||||
|
vm_size_t page_size_kb;
|
||||||
|
if (host_page_size(mach_host_self(), &page_size_kb) != KERN_SUCCESS)
|
||||||
|
{
|
||||||
|
LL_WARNS() << "Unable to get host page size. Using default value." << LL_ENDL;
|
||||||
|
page_size_kb = 4096;
|
||||||
|
}
|
||||||
|
|
||||||
const vm_size_t pagekb(vm_page_size / 1024);
|
page_size_kb = page_size_kb / 1024;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Collect the vm_stat's
|
// Collect the vm_stat's
|
||||||
//
|
//
|
||||||
|
|
||||||
{
|
{
|
||||||
vm_statistics_data_t vmstat;
|
vm_statistics64_data_t vmstat;
|
||||||
mach_msg_type_number_t vmstatCount = HOST_VM_INFO_COUNT;
|
mach_msg_type_number_t vmstatCount = HOST_VM_INFO64_COUNT;
|
||||||
|
|
||||||
if (host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t) &vmstat, &vmstatCount) != KERN_SUCCESS)
|
if (host_statistics64(mach_host_self(), HOST_VM_INFO64, (host_info64_t) &vmstat, &vmstatCount) != KERN_SUCCESS)
|
||||||
{
|
{
|
||||||
LL_WARNS("LLMemoryInfo") << "Unable to collect memory information" << LL_ENDL;
|
LL_WARNS("LLMemoryInfo") << "Unable to collect memory information" << LL_ENDL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stats.add("Pages free KB", pagekb * vmstat.free_count);
|
stats.add("Pages free KB", page_size_kb * vmstat.free_count);
|
||||||
stats.add("Pages active KB", pagekb * vmstat.active_count);
|
stats.add("Pages active KB", page_size_kb * vmstat.active_count);
|
||||||
stats.add("Pages inactive KB", pagekb * vmstat.inactive_count);
|
stats.add("Pages inactive KB", page_size_kb * vmstat.inactive_count);
|
||||||
stats.add("Pages wired KB", pagekb * vmstat.wire_count);
|
stats.add("Pages wired KB", page_size_kb * vmstat.wire_count);
|
||||||
|
|
||||||
stats.add("Pages zero fill", vmstat.zero_fill_count);
|
stats.add("Pages zero fill", vmstat.zero_fill_count);
|
||||||
stats.add("Page reactivations", vmstat.reactivations);
|
stats.add("Page reactivations", vmstat.reactivations);
|
||||||
@@ -1042,20 +1009,20 @@ LLSD LLMemoryInfo::loadStatsMap()
|
|||||||
//
|
//
|
||||||
|
|
||||||
{
|
{
|
||||||
task_basic_info_64_data_t taskinfo;
|
mach_task_basic_info_data_t taskinfo;
|
||||||
unsigned taskinfoSize = sizeof(taskinfo);
|
mach_msg_type_number_t task_count = MACH_TASK_BASIC_INFO_COUNT;
|
||||||
|
if (task_info(mach_task_self(), MACH_TASK_BASIC_INFO, (task_info_t) &taskinfo, &task_count) != KERN_SUCCESS)
|
||||||
if (task_info(mach_task_self(), TASK_BASIC_INFO_64, (task_info_t) &taskinfo, &taskinfoSize) != KERN_SUCCESS)
|
|
||||||
{
|
{
|
||||||
LL_WARNS("LLMemoryInfo") << "Unable to collect task information" << LL_ENDL;
|
LL_WARNS("LLMemoryInfo") << "Unable to collect task information" << LL_ENDL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stats.add("Basic suspend count", taskinfo.suspend_count);
|
stats.add("Basic virtual memory KB", taskinfo.virtual_size / 1024);
|
||||||
stats.add("Basic virtual memory KB", taskinfo.virtual_size / 1024);
|
stats.add("Basic resident memory KB", taskinfo.resident_size / 1024);
|
||||||
stats.add("Basic resident memory KB", taskinfo.resident_size / 1024);
|
stats.add("Basic max resident memory KB", taskinfo.resident_size_max / 1024);
|
||||||
stats.add("Basic new thread policy", taskinfo.policy);
|
stats.add("Basic new thread policy", taskinfo.policy);
|
||||||
}
|
stats.add("Basic suspend count", taskinfo.suspend_count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif LL_SOLARIS
|
#elif LL_SOLARIS
|
||||||
|
|||||||
@@ -114,11 +114,6 @@ public:
|
|||||||
|
|
||||||
U32Kilobytes getPhysicalMemoryKB() const;
|
U32Kilobytes getPhysicalMemoryKB() const;
|
||||||
|
|
||||||
/*! Memory size in bytes, if total memory is >= 4GB then U32_MAX will
|
|
||||||
** be returned.
|
|
||||||
*/
|
|
||||||
U32Bytes getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes
|
|
||||||
|
|
||||||
//get the available memory infomation in KiloBytes.
|
//get the available memory infomation in KiloBytes.
|
||||||
static void getAvailableMemoryKB(U32Kilobytes& avail_physical_mem_kb, U32Kilobytes& avail_virtual_mem_kb);
|
static void getAvailableMemoryKB(U32Kilobytes& avail_physical_mem_kb, U32Kilobytes& avail_virtual_mem_kb);
|
||||||
|
|
||||||
|
|||||||
@@ -1165,8 +1165,10 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
|
|||||||
// mType, these are the two asset types that are IT_WEARABLE:
|
// mType, these are the two asset types that are IT_WEARABLE:
|
||||||
static U32 AT_BODYPART = 13; // LLAssetType::AT_BODYPART
|
static U32 AT_BODYPART = 13; // LLAssetType::AT_BODYPART
|
||||||
// Viewer local values:
|
// Viewer local values:
|
||||||
static U32 WT_UNKNOWN = 16; // LLWearableType::WT_UNKNOWN
|
static U32 WT_UNKNOWN = 17; // LLWearableType::WT_UNKNOWN
|
||||||
static U32 WT_COUNT = 17; // LLWearableType::WT_COUNT
|
static U32 WT_COUNT = 18; // LLWearableType::WT_COUNT
|
||||||
|
// Keep WT_UNKNOWN and WT_COUNT
|
||||||
|
// in sync with llwearabletype.h
|
||||||
// The last 8 bits of mFlags contain the wearable type.
|
// The last 8 bits of mFlags contain the wearable type.
|
||||||
static U32 II_FLAGS_SUBTYPE_MASK = 0xff; // LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK
|
static U32 II_FLAGS_SUBTYPE_MASK = 0xff; // LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK
|
||||||
|
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ public:
|
|||||||
ICONNAME_CLOTHING_SKIRT,
|
ICONNAME_CLOTHING_SKIRT,
|
||||||
ICONNAME_CLOTHING_ALPHA,
|
ICONNAME_CLOTHING_ALPHA,
|
||||||
ICONNAME_CLOTHING_TATTOO,
|
ICONNAME_CLOTHING_TATTOO,
|
||||||
|
ICONNAME_CLOTHING_UNIVERSAL,
|
||||||
|
|
||||||
ICONNAME_ANIMATION,
|
ICONNAME_ANIMATION,
|
||||||
ICONNAME_GESTURE,
|
ICONNAME_GESTURE,
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ LLSettingsDay::validation_list_t LLSettingsDay::validationList()
|
|||||||
return validation;
|
return validation;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLSettingsDay::CycleTrack_t& LLSettingsDay::getCycleTrack(S32 track)
|
LLSettingsDay::CycleTrack_t& LLSettingsDay::getCycleTrack(size_t track)
|
||||||
{
|
{
|
||||||
static CycleTrack_t emptyTrack;
|
static CycleTrack_t emptyTrack;
|
||||||
if (mDayTracks.size() <= track)
|
if (mDayTracks.size() <= track)
|
||||||
@@ -617,7 +617,7 @@ LLSettingsDay::CycleTrack_t& LLSettingsDay::getCycleTrack(S32 track)
|
|||||||
return mDayTracks[track];
|
return mDayTracks[track];
|
||||||
}
|
}
|
||||||
|
|
||||||
const LLSettingsDay::CycleTrack_t& LLSettingsDay::getCycleTrackConst(S32 track) const
|
const LLSettingsDay::CycleTrack_t& LLSettingsDay::getCycleTrackConst(size_t track) const
|
||||||
{
|
{
|
||||||
static CycleTrack_t emptyTrack;
|
static CycleTrack_t emptyTrack;
|
||||||
if (mDayTracks.size() <= track)
|
if (mDayTracks.size() <= track)
|
||||||
|
|||||||
@@ -118,8 +118,8 @@ public:
|
|||||||
virtual LLSettingsWaterPtr_t buildWater(LLSD) const = 0;
|
virtual LLSettingsWaterPtr_t buildWater(LLSD) const = 0;
|
||||||
|
|
||||||
void setInitialized(bool value = true) { mInitialized = value; }
|
void setInitialized(bool value = true) { mInitialized = value; }
|
||||||
CycleTrack_t & getCycleTrack(S32 track);
|
CycleTrack_t & getCycleTrack(size_t track);
|
||||||
const CycleTrack_t & getCycleTrackConst(S32 track) const;
|
const CycleTrack_t & getCycleTrackConst(size_t track) const;
|
||||||
bool clearCycleTrack(S32 track);
|
bool clearCycleTrack(S32 track);
|
||||||
bool replaceCycleTrack(S32 track, const CycleTrack_t &source);
|
bool replaceCycleTrack(S32 track, const CycleTrack_t &source);
|
||||||
bool isTrackEmpty(S32 track) const;
|
bool isTrackEmpty(S32 track) const;
|
||||||
|
|||||||
@@ -6331,7 +6331,9 @@ void LLVolumeFace::allocateIndices(S32 num_indices, bool copy)
|
|||||||
S32 new_size = ((num_indices * sizeof(U16)) + 0xF) & ~0xF;
|
S32 new_size = ((num_indices * sizeof(U16)) + 0xF) & ~0xF;
|
||||||
if (copy && num_indices && mIndices && mNumIndices)
|
if (copy && num_indices && mIndices && mNumIndices)
|
||||||
{
|
{
|
||||||
|
#if !LL_USE_TCMALLOC
|
||||||
S32 old_size = ((mNumIndices * sizeof(U16)) + 0xF) & ~0xF;
|
S32 old_size = ((mNumIndices * sizeof(U16)) + 0xF) & ~0xF;
|
||||||
|
#endif
|
||||||
|
|
||||||
mIndices = (U16*)ll_aligned_realloc_16(mIndices, new_size, old_size);
|
mIndices = (U16*)ll_aligned_realloc_16(mIndices, new_size, old_size);
|
||||||
|
|
||||||
|
|||||||
@@ -227,7 +227,8 @@ target_link_libraries(
|
|||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
${CRYPTO_LIBRARIES}
|
${CRYPTO_LIBRARIES}
|
||||||
${XMLRPCEPI_LIBRARIES}
|
${XMLRPCEPI_LIBRARIES}
|
||||||
)
|
${PTHREAD_LIBRARY}
|
||||||
|
)
|
||||||
|
|
||||||
# tests
|
# tests
|
||||||
if (LL_TESTS)
|
if (LL_TESTS)
|
||||||
|
|||||||
@@ -960,5 +960,4 @@ P(webProfileResponders);
|
|||||||
P(wholeModelFeeResponder);
|
P(wholeModelFeeResponder);
|
||||||
P(wholeModelUploadResponder);
|
P(wholeModelUploadResponder);
|
||||||
P2(XMLRPCResponder, connect_40s);
|
P2(XMLRPCResponder, connect_40s);
|
||||||
P2(crashLoggerResponder, transfer_300s);
|
|
||||||
P(getUpdateInfoResponder);
|
P(getUpdateInfoResponder);
|
||||||
@@ -139,7 +139,7 @@ void LLAvatarName::fromString(const std::string& full_name)
|
|||||||
mLegacyLastName = full_name.substr(index+1);
|
mLegacyLastName = full_name.substr(index+1);
|
||||||
if (mLegacyLastName != "Resident")
|
if (mLegacyLastName != "Resident")
|
||||||
{
|
{
|
||||||
mUsername = mLegacyFirstName + "." + mLegacyLastName;
|
mUsername = mLegacyFirstName + '.' + mLegacyLastName;
|
||||||
mDisplayName = full_name;
|
mDisplayName = full_name;
|
||||||
LLStringUtil::toLower(mUsername);
|
LLStringUtil::toLower(mUsername);
|
||||||
}
|
}
|
||||||
@@ -184,7 +184,7 @@ std::string LLAvatarName::getCompleteName(bool linefeed) const
|
|||||||
name = mDisplayName;
|
name = mDisplayName;
|
||||||
if (sUseUsernames)
|
if (sUseUsernames)
|
||||||
{
|
{
|
||||||
name += (linefeed ? "\n(" : " (") + mUsername + ")";
|
name += (linefeed ? "\n(" : " (") + mUsername + ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,7 +238,7 @@ std::string LLAvatarName::getUserName() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
name = mLegacyFirstName + " " + mLegacyLastName;
|
name = mLegacyFirstName + ' ' + mLegacyLastName;
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public:
|
|||||||
{
|
{
|
||||||
case 1 : return getCompleteName();
|
case 1 : return getCompleteName();
|
||||||
case 2 : return getDisplayName();
|
case 2 : return getDisplayName();
|
||||||
case 3 : return getLegacyName() + (mIsDisplayNameDefault ? "" : " (" + mDisplayName + ")"); break;
|
case 3 : return getLegacyName() + (mIsDisplayNameDefault ? "" : " (" + mDisplayName + ')'); break;
|
||||||
default : return getLegacyName();
|
default : return getLegacyName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ include(LLCommon)
|
|||||||
include(LLMath)
|
include(LLMath)
|
||||||
include(LLMessage)
|
include(LLMessage)
|
||||||
include(LLRender)
|
include(LLRender)
|
||||||
|
include(Boost)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${LLCOMMON_INCLUDE_DIRS}
|
${LLCOMMON_INCLUDE_DIRS}
|
||||||
@@ -46,14 +47,6 @@ set(llplugin_HEADER_FILES
|
|||||||
set_source_files_properties(${llplugin_HEADER_FILES}
|
set_source_files_properties(${llplugin_HEADER_FILES}
|
||||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||||
|
|
||||||
if(NOT WORD_SIZE EQUAL 32)
|
|
||||||
if(WINDOWS)
|
|
||||||
# add_definitions(/FIXED:NO)
|
|
||||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
|
||||||
add_definitions(-fPIC)
|
|
||||||
endif(WINDOWS)
|
|
||||||
endif (NOT WORD_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
|
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
|
||||||
|
|
||||||
add_library (llplugin ${llplugin_SOURCE_FILES})
|
add_library (llplugin ${llplugin_SOURCE_FILES})
|
||||||
@@ -67,6 +60,8 @@ else()
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(llplugin PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
|
||||||
add_subdirectory(slplugin)
|
add_subdirectory(slplugin)
|
||||||
|
|
||||||
# # Add tests
|
# # Add tests
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
project(SLPlugin)
|
project(SLPlugin)
|
||||||
|
|
||||||
include(00-Common)
|
include(00-Common)
|
||||||
include(Linking)
|
|
||||||
include(LLCommon)
|
include(LLCommon)
|
||||||
include(LLPlugin)
|
include(LLPlugin)
|
||||||
include(Linking)
|
include(Linking)
|
||||||
@@ -69,12 +68,7 @@ target_link_libraries(SLPlugin
|
|||||||
${LLCOMMON_LIBRARIES}
|
${LLCOMMON_LIBRARIES}
|
||||||
${APRUTIL_LIBRARIES}
|
${APRUTIL_LIBRARIES}
|
||||||
${PLUGIN_API_WINDOWS_LIBRARIES}
|
${PLUGIN_API_WINDOWS_LIBRARIES}
|
||||||
)
|
${PTHREAD_LIBRARY}
|
||||||
|
|
||||||
add_dependencies(SLPlugin
|
|
||||||
${LLPLUGIN_LIBRARIES}
|
|
||||||
${LLMESSAGE_LIBRARIES}
|
|
||||||
${LLCOMMON_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (DARWIN)
|
if (DARWIN)
|
||||||
|
|||||||
@@ -42,8 +42,11 @@ LLMaterialID::LLMaterialID()
|
|||||||
|
|
||||||
LLMaterialID::LLMaterialID(const LLSD& pMaterialID)
|
LLMaterialID::LLMaterialID(const LLSD& pMaterialID)
|
||||||
{
|
{
|
||||||
llassert(pMaterialID.isBinary());
|
llassert(pMaterialID.isBinary() || pMaterialID.isUUID());
|
||||||
parseFromBinary(pMaterialID.asBinary());
|
if (pMaterialID.isUUID())
|
||||||
|
set(pMaterialID.asUUID().mData);
|
||||||
|
else
|
||||||
|
parseFromBinary(pMaterialID.asBinary());
|
||||||
}
|
}
|
||||||
|
|
||||||
LLMaterialID::LLMaterialID(const LLSD::Binary& pMaterialID)
|
LLMaterialID::LLMaterialID(const LLSD::Binary& pMaterialID)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class LLMaterialID
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLMaterialID();
|
LLMaterialID();
|
||||||
|
LLMaterialID(const LLUUID& id) { set(id.mData); }
|
||||||
LLMaterialID(const LLSD& pMaterialID);
|
LLMaterialID(const LLSD& pMaterialID);
|
||||||
LLMaterialID(const LLSD::Binary& pMaterialID);
|
LLMaterialID(const LLSD::Binary& pMaterialID);
|
||||||
LLMaterialID(const void* pMemory);
|
LLMaterialID(const void* pMemory);
|
||||||
|
|||||||
@@ -1037,14 +1037,26 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa
|
|||||||
}
|
}
|
||||||
|
|
||||||
//assign exception faces to cur_ptr
|
//assign exception faces to cur_ptr
|
||||||
if (exception_faces >= (0x1 << 7))
|
if (exception_faces >= ((U64)0x1 << 7))
|
||||||
{
|
{
|
||||||
if (exception_faces >= (0x1 << 14))
|
if (exception_faces >= ((U64)0x1 << 14))
|
||||||
{
|
{
|
||||||
if (exception_faces >= (0x1 << 21))
|
if (exception_faces >= ((U64)0x1 << 21))
|
||||||
{
|
{
|
||||||
if (exception_faces >= (0x1 << 28))
|
if (exception_faces >= ((U64)0x1 << 28))
|
||||||
{
|
{
|
||||||
|
if (exception_faces >= ((U64)0x1 << 35))
|
||||||
|
{
|
||||||
|
if (exception_faces >= ((U64)0x1 << 42))
|
||||||
|
{
|
||||||
|
if (exception_faces >= ((U64)0x1 << 49))
|
||||||
|
{
|
||||||
|
*cur_ptr++ = (U8)(((exception_faces >> 49) & 0x7F) | 0x80);
|
||||||
|
}
|
||||||
|
*cur_ptr++ = (U8)(((exception_faces >> 42) & 0x7F) | 0x80);
|
||||||
|
}
|
||||||
|
*cur_ptr++ = (U8)(((exception_faces >> 35) & 0x7F) | 0x80);
|
||||||
|
}
|
||||||
*cur_ptr++ = (U8)(((exception_faces >> 28) & 0x7F) | 0x80);
|
*cur_ptr++ = (U8)(((exception_faces >> 28) & 0x7F) | 0x80);
|
||||||
}
|
}
|
||||||
*cur_ptr++ = (U8)(((exception_faces >> 21) & 0x7F) | 0x80);
|
*cur_ptr++ = (U8)(((exception_faces >> 21) & 0x7F) | 0x80);
|
||||||
@@ -1054,6 +1066,7 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa
|
|||||||
*cur_ptr++ = (U8)(((exception_faces >> 7) & 0x7F) | 0x80);
|
*cur_ptr++ = (U8)(((exception_faces >> 7) & 0x7F) | 0x80);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
*cur_ptr++ = (U8)(exception_faces & 0x7F);
|
*cur_ptr++ = (U8)(exception_faces & 0x7F);
|
||||||
|
|
||||||
htonmemcpy(cur_ptr,data_ptr + (face_index * data_size), type, data_size);
|
htonmemcpy(cur_ptr,data_ptr + (face_index * data_size), type, data_size);
|
||||||
@@ -1112,7 +1125,7 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat
|
|||||||
// Includes information about image ID, color, scale S,T, offset S,T and rotation
|
// Includes information about image ID, color, scale S,T, offset S,T and rotation
|
||||||
BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
|
BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
|
||||||
{
|
{
|
||||||
const U32 MAX_TES = 32;
|
const U32 MAX_TES = 45;
|
||||||
|
|
||||||
U8 image_ids[MAX_TES*16];
|
U8 image_ids[MAX_TES*16];
|
||||||
U8 colors[MAX_TES*4];
|
U8 colors[MAX_TES*4];
|
||||||
@@ -1197,7 +1210,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
|
|||||||
|
|
||||||
BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
|
BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
|
||||||
{
|
{
|
||||||
const U32 MAX_TES = 32;
|
const U32 MAX_TES = 45;
|
||||||
|
|
||||||
U8 image_ids[MAX_TES*16];
|
U8 image_ids[MAX_TES*16];
|
||||||
U8 colors[MAX_TES*4];
|
U8 colors[MAX_TES*4];
|
||||||
@@ -1401,7 +1414,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
|
|||||||
{
|
{
|
||||||
// use a negative block_num to indicate a single-block read (a non-variable block)
|
// use a negative block_num to indicate a single-block read (a non-variable block)
|
||||||
S32 retval = 0;
|
S32 retval = 0;
|
||||||
const U32 MAX_TES = 32;
|
const U32 MAX_TES = 45;
|
||||||
|
|
||||||
// Avoid construction of 32 UUIDs per call
|
// Avoid construction of 32 UUIDs per call
|
||||||
static LLUUID image_ids[MAX_TES];
|
static LLUUID image_ids[MAX_TES];
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ public:
|
|||||||
// - Vir
|
// - Vir
|
||||||
struct LLTEContents
|
struct LLTEContents
|
||||||
{
|
{
|
||||||
static const U32 MAX_TES = 32;
|
static const U32 MAX_TES = 45;
|
||||||
|
|
||||||
U8 image_data[MAX_TES*16];
|
U8 image_data[MAX_TES*16];
|
||||||
U8 colors[MAX_TES*4];
|
U8 colors[MAX_TES*4];
|
||||||
|
|||||||
@@ -307,6 +307,13 @@ public:
|
|||||||
NUM_TEXTURE_CHANNELS,
|
NUM_TEXTURE_CHANNELS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum eVolumeTexIndex
|
||||||
|
{
|
||||||
|
LIGHT_TEX = 0,
|
||||||
|
SCULPT_TEX,
|
||||||
|
NUM_VOLUME_TEXTURE_CHANNELS,
|
||||||
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TRIANGLES = 0,
|
TRIANGLES = 0,
|
||||||
TRIANGLE_STRIP,
|
TRIANGLE_STRIP,
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ U64 LLVBOPool::sBytesPooled = 0;
|
|||||||
U64 LLVBOPool::sIndexBytesPooled = 0;
|
U64 LLVBOPool::sIndexBytesPooled = 0;
|
||||||
std::vector<U32> LLVBOPool::sPendingDeletions;
|
std::vector<U32> LLVBOPool::sPendingDeletions;
|
||||||
|
|
||||||
std::list<U32> LLVertexBuffer::sAvailableVAOName;
|
std::vector<U32> LLVertexBuffer::sAvailableVAOName;
|
||||||
U32 LLVertexBuffer::sCurVAOName = 1;
|
U32 LLVertexBuffer::sCurVAOName = 1;
|
||||||
|
|
||||||
U64 LLVertexBuffer::sAllocatedIndexBytes = 0;
|
U64 LLVertexBuffer::sAllocatedIndexBytes = 0;
|
||||||
@@ -480,8 +480,8 @@ U32 LLVertexBuffer::getVAOName()
|
|||||||
|
|
||||||
if (!sAvailableVAOName.empty())
|
if (!sAvailableVAOName.empty())
|
||||||
{
|
{
|
||||||
ret = sAvailableVAOName.front();
|
ret = sAvailableVAOName.back();
|
||||||
sAvailableVAOName.pop_front();
|
sAvailableVAOName.pop_back();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -998,8 +998,8 @@ void LLVertexBuffer::cleanupClass()
|
|||||||
|
|
||||||
if (!sAvailableVAOName.empty())
|
if (!sAvailableVAOName.empty())
|
||||||
{
|
{
|
||||||
glDeleteVertexArrays(1, &sAvailableVAOName.front());
|
glDeleteVertexArrays(sAvailableVAOName.size(), sAvailableVAOName.data());
|
||||||
sAvailableVAOName.pop_front();
|
sAvailableVAOName.clear();
|
||||||
}
|
}
|
||||||
sLastMask = 0;
|
sLastMask = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ public:
|
|||||||
static LLVBOPool sStreamIBOPool;
|
static LLVBOPool sStreamIBOPool;
|
||||||
static LLVBOPool sDynamicIBOPool;
|
static LLVBOPool sDynamicIBOPool;
|
||||||
|
|
||||||
static std::list<U32> sAvailableVAOName;
|
static std::vector<U32> sAvailableVAOName;
|
||||||
static U32 sCurVAOName;
|
static U32 sCurVAOName;
|
||||||
|
|
||||||
static bool sUseStreamDraw;
|
static bool sUseStreamDraw;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ include_directories(
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(llui_SOURCE_FILES
|
set(llui_SOURCE_FILES
|
||||||
|
lfidbearer.cpp
|
||||||
llaccordionctrl.cpp
|
llaccordionctrl.cpp
|
||||||
llaccordionctrltab.cpp
|
llaccordionctrltab.cpp
|
||||||
llalertdialog.cpp
|
llalertdialog.cpp
|
||||||
@@ -101,6 +102,7 @@ set(llui_HEADER_FILES
|
|||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
|
|
||||||
ailist.h
|
ailist.h
|
||||||
|
lfidbearer.h
|
||||||
llaccordionctrl.h
|
llaccordionctrl.h
|
||||||
llaccordionctrltab.h
|
llaccordionctrltab.h
|
||||||
llalertdialog.h
|
llalertdialog.h
|
||||||
|
|||||||
57
indra/llui/lfidbearer.cpp
Normal file
57
indra/llui/lfidbearer.cpp
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/* Copyright (C) 2019 Liru Færs
|
||||||
|
*
|
||||||
|
* LFIDBearer is a class that holds an ID or IDs that menus can use
|
||||||
|
*
|
||||||
|
* 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; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* 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 */
|
||||||
|
|
||||||
|
#include "linden_common.h"
|
||||||
|
#include "lfidbearer.h"
|
||||||
|
#include "llmenugl.h"
|
||||||
|
#include "lluictrlfactory.h"
|
||||||
|
|
||||||
|
const std::array<const std::string, LFIDBearer::COUNT> LFIDBearer::sMenuStrings
|
||||||
|
{
|
||||||
|
"menu_avs_list.xml" // 0
|
||||||
|
, "menu_groups_list.xml" // 1
|
||||||
|
, "menu_objects_list.xml" // 2 // Singu TODO
|
||||||
|
};
|
||||||
|
std::array<LLMenuGL*, LFIDBearer::COUNT> LFIDBearer::sMenus {};
|
||||||
|
|
||||||
|
const LFIDBearer* LFIDBearer::sActive = nullptr;
|
||||||
|
LFIDBearer::Type LFIDBearer::sActiveType = LFIDBearer::AVATAR;
|
||||||
|
|
||||||
|
void LFIDBearer::buildMenus()
|
||||||
|
{
|
||||||
|
auto& factory = LLUICtrlFactory::instance();
|
||||||
|
for (auto i = 0; i < COUNT; ++i)
|
||||||
|
sMenus[i] = factory.buildMenu(sMenuStrings[i], LLMenuGL::sMenuContainer);
|
||||||
|
}
|
||||||
|
|
||||||
|
LLMenuGL* LFIDBearer::showMenu(LLView* self, const std::string& menu_name, S32 x, S32 y, std::function<void(LLMenuGL*)> on_menu_built)
|
||||||
|
{
|
||||||
|
auto menu = LLUICtrlFactory::instance().buildMenu(menu_name, LLMenuGL::sMenuContainer);
|
||||||
|
if (on_menu_built) on_menu_built(menu);
|
||||||
|
showMenu(self, menu, x, y);
|
||||||
|
return menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LFIDBearer::showMenu(LLView* self, LLMenuGL* menu, S32 x, S32 y)
|
||||||
|
{
|
||||||
|
setActive(); // Menu listeners rely on this
|
||||||
|
menu->buildDrawLabels();
|
||||||
|
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||||
|
LLMenuGL::showPopup(self, menu, x, y);
|
||||||
|
}
|
||||||
71
indra/llui/lfidbearer.h
Normal file
71
indra/llui/lfidbearer.h
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
/* Copyright (C) 2019 Liru Færs
|
||||||
|
*
|
||||||
|
* LFIDBearer is a class that holds an ID or IDs that menus can use
|
||||||
|
* This class also bears the type of ID/IDs that it is holding
|
||||||
|
*
|
||||||
|
* 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; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* 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 */
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "lluuid.h"
|
||||||
|
|
||||||
|
class LLMenuGL;
|
||||||
|
class LLView;
|
||||||
|
|
||||||
|
struct LFIDBearer
|
||||||
|
{
|
||||||
|
enum Type : S8
|
||||||
|
{
|
||||||
|
MULTIPLE = -2,
|
||||||
|
NONE = -1,
|
||||||
|
AVATAR = 0,
|
||||||
|
GROUP,
|
||||||
|
OBJECT,
|
||||||
|
COUNT
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual ~LFIDBearer() { if (sActive == this) sActive = nullptr; }
|
||||||
|
virtual LLUUID getStringUUIDSelectedItem() const = 0;
|
||||||
|
virtual uuid_vec_t getSelectedIDs() const { return { getStringUUIDSelectedItem() }; }
|
||||||
|
virtual S32 getNumSelected() const { return getStringUUIDSelectedItem().notNull(); }
|
||||||
|
virtual Type getSelectedType() const { return AVATAR; }
|
||||||
|
|
||||||
|
template<typename T> static const T* getActive() { return static_cast<const T*>(sActive); }
|
||||||
|
static LLUUID getActiveSelectedID() { return sActive->getStringUUIDSelectedItem(); }
|
||||||
|
static uuid_vec_t getActiveSelectedIDs() { return sActive->getSelectedIDs(); }
|
||||||
|
static S32 getActiveNumSelected() { return sActive->getNumSelected(); }
|
||||||
|
static const Type& getActiveType() { return sActiveType; }
|
||||||
|
|
||||||
|
void setActive() const
|
||||||
|
{
|
||||||
|
sActive = this;
|
||||||
|
sActiveType = getSelectedType();
|
||||||
|
//sActiveIDs or even some kinda hybrid map, if Type is MULTIPLE fill the vals? and remove a buncha virtual functions?
|
||||||
|
}
|
||||||
|
|
||||||
|
static void buildMenus();
|
||||||
|
LLMenuGL* showMenu(LLView* self, const std::string& menu_name, S32 x, S32 y, std::function<void(LLMenuGL*)> on_menu_built = nullptr);
|
||||||
|
void showMenu(LLView* self, LLMenuGL* menu, S32 x, S32 y);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Menus that recur, such as general avatars or groups menus
|
||||||
|
static const std::array<const std::string, COUNT> sMenuStrings;
|
||||||
|
static std::array<LLMenuGL*, COUNT> sMenus;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static const LFIDBearer* sActive;
|
||||||
|
static Type sActiveType;
|
||||||
|
};
|
||||||
@@ -200,9 +200,14 @@ LLView* LLComboBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *
|
|||||||
// if we haven't already gotten a value from our control_name and
|
// if we haven't already gotten a value from our control_name and
|
||||||
// if providing user text entry or descriptive label
|
// if providing user text entry or descriptive label
|
||||||
// don't select an item under the hood
|
// don't select an item under the hood
|
||||||
if (combo_box->getControlName().empty() && !combo_box->acceptsTextInput() && combo_box->mLabel.empty())
|
if (combo_box->getControlName().empty())
|
||||||
{
|
{
|
||||||
combo_box->selectFirstItem();
|
const auto text = combo_box->acceptsTextInput();
|
||||||
|
std::string label;
|
||||||
|
if (node->getAttributeString("label", label))
|
||||||
|
text ? combo_box->setLabel(label) : (void)combo_box->mList->selectItemByLabel(label, FALSE);
|
||||||
|
else if (!text && combo_box->mLabel.empty())
|
||||||
|
combo_box->selectFirstItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
return combo_box;
|
return combo_box;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
virtual void cut() {};
|
virtual void cut() {};
|
||||||
virtual BOOL canCut() const { return FALSE; }
|
virtual BOOL canCut() const { return FALSE; }
|
||||||
|
|
||||||
virtual void copy() {};
|
virtual void copy() const {};
|
||||||
virtual BOOL canCopy() const { return FALSE; }
|
virtual BOOL canCopy() const { return FALSE; }
|
||||||
|
|
||||||
virtual void paste() {};
|
virtual void paste() {};
|
||||||
|
|||||||
@@ -43,18 +43,18 @@
|
|||||||
#include "lltimer.h"
|
#include "lltimer.h"
|
||||||
|
|
||||||
#include "llcalc.h"
|
#include "llcalc.h"
|
||||||
//#include "llclipboard.h"
|
#include "llclipboard.h"
|
||||||
#include "llcontrol.h"
|
#include "llcontrol.h"
|
||||||
#include "llbutton.h"
|
#include "llbutton.h"
|
||||||
#include "llfocusmgr.h"
|
#include "llfocusmgr.h"
|
||||||
#include "llkeyboard.h"
|
#include "llkeyboard.h"
|
||||||
|
#include "llmenugl.h"
|
||||||
#include "llrect.h"
|
#include "llrect.h"
|
||||||
#include "llresmgr.h"
|
#include "llresmgr.h"
|
||||||
#include "llstring.h"
|
#include "llstring.h"
|
||||||
#include "llwindow.h"
|
#include "llwindow.h"
|
||||||
#include "llui.h"
|
#include "llui.h"
|
||||||
#include "lluictrlfactory.h"
|
#include "lluictrlfactory.h"
|
||||||
#include "llclipboard.h"
|
|
||||||
#include "../newview/lgghunspell_wrapper.h"
|
#include "../newview/lgghunspell_wrapper.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -178,19 +178,9 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
|
|||||||
sImage = LLUI::getUIImage("sm_rounded_corners_simple.tga");
|
sImage = LLUI::getUIImage("sm_rounded_corners_simple.tga");
|
||||||
}
|
}
|
||||||
mImage = sImage;
|
mImage = sImage;
|
||||||
|
|
||||||
// make the popup menu available
|
// make the popup menu available
|
||||||
//LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_texteditor.xml", parent_view);
|
LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_texteditor.xml", LLMenuGL::sMenuContainer);
|
||||||
LLMenuGL* menu = new LLMenuGL("wot");
|
|
||||||
/*if (!menu)
|
|
||||||
{
|
|
||||||
menu = new LLMenuGL(LLStringUtil::null);
|
|
||||||
}*/
|
|
||||||
menu->addChild(new LLMenuItemCallGL("Cut", context_cut, NULL, this));
|
|
||||||
menu->addChild(new LLMenuItemCallGL("Copy", context_copy, NULL, this));
|
|
||||||
menu->addChild(new LLMenuItemCallGL("Paste", context_paste, NULL, this));
|
|
||||||
menu->addChild(new LLMenuItemCallGL("Delete", context_delete, NULL, this));
|
|
||||||
menu->addChild(new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
|
||||||
menu->addSeparator();
|
|
||||||
//menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
|
//menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
|
||||||
menu->setCanTearOff(FALSE);
|
menu->setCanTearOff(FALSE);
|
||||||
menu->setVisible(FALSE);
|
menu->setVisible(FALSE);
|
||||||
@@ -452,40 +442,9 @@ void LLLineEditor::deselect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLLineEditor::context_cut(void* data)
|
void LLLineEditor::spell_show(void* show)
|
||||||
{
|
{
|
||||||
LLLineEditor* line = (LLLineEditor*)data;
|
glggHunSpell->setSpellCheckHighlight(!!show);
|
||||||
if(line)line->cut();
|
|
||||||
}
|
|
||||||
void LLLineEditor::context_copy(void* data)
|
|
||||||
{
|
|
||||||
LLLineEditor* line = (LLLineEditor*)data;
|
|
||||||
if(line)line->copy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LLLineEditor::spell_correct(void* data)
|
|
||||||
{
|
|
||||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
|
||||||
LLLineEditor* line = tempBind->origin;
|
|
||||||
if(tempBind && line)
|
|
||||||
{
|
|
||||||
LL_INFOS() << ((LLMenuItemCallGL *)(tempBind->menuItem))->getName() << " : " << tempBind->origin->getName() << " : " << tempBind->word << LL_ENDL;
|
|
||||||
if(line)line->spellReplace(tempBind);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LLLineEditor::spell_show(void * data)
|
|
||||||
{
|
|
||||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
|
||||||
LLLineEditor* line = tempBind->origin;
|
|
||||||
|
|
||||||
if (tempBind && line)
|
|
||||||
{
|
|
||||||
BOOL show = (tempBind->word == "Show Misspellings");
|
|
||||||
glggHunSpell->setSpellCheckHighlight(show);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<S32> LLLineEditor::getMisspelledWordsPositions()
|
std::vector<S32> LLLineEditor::getMisspelledWordsPositions()
|
||||||
@@ -537,33 +496,15 @@ std::vector<S32> LLLineEditor::getMisspelledWordsPositions()
|
|||||||
|
|
||||||
void LLLineEditor::spell_add(void* data)
|
void LLLineEditor::spell_add(void* data)
|
||||||
{
|
{
|
||||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
auto self = static_cast<LLLineEditor*>(data);
|
||||||
if(tempBind)
|
S32 wordStart = 0, wordLen = 0;
|
||||||
|
if (self->getWordBoundriesAt(self->calculateCursorFromMouse(self->mLastContextMenuX), &wordStart, &wordLen))
|
||||||
{
|
{
|
||||||
glggHunSpell->addWordToCustomDictionary(tempBind->word);
|
glggHunSpell->addWordToCustomDictionary(wstring_to_utf8str(self->getWText().substr(wordStart, wordLen)));
|
||||||
tempBind->origin->mPrevSpelledText="";//make it update
|
self->mPrevSpelledText.clear(); //make it update
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLLineEditor::context_paste(void* data)
|
|
||||||
{
|
|
||||||
LLLineEditor* line = (LLLineEditor*)data;
|
|
||||||
if(line)line->paste();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLLineEditor::context_delete(void* data)
|
|
||||||
{
|
|
||||||
LLLineEditor* line = (LLLineEditor*)data;
|
|
||||||
if(line)line->doDelete();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLLineEditor::context_selectall(void* data)
|
|
||||||
{
|
|
||||||
LLLineEditor* line = (LLLineEditor*)data;
|
|
||||||
if(line)line->selectAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLLineEditor::startSelection()
|
void LLLineEditor::startSelection()
|
||||||
{
|
{
|
||||||
mIsSelecting = TRUE;
|
mIsSelecting = TRUE;
|
||||||
@@ -1178,7 +1119,7 @@ BOOL LLLineEditor::canCopy() const
|
|||||||
|
|
||||||
|
|
||||||
// copy selection to clipboard
|
// copy selection to clipboard
|
||||||
void LLLineEditor::copy()
|
void LLLineEditor::copy() const
|
||||||
{
|
{
|
||||||
if( canCopy() )
|
if( canCopy() )
|
||||||
{
|
{
|
||||||
@@ -1189,12 +1130,19 @@ void LLLineEditor::copy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLLineEditor::spellReplace(SpellMenuBind* spellData)
|
void LLLineEditor::spell_correct(void* data)
|
||||||
{
|
{
|
||||||
mText.erase(spellData->wordPositionStart,
|
auto self = static_cast<LLLineEditor*>(data);
|
||||||
spellData->wordPositionEnd - spellData->wordPositionStart);
|
S32 wordStart = 0, wordLen = 0;
|
||||||
insert(spellData->word,spellData->wordPositionStart);
|
if (self->getWordBoundriesAt(self->calculateCursorFromMouse(self->mLastContextMenuX), &wordStart, &wordLen))
|
||||||
mCursorPos+=spellData->word.length() - (spellData->wordPositionEnd-spellData->wordPositionStart);
|
{
|
||||||
|
auto word = utf8str_to_wstring(LLMenuGL::sMenuContainer->getActivatedItem()->getLabel());
|
||||||
|
LLWStringUtil::replaceTabsWithSpaces(word, 4);
|
||||||
|
|
||||||
|
self->mText.erase(wordStart, wordLen);
|
||||||
|
self->mText.insert(wordStart, word);
|
||||||
|
self->mCursorPos += word.length() - wordLen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3057,102 +3005,47 @@ void LLLineEditor::showContextMenu(S32 x, S32 y)
|
|||||||
{
|
{
|
||||||
gEditMenuHandler = this;
|
gEditMenuHandler = this;
|
||||||
|
|
||||||
/*S32 screen_x, screen_y;
|
if(menu->isOpen())
|
||||||
localPointToScreen(x, y, &screen_x, &screen_y);
|
|
||||||
menu->show(screen_x, screen_y);*/
|
|
||||||
|
|
||||||
|
|
||||||
//setCursorAtLocalPos( x);
|
|
||||||
S32 wordStart = 0;
|
|
||||||
S32 wordLen = 0;
|
|
||||||
S32 pos = calculateCursorFromMouse(x);
|
|
||||||
|
|
||||||
LLMenuGL* menu = (LLMenuGL*)mContextMenuHandle.get();
|
|
||||||
if (menu)
|
|
||||||
{
|
{
|
||||||
if(menu->isOpen())
|
menu->setVisible(FALSE);
|
||||||
{
|
|
||||||
menu->setVisible(FALSE);
|
|
||||||
}
|
|
||||||
for (int i = 0;i<(int)suggestionMenuItems.size();i++)
|
|
||||||
{
|
|
||||||
SpellMenuBind * tempBind = suggestionMenuItems[i];
|
|
||||||
if(tempBind)
|
|
||||||
{
|
|
||||||
menu->removeChild((LLMenuItemCallGL *)tempBind->menuItem);
|
|
||||||
((LLMenuItemCallGL *)tempBind->menuItem)->die();
|
|
||||||
//delete tempBind->menuItem;
|
|
||||||
//tempBind->menuItem = NULL;
|
|
||||||
delete tempBind;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
suggestionMenuItems.clear();
|
|
||||||
|
|
||||||
// spell_check="true" in xui
|
|
||||||
menu->setItemVisible("Spelsep", !mReadOnly && mSpellCheckable);
|
|
||||||
if (!mReadOnly && mSpellCheckable)
|
|
||||||
{
|
|
||||||
// search for word matches
|
|
||||||
bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordLen);
|
|
||||||
if (is_word_part)
|
|
||||||
{
|
|
||||||
const LLWString& text = mText.getWString();
|
|
||||||
std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordLen));
|
|
||||||
|
|
||||||
if (!glggHunSpell->isSpelledRight(selectedWord))
|
|
||||||
{
|
|
||||||
//misspelled word here, and you have just right clicked on it!
|
|
||||||
std::vector<std::string> suggs = glggHunSpell->getSuggestionList(selectedWord);
|
|
||||||
|
|
||||||
for (int i = 0; i<(int)suggs.size() ;i++)
|
|
||||||
{
|
|
||||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
|
||||||
tempStruct->origin = this;
|
|
||||||
tempStruct->word = suggs[i];
|
|
||||||
tempStruct->wordPositionEnd = wordStart + wordLen;
|
|
||||||
tempStruct->wordPositionStart=wordStart;
|
|
||||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
|
||||||
tempStruct->word, spell_correct, NULL, tempStruct);
|
|
||||||
//new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
|
||||||
tempStruct->menuItem = suggMenuItem;
|
|
||||||
suggestionMenuItems.push_back(tempStruct);
|
|
||||||
menu->addChild(suggMenuItem);
|
|
||||||
}
|
|
||||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
|
||||||
tempStruct->origin = this;
|
|
||||||
tempStruct->word = selectedWord;
|
|
||||||
tempStruct->wordPositionEnd = wordStart + wordLen;
|
|
||||||
tempStruct->wordPositionStart=wordStart;
|
|
||||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
|
||||||
"Add Word", spell_add, NULL, tempStruct);
|
|
||||||
tempStruct->menuItem = suggMenuItem;
|
|
||||||
suggestionMenuItems.push_back(tempStruct);
|
|
||||||
menu->addChild(suggMenuItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
|
||||||
tempStruct->origin = this;
|
|
||||||
if (glggHunSpell->getSpellCheckHighlight())
|
|
||||||
{
|
|
||||||
tempStruct->word = "Hide Misspellings";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tempStruct->word = "Show Misspellings";
|
|
||||||
}
|
|
||||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
|
||||||
tempStruct->word, spell_show, NULL, tempStruct);
|
|
||||||
tempStruct->menuItem = suggMenuItem;
|
|
||||||
suggestionMenuItems.push_back(tempStruct);
|
|
||||||
menu->addChild(suggMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
mLastContextMenuX = x;
|
|
||||||
menu->buildDrawLabels();
|
|
||||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
|
||||||
LLMenuGL::showPopup(this, menu, x, y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// spell_check="true" in xui
|
||||||
|
if (!mReadOnly && mSpellCheckable)
|
||||||
|
{
|
||||||
|
constexpr auto spell_sep = "Spell Check Sep";
|
||||||
|
// Remove everything after the separator if we added it, because menus don't autodie yet.
|
||||||
|
menu->erase(menu->find(menu->findChild<LLMenuItemGL>(spell_sep)), menu->end());
|
||||||
|
menu->addSeparator(spell_sep);
|
||||||
|
|
||||||
|
// search for word matches
|
||||||
|
S32 wordStart = 0;
|
||||||
|
S32 wordLen = 0;
|
||||||
|
S32 pos = calculateCursorFromMouse(x);
|
||||||
|
if (getWordBoundriesAt(pos, &wordStart, &wordLen))
|
||||||
|
{
|
||||||
|
const auto selectedWord = wstring_to_utf8str(getWText().substr(wordStart, wordLen));
|
||||||
|
|
||||||
|
if (!glggHunSpell->isSpelledRight(selectedWord))
|
||||||
|
{
|
||||||
|
//misspelled word here, and you have just right clicked on it!
|
||||||
|
|
||||||
|
for (const auto& word : glggHunSpell->getSuggestionList(selectedWord))
|
||||||
|
{
|
||||||
|
menu->addChild(new LLMenuItemCallGL(word, spell_correct, nullptr, this));
|
||||||
|
}
|
||||||
|
menu->addChild(new LLMenuItemCallGL("Add Word", spell_add, nullptr, this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool show = !glggHunSpell->getSpellCheckHighlight();
|
||||||
|
menu->addChild(new LLMenuItemCallGL(show ? "Show Misspellings" : "Hide Misspellings", spell_show, nullptr, show ? menu : nullptr));
|
||||||
|
}
|
||||||
|
|
||||||
|
mLastContextMenuX = x;
|
||||||
|
menu->buildDrawLabels();
|
||||||
|
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||||
|
LLMenuGL::showPopup(this, menu, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,23 +101,13 @@ public:
|
|||||||
/*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char);
|
/*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char);
|
||||||
/*virtual*/ void onMouseCaptureLost();
|
/*virtual*/ void onMouseCaptureLost();
|
||||||
|
|
||||||
struct SpellMenuBind
|
|
||||||
{
|
|
||||||
LLLineEditor* origin;
|
|
||||||
void * menuItem;
|
|
||||||
std::string word;
|
|
||||||
S32 wordPositionStart;
|
|
||||||
S32 wordPositionEnd;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual void spellReplace(SpellMenuBind* spellData);
|
|
||||||
virtual void insert(std::string what,S32 wher);
|
virtual void insert(std::string what,S32 wher);
|
||||||
|
|
||||||
// LLEditMenuHandler overrides
|
// LLEditMenuHandler overrides
|
||||||
virtual void cut();
|
virtual void cut();
|
||||||
virtual BOOL canCut() const;
|
virtual BOOL canCut() const;
|
||||||
|
|
||||||
virtual void copy();
|
void copy() const override final;
|
||||||
virtual BOOL canCopy() const;
|
virtual BOOL canCopy() const;
|
||||||
|
|
||||||
virtual void paste();
|
virtual void paste();
|
||||||
@@ -137,11 +127,6 @@ public:
|
|||||||
virtual void deselect();
|
virtual void deselect();
|
||||||
virtual BOOL canDeselect() const;
|
virtual BOOL canDeselect() const;
|
||||||
|
|
||||||
static void context_cut(void* data);
|
|
||||||
static void context_copy(void* data);
|
|
||||||
static void context_paste(void* data);
|
|
||||||
static void context_delete(void* data);
|
|
||||||
static void context_selectall(void* data);
|
|
||||||
static void spell_correct(void* data);
|
static void spell_correct(void* data);
|
||||||
static void spell_show(void* data);
|
static void spell_show(void* data);
|
||||||
static void spell_add(void* data);
|
static void spell_add(void* data);
|
||||||
@@ -309,7 +294,6 @@ protected:
|
|||||||
S32 mEndSpellHere; // the location of the last char on the screen
|
S32 mEndSpellHere; // the location of the last char on the screen
|
||||||
BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field
|
BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field
|
||||||
LLFrameTimer mSpellTimer;
|
LLFrameTimer mSpellTimer;
|
||||||
std::vector<SpellMenuBind* > suggestionMenuItems;
|
|
||||||
S32 mLastContextMenuX;
|
S32 mLastContextMenuX;
|
||||||
|
|
||||||
// line history support:
|
// line history support:
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ using namespace LLOldEvents;
|
|||||||
LLMenuHolderGL *LLMenuGL::sMenuContainer = nullptr;
|
LLMenuHolderGL *LLMenuGL::sMenuContainer = nullptr;
|
||||||
|
|
||||||
S32 MENU_BAR_HEIGHT = 0;
|
S32 MENU_BAR_HEIGHT = 0;
|
||||||
S32 MENU_BAR_WIDTH = 0;
|
|
||||||
|
|
||||||
///============================================================================
|
///============================================================================
|
||||||
/// Local function declarations, constants, enums, and typedefs
|
/// Local function declarations, constants, enums, and typedefs
|
||||||
@@ -693,16 +692,17 @@ BOOL LLMenuItemSeparatorGL::handleHover(S32 x, S32 y, MASK mask)
|
|||||||
// This class represents a vertical separator.
|
// This class represents a vertical separator.
|
||||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
class LLMenuItemVerticalSeparatorGL
|
class LLMenuItemVerticalSeparatorGL final
|
||||||
: public LLMenuItemSeparatorGL
|
: public LLMenuItemSeparatorGL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLMenuItemVerticalSeparatorGL( void );
|
LLMenuItemVerticalSeparatorGL(const std::string& name = LLStringUtil::null);
|
||||||
|
|
||||||
BOOL handleMouseDown(S32 x, S32 y, MASK mask) override { return FALSE; }
|
BOOL handleMouseDown(S32 x, S32 y, MASK mask) override { return FALSE; }
|
||||||
};
|
};
|
||||||
|
|
||||||
LLMenuItemVerticalSeparatorGL::LLMenuItemVerticalSeparatorGL( void )
|
LLMenuItemVerticalSeparatorGL::LLMenuItemVerticalSeparatorGL(const std::string& name)
|
||||||
|
: LLMenuItemSeparatorGL(name)
|
||||||
{
|
{
|
||||||
setLabel( VERTICAL_SEPARATOR_LABEL );
|
setLabel( VERTICAL_SEPARATOR_LABEL );
|
||||||
}
|
}
|
||||||
@@ -827,15 +827,15 @@ U32 LLMenuItemTearOffGL::getNominalHeight( void ) const
|
|||||||
// This class represents a blank, non-functioning item.
|
// This class represents a blank, non-functioning item.
|
||||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
class LLMenuItemBlankGL : public LLMenuItemGL
|
class LLMenuItemBlankGL final : public LLMenuItemGL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLMenuItemBlankGL( void ) : LLMenuItemGL( LLStringUtil::null, LLStringUtil::null )
|
LLMenuItemBlankGL(const std::string& name = LLStringUtil::null) : LLMenuItemGL(name, LLStringUtil::null)
|
||||||
{
|
{
|
||||||
setEnabled(FALSE);
|
setEnabled(FALSE);
|
||||||
}
|
}
|
||||||
virtual void onCommit( void ) {}
|
void onCommit() override {}
|
||||||
virtual void draw( void ) {}
|
void draw() override {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -2109,13 +2109,13 @@ LLXMLNodePtr LLMenuGL::getXML(bool save_children) const
|
|||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory *factory)
|
void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent)
|
||||||
{
|
{
|
||||||
std::string name(child->getName()->mString);
|
std::string name(child->getName()->mString);
|
||||||
if (child->hasName(LL_MENU_GL_TAG))
|
if (child->hasName(LL_MENU_GL_TAG))
|
||||||
{
|
{
|
||||||
// SUBMENU
|
// SUBMENU
|
||||||
LLMenuGL *submenu = (LLMenuGL*)LLMenuGL::fromXML(child, parent, factory);
|
LLMenuGL *submenu = (LLMenuGL*)LLMenuGL::fromXML(child, parent, LLUICtrlFactory::getInstance());
|
||||||
appendMenu(submenu);
|
appendMenu(submenu);
|
||||||
if (LLMenuGL::sMenuContainer != NULL)
|
if (LLMenuGL::sMenuContainer != NULL)
|
||||||
{
|
{
|
||||||
@@ -2193,7 +2193,7 @@ void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory
|
|||||||
{
|
{
|
||||||
mask |= MASK_SHIFT;
|
mask |= MASK_SHIFT;
|
||||||
}
|
}
|
||||||
S32 pipe_pos = shortcut.rfind("|");
|
S32 pipe_pos = shortcut.rfind('|');
|
||||||
std::string key_str = shortcut.substr(pipe_pos+1);
|
std::string key_str = shortcut.substr(pipe_pos+1);
|
||||||
|
|
||||||
KEY key = KEY_NONE;
|
KEY key = KEY_NONE;
|
||||||
@@ -2471,63 +2471,80 @@ BOOL LLMenuGL::isOpen()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// static
|
// static
|
||||||
LLView* LLMenuGL::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
LLView* LLMenuGL::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory* factory)
|
||||||
{
|
{
|
||||||
std::string name("menu");
|
std::string name("menu");
|
||||||
node->getAttributeString("name", name);
|
node->getAttributeString("name", name);
|
||||||
|
|
||||||
std::string label = name;
|
LLMenuGL* menu = new LLMenuGL(name);
|
||||||
node->getAttributeString("label", label);
|
|
||||||
|
|
||||||
LLStringUtil::format(label, LLTrans::getDefaultArgs());
|
// Menus can be extended using filename
|
||||||
|
if (node->hasAttribute("filename"))
|
||||||
// parse jump key out of label
|
|
||||||
std::string new_menu_label;
|
|
||||||
|
|
||||||
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
|
|
||||||
boost::char_separator<char> sep("_");
|
|
||||||
tokenizer tokens(label, sep);
|
|
||||||
tokenizer::iterator token_iter;
|
|
||||||
|
|
||||||
KEY jump_key = KEY_NONE;
|
|
||||||
S32 token_count = 0;
|
|
||||||
for( token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
|
|
||||||
{
|
{
|
||||||
new_menu_label += (*token_iter);
|
std::string filename;
|
||||||
if (token_count > 0)
|
node->getAttributeString("filename", filename);
|
||||||
|
LLXMLNodePtr root;
|
||||||
|
LLUICtrlFactory::getLayeredXMLNode(filename, root);
|
||||||
|
menu->initMenuXML(root, parent);
|
||||||
|
}
|
||||||
|
menu->initMenuXML(node, parent);
|
||||||
|
|
||||||
|
return menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLMenuGL::initMenuXML(LLXMLNodePtr node, LLView* parent)
|
||||||
|
{
|
||||||
|
std::string label;
|
||||||
|
if (node->getAttributeString("label", label))
|
||||||
|
{
|
||||||
|
LLStringUtil::format(label, LLTrans::getDefaultArgs());
|
||||||
|
|
||||||
|
// parse jump key out of label
|
||||||
|
std::string new_menu_label;
|
||||||
|
|
||||||
|
typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
|
||||||
|
boost::char_separator<char> sep("_");
|
||||||
|
|
||||||
|
KEY jump_key = KEY_NONE;
|
||||||
|
S32 token_count = 0;
|
||||||
|
for (auto token : tokenizer(label, sep))
|
||||||
{
|
{
|
||||||
jump_key = (*token_iter).c_str()[0];
|
new_menu_label += token;
|
||||||
|
if (token_count > 0)
|
||||||
|
{
|
||||||
|
jump_key = token.front();
|
||||||
|
}
|
||||||
|
++token_count;
|
||||||
}
|
}
|
||||||
++token_count;
|
|
||||||
|
setLabel(new_menu_label);
|
||||||
|
setJumpKey(jump_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL opaque = TRUE;
|
BOOL opaque = TRUE;
|
||||||
node->getAttributeBOOL("opaque", opaque);
|
node->getAttributeBOOL("opaque", opaque);
|
||||||
|
|
||||||
LLMenuGL *menu = new LLMenuGL(name, new_menu_label);
|
|
||||||
|
|
||||||
bool b(false);
|
bool b(false);
|
||||||
node->getAttribute_bool("scrollable", b);
|
node->getAttribute_bool("scrollable", b);
|
||||||
menu->setScrollable(b);
|
setScrollable(b);
|
||||||
|
|
||||||
menu->setJumpKey(jump_key);
|
|
||||||
|
|
||||||
BOOL tear_off = FALSE;
|
BOOL tear_off = FALSE;
|
||||||
node->getAttributeBOOL("tear_off", tear_off);
|
node->getAttributeBOOL("tear_off", tear_off);
|
||||||
menu->setCanTearOff(tear_off);
|
setCanTearOff(tear_off);
|
||||||
|
|
||||||
if (node->hasAttribute("drop_shadow"))
|
if (node->hasAttribute("drop_shadow"))
|
||||||
{
|
{
|
||||||
BOOL drop_shadow = FALSE;
|
BOOL drop_shadow = FALSE;
|
||||||
node->getAttributeBOOL("drop_shadow", drop_shadow);
|
node->getAttributeBOOL("drop_shadow", drop_shadow);
|
||||||
menu->setDropShadowed(drop_shadow);
|
setDropShadowed(drop_shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
menu->setBackgroundVisible(opaque);
|
setBackgroundVisible(opaque);
|
||||||
LLColor4 color(0,0,0,1);
|
LLColor4 color(0,0,0,1);
|
||||||
if (opaque && LLUICtrlFactory::getAttributeColor(node,"color", color))
|
if (opaque && LLUICtrlFactory::getAttributeColor(node,"color", color))
|
||||||
{
|
{
|
||||||
menu->setBackgroundColor(color);
|
setBackgroundColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL create_jump_keys = FALSE;
|
BOOL create_jump_keys = FALSE;
|
||||||
@@ -2536,14 +2553,13 @@ LLView* LLMenuGL::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *fa
|
|||||||
LLXMLNodePtr child;
|
LLXMLNodePtr child;
|
||||||
for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
|
for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
|
||||||
{
|
{
|
||||||
menu->parseChildXML(child, parent, factory);
|
parseChildXML(child, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (create_jump_keys)
|
if (create_jump_keys)
|
||||||
{
|
{
|
||||||
menu->createJumpKeys();
|
createJumpKeys();
|
||||||
}
|
}
|
||||||
return menu;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3151,12 +3167,7 @@ void LLMenuGL::erase( S32 begin, S32 end, bool arrange/* = true*/)
|
|||||||
item_list_t::iterator end_position = mItems.begin();
|
item_list_t::iterator end_position = mItems.begin();
|
||||||
std::advance(end_position, end);
|
std::advance(end_position, end);
|
||||||
|
|
||||||
for (item_list_t::iterator position_iter = start_position; position_iter != end_position; position_iter++)
|
erase(start_position, end_position);
|
||||||
{
|
|
||||||
LLUICtrl::removeChild(*position_iter);
|
|
||||||
}
|
|
||||||
|
|
||||||
mItems.erase(start_position, end_position);
|
|
||||||
|
|
||||||
if (arrange)
|
if (arrange)
|
||||||
{
|
{
|
||||||
@@ -3178,7 +3189,7 @@ void LLMenuGL::insert(S32 position, LLView* ctrl, bool arrange /*= true*/)
|
|||||||
std::advance(position_iter, position);
|
std::advance(position_iter, position);
|
||||||
insert(position_iter, item, arrange);
|
insert(position_iter, item, arrange);
|
||||||
}
|
}
|
||||||
void LLMenuGL::insert(item_list_t::iterator position_iter, LLMenuItemGL* item, bool arrange /*= true*/)
|
void LLMenuGL::insert(item_list_t::const_iterator position_iter, LLMenuItemGL* item, bool arrange /*= true*/)
|
||||||
{
|
{
|
||||||
mItems.insert(position_iter, item);
|
mItems.insert(position_iter, item);
|
||||||
LLUICtrl::addChild(item);
|
LLUICtrl::addChild(item);
|
||||||
@@ -3228,9 +3239,9 @@ BOOL LLMenuGL::append( LLMenuItemGL* item )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add a separator to this menu
|
// add a separator to this menu
|
||||||
BOOL LLMenuGL::addSeparator()
|
BOOL LLMenuGL::addSeparator(const std::string& name)
|
||||||
{
|
{
|
||||||
LLMenuItemGL* separator = new LLMenuItemSeparatorGL();
|
LLMenuItemGL* separator = new LLMenuItemSeparatorGL(name);
|
||||||
return addChild(separator);
|
return addChild(separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3317,11 +3328,6 @@ void LLMenuGL::setTornOff(BOOL torn_off)
|
|||||||
mTornOff = torn_off;
|
mTornOff = torn_off;
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 LLMenuGL::getItemCount()
|
|
||||||
{
|
|
||||||
return mItems.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
LLMenuItemGL* LLMenuGL::getItem(S32 number)
|
LLMenuItemGL* LLMenuGL::getItem(S32 number)
|
||||||
{
|
{
|
||||||
if (number >= 0 && number < (S32)mItems.size())
|
if (number >= 0 && number < (S32)mItems.size())
|
||||||
@@ -4182,10 +4188,10 @@ S32 LLMenuBarGL::getRightmostMenuEdge()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add a vertical separator to this menu
|
// add a vertical separator to this menu
|
||||||
BOOL LLMenuBarGL::addSeparator()
|
BOOL LLMenuBarGL::addSeparator(const std::string& name)
|
||||||
{
|
{
|
||||||
LLMenuItemGL* separator = new LLMenuItemVerticalSeparatorGL();
|
LLMenuItemGL* separator = new LLMenuItemVerticalSeparatorGL(name);
|
||||||
return append( separator );
|
return append(separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add a menu - this will create a drop down menu.
|
// add a menu - this will create a drop down menu.
|
||||||
@@ -4776,7 +4782,7 @@ void LLContextMenu::initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
parseChildXML(child, context, factory);
|
parseChildXML(child, context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5346,9 +5352,9 @@ BOOL LLPieMenu::append(LLMenuItemGL *item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
BOOL LLPieMenu::addSeparator()
|
BOOL LLPieMenu::addSeparator(const std::string& name)
|
||||||
{
|
{
|
||||||
return append( new LLMenuItemBlankGL() );
|
return append(new LLMenuItemBlankGL(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
|
|
||||||
|
|
||||||
extern S32 MENU_BAR_HEIGHT;
|
extern S32 MENU_BAR_HEIGHT;
|
||||||
extern S32 MENU_BAR_WIDTH;
|
|
||||||
|
|
||||||
// These callbacks are used by the LLMenuItemCallGL and LLMenuItemCheckGL
|
// These callbacks are used by the LLMenuItemCallGL and LLMenuItemCheckGL
|
||||||
// classes during their work.
|
// classes during their work.
|
||||||
@@ -458,8 +457,9 @@ public:
|
|||||||
virtual ~LLMenuGL( void );
|
virtual ~LLMenuGL( void );
|
||||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||||
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
||||||
|
void initMenuXML(LLXMLNodePtr node, LLView* parent);
|
||||||
|
|
||||||
void parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory *factory);
|
void parseChildXML(LLXMLNodePtr child, LLView *parent);
|
||||||
|
|
||||||
// LLView Functionality
|
// LLView Functionality
|
||||||
/*virtual*/ BOOL handleUnicodeCharHere( llwchar uni_char );
|
/*virtual*/ BOOL handleUnicodeCharHere( llwchar uni_char );
|
||||||
@@ -490,7 +490,7 @@ public:
|
|||||||
void setCanTearOff(BOOL tear_off);
|
void setCanTearOff(BOOL tear_off);
|
||||||
|
|
||||||
// add a separator to this menu
|
// add a separator to this menu
|
||||||
virtual BOOL addSeparator();
|
virtual BOOL addSeparator(const std::string& name = LLStringUtil::null);
|
||||||
|
|
||||||
// for branching menu items, bring sub menus up to root level of menu hierarchy
|
// for branching menu items, bring sub menus up to root level of menu hierarchy
|
||||||
virtual void updateParent( LLView* parentp );
|
virtual void updateParent( LLView* parentp );
|
||||||
@@ -527,16 +527,31 @@ public:
|
|||||||
|
|
||||||
// erase group of items from menu
|
// erase group of items from menu
|
||||||
void erase(S32 begin, S32 end, bool arrange = true);
|
void erase(S32 begin, S32 end, bool arrange = true);
|
||||||
|
typedef std::list<LLMenuItemGL*> item_list_t;
|
||||||
|
inline item_list_t::iterator erase(item_list_t::const_iterator first, item_list_t::const_iterator last)
|
||||||
|
{
|
||||||
|
for (auto it = first; it != last; ++it)
|
||||||
|
LLUICtrl::removeChild(*it);
|
||||||
|
return mItems.erase(first, last);
|
||||||
|
}
|
||||||
|
|
||||||
// add new item at position
|
// add new item at position
|
||||||
void insert(S32 begin, LLView* ctrl, bool arrange = true);
|
void insert(S32 begin, LLView* ctrl, bool arrange = true);
|
||||||
void insert(std::list<LLMenuItemGL*>::iterator position_iter, LLMenuItemGL* item, bool arrange = true);
|
void insert(item_list_t::const_iterator position_iter, LLMenuItemGL* item, bool arrange = true);
|
||||||
|
|
||||||
// find an item's position
|
// find an item's position
|
||||||
std::list<LLMenuItemGL*>::iterator find(LLMenuItemGL* item) { return std::find(mItems.begin(), mItems.end(), item); }
|
item_list_t::const_iterator find(LLMenuItemGL* item) const { return std::find(mItems.begin(), mItems.end(), item); }
|
||||||
|
|
||||||
|
// end of items, for use with other members that return an iterator
|
||||||
|
item_list_t::const_iterator end() const { return mItems.cend(); }
|
||||||
|
|
||||||
|
// get list of items
|
||||||
|
const item_list_t& getItems() const { return mItems; }
|
||||||
|
|
||||||
|
// number of menu items
|
||||||
|
item_list_t::size_type getItemCount() const { return mItems.size(); }
|
||||||
|
|
||||||
void setItemLastSelected(LLMenuItemGL* item); // must be in menu
|
void setItemLastSelected(LLMenuItemGL* item); // must be in menu
|
||||||
U32 getItemCount(); // number of menu items
|
|
||||||
LLMenuItemGL* getItem(S32 number); // 0 = first item
|
LLMenuItemGL* getItem(S32 number); // 0 = first item
|
||||||
LLMenuItemGL* getHighlightedItem();
|
LLMenuItemGL* getHighlightedItem();
|
||||||
|
|
||||||
@@ -580,18 +595,19 @@ public:
|
|||||||
void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
|
void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
|
||||||
bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
|
bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
|
||||||
protected:
|
protected:
|
||||||
friend class LLTextEditor;
|
|
||||||
void createSpilloverBranch();
|
void createSpilloverBranch();
|
||||||
void cleanupSpilloverBranch();
|
void cleanupSpilloverBranch();
|
||||||
|
|
||||||
|
public:
|
||||||
// Add the menu item to this menu.
|
// Add the menu item to this menu.
|
||||||
virtual BOOL append( LLMenuItemGL* item );
|
virtual BOOL append( LLMenuItemGL* item );
|
||||||
|
|
||||||
// add a menu - this will create a cascading menu
|
// add a menu - this will create a cascading menu
|
||||||
virtual BOOL appendMenu( LLMenuGL* menu );
|
virtual BOOL appendMenu( LLMenuGL* menu );
|
||||||
|
|
||||||
// TODO: create accessor methods for these?
|
protected:
|
||||||
typedef std::list< LLMenuItemGL* > item_list_t;
|
|
||||||
item_list_t mItems;
|
item_list_t mItems;
|
||||||
|
// TODO: create accessor methods for these?
|
||||||
LLMenuItemGL*mFirstVisibleItem;
|
LLMenuItemGL*mFirstVisibleItem;
|
||||||
LLMenuItemGL *mArrowUpItem, *mArrowDownItem;
|
LLMenuItemGL *mArrowUpItem, *mArrowDownItem;
|
||||||
|
|
||||||
@@ -762,7 +778,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
virtual BOOL append(LLMenuItemGL* item);
|
virtual BOOL append(LLMenuItemGL* item);
|
||||||
public:
|
public:
|
||||||
virtual BOOL addSeparator();
|
virtual BOOL addSeparator(const std::string& name = LLStringUtil::null) override final;
|
||||||
|
|
||||||
virtual void arrange( void );
|
virtual void arrange( void );
|
||||||
|
|
||||||
@@ -842,7 +858,7 @@ public:
|
|||||||
/*virtual*/ BOOL jumpKeysActive();
|
/*virtual*/ BOOL jumpKeysActive();
|
||||||
|
|
||||||
// add a vertical separator to this menu
|
// add a vertical separator to this menu
|
||||||
virtual BOOL addSeparator();
|
virtual BOOL addSeparator(const std::string& name = LLStringUtil::null) override final;
|
||||||
|
|
||||||
// LLView Functionality
|
// LLView Functionality
|
||||||
virtual BOOL handleHover( S32 x, S32 y, MASK mask );
|
virtual BOOL handleHover( S32 x, S32 y, MASK mask );
|
||||||
@@ -894,6 +910,7 @@ public:
|
|||||||
LLView*const getVisibleMenu() const;
|
LLView*const getVisibleMenu() const;
|
||||||
virtual BOOL hasVisibleMenu() const {return getVisibleMenu() != NULL;}
|
virtual BOOL hasVisibleMenu() const {return getVisibleMenu() != NULL;}
|
||||||
|
|
||||||
|
static LLMenuItemGL* getActivatedItem() { return static_cast<LLMenuItemGL*>(sItemLastSelectedHandle.get()); }
|
||||||
static void setActivatedItem(LLMenuItemGL* item);
|
static void setActivatedItem(LLMenuItemGL* item);
|
||||||
|
|
||||||
// Need to detect if mouse-up after context menu spawn has moved.
|
// Need to detect if mouse-up after context menu spawn has moved.
|
||||||
|
|||||||
@@ -801,7 +801,7 @@ LLView* LLScrollContainer::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFa
|
|||||||
panelp = new LLPanel(std::string("dummy"), LLRect::null, FALSE);
|
panelp = new LLPanel(std::string("dummy"), LLRect::null, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret->mScrolledView = panelp;
|
ret->addChild(panelp);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,8 +59,6 @@
|
|||||||
|
|
||||||
static LLRegisterWidget<LLScrollListCtrl> r("scroll_list");
|
static LLRegisterWidget<LLScrollListCtrl> r("scroll_list");
|
||||||
|
|
||||||
std::vector<LLMenuGL*> LLScrollListCtrl::sMenus = {}; // List menus that recur, such as general avatars or groups menus
|
|
||||||
|
|
||||||
// local structures & classes.
|
// local structures & classes.
|
||||||
struct SortScrollListItem
|
struct SortScrollListItem
|
||||||
{
|
{
|
||||||
@@ -314,7 +312,7 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
uuid_vec_t LLScrollListCtrl::getSelectedIDs()
|
uuid_vec_t LLScrollListCtrl::getSelectedIDs() const
|
||||||
{
|
{
|
||||||
uuid_vec_t ids;
|
uuid_vec_t ids;
|
||||||
if (!getCanSelect()) return ids;
|
if (!getCanSelect()) return ids;
|
||||||
@@ -1813,10 +1811,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||||||
if (col->mHeader && col->mHeader->getRect().pointInRect(x,y)) // Right clicking a column header shouldn't bring up a menu
|
if (col->mHeader && col->mHeader->getRect().pointInRect(x,y)) // Right clicking a column header shouldn't bring up a menu
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
gFocusMgr.setKeyboardFocus(this); // Menu listeners rely on this
|
showMenu(this, mPopupMenu, x, y);
|
||||||
mPopupMenu->buildDrawLabels();
|
|
||||||
mPopupMenu->updateParent(LLMenuGL::sMenuContainer);
|
|
||||||
LLMenuGL::showPopup(this, mPopupMenu, x, y);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2041,6 +2036,11 @@ void LLScrollListCtrl::setFilter(const std::string& filter)
|
|||||||
adjustScrollbar(unfiltered_count);
|
adjustScrollbar(unfiltered_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLScrollListCtrl::setContextMenu(const std::string& menu)
|
||||||
|
{
|
||||||
|
setContextMenu(LLUICtrlFactory::instance().buildMenu(menu, LLMenuGL::sMenuContainer));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask)
|
BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask)
|
||||||
{
|
{
|
||||||
@@ -2700,17 +2700,17 @@ void LLScrollListCtrl::setScrollListParameters(LLXMLNodePtr node)
|
|||||||
|
|
||||||
if (node->hasAttribute("menu_num"))
|
if (node->hasAttribute("menu_num"))
|
||||||
{
|
{
|
||||||
// Some scroll lists use common menus identified by number
|
// Some UI uses common menus identified by number
|
||||||
// 0 is menu_avs_list.xml, 1 will be for groups, 2 could be for lists of objects
|
// 0 is avatars, 1 will be for groups, others could be for lists of objects or locations or experiences
|
||||||
S32 menu_num;
|
S32 menu_num;
|
||||||
node->getAttributeS32("menu_num", menu_num);
|
node->getAttributeS32("menu_num", menu_num);
|
||||||
setContextMenu(menu_num);
|
mPopupMenu = sMenus[menu_num];
|
||||||
}
|
}
|
||||||
else if (node->hasAttribute("menu_file"))
|
else if (node->hasAttribute("menu_file"))
|
||||||
{
|
{
|
||||||
std::string menu_file;
|
std::string menu;
|
||||||
node->getAttributeString("menu_file", menu_file);
|
node->getAttributeString("menu_file", menu);
|
||||||
mPopupMenu = LLUICtrlFactory::getInstance()->buildMenu(menu_file, LLMenuGL::sMenuContainer);
|
if (!menu.empty()) setContextMenu(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2749,10 +2749,11 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
|||||||
LLSD columns;
|
LLSD columns;
|
||||||
S32 index = 0;
|
S32 index = 0;
|
||||||
const std::string nodename(std::string(node->getName()->mString) + '.');
|
const std::string nodename(std::string(node->getName()->mString) + '.');
|
||||||
const std::string kidcolumn(nodename + "columns");
|
const std::string kidcolumns(nodename + "columns");
|
||||||
|
const std::string kidcolumn(nodename + "column");
|
||||||
for (LLXMLNodePtr child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
|
for (LLXMLNodePtr child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
|
||||||
{
|
{
|
||||||
if (child->hasName("column") || child->hasName(kidcolumn))
|
if (child->hasName("column") || child->hasName("columns") || child->hasName(kidcolumn) || child->hasName(kidcolumns))
|
||||||
{
|
{
|
||||||
std::string labelname("");
|
std::string labelname("");
|
||||||
if (child->getAttributeString("label", labelname))
|
if (child->getAttributeString("label", labelname))
|
||||||
@@ -2832,9 +2833,10 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
|||||||
bool explicit_column = false;
|
bool explicit_column = false;
|
||||||
for (LLXMLNodePtr row_child = child->getFirstChild(); row_child.notNull(); row_child = row_child->getNextSibling())
|
for (LLXMLNodePtr row_child = child->getFirstChild(); row_child.notNull(); row_child = row_child->getNextSibling())
|
||||||
{
|
{
|
||||||
if (row_child->hasName("column"))
|
if (row_child->hasName("column") || row_child->hasName("columns"))
|
||||||
{
|
{
|
||||||
std::string value = row_child->getTextContents();
|
std::string value = row_child->getTextContents();
|
||||||
|
row_child->getAttributeString("value", value);
|
||||||
row["columns"][column_idx]["value"] = value;
|
row["columns"][column_idx]["value"] = value;
|
||||||
|
|
||||||
std::string columnname;
|
std::string columnname;
|
||||||
@@ -2872,7 +2874,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
|||||||
// LLEditMenuHandler functions
|
// LLEditMenuHandler functions
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void LLScrollListCtrl::copy()
|
void LLScrollListCtrl::copy() const
|
||||||
{
|
{
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
for (auto item : getAllSelected())
|
for (auto item : getAllSelected())
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
|
#include "lfidbearer.h"
|
||||||
#include "lluictrl.h"
|
#include "lluictrl.h"
|
||||||
#include "llctrlselectioninterface.h"
|
#include "llctrlselectioninterface.h"
|
||||||
#include "llfontgl.h"
|
#include "llfontgl.h"
|
||||||
@@ -48,6 +49,7 @@ class LLMenuGL;
|
|||||||
|
|
||||||
class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler,
|
class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler,
|
||||||
public LLCtrlListInterface, public LLCtrlScrollInterface
|
public LLCtrlListInterface, public LLCtrlScrollInterface
|
||||||
|
, public LFIDBearer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef boost::function<void (void)> callback_t;
|
typedef boost::function<void (void)> callback_t;
|
||||||
@@ -194,13 +196,13 @@ public:
|
|||||||
// "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which
|
// "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which
|
||||||
// has an associated, unique UUID, and only one of which can be selected at a time.
|
// has an associated, unique UUID, and only one of which can be selected at a time.
|
||||||
LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
|
LLScrollListItem* addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
|
||||||
LLUUID getStringUUIDSelectedItem() const;
|
LLUUID getStringUUIDSelectedItem() const override final;
|
||||||
|
|
||||||
LLScrollListItem* getFirstSelected() const;
|
LLScrollListItem* getFirstSelected() const;
|
||||||
virtual S32 getFirstSelectedIndex() const;
|
virtual S32 getFirstSelectedIndex() const;
|
||||||
std::vector<LLScrollListItem*> getAllSelected() const;
|
std::vector<LLScrollListItem*> getAllSelected() const;
|
||||||
uuid_vec_t getSelectedIDs(); //Helper. Much like getAllSelected, but just provides a LLUUID vec
|
uuid_vec_t getSelectedIDs() const override final; //Helper. Much like getAllSelected, but just provides a LLUUID vec
|
||||||
S32 getNumSelected() const;
|
S32 getNumSelected() const override final;
|
||||||
LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }
|
LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }
|
||||||
|
|
||||||
// iterate over all items
|
// iterate over all items
|
||||||
@@ -252,10 +254,18 @@ public:
|
|||||||
bool filterItem(LLScrollListItem* item);
|
bool filterItem(LLScrollListItem* item);
|
||||||
void setFilter(const std::string& filter);
|
void setFilter(const std::string& filter);
|
||||||
|
|
||||||
// support right-click context menus for avatar/group lists
|
// Context Menus
|
||||||
void setContextMenu(LLMenuGL* menu) { mPopupMenu = menu; }
|
void setContextMenu(LLMenuGL* menu) { mPopupMenu = menu; }
|
||||||
void setContextMenu(S32 index) { mPopupMenu = sMenus[index]; }
|
void setContextMenu(U8 index) { mPopupMenu = sMenus[index]; }
|
||||||
static void addCommonMenu(LLMenuGL* menu) { sMenus.push_back(menu); }
|
void setContextMenu(const std::string& menu);
|
||||||
|
|
||||||
|
Type getSelectedType() const override
|
||||||
|
{
|
||||||
|
for (auto i = 0; mPopupMenu && i < COUNT; ++i)
|
||||||
|
if (sMenus[i] == mPopupMenu)
|
||||||
|
return (Type)i;
|
||||||
|
return LFIDBearer::getSelectedType();
|
||||||
|
}
|
||||||
|
|
||||||
// Overridden from LLView
|
// Overridden from LLView
|
||||||
/*virtual*/ void draw();
|
/*virtual*/ void draw();
|
||||||
@@ -312,7 +322,7 @@ public:
|
|||||||
virtual void scrollToShowSelected();
|
virtual void scrollToShowSelected();
|
||||||
|
|
||||||
// LLEditMenuHandler functions
|
// LLEditMenuHandler functions
|
||||||
virtual void copy();
|
void copy() const override final;
|
||||||
virtual BOOL canCopy() const;
|
virtual BOOL canCopy() const;
|
||||||
virtual void cut();
|
virtual void cut();
|
||||||
virtual BOOL canCut() const;
|
virtual BOOL canCut() const;
|
||||||
@@ -468,8 +478,6 @@ private:
|
|||||||
class LLViewBorder* mBorder;
|
class LLViewBorder* mBorder;
|
||||||
LLMenuGL *mPopupMenu;
|
LLMenuGL *mPopupMenu;
|
||||||
|
|
||||||
static std::vector<LLMenuGL*> sMenus; // List menus that recur, such as general avatars or groups menus
|
|
||||||
|
|
||||||
LLView *mCommentTextView;
|
LLView *mCommentTextView;
|
||||||
|
|
||||||
LLWString mSearchString;
|
LLWString mSearchString;
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ private:
|
|||||||
void setLineLengths();
|
void setLineLengths();
|
||||||
void drawText(S32 x, S32 y, const LLColor4& color );
|
void drawText(S32 x, S32 y, const LLColor4& color );
|
||||||
|
|
||||||
|
protected:
|
||||||
LLUIString mText;
|
LLUIString mText;
|
||||||
const LLFontGL* mFontGL;
|
const LLFontGL* mFontGL;
|
||||||
LLColor4 mTextColor;
|
LLColor4 mTextColor;
|
||||||
|
|||||||
@@ -244,8 +244,6 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
LLTextEditor::is_friend_signal_t* LLTextEditor::mIsFriendSignal = nullptr;
|
|
||||||
LLTextEditor::is_blocked_signal_t* LLTextEditor::mIsObjectBlockedSignal = nullptr;
|
|
||||||
|
|
||||||
LLTextEditor::LLTextEditor(
|
LLTextEditor::LLTextEditor(
|
||||||
const std::string& name,
|
const std::string& name,
|
||||||
@@ -372,57 +370,63 @@ LLTextEditor::~LLTextEditor()
|
|||||||
menu->die();
|
menu->die();
|
||||||
mPopupMenuHandle.markDead();
|
mPopupMenuHandle.markDead();
|
||||||
}
|
}
|
||||||
/* Singu Note: Static this, we'll use it wherever we can!
|
|
||||||
delete mIsFriendSignal;
|
|
||||||
delete mIsObjectBlockedSignal;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& LLTextEditor::getMenuSegmentUrl() const
|
const std::string& LLTextEditor::getMenuSegmentUrl() const
|
||||||
{
|
{
|
||||||
auto segment = getSegmentAtLocalPos(mLastContextMenuX, mLastContextMenuY);
|
auto segment = getSegmentAtLocalPos(mLastContextMenuX, mLastContextMenuY);
|
||||||
auto style = segment->getStyle();
|
auto style = segment ? segment->getStyle() : nullptr;
|
||||||
return style ? style->getLinkHREF() : LLStringUtil::null;
|
return style ? style->getLinkHREF() : LLStringUtil::null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static LLTextEditor* get_focused_text_editor()
|
static LFIDBearer::Type get_type_from_url(const std::string& url)
|
||||||
{
|
{
|
||||||
auto* te =
|
auto pos = url.find("/app/");
|
||||||
#ifdef SHOW_ASSERT
|
if (pos != std::string::npos && pos + 10 <= url.size())
|
||||||
dynamic_cast<LLTextEditor*>
|
{
|
||||||
#else
|
auto type = url.substr(pos + 5, 5);
|
||||||
static_cast<LLTextEditor*>
|
return type == "agent" ? LFIDBearer::AVATAR
|
||||||
#endif
|
: type == "group" ? LFIDBearer::GROUP
|
||||||
(gFocusMgr.getKeyboardFocus());
|
: LFIDBearer::OBJECT;
|
||||||
llassert(te); // This listener only applies to text editors
|
}
|
||||||
return te;
|
return LFIDBearer::NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ContextText : public LLMemberListener<LLView>
|
LLUUID LLTextEditor::getStringUUIDSelectedItem() const
|
||||||
|
{
|
||||||
|
const auto& url = getMenuSegmentUrl();
|
||||||
|
const auto& type = get_type_from_url(url);
|
||||||
|
return type == LFIDBearer::NONE ? LLUUID::null : LLUUID(type == OBJECT ? LLUrlAction::getObjectId(url) : LLUrlAction::getUserID(url));
|
||||||
|
}
|
||||||
|
|
||||||
|
LFIDBearer::Type LLTextEditor::getSelectedType() const
|
||||||
|
{
|
||||||
|
return get_type_from_url(getMenuSegmentUrl());
|
||||||
|
}
|
||||||
|
|
||||||
|
class CopyRawText : public LLMemberListener<LLView>
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
|
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
|
||||||
{
|
{
|
||||||
auto text = get_focused_text_editor();
|
LFIDBearer::getActive<LLTextEditor>()->copyRaw();
|
||||||
const auto& op = userdata.asStringRef();
|
|
||||||
if (op == "Cut") text->cut();
|
|
||||||
else if (op == "Copy") text->copy();
|
|
||||||
else if (op == "CopyRaw") text->copyRaw();
|
|
||||||
else if (op == "Paste") text->paste();
|
|
||||||
else if (op == "Delete") text->doDelete();
|
|
||||||
else if (op == "SelectAll") text->selectAll();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const std::string& get_focused_url()
|
class TextEditorVisible : public LLMemberListener<LLView>
|
||||||
{
|
{
|
||||||
return get_focused_text_editor()->getMenuSegmentUrl();
|
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
|
||||||
}
|
{
|
||||||
|
LLMenuGL::sMenuContainer->findControl(userdata["control"].asString())->setValue(!!dynamic_cast<LLTextEditor*>(gFocusMgr.getKeyboardFocus()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class ContextUrl : public LLMemberListener<LLView>
|
class ContextUrl : public LLMemberListener<LLView>
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
|
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
|
||||||
{
|
{
|
||||||
const auto& url = get_focused_url();
|
const auto& url = LFIDBearer::getActive<LLTextEditor>()->getMenuSegmentUrl();
|
||||||
const auto& op = userdata.asStringRef();
|
const auto& op = userdata.asStringRef();
|
||||||
if (op == "Open") LLUrlAction::openURL(url);
|
if (op == "Open") LLUrlAction::openURL(url);
|
||||||
else if (op == "OpenInternal") LLUrlAction::openURLInternal(url);
|
else if (op == "OpenInternal") LLUrlAction::openURLInternal(url);
|
||||||
@@ -431,10 +435,6 @@ class ContextUrl : public LLMemberListener<LLView>
|
|||||||
else if (op == "Block") LLUrlAction::blockObject(url);
|
else if (op == "Block") LLUrlAction::blockObject(url);
|
||||||
else if (op == "Unblock") LLUrlAction::unblockObject(url);
|
else if (op == "Unblock") LLUrlAction::unblockObject(url);
|
||||||
else if (op == "Teleport") LLUrlAction::teleportToLocation(url);
|
else if (op == "Teleport") LLUrlAction::teleportToLocation(url);
|
||||||
else if (op == "ShowProfile") LLUrlAction::showProfile(url);
|
|
||||||
else if (op == "AddFriend") LLUrlAction::addFriend(url);
|
|
||||||
else if (op == "RemoveFriend") LLUrlAction::removeFriend(url);
|
|
||||||
else if (op == "SendIM") LLUrlAction::sendIM(url);
|
|
||||||
else if (op == "ShowOnMap") LLUrlAction::showLocationOnMap(url);
|
else if (op == "ShowOnMap") LLUrlAction::showLocationOnMap(url);
|
||||||
else if (op == "CopyLabel") LLUrlAction::copyLabelToClipboard(url);
|
else if (op == "CopyLabel") LLUrlAction::copyLabelToClipboard(url);
|
||||||
else if (op == "CopyUrl") LLUrlAction::copyURLToClipboard(url);
|
else if (op == "CopyUrl") LLUrlAction::copyURLToClipboard(url);
|
||||||
@@ -442,90 +442,35 @@ class ContextUrl : public LLMemberListener<LLView>
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ContextIDUrl : public LLMemberListener<LLView>
|
class ContextUrlCopy : public LLMemberListener<LLView>
|
||||||
{
|
|
||||||
protected:
|
|
||||||
std::string getID(const std::string& type) const
|
|
||||||
{
|
|
||||||
const auto& url = get_focused_url();
|
|
||||||
// Empty works like avatar and group, "object" is an object (you needed to be told this)
|
|
||||||
return type.empty() ? LLUrlAction::getUserID(url) : LLUrlAction::getObjectId(url);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class ContextUrlCopy : public ContextIDUrl
|
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
|
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
|
||||||
{
|
{
|
||||||
LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(getID(userdata.asStringRef())));
|
LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(LFIDBearer::getActiveSelectedID().asString()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ContextUrlExt : public ContextIDUrl
|
|
||||||
{
|
|
||||||
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
|
|
||||||
{
|
|
||||||
std::string cmd = userdata.asStringRef();
|
|
||||||
std::string type;
|
|
||||||
const auto sep = cmd.find(',');
|
|
||||||
if (sep != std::string::npos)
|
|
||||||
{
|
|
||||||
type = cmd.substr(sep);
|
|
||||||
cmd = cmd.substr(0, sep);
|
|
||||||
}
|
|
||||||
mExtCallback(cmd, LLUUID(getID(type)));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
LLTextEditor::ext_slurl_cb mExtCallback;
|
|
||||||
public:
|
|
||||||
ContextUrlExt(LLTextEditor::ext_slurl_cb cb) : mExtCallback(cb) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
class ContextUrlExtVisible : public ContextIDUrl
|
|
||||||
{
|
|
||||||
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
|
|
||||||
{
|
|
||||||
std::string cmd = userdata["data"];
|
|
||||||
std::string type;
|
|
||||||
const auto sep = cmd.find(',');
|
|
||||||
if (sep != std::string::npos)
|
|
||||||
{
|
|
||||||
type = cmd.substr(sep);
|
|
||||||
cmd = cmd.substr(0, sep);
|
|
||||||
}
|
|
||||||
|
|
||||||
LLMenuGL::sMenuContainer->findControl(userdata["control"].asString())->setValue(mExtVCB(cmd, LLUUID(getID(type))));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
LLTextEditor::ext_slurl_visible_cb mExtVCB;
|
|
||||||
public:
|
|
||||||
ContextUrlExtVisible(LLTextEditor::ext_slurl_visible_cb vcb) : mExtVCB(vcb) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void LLTextEditor::spell_correct(void* data)
|
void LLTextEditor::spell_correct(void* data)
|
||||||
{
|
{
|
||||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
auto self = static_cast<LLTextEditor*>(data);
|
||||||
LLTextEditor* line = tempBind->origin;
|
S32 wordStart = 0, wordLen = 0;
|
||||||
if(tempBind && line)
|
if (self->getWordBoundriesAt(self->getCursorPosFromLocalCoord(self->mLastContextMenuX, self->mLastContextMenuY, TRUE), &wordStart, &wordLen))
|
||||||
{
|
{
|
||||||
LL_INFOS() << tempBind->menuItem->getName() << " : " << tempBind->origin->getName() << " : " << tempBind->word << LL_ENDL;
|
const auto& word = utf8str_to_wstring(LLMenuGL::sMenuContainer->getActivatedItem()->getLabel());
|
||||||
if(line)line->spellReplace(tempBind);
|
|
||||||
|
self->remove(wordStart, wordLen, TRUE);
|
||||||
|
self->insert(wordStart, word, FALSE);
|
||||||
|
self->mCursorPos += word.length() - wordLen;
|
||||||
|
self->needsReflow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLTextEditor::spell_show(void * data)
|
void LLTextEditor::spell_show(void* show)
|
||||||
{
|
{
|
||||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
glggHunSpell->setSpellCheckHighlight(!!show);
|
||||||
LLTextEditor* line = tempBind->origin;
|
|
||||||
|
|
||||||
if(tempBind && line)
|
|
||||||
{
|
|
||||||
BOOL show = (tempBind->word == "Show Misspellings");
|
|
||||||
glggHunSpell->setSpellCheckHighlight(show);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -572,22 +517,22 @@ std::vector<S32> LLTextEditor::getMisspelledWordsPositions()
|
|||||||
|
|
||||||
void LLTextEditor::spell_add(void* data)
|
void LLTextEditor::spell_add(void* data)
|
||||||
{
|
{
|
||||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
auto self = static_cast<LLTextEditor*>(data);
|
||||||
if(tempBind)
|
S32 wordStart = 0, wordLen = 0;
|
||||||
|
if (self->getWordBoundriesAt(self->getCursorPosFromLocalCoord(self->mLastContextMenuX, self->mLastContextMenuY, TRUE), &wordStart, &wordLen))
|
||||||
{
|
{
|
||||||
glggHunSpell->addWordToCustomDictionary(tempBind->word);
|
glggHunSpell->addWordToCustomDictionary(wstring_to_utf8str(self->getWText().substr(wordStart, wordLen)));
|
||||||
tempBind->origin->mPrevSpelledText.erase();//make it update
|
self->mPrevSpelledText.erase(); //make it update
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
void LLTextEditor::addMenuListeners(ext_slurl_cb cb, ext_slurl_visible_cb vcb)
|
void LLTextEditor::addMenuListeners()
|
||||||
{
|
{
|
||||||
(new ContextText)->registerListener(LLMenuGL::sMenuContainer, "Text");
|
(new CopyRawText)->registerListener(LLMenuGL::sMenuContainer, "CopyRawText");
|
||||||
|
(new TextEditorVisible)->registerListener(LLMenuGL::sMenuContainer, "TextEditorVisible");
|
||||||
(new ContextUrl)->registerListener(LLMenuGL::sMenuContainer, "Text.Url");
|
(new ContextUrl)->registerListener(LLMenuGL::sMenuContainer, "Text.Url");
|
||||||
(new ContextUrlCopy)->registerListener(LLMenuGL::sMenuContainer, "Text.Url.CopyUUID");
|
(new ContextUrlCopy)->registerListener(LLMenuGL::sMenuContainer, "Text.Url.CopyUUID");
|
||||||
(new ContextUrlExt(cb))->registerListener(LLMenuGL::sMenuContainer, "Text.Url.Ext");
|
|
||||||
(new ContextUrlExtVisible(vcb))->registerListener(LLMenuGL::sMenuContainer, "Text.Url.ExtVisible");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLTextEditor::setTrackColor( const LLColor4& color )
|
void LLTextEditor::setTrackColor( const LLColor4& color )
|
||||||
@@ -765,35 +710,7 @@ LLMenuGL* LLTextEditor::createUrlContextMenu(S32 x, S32 y, const std::string &in
|
|||||||
|
|
||||||
// create and return the context menu from the XUI file
|
// create and return the context menu from the XUI file
|
||||||
llassert(LLMenuGL::sMenuContainer != NULL);
|
llassert(LLMenuGL::sMenuContainer != NULL);
|
||||||
auto menu = LLUICtrlFactory::getInstance()->buildMenu(xui_file, LLMenuGL::sMenuContainer);
|
auto menu = LLUICtrlFactory::instance().buildMenu(xui_file, LLMenuGL::sMenuContainer);
|
||||||
if (menu)
|
|
||||||
{
|
|
||||||
if (mIsFriendSignal)
|
|
||||||
{
|
|
||||||
bool isFriend = *(*mIsFriendSignal)(LLUUID(LLUrlAction::getUserID(url)));
|
|
||||||
LLView* addFriendButton = menu->findChild<LLView>("add_friend");
|
|
||||||
LLView* removeFriendButton = menu->findChild<LLView>("remove_friend");
|
|
||||||
|
|
||||||
if (addFriendButton && removeFriendButton)
|
|
||||||
{
|
|
||||||
addFriendButton->setVisible(!isFriend);
|
|
||||||
removeFriendButton->setVisible(isFriend);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mIsObjectBlockedSignal)
|
|
||||||
{
|
|
||||||
bool is_blocked = *(*mIsObjectBlockedSignal)(LLUUID(LLUrlAction::getObjectId(url)), LLUrlAction::getObjectName(url));
|
|
||||||
LLView* blockButton = menu->findChild<LLView>("block_object");
|
|
||||||
LLView* unblockButton = menu->findChild<LLView>("unblock_object");
|
|
||||||
|
|
||||||
if (blockButton && unblockButton)
|
|
||||||
{
|
|
||||||
blockButton->setVisible(!is_blocked);
|
|
||||||
unblockButton->setVisible(is_blocked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1528,35 +1445,13 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||||||
}
|
}
|
||||||
BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||||
{
|
{
|
||||||
|
|
||||||
setFocus(TRUE);
|
setFocus(TRUE);
|
||||||
|
|
||||||
//setCursorAtLocalPos( x, y, TRUE );
|
|
||||||
S32 wordStart = 0;
|
|
||||||
S32 wordLen = 0;
|
|
||||||
S32 pos = getCursorPosFromLocalCoord(x,y,TRUE);
|
|
||||||
|
|
||||||
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
|
|
||||||
if (menu)
|
|
||||||
{
|
|
||||||
for (auto tempBind : suggestionMenuItems)
|
|
||||||
{
|
|
||||||
if (tempBind)
|
|
||||||
{
|
|
||||||
menu->removeChild(tempBind->menuItem);
|
|
||||||
tempBind->menuItem->die();
|
|
||||||
delete tempBind;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
suggestionMenuItems.clear();
|
|
||||||
menu->die();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto segment = getSegmentAtLocalPos(x, y);
|
auto segment = getSegmentAtLocalPos(x, y);
|
||||||
const LLStyleSP style = segment ? segment->getStyle() : nullptr;
|
const LLStyleSP style = segment ? segment->getStyle() : nullptr;
|
||||||
auto submenu = (style && style->isLink()) ? createUrlContextMenu(x, y, style->getLinkHREF()) : nullptr;
|
auto submenu = (style && style->isLink()) ? createUrlContextMenu(x, y, style->getLinkHREF()) : nullptr;
|
||||||
// Add url menu to base menu if we have a selection, otherwise make it the menu.
|
// Add url menu to base menu if we have a selection, otherwise make it the menu.
|
||||||
menu = (submenu && !hasSelection()) ? submenu : LLUICtrlFactory::getInstance()->buildMenu("menu_texteditor.xml", LLMenuGL::sMenuContainer);
|
auto menu = (submenu && !hasSelection()) ? submenu : LLUICtrlFactory::instance().buildMenu("menu_texteditor.xml", LLMenuGL::sMenuContainer);
|
||||||
mPopupMenuHandle = menu->getHandle();
|
mPopupMenuHandle = menu->getHandle();
|
||||||
if (menu)
|
if (menu)
|
||||||
{
|
{
|
||||||
@@ -1569,69 +1464,34 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
|||||||
// spell_check="true" in xui
|
// spell_check="true" in xui
|
||||||
if (!mReadOnly && mSpellCheckable)
|
if (!mReadOnly && mSpellCheckable)
|
||||||
{
|
{
|
||||||
bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordLen);
|
S32 wordStart = 0;
|
||||||
if (is_word_part)
|
S32 wordLen = 0;
|
||||||
|
S32 pos = getCursorPosFromLocalCoord(x, y, TRUE);
|
||||||
|
if (getWordBoundriesAt(pos, &wordStart, &wordLen))
|
||||||
{
|
{
|
||||||
const LLWString &text = mWText;
|
const auto selectedWord = wstring_to_utf8str(getWText().substr(wordStart, wordLen));
|
||||||
std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart, wordLen));
|
|
||||||
|
|
||||||
if (!glggHunSpell->isSpelledRight(selectedWord))
|
if (!glggHunSpell->isSpelledRight(selectedWord))
|
||||||
{
|
{
|
||||||
//misspelled word here, and you have just right clicked on it!
|
//misspelled word here, and you have just right clicked on it!
|
||||||
std::vector<std::string> suggs = glggHunSpell->getSuggestionList(selectedWord);
|
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
for (auto word : suggs)
|
for (const auto& word : glggHunSpell->getSuggestionList(selectedWord))
|
||||||
{
|
{
|
||||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
menu->addChild(new LLMenuItemCallGL(word, spell_correct, nullptr, this));
|
||||||
tempStruct->origin = this;
|
|
||||||
tempStruct->word = word;
|
|
||||||
tempStruct->wordPositionEnd = wordStart + wordLen;
|
|
||||||
tempStruct->wordPositionStart = wordStart;
|
|
||||||
tempStruct->wordY = y;
|
|
||||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
|
||||||
tempStruct->word, spell_correct, NULL, tempStruct);
|
|
||||||
tempStruct->menuItem = suggMenuItem;
|
|
||||||
suggestionMenuItems.push_back(tempStruct);
|
|
||||||
menu->addChild(suggMenuItem);
|
|
||||||
}
|
}
|
||||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
menu->addChild(new LLMenuItemCallGL("Add Word", spell_add, nullptr, this));
|
||||||
tempStruct->origin = this;
|
|
||||||
tempStruct->word = selectedWord;
|
|
||||||
tempStruct->wordPositionEnd = wordStart + wordLen;
|
|
||||||
tempStruct->wordPositionStart = wordStart;
|
|
||||||
tempStruct->wordY = y;
|
|
||||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
|
||||||
"Add Word", spell_add, NULL, tempStruct);
|
|
||||||
tempStruct->menuItem = suggMenuItem;
|
|
||||||
suggestionMenuItems.push_back(tempStruct);
|
|
||||||
menu->addChild(suggMenuItem);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
bool show = !glggHunSpell->getSpellCheckHighlight();
|
||||||
tempStruct->origin = this;
|
auto word = show ? "Show Misspellings" : "Hide Misspellings";
|
||||||
if (glggHunSpell->getSpellCheckHighlight())
|
menu->addChild(new LLMenuItemCallGL(word, spell_show, nullptr, show ? &show : nullptr));
|
||||||
{
|
|
||||||
tempStruct->word = "Hide Misspellings";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tempStruct->word = "Show Misspellings";
|
|
||||||
}
|
|
||||||
|
|
||||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
|
||||||
tempStruct->word, spell_show, NULL, tempStruct);
|
|
||||||
tempStruct->menuItem = suggMenuItem;
|
|
||||||
suggestionMenuItems.push_back(tempStruct);
|
|
||||||
menu->addChild(suggMenuItem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mLastContextMenuX = x;
|
mLastContextMenuX = x;
|
||||||
mLastContextMenuY = y;
|
mLastContextMenuY = y;
|
||||||
menu->buildDrawLabels();
|
showMenu(this, menu, x, y);
|
||||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
|
||||||
LLMenuGL::showPopup(this, menu, x, y);
|
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -2356,7 +2216,7 @@ BOOL LLTextEditor::canCopy() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// copy selection to clipboard
|
// copy selection to clipboard
|
||||||
void LLTextEditor::copy(bool raw)
|
void LLTextEditor::copy(bool raw) const
|
||||||
{
|
{
|
||||||
if( !canCopy() )
|
if( !canCopy() )
|
||||||
{
|
{
|
||||||
@@ -2420,17 +2280,6 @@ BOOL LLTextEditor::canPaste() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLTextEditor::spellReplace(SpellMenuBind* spellData)
|
|
||||||
{
|
|
||||||
remove( spellData->wordPositionStart,
|
|
||||||
spellData->wordPositionEnd - spellData->wordPositionStart, TRUE );
|
|
||||||
LLWString clean_string = utf8str_to_wstring(spellData->word);
|
|
||||||
insert(spellData->wordPositionStart, clean_string, FALSE);
|
|
||||||
mCursorPos+=clean_string.length() - (spellData->wordPositionEnd-spellData->wordPositionStart);
|
|
||||||
needsReflow();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// paste from clipboard
|
// paste from clipboard
|
||||||
void LLTextEditor::paste()
|
void LLTextEditor::paste()
|
||||||
{
|
{
|
||||||
@@ -4352,7 +4201,7 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s
|
|||||||
if (mReadOnly && mParseHTML && !is_link) // Singu Note: Do not replace html if the user is going to edit it. (Like in profiles)
|
if (mReadOnly && mParseHTML && !is_link) // Singu Note: Do not replace html if the user is going to edit it. (Like in profiles)
|
||||||
{
|
{
|
||||||
LL_RECORD_BLOCK_TIME(FTM_PARSE_HTML);
|
LL_RECORD_BLOCK_TIME(FTM_PARSE_HTML);
|
||||||
S32 start=0,end=0;
|
size_t start=0, end=0;
|
||||||
LLUrlMatch match;
|
LLUrlMatch match;
|
||||||
auto append_substr = [&](const size_t& pos, const size_t& count)
|
auto append_substr = [&](const size_t& pos, const size_t& count)
|
||||||
{
|
{
|
||||||
@@ -4360,6 +4209,12 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s
|
|||||||
};
|
};
|
||||||
auto append_link = [&](const std::string& link, LLStyleSP link_style)
|
auto append_link = [&](const std::string& link, LLStyleSP link_style)
|
||||||
{
|
{
|
||||||
|
if (!link_style->isLink())
|
||||||
|
{
|
||||||
|
appendAndHighlightText(link, part, style);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (style) // Respect styling
|
if (style) // Respect styling
|
||||||
{
|
{
|
||||||
const auto& text_style = *style;
|
const auto& text_style = *style;
|
||||||
@@ -4373,8 +4228,9 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s
|
|||||||
if (always_underline) link_style->mUnderline = true;
|
if (always_underline) link_style->mUnderline = true;
|
||||||
appendAndHighlightText(link, part, link_style, !always_underline/*match.underlineOnHoverOnly()*/);
|
appendAndHighlightText(link, part, link_style, !always_underline/*match.underlineOnHoverOnly()*/);
|
||||||
};
|
};
|
||||||
const auto&& cb = force_replace_links ? boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3) : LLUrlLabelCallback();
|
const auto&& cb = force_replace_links ? boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3) : static_cast<LLUrlLabelCallback>(LLUrlRegistryNullCallback);
|
||||||
while (!text.empty() && LLUrlRegistry::instance().findUrl(text, match, cb))
|
auto& urlr = LLUrlRegistry::instance();
|
||||||
|
while (!text.empty() && urlr.findUrl(text, match, cb))
|
||||||
{
|
{
|
||||||
start = match.getStart();
|
start = match.getStart();
|
||||||
end = match.getEnd()+1;
|
end = match.getEnd()+1;
|
||||||
@@ -4497,7 +4353,7 @@ void LLTextEditor::appendAndHighlightText(const std::string& new_text, S32 highl
|
|||||||
std::string::size_type start = 0;
|
std::string::size_type start = 0;
|
||||||
/*std::string::size_type pos = new_text.find('\n',start);
|
/*std::string::size_type pos = new_text.find('\n',start);
|
||||||
|
|
||||||
while(pos!=-1)
|
while(pos != std::string::npos)
|
||||||
{
|
{
|
||||||
if(pos!=start)
|
if(pos!=start)
|
||||||
{
|
{
|
||||||
@@ -5238,24 +5094,6 @@ BOOL LLTextEditor::exportBuffer(std::string &buffer )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::signals2::connection LLTextEditor::setIsFriendCallback(const is_friend_signal_t::slot_type& cb)
|
|
||||||
{
|
|
||||||
if (!mIsFriendSignal)
|
|
||||||
{
|
|
||||||
mIsFriendSignal = new is_friend_signal_t();
|
|
||||||
}
|
|
||||||
return mIsFriendSignal->connect(cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
boost::signals2::connection LLTextEditor::setIsObjectBlockedCallback(const is_blocked_signal_t::slot_type& cb)
|
|
||||||
{
|
|
||||||
if (!mIsObjectBlockedSignal)
|
|
||||||
{
|
|
||||||
mIsObjectBlockedSignal = new is_blocked_signal_t();
|
|
||||||
}
|
|
||||||
return mIsObjectBlockedSignal->connect(cb);
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// LLTextSegment
|
// LLTextSegment
|
||||||
|
|
||||||
|
|||||||
@@ -43,16 +43,15 @@
|
|||||||
#include "lleditmenuhandler.h"
|
#include "lleditmenuhandler.h"
|
||||||
|
|
||||||
#include "llpreeditor.h"
|
#include "llpreeditor.h"
|
||||||
#include "llmenugl.h"
|
#include "lfidbearer.h"
|
||||||
|
|
||||||
class LLFontGL;
|
class LLFontGL;
|
||||||
class LLScrollbar;
|
|
||||||
class LLViewBorder;
|
|
||||||
class LLKeywordToken;
|
class LLKeywordToken;
|
||||||
|
class LLMenuGL;
|
||||||
class LLTextCmd;
|
class LLTextCmd;
|
||||||
class LLUICtrlFactory;
|
|
||||||
|
|
||||||
class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor
|
class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor
|
||||||
|
, public LFIDBearer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//
|
//
|
||||||
@@ -74,16 +73,12 @@ public:
|
|||||||
|
|
||||||
const std::string& getMenuSegmentUrl() const;
|
const std::string& getMenuSegmentUrl() const;
|
||||||
|
|
||||||
|
LLUUID getStringUUIDSelectedItem() const override final;
|
||||||
|
Type getSelectedType() const override final;
|
||||||
|
|
||||||
typedef boost::signals2::signal<void (LLTextEditor* caller)> keystroke_signal_t;
|
typedef boost::signals2::signal<void (LLTextEditor* caller)> keystroke_signal_t;
|
||||||
typedef boost::signals2::signal<bool(const LLUUID& user_id)> is_friend_signal_t;
|
|
||||||
typedef boost::signals2::signal<bool(const LLUUID& blocked_id, const std::string from)> is_blocked_signal_t;
|
|
||||||
|
|
||||||
static boost::signals2::connection setIsFriendCallback(const is_friend_signal_t::slot_type& cb);
|
static void addMenuListeners();
|
||||||
static boost::signals2::connection setIsObjectBlockedCallback(const is_blocked_signal_t::slot_type& cb);
|
|
||||||
|
|
||||||
typedef std::function<void(const std::string&, const LLUUID&)> ext_slurl_cb;
|
|
||||||
typedef std::function<bool(const std::string&, const LLUUID&)> ext_slurl_visible_cb;
|
|
||||||
static void addMenuListeners(ext_slurl_cb cb, ext_slurl_visible_cb vcb);
|
|
||||||
|
|
||||||
void setKeystrokeCallback(const keystroke_signal_t::slot_type& callback);
|
void setKeystrokeCallback(const keystroke_signal_t::slot_type& callback);
|
||||||
|
|
||||||
@@ -127,16 +122,6 @@ public:
|
|||||||
BOOL isSpellDirty() const { return mWText != mPrevSpelledText; } // Returns TRUE if user changed value at all
|
BOOL isSpellDirty() const { return mWText != mPrevSpelledText; } // Returns TRUE if user changed value at all
|
||||||
void resetSpellDirty() { mPrevSpelledText = mWText; } // Clear dirty state
|
void resetSpellDirty() { mPrevSpelledText = mWText; } // Clear dirty state
|
||||||
|
|
||||||
struct SpellMenuBind
|
|
||||||
{
|
|
||||||
LLTextEditor* origin;
|
|
||||||
LLMenuItemCallGL * menuItem;
|
|
||||||
std::string word;
|
|
||||||
S32 wordPositionStart;
|
|
||||||
S32 wordPositionEnd;
|
|
||||||
S32 wordY;
|
|
||||||
};
|
|
||||||
|
|
||||||
// LLEditMenuHandler interface
|
// LLEditMenuHandler interface
|
||||||
virtual void undo();
|
virtual void undo();
|
||||||
virtual BOOL canUndo() const;
|
virtual BOOL canUndo() const;
|
||||||
@@ -144,15 +129,13 @@ public:
|
|||||||
virtual BOOL canRedo() const;
|
virtual BOOL canRedo() const;
|
||||||
virtual void cut();
|
virtual void cut();
|
||||||
virtual BOOL canCut() const;
|
virtual BOOL canCut() const;
|
||||||
void copy(bool raw);
|
void copy(bool raw) const;
|
||||||
void copyRaw() { copy(true); }
|
void copyRaw() const { copy(true); }
|
||||||
virtual void copy() { copy(false); }
|
void copy() const override final { copy(false); }
|
||||||
virtual BOOL canCopy() const;
|
virtual BOOL canCopy() const;
|
||||||
virtual void paste();
|
virtual void paste();
|
||||||
virtual BOOL canPaste() const;
|
virtual BOOL canPaste() const;
|
||||||
|
|
||||||
virtual void spellReplace(SpellMenuBind* spellData);
|
|
||||||
|
|
||||||
virtual void updatePrimary();
|
virtual void updatePrimary();
|
||||||
virtual void copyPrimary();
|
virtual void copyPrimary();
|
||||||
virtual void pastePrimary();
|
virtual void pastePrimary();
|
||||||
@@ -483,10 +466,6 @@ protected:
|
|||||||
void (*mOnScrollEndCallback)(void*);
|
void (*mOnScrollEndCallback)(void*);
|
||||||
void *mOnScrollEndData;
|
void *mOnScrollEndData;
|
||||||
|
|
||||||
// Used to check if user with given ID is avatar's friend
|
|
||||||
static is_friend_signal_t* mIsFriendSignal;
|
|
||||||
static is_blocked_signal_t* mIsObjectBlockedSignal;
|
|
||||||
|
|
||||||
LLWString mPreeditWString;
|
LLWString mPreeditWString;
|
||||||
LLWString mPreeditOverwrittenWString;
|
LLWString mPreeditOverwrittenWString;
|
||||||
std::vector<S32> mPreeditPositions;
|
std::vector<S32> mPreeditPositions;
|
||||||
@@ -580,7 +559,6 @@ private:
|
|||||||
typedef std::vector<line_info> line_list_t;
|
typedef std::vector<line_info> line_list_t;
|
||||||
|
|
||||||
//to keep track of what we have to remove before showing menu
|
//to keep track of what we have to remove before showing menu
|
||||||
std::vector<SpellMenuBind* > suggestionMenuItems;
|
|
||||||
S32 mLastContextMenuX;
|
S32 mLastContextMenuX;
|
||||||
S32 mLastContextMenuY;
|
S32 mLastContextMenuY;
|
||||||
|
|
||||||
|
|||||||
@@ -406,16 +406,16 @@ LLMenuGL *LLUICtrlFactory::buildMenu(const std::string &filename, LLView* parent
|
|||||||
LLXMLNodePtr root;
|
LLXMLNodePtr root;
|
||||||
LLMenuGL* menu;
|
LLMenuGL* menu;
|
||||||
|
|
||||||
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
|
if (!getLayeredXMLNode(filename, root))
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// root must be called panel
|
// root must be called panel
|
||||||
if( !root->hasName( "menu_bar" ) && !root->hasName( "menu" ) && !root->hasName("context_menu"))
|
if (!root->hasName("menu_bar") && !root->hasName("menu") && !root->hasName("context_menu"))
|
||||||
{
|
{
|
||||||
LL_WARNS() << "Root node should be named menu bar or menu in : " << filename << LL_ENDL;
|
LL_WARNS() << "Root node should be named menu bar or menu in: " << filename << LL_ENDL;
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root->hasName("menu") || root->hasName("context_menu"))
|
if (root->hasName("menu") || root->hasName("context_menu"))
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
|
|
||||||
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
|
||||||
/**
|
/**
|
||||||
* @file llurlentry.cpp
|
* @file llurlentry.cpp
|
||||||
* @author Martin Reddy
|
* @author Martin Reddy
|
||||||
@@ -72,7 +70,7 @@ std::string LLUrlEntryBase::getIcon(const std::string &url)
|
|||||||
|
|
||||||
LLStyleSP LLUrlEntryBase::getStyle() const
|
LLStyleSP LLUrlEntryBase::getStyle() const
|
||||||
{
|
{
|
||||||
static LLUICachedControl<LLColor4> color("HTMLLinkColor");
|
static const LLUICachedControl<LLColor4> color("HTMLLinkColor");
|
||||||
LLStyleSP style_params(new LLStyle(true, color, LLStringUtil::null));
|
LLStyleSP style_params(new LLStyle(true, color, LLStringUtil::null));
|
||||||
//style_params->mUnderline = true; // Singu Note: We're not gonna bother here, underlining on hover
|
//style_params->mUnderline = true; // Singu Note: We're not gonna bother here, underlining on hover
|
||||||
return style_params;
|
return style_params;
|
||||||
@@ -230,7 +228,7 @@ static std::string getStringAfterToken(const std::string& str, const std::string
|
|||||||
size_t pos = str.find(token);
|
size_t pos = str.find(token);
|
||||||
if (pos == std::string::npos)
|
if (pos == std::string::npos)
|
||||||
{
|
{
|
||||||
return std::string();
|
return LLStringUtil::null;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos += token.size();
|
pos += token.size();
|
||||||
@@ -385,9 +383,9 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const
|
|||||||
if (path_parts == actual_parts)
|
if (path_parts == actual_parts)
|
||||||
{
|
{
|
||||||
// handle slurl with (X,Y,Z) coordinates
|
// handle slurl with (X,Y,Z) coordinates
|
||||||
LLStringUtil::convertToS32(path_array[path_parts-3],x);
|
LLStringUtil::convertToS32(path_array[path_parts-3].asString(),x);
|
||||||
LLStringUtil::convertToS32(path_array[path_parts-2],y);
|
LLStringUtil::convertToS32(path_array[path_parts-2].asString(),y);
|
||||||
LLStringUtil::convertToS32(path_array[path_parts-1],z);
|
LLStringUtil::convertToS32(path_array[path_parts-1].asString(),z);
|
||||||
|
|
||||||
if((x>= 0 && x<= 256) && (y>= 0 && y<= 256) && (z>= 0))
|
if((x>= 0 && x<= 256) && (y>= 0 && y<= 256) && (z>= 0))
|
||||||
{
|
{
|
||||||
@@ -398,8 +396,8 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const
|
|||||||
{
|
{
|
||||||
// handle slurl with (X,Y) coordinates
|
// handle slurl with (X,Y) coordinates
|
||||||
|
|
||||||
LLStringUtil::convertToS32(path_array[path_parts-2],x);
|
LLStringUtil::convertToS32(path_array[path_parts-2].asString(),x);
|
||||||
LLStringUtil::convertToS32(path_array[path_parts-1],y);
|
LLStringUtil::convertToS32(path_array[path_parts-1].asString(),y);
|
||||||
;
|
;
|
||||||
if((x>= 0 && x<= 256) && (y>= 0 && y<= 256))
|
if((x>= 0 && x<= 256) && (y>= 0 && y<= 256))
|
||||||
{
|
{
|
||||||
@@ -409,7 +407,7 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const
|
|||||||
else if (path_parts == (actual_parts-2))
|
else if (path_parts == (actual_parts-2))
|
||||||
{
|
{
|
||||||
// handle slurl with (X) coordinate
|
// handle slurl with (X) coordinate
|
||||||
LLStringUtil::convertToS32(path_array[path_parts-1],x);
|
LLStringUtil::convertToS32(path_array[path_parts-1].asString(),x);
|
||||||
if(x>= 0 && x<= 256)
|
if(x>= 0 && x<= 256)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -427,6 +425,7 @@ LLUrlEntrySLURL::LLUrlEntrySLURL()
|
|||||||
// see http://slurl.com/about.php for details on the SLURL format
|
// see http://slurl.com/about.php for details on the SLURL format
|
||||||
mPattern = boost::regex("https?://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?\\S*)?)?",
|
mPattern = boost::regex("https?://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?\\S*)?)?",
|
||||||
boost::regex::perl|boost::regex::icase);
|
boost::regex::perl|boost::regex::icase);
|
||||||
|
mIcon = "Hand";
|
||||||
mMenuName = "menu_url_slurl.xml";
|
mMenuName = "menu_url_slurl.xml";
|
||||||
mTooltip = LLTrans::getString("TooltipSLURL");
|
mTooltip = LLTrans::getString("TooltipSLURL");
|
||||||
}
|
}
|
||||||
@@ -643,10 +642,11 @@ bool LLUrlEntryAgent::underlineOnHoverOnly(const std::string &string) const
|
|||||||
|
|
||||||
std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||||
{
|
{
|
||||||
|
static std::string name_wait_str = LLTrans::getString("LoadingData");
|
||||||
if (!gCacheName)
|
if (!gCacheName)
|
||||||
{
|
{
|
||||||
// probably at the login screen, use short string for layout
|
// probably at the login screen, use short string for layout
|
||||||
return LLTrans::getString("LoadingData");
|
return name_wait_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string agent_id_string = getIDStringFromUrl(url);
|
std::string agent_id_string = getIDStringFromUrl(url);
|
||||||
@@ -673,19 +673,16 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (cb)
|
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2));
|
||||||
{
|
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2));
|
addObserver(agent_id_string, url, cb);
|
||||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
return name_wait_str;
|
||||||
addObserver(agent_id_string, url, cb);
|
|
||||||
}
|
|
||||||
return LLTrans::getString("LoadingData");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLStyleSP LLUrlEntryAgent::getStyle() const
|
LLStyleSP LLUrlEntryAgent::getStyle() const
|
||||||
{
|
{
|
||||||
static LLUICachedControl<LLColor4> color("HTMLAgentColor");
|
static const LLUICachedControl<LLColor4> color("HTMLAgentColor");
|
||||||
LLStyleSP style_params(new LLStyle(true, color, LLStringUtil::null));
|
LLStyleSP style_params(new LLStyle(true, color, LLStringUtil::null));
|
||||||
return style_params;
|
return style_params;
|
||||||
}
|
}
|
||||||
@@ -762,10 +759,11 @@ void LLUrlEntryAgentName::onAvatarNameCache(const LLUUID& id,
|
|||||||
|
|
||||||
std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||||
{
|
{
|
||||||
|
static std::string name_wait_str = LLTrans::getString("LoadingData");
|
||||||
if (!gCacheName)
|
if (!gCacheName)
|
||||||
{
|
{
|
||||||
// probably at the login screen, use short string for layout
|
// probably at the login screen, use short string for layout
|
||||||
return LLTrans::getString("LoadingData");
|
return name_wait_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string agent_id_string = getIDStringFromUrl(url);
|
std::string agent_id_string = getIDStringFromUrl(url);
|
||||||
@@ -788,19 +786,16 @@ std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLab
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (cb)
|
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2));
|
||||||
{
|
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2));
|
addObserver(agent_id_string, url, cb);
|
||||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
return name_wait_str;
|
||||||
addObserver(agent_id_string, url, cb);
|
|
||||||
}
|
|
||||||
return LLTrans::getString("LoadingData");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLStyleSP LLUrlEntryAgentName::getStyle() const
|
LLStyleSP LLUrlEntryAgentName::getStyle() const
|
||||||
{
|
{
|
||||||
static LLUICachedControl<LLColor4> color("HTMLAgentColor");
|
static const LLUICachedControl<LLColor4> color("HTMLAgentColor");
|
||||||
LLStyleSP style_params(new LLStyle(true, color, LLStringUtil::null));
|
LLStyleSP style_params(new LLStyle(true, color, LLStringUtil::null));
|
||||||
return style_params;
|
return style_params;
|
||||||
}
|
}
|
||||||
@@ -927,13 +922,10 @@ std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCa
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (cb)
|
gCacheName->getGroup(group_id,
|
||||||
{
|
boost::bind(&LLUrlEntryGroup::onGroupNameReceived,
|
||||||
gCacheName->getGroup(group_id,
|
this, _1, _2, _3));
|
||||||
boost::bind(&LLUrlEntryGroup::onGroupNameReceived,
|
addObserver(group_id_string, url, cb);
|
||||||
this, _1, _2, _3));
|
|
||||||
addObserver(group_id_string, url, cb);
|
|
||||||
}
|
|
||||||
return LLTrans::getString("LoadingData");
|
return LLTrans::getString("LoadingData");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1037,7 +1029,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC
|
|||||||
std::string parcel_id_string = unescapeUrl(path_array[2]); // parcel id
|
std::string parcel_id_string = unescapeUrl(path_array[2]); // parcel id
|
||||||
|
|
||||||
// Add an observer to call LLUrlLabelCallback when we have parcel name.
|
// Add an observer to call LLUrlLabelCallback when we have parcel name.
|
||||||
if (cb) addObserver(parcel_id_string, url, cb);
|
addObserver(parcel_id_string, url, cb);
|
||||||
|
|
||||||
LLUUID parcel_id(parcel_id_string);
|
LLUUID parcel_id(parcel_id_string);
|
||||||
|
|
||||||
@@ -1084,11 +1076,8 @@ void LLUrlEntryParcel::processParcelInfo(const LLParcelData& parcel_data)
|
|||||||
parcel_data.sim_name.c_str(), region_x, region_y, region_z);
|
parcel_data.sim_name.c_str(), region_x, region_y, region_z);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (std::set<LLUrlEntryParcel*>::iterator iter = sParcelInfoObservers.begin();
|
for (auto url_entry : sParcelInfoObservers)
|
||||||
iter != sParcelInfoObservers.end();
|
|
||||||
++iter)
|
|
||||||
{
|
{
|
||||||
LLUrlEntryParcel* url_entry = *iter;
|
|
||||||
if (url_entry)
|
if (url_entry)
|
||||||
{
|
{
|
||||||
url_entry->onParcelInfoReceived(parcel_data.parcel_id.asString(), label);
|
url_entry->onParcelInfoReceived(parcel_data.parcel_id.asString(), label);
|
||||||
@@ -1432,8 +1421,9 @@ std::string LLUrlEntryNoLink::getLabel(const std::string &url, const LLUrlLabelC
|
|||||||
LLStyleSP LLUrlEntryNoLink::getStyle() const
|
LLStyleSP LLUrlEntryNoLink::getStyle() const
|
||||||
{
|
{
|
||||||
// Don't render as URL (i.e. no context menu or hand cursor).
|
// Don't render as URL (i.e. no context menu or hand cursor).
|
||||||
// Singu Note: What the heck? No, that's misleading!!
|
LLStyleSP style(new LLStyle());
|
||||||
return LLUrlEntryBase::getStyle();
|
style->setLinkHREF(" ");
|
||||||
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1538,4 +1528,3 @@ std::string LLUrlEntryJira::getUrl(const std::string &url) const
|
|||||||
}
|
}
|
||||||
// </alchemy>
|
// </alchemy>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class LLAvatarName;
|
|||||||
typedef boost::signals2::signal<void (const std::string& url,
|
typedef boost::signals2::signal<void (const std::string& url,
|
||||||
const std::string& label,
|
const std::string& label,
|
||||||
const std::string& icon)> LLUrlLabelSignal;
|
const std::string& icon)> LLUrlLabelSignal;
|
||||||
typedef LLUrlLabelSignal::slot_function_type LLUrlLabelCallback;
|
typedef LLUrlLabelSignal::slot_type LLUrlLabelCallback;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// LLUrlEntryBase is the base class of all Url types registered in the
|
/// LLUrlEntryBase is the base class of all Url types registered in the
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url, const std
|
|||||||
mTooltip = tooltip;
|
mTooltip = tooltip;
|
||||||
mIcon = icon;
|
mIcon = icon;
|
||||||
mStyle = style;
|
mStyle = style;
|
||||||
mStyle->setLinkHREF(url);
|
mStyle->setLinkHREF(mStyle->isLink() ? LLStringUtil::null : url); // Singu Note: This hack exists in lieu of no link flag
|
||||||
mMenuName = menu;
|
mMenuName = menu;
|
||||||
mLocation = location;
|
mLocation = location;
|
||||||
mID = id;
|
mID = id;
|
||||||
|
|||||||
@@ -12,8 +12,10 @@ include(BuildPackagesInfo)
|
|||||||
include(BuildVersion)
|
include(BuildVersion)
|
||||||
include(BuildBranding)
|
include(BuildBranding)
|
||||||
include(CMakeCopyIfDifferent)
|
include(CMakeCopyIfDifferent)
|
||||||
|
include(CrashPad)
|
||||||
include(DBusGlib)
|
include(DBusGlib)
|
||||||
include(FMODSTUDIO)
|
include(FMODSTUDIO)
|
||||||
|
include(GeneratePrecompiledHeader)
|
||||||
include(GLOD)
|
include(GLOD)
|
||||||
include(Hunspell)
|
include(Hunspell)
|
||||||
include(Json)
|
include(Json)
|
||||||
@@ -48,6 +50,15 @@ include(WinManifest)
|
|||||||
include(ZLIB)
|
include(ZLIB)
|
||||||
include(URIPARSER)
|
include(URIPARSER)
|
||||||
|
|
||||||
|
|
||||||
|
if(USE_FMODSTUDIO)
|
||||||
|
include_directories(${FMODSTUDIO_INCLUDE_DIR})
|
||||||
|
endif(USE_FMODSTUDIO)
|
||||||
|
|
||||||
|
if(USE_CRASHPAD)
|
||||||
|
include_directories(${CRASHPAD_INCLUDE_DIRS})
|
||||||
|
endif(USE_CRASHPAD)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${STATEMACHINE_INCLUDE_DIRS}
|
${STATEMACHINE_INCLUDE_DIRS}
|
||||||
${DBUSGLIB_INCLUDE_DIRS}
|
${DBUSGLIB_INCLUDE_DIRS}
|
||||||
@@ -70,6 +81,7 @@ include_directories(
|
|||||||
${LLWINDOW_INCLUDE_DIRS}
|
${LLWINDOW_INCLUDE_DIRS}
|
||||||
${LLXML_INCLUDE_DIRS}
|
${LLXML_INCLUDE_DIRS}
|
||||||
${HUNSPELL_INCLUDE_DIR}
|
${HUNSPELL_INCLUDE_DIR}
|
||||||
|
${OPENAL_LIB_INCLUDE_DIRS}
|
||||||
${LLAPPEARANCE_INCLUDE_DIRS}
|
${LLAPPEARANCE_INCLUDE_DIRS}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
@@ -142,7 +154,6 @@ set(viewer_SOURCE_FILES
|
|||||||
llconfirmationmanager.cpp
|
llconfirmationmanager.cpp
|
||||||
llconsole.cpp
|
llconsole.cpp
|
||||||
llcontrolavatar.cpp
|
llcontrolavatar.cpp
|
||||||
llcrashlogger.cpp
|
|
||||||
llcurrencyuimanager.cpp
|
llcurrencyuimanager.cpp
|
||||||
llcylinder.cpp
|
llcylinder.cpp
|
||||||
lldaycyclemanager.cpp
|
lldaycyclemanager.cpp
|
||||||
@@ -349,6 +360,7 @@ set(viewer_SOURCE_FILES
|
|||||||
llnamebox.cpp
|
llnamebox.cpp
|
||||||
llnameeditor.cpp
|
llnameeditor.cpp
|
||||||
llnamelistctrl.cpp
|
llnamelistctrl.cpp
|
||||||
|
llnameui.cpp
|
||||||
llnetmap.cpp
|
llnetmap.cpp
|
||||||
llnotify.cpp
|
llnotify.cpp
|
||||||
lloutfitobserver.cpp
|
lloutfitobserver.cpp
|
||||||
@@ -605,9 +617,6 @@ set(viewer_SOURCE_FILES
|
|||||||
wlfPanel_AdvSettings.cpp
|
wlfPanel_AdvSettings.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(VIEWER_BINARY_NAME "singularity-bin" CACHE STRING
|
|
||||||
"The name of the viewer executable to create.")
|
|
||||||
|
|
||||||
set(viewer_HEADER_FILES
|
set(viewer_HEADER_FILES
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
ViewerInstall.cmake
|
ViewerInstall.cmake
|
||||||
@@ -679,7 +688,6 @@ set(viewer_HEADER_FILES
|
|||||||
llconfirmationmanager.h
|
llconfirmationmanager.h
|
||||||
llconsole.h
|
llconsole.h
|
||||||
llcontrolavatar.h
|
llcontrolavatar.h
|
||||||
llcrashlogger.h
|
|
||||||
llcurrencyuimanager.h
|
llcurrencyuimanager.h
|
||||||
llcylinder.h
|
llcylinder.h
|
||||||
lldaycyclemanager.h
|
lldaycyclemanager.h
|
||||||
@@ -886,6 +894,7 @@ set(viewer_HEADER_FILES
|
|||||||
llnamebox.h
|
llnamebox.h
|
||||||
llnameeditor.h
|
llnameeditor.h
|
||||||
llnamelistctrl.h
|
llnamelistctrl.h
|
||||||
|
llnameui.h
|
||||||
llnetmap.h
|
llnetmap.h
|
||||||
llnotify.h
|
llnotify.h
|
||||||
lloutfitobserver.h
|
lloutfitobserver.h
|
||||||
@@ -1153,12 +1162,12 @@ set(viewer_HEADER_FILES
|
|||||||
|
|
||||||
source_group("CMake Rules" FILES ViewerInstall.cmake)
|
source_group("CMake Rules" FILES ViewerInstall.cmake)
|
||||||
|
|
||||||
|
#build_data.json creation moved to viewer_manifest.py MAINT-6413
|
||||||
# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild
|
# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild
|
||||||
# the summary.json file is created for the benefit of the TeamCity builds, where
|
# the summary.json file is created for the benefit of the TeamCity builds, where
|
||||||
# it is used to provide descriptive information to the build results page
|
# it is used to provide descriptive information to the build results page
|
||||||
add_custom_target(generate_viewer_version ALL
|
add_custom_target(generate_viewer_version ALL
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION} > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
COMMAND ${CMAKE_COMMAND} -E echo ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION} > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo {"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"} > ${CMAKE_BINARY_DIR}/summary.json
|
|
||||||
COMMENT "Generating viewer_version.txt for manifest processing"
|
COMMENT "Generating viewer_version.txt for manifest processing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1227,26 +1236,13 @@ if (WINDOWS)
|
|||||||
llwindebug.h
|
llwindebug.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NVAPI)
|
if (USE_NVAPI)
|
||||||
set(APPVWRW32_COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS} -DUSE_NVAPI=1")
|
set(APPVWRW32_COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS} -DUSE_NVAPI=1")
|
||||||
else (NVAPI)
|
else (USE_NVAPI)
|
||||||
set(APPVWRW32_COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS} -UUSE_NVAPI")
|
set(APPVWRW32_COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS} -UUSE_NVAPI")
|
||||||
endif (NVAPI)
|
endif (USE_NVAPI)
|
||||||
set_source_files_properties(llappviewerwin32.cpp PROPERTIES COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS}")
|
set_source_files_properties(llappviewerwin32.cpp PROPERTIES COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS}")
|
||||||
|
|
||||||
# precompiled header configuration
|
|
||||||
# llviewerprecompiledheaders.cpp generates
|
|
||||||
# the .pch file.
|
|
||||||
# All sources added to viewer_SOURCE_FILES
|
|
||||||
# at this point use it.
|
|
||||||
if(USE_PRECOMPILED_HEADERS)
|
|
||||||
set_source_files_properties(llviewerprecompiledheaders.cpp
|
|
||||||
PROPERTIES
|
|
||||||
COMPILE_FLAGS "/Ycllviewerprecompiledheaders.h"
|
|
||||||
)
|
|
||||||
list(APPEND viewer_SOURCE_FILES llviewerprecompiledheaders.cpp)
|
|
||||||
endif(USE_PRECOMPILED_HEADERS)
|
|
||||||
|
|
||||||
# Replace the icons with the appropriate ones for the channel
|
# Replace the icons with the appropriate ones for the channel
|
||||||
# ('test' is the default)
|
# ('test' is the default)
|
||||||
set(ICON_PATH "default")
|
set(ICON_PATH "default")
|
||||||
@@ -1313,16 +1309,16 @@ if (WINDOWS)
|
|||||||
set_source_files_properties(${viewer_RESOURCE_FILES}
|
set_source_files_properties(${viewer_RESOURCE_FILES}
|
||||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||||
|
|
||||||
set(viewer_RESOURCE_FILES
|
|
||||||
|
list(APPEND viewer_RESOURCE_FILES
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/viewerRes.rc
|
${CMAKE_CURRENT_BINARY_DIR}/viewerRes.rc
|
||||||
${viewer_RESOURCE_FILES}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/viewerRes.rc
|
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/viewerRes.rc
|
||||||
PROPERTIES COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/res"
|
PROPERTIES COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/res"
|
||||||
)
|
)
|
||||||
|
|
||||||
SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES})
|
source_group("Resource Files" FILES ${viewer_RESOURCE_FILES})
|
||||||
|
|
||||||
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
|
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
|
||||||
|
|
||||||
@@ -1385,7 +1381,6 @@ set(viewer_APPSETTINGS_FILES
|
|||||||
app_settings/settings.xml
|
app_settings/settings.xml
|
||||||
app_settings/settings_ascent.xml
|
app_settings/settings_ascent.xml
|
||||||
app_settings/settings_ascent_coa.xml
|
app_settings/settings_ascent_coa.xml
|
||||||
app_settings/settings_crash_behavior.xml
|
|
||||||
app_settings/settings_files.xml
|
app_settings/settings_files.xml
|
||||||
app_settings/settings_per_account.xml
|
app_settings/settings_per_account.xml
|
||||||
app_settings/settings_sh.xml
|
app_settings/settings_sh.xml
|
||||||
@@ -1432,7 +1427,15 @@ if (WINDOWS)
|
|||||||
list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES})
|
list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES})
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
|
if (OPENAL)
|
||||||
|
list(APPEND LLSTARTUP_COMPILE_DEFINITIONS "LL_OPENAL=1")
|
||||||
|
endif (OPENAL)
|
||||||
|
|
||||||
|
if (USE_FMODSTUDIO)
|
||||||
|
list(APPEND LLSTARTUP_COMPILE_DEFINITIONS "LL_FMODSTUDIO=1")
|
||||||
|
endif (USE_FMODSTUDIO)
|
||||||
|
|
||||||
|
set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_DEFINITIONS "${LLSTARTUP_COMPILE_DEFINITIONS}")
|
||||||
|
|
||||||
if (LIBVLCPLUGIN)
|
if (LIBVLCPLUGIN)
|
||||||
set_source_files_properties(llfloaterabout.cpp PROPERTIES COMPILE_DEFINITIONS "VLCPLUGIN=1")
|
set_source_files_properties(llfloaterabout.cpp PROPERTIES COMPILE_DEFINITIONS "VLCPLUGIN=1")
|
||||||
@@ -1451,8 +1454,13 @@ add_executable(${VIEWER_BINARY_NAME}
|
|||||||
${viewer_SOURCE_FILES}
|
${viewer_SOURCE_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PACKAGE OFF CACHE BOOL
|
if(USE_PRECOMPILED_HEADERS)
|
||||||
"Add a package target that builds an installer package.")
|
target_precompiled_header(${VIEWER_BINARY_NAME}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/llviewerprecompiledheaders.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/llviewerprecompiledheaders.cpp)
|
||||||
|
endif(USE_PRECOMPILED_HEADERS)
|
||||||
|
|
||||||
|
option(PACKAGE "Add a package target that builds an installer package." ON)
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
set(release_flags "/MAP")
|
set(release_flags "/MAP")
|
||||||
@@ -1465,15 +1473,17 @@ if (WINDOWS)
|
|||||||
LINK_FLAGS_RELWITHDEBINFO "${release_flags} ${EXTRA_LINKER_FLAGS_RELEASE}"
|
LINK_FLAGS_RELWITHDEBINFO "${release_flags} ${EXTRA_LINKER_FLAGS_RELEASE}"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(${VIEWER_BINARY_NAME} generate_viewer_version)
|
if(GEN_IS_MULTI_CONFIG)
|
||||||
|
set(VIEWER_BUILD_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
||||||
|
set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES
|
||||||
|
VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
else()
|
||||||
|
set(VIEWER_BUILD_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/package")
|
||||||
|
set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY "${VIEWER_BUILD_DEST_DIR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(USE_PRECOMPILED_HEADERS)
|
add_dependencies(${VIEWER_BINARY_NAME} generate_viewer_version)
|
||||||
set_target_properties(
|
|
||||||
${VIEWER_BINARY_NAME}
|
|
||||||
PROPERTIES
|
|
||||||
COMPILE_FLAGS "/Yullviewerprecompiledheaders.h"
|
|
||||||
)
|
|
||||||
endif(USE_PRECOMPILED_HEADERS)
|
|
||||||
|
|
||||||
# If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency
|
# If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency
|
||||||
# here.
|
# here.
|
||||||
@@ -1488,7 +1498,6 @@ if (WINDOWS)
|
|||||||
set(GOOGLE_PERF_TOOLS_SOURCE
|
set(GOOGLE_PERF_TOOLS_SOURCE
|
||||||
${SHARED_LIB_STAGING_DIR}/Release/libtcmalloc_minimal.dll
|
${SHARED_LIB_STAGING_DIR}/Release/libtcmalloc_minimal.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll
|
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll
|
|
||||||
)
|
)
|
||||||
endif(NOT DISABLE_TCMALLOC)
|
endif(NOT DISABLE_TCMALLOC)
|
||||||
|
|
||||||
@@ -1497,66 +1506,54 @@ if (WINDOWS)
|
|||||||
#${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll
|
#${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll
|
||||||
${CMAKE_SOURCE_DIR}/../etc/message.xml
|
${CMAKE_SOURCE_DIR}/../etc/message.xml
|
||||||
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
|
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/Release/glod.dll
|
${SHARED_LIB_STAGING_DIR}/Release/glod.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/glod.dll
|
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/glod.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/Debug/glod.dll
|
${SHARED_LIB_STAGING_DIR}/Release/SLVoice.exe
|
||||||
${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll
|
${SHARED_LIB_STAGING_DIR}/Release/vivoxplatform.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/Release/libhunspell.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe
|
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxplatform.dll
|
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ca-bundle.crt
|
|
||||||
${GOOGLE_PERF_TOOLS_SOURCE}
|
${GOOGLE_PERF_TOOLS_SOURCE}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/featuretable_xp.txt
|
|
||||||
${ARCH_PREBUILT_DIRS_RELEASE}/libeay32.dll
|
|
||||||
${ARCH_PREBUILT_DIRS_RELEASE}/ssleay32.dll
|
|
||||||
${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll
|
|
||||||
${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll
|
|
||||||
SLPlugin
|
SLPlugin
|
||||||
media_plugin_libvlc
|
media_plugin_libvlc
|
||||||
media_plugin_cef
|
media_plugin_cef
|
||||||
windows-crash-logger
|
basic_plugin_filepicker
|
||||||
)
|
)
|
||||||
|
|
||||||
if (ADDRESS_SIZE EQUAL 64)
|
if (ADDRESS_SIZE EQUAL 64)
|
||||||
list(APPEND COPY_INPUT_DEPENDENCIES
|
list(APPEND COPY_INPUT_DEPENDENCIES
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk_x64.dll
|
${SHARED_LIB_STAGING_DIR}/Release/vivoxsdk_x64.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp_x64.dll
|
${SHARED_LIB_STAGING_DIR}/Release/ortp_x64.dll
|
||||||
)
|
)
|
||||||
else (ADDRESS_SIZE EQUAL 64)
|
else (ADDRESS_SIZE EQUAL 64)
|
||||||
list(APPEND COPY_INPUT_DEPENDENCIES
|
list(APPEND COPY_INPUT_DEPENDENCIES
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll
|
${SHARED_LIB_STAGING_DIR}/Release/vivoxsdk.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll
|
${SHARED_LIB_STAGING_DIR}/Release/ortp.dll
|
||||||
)
|
)
|
||||||
endif (ADDRESS_SIZE EQUAL 64)
|
endif (ADDRESS_SIZE EQUAL 64)
|
||||||
|
|
||||||
if (FMODSTUDIO)
|
if (USE_FMODSTUDIO)
|
||||||
if (WORD_SIZE EQUAL 64)
|
if (ADDRESS_SIZE EQUAL 64)
|
||||||
list(APPEND COPY_INPUT_DEPENDENCIES
|
list(APPEND COPY_INPUT_DEPENDENCIES
|
||||||
${SHARED_LIB_STAGING_DIR}/Release/fmod64.dll
|
${SHARED_LIB_STAGING_DIR}/Release/fmod64.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod64.dll
|
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod64.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/Debug/fmodL64.dll
|
${SHARED_LIB_STAGING_DIR}/Debug/fmodL64.dll
|
||||||
)
|
)
|
||||||
else (WORD_SIZE EQUAL 64)
|
else (ADDRESS_SIZE EQUAL 64)
|
||||||
list(APPEND COPY_INPUT_DEPENDENCIES
|
list(APPEND COPY_INPUT_DEPENDENCIES
|
||||||
${SHARED_LIB_STAGING_DIR}/Release/fmod.dll
|
${SHARED_LIB_STAGING_DIR}/Release/fmod.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll
|
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll
|
||||||
${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll
|
|
||||||
)
|
)
|
||||||
endif (WORD_SIZE EQUAL 64)
|
endif (ADDRESS_SIZE EQUAL 64)
|
||||||
endif (FMODSTUDIO)
|
endif (USE_FMODSTUDIO)
|
||||||
|
|
||||||
|
if(MSVC_IDE)
|
||||||
|
set(VIEWER_BUILD_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
||||||
|
else()
|
||||||
|
set(VIEWER_BUILD_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/packaged")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat
|
OUTPUT ${VIEWER_BUILD_DEST_DIR}/copy_touched.bat
|
||||||
COMMAND ${PYTHON_EXECUTABLE}
|
COMMAND ${PYTHON_EXECUTABLE}
|
||||||
ARGS
|
ARGS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||||
@@ -1566,13 +1563,13 @@ if (WINDOWS)
|
|||||||
--branding_id=${VIEWER_BRANDING_ID}
|
--branding_id=${VIEWER_BRANDING_ID}
|
||||||
--build=${CMAKE_CURRENT_BINARY_DIR}
|
--build=${CMAKE_CURRENT_BINARY_DIR}
|
||||||
--buildtype=${CMAKE_BUILD_TYPE}
|
--buildtype=${CMAKE_BUILD_TYPE}
|
||||||
--configuration=${CMAKE_CFG_INTDIR}
|
--configuration=${VIEWER_BUILD_DEST_DIR}
|
||||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
--dest=${VIEWER_BUILD_DEST_DIR}
|
||||||
--grid=${GRID}
|
--grid=${GRID}
|
||||||
--channel=${VIEWER_CHANNEL}
|
--channel=${VIEWER_CHANNEL}
|
||||||
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
||||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
|
--touch=${VIEWER_BUILD_DEST_DIR}/copy_touched.bat
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||||
generate_viewer_version
|
generate_viewer_version
|
||||||
@@ -1582,7 +1579,7 @@ if (WINDOWS)
|
|||||||
COMMENT "Performing viewer_manifest copy"
|
COMMENT "Performing viewer_manifest copy"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${CMAKE_CFG_INTDIR}/copy_touched.bat)
|
add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${VIEWER_BUILD_DEST_DIR}/copy_touched.bat)
|
||||||
|
|
||||||
add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon copy_w_viewer_manifest)
|
add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon copy_w_viewer_manifest)
|
||||||
|
|
||||||
@@ -1599,7 +1596,7 @@ if (WINDOWS)
|
|||||||
if (PACKAGE)
|
if (PACKAGE)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat
|
OUTPUT ${VIEWER_BUILD_DEST_DIR}/touched.bat
|
||||||
COMMAND ${PYTHON_EXECUTABLE}
|
COMMAND ${PYTHON_EXECUTABLE}
|
||||||
ARGS
|
ARGS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||||
@@ -1610,11 +1607,11 @@ if (WINDOWS)
|
|||||||
--buildtype=${CMAKE_BUILD_TYPE}
|
--buildtype=${CMAKE_BUILD_TYPE}
|
||||||
--channel=${VIEWER_CHANNEL}
|
--channel=${VIEWER_CHANNEL}
|
||||||
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
||||||
--configuration=${CMAKE_CFG_INTDIR}
|
--configuration=${VIEWER_BUILD_DEST_DIR}
|
||||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
--dest=${VIEWER_BUILD_DEST_DIR}
|
||||||
--grid=${GRID}
|
--grid=${GRID}
|
||||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat
|
--touch=${VIEWER_BUILD_DEST_DIR}/touched.bat
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${VIEWER_BINARY_NAME}
|
${VIEWER_BINARY_NAME}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||||
@@ -1623,7 +1620,7 @@ if (WINDOWS)
|
|||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(llpackage ALL DEPENDS
|
add_custom_target(llpackage ALL DEPENDS
|
||||||
${CMAKE_CFG_INTDIR}/touched.bat
|
${VIEWER_BUILD_DEST_DIR}/touched.bat
|
||||||
windows-setup-build-all
|
windows-setup-build-all
|
||||||
)
|
)
|
||||||
endif (PACKAGE)
|
endif (PACKAGE)
|
||||||
@@ -1639,6 +1636,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
|||||||
${PNG_PRELOAD_ARCHIVES}
|
${PNG_PRELOAD_ARCHIVES}
|
||||||
${ZLIB_PRELOAD_ARCHIVES}
|
${ZLIB_PRELOAD_ARCHIVES}
|
||||||
${GOOGLE_PERFTOOLS_LIBRARIES}
|
${GOOGLE_PERFTOOLS_LIBRARIES}
|
||||||
|
${CRASHPAD_LIBRARIES}
|
||||||
${LLAUDIO_LIBRARIES}
|
${LLAUDIO_LIBRARIES}
|
||||||
${LLAUDIO_VORBIS_LIBRARIES}
|
${LLAUDIO_VORBIS_LIBRARIES}
|
||||||
${LLCHARACTER_LIBRARIES}
|
${LLCHARACTER_LIBRARIES}
|
||||||
@@ -1686,6 +1684,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
|||||||
${LLAPPEARANCE_LIBRARIES}
|
${LLAPPEARANCE_LIBRARIES}
|
||||||
absl::flat_hash_map
|
absl::flat_hash_map
|
||||||
absl::node_hash_map
|
absl::node_hash_map
|
||||||
|
${FMT_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
@@ -1837,8 +1836,10 @@ if (INSTALL)
|
|||||||
include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake)
|
include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake)
|
||||||
endif (INSTALL)
|
endif (INSTALL)
|
||||||
|
|
||||||
if (PACKAGE)
|
if (FALSE)
|
||||||
|
# Breakpad symbol-file generation
|
||||||
set(SYMBOL_NAME ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_CHANNEL_NOSPACE}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}-symbols)
|
set(SYMBOL_NAME ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_CHANNEL_NOSPACE}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}-symbols)
|
||||||
|
|
||||||
set(SYMBOL_SEARCH_DIRS "")
|
set(SYMBOL_SEARCH_DIRS "")
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
||||||
@@ -1863,19 +1864,18 @@ if (PACKAGE)
|
|||||||
if (LINUX)
|
if (LINUX)
|
||||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged")
|
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged")
|
||||||
set(VIEWER_SYMBOL_FILE "${SYMBOL_NAME}-${AUTOBUILD_PLATFORM_NAME}.tar.bz2")
|
set(VIEWER_SYMBOL_FILE "${SYMBOL_NAME}-${AUTOBUILD_PLATFORM_NAME}.tar.bz2")
|
||||||
set(VIEWER_EXE_GLOBS "${VIEWER_BRANDING_ID}-do-not-run-directly SLPlugin")
|
set(VIEWER_EXE_GLOBS "do-not-directly-run-${VIEWER_BINARY_NAME} SLPlugin")
|
||||||
set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*")
|
set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*")
|
||||||
set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest)
|
set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest)
|
||||||
endif (LINUX)
|
endif (LINUX)
|
||||||
|
|
||||||
if(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
|
if(GEN_IS_MULTI_CONFIG)
|
||||||
if(CMAKE_CFG_INTDIR STREQUAL ".")
|
|
||||||
set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE})
|
set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE})
|
||||||
else(CMAKE_CFG_INTDIR STREQUAL ".")
|
else()
|
||||||
# set LLBUILD_CONFIG to be a shell variable evaluated at build time
|
# set LLBUILD_CONFIG to be a shell variable evaluated at build time
|
||||||
# reflecting the configuration we are currently building.
|
# reflecting the configuration we are currently building.
|
||||||
set(LLBUILD_CONFIG ${CMAKE_CFG_INTDIR})
|
set(LLBUILD_CONFIG ${CMAKE_CFG_INTDIR})
|
||||||
endif(CMAKE_CFG_INTDIR STREQUAL ".")
|
endif()
|
||||||
add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
|
add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
|
||||||
COMMAND "${PYTHON_EXECUTABLE}"
|
COMMAND "${PYTHON_EXECUTABLE}"
|
||||||
ARGS
|
ARGS
|
||||||
@@ -1889,14 +1889,14 @@ if (PACKAGE)
|
|||||||
DEPENDS generate_breakpad_symbols.py
|
DEPENDS generate_breakpad_symbols.py
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
||||||
add_custom_target(generate_breakpad_symbols DEPENDS "${VIEWER_SYMBOL_FILE}")
|
add_custom_target(generate_symbols DEPENDS "${VIEWER_SYMBOL_FILE}" ${VIEWER_BINARY_NAME} "${VIEWER_COPY_MANIFEST}")
|
||||||
add_dependencies(generate_breakpad_symbols ${VIEWER_BINARY_NAME})
|
add_dependencies(generate_symbols ${VIEWER_BINARY_NAME})
|
||||||
if(VIEWER_COPY_MANIFEST)
|
if (WINDOWS OR LINUX)
|
||||||
add_dependencies(generate_breakpad_symbols ${VIEWER_COPY_MANIFEST})
|
add_dependencies(generate_symbols "${VIEWER_COPY_MANIFEST}")
|
||||||
endif(VIEWER_COPY_MANIFEST)
|
endif (WINDOWS OR LINUX)
|
||||||
add_dependencies(llpackage generate_breakpad_symbols)
|
|
||||||
endif(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
|
add_dependencies(llpackage generate_symbols)
|
||||||
endif (PACKAGE)
|
endif ()
|
||||||
|
|
||||||
# Add tests
|
# Add tests
|
||||||
if (LL_TESTS)
|
if (LL_TESTS)
|
||||||
|
|||||||
@@ -2079,6 +2079,24 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>IsCOA</key>
|
<key>IsCOA</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
|
<key>LogChatColor</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Color of chat messages loaded from your log</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Color4</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>1.0</real>
|
||||||
|
</array>
|
||||||
|
<key>IsCOA</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</map>
|
||||||
<key>UISndAlert</key>
|
<key>UISndAlert</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -2538,17 +2556,6 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
<!-- Standard SL options (To my knowledge) -->
|
<!-- Standard SL options (To my knowledge) -->
|
||||||
<key>CrashHostUrl</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>A URL pointing to a crash report handler; overrides cluster negotiation to locate crash handler.</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>String</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<string>http://crash.singularityviewer.org/report.php</string>>
|
|
||||||
</map>
|
|
||||||
<key>AFKTimeout</key>
|
<key>AFKTimeout</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -10750,17 +10757,6 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>18</integer>
|
<integer>18</integer>
|
||||||
</map>
|
</map>
|
||||||
<key>MenuBarWidth</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string/>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>0</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>S32</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<integer>410</integer>
|
|
||||||
</map>
|
|
||||||
<key>MeshEnabled</key>
|
<key>MeshEnabled</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -12685,7 +12681,10 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>AlwaysRenderFriends</key>
|
<key>AlwaysRenderFriends</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Always render friends regardless of max complexity, a value of 2 will only render friends</string>
|
<string>0 - Render avatars with complexity below RenderAvatarMaxComplexity
|
||||||
|
1 - Always renders friends, regardless of max complexity
|
||||||
|
2 - Only renders friends
|
||||||
|
3 - Only renders self</string>
|
||||||
<key>Persist</key>
|
<key>Persist</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
@@ -18979,24 +18978,13 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>CrashSubmitBehavior</key>
|
<key>CrashSubmitBehavior</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Controls behavior when viewer crashes (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)</string>
|
<string>Controls behavior when viewer crashes (0 = never send crash report, 1 = always send crash report)</string>
|
||||||
<key>Persist</key>
|
<key>Persist</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
<string>S32</string>
|
<string>S32</string>
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>0</integer>
|
<integer>-1</integer>
|
||||||
</map>
|
|
||||||
<key>CrashReportID</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>ID of the last crash report sent. Zero indicates that no crash report has been sent. Non-zero value can be useful infermation for developers to track a specific issue</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>S32</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<integer>0</integer>
|
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<key>EveryoneCopy</key>
|
<key>EveryoneCopy</key>
|
||||||
|
|||||||
@@ -91,6 +91,17 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
|
<key>ProfileNameSystem</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>For a name displayed on its profile. 0 = Old Style, 1 = Display Names and Username, 2 = Displayname only, 3 = Old Style (Display Name)</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>S32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</map>
|
||||||
<key>RadarNameSystem</key>
|
<key>RadarNameSystem</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -135,6 +146,28 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<string>/resync</string>
|
<string>/resync</string>
|
||||||
</map>
|
</map>
|
||||||
|
<key>AlchemyChatCommandSetChatChannel</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Command to set nearby chat channel</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>String</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<string>/setchannel</string>
|
||||||
|
</map>
|
||||||
|
<key>AlchemyChatCommandSetHome</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Command to set the avatar home</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>String</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<string>/sethome</string>
|
||||||
|
</map>
|
||||||
<key>AlchemyConnectToNeighbors</key>
|
<key>AlchemyConnectToNeighbors</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -201,6 +234,17 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
|
<key>AlchemyNearbyChatChannel</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Chat channel used for sending nearby chat from the viewer</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>S32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</map>
|
||||||
<key>AlchemyRainbowEffects</key>
|
<key>AlchemyRainbowEffects</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -763,6 +807,17 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<string>key2name</string>
|
<string>key2name</string>
|
||||||
</map>
|
</map>
|
||||||
|
<key>AscentCmdLineKeyToNameNameSystem</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>For key to name command defined by AscentCmdLineKeyToName, the format to show the key's name in. 0 = Old Style, 1 = Display Names and Username, 2 = Displayname only, 3 = Old Style (Display Name)</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>S32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</map>
|
||||||
<key>AscentCmdLineOfferTp</key>
|
<key>AscentCmdLineOfferTp</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -840,17 +895,6 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<string>/open</string>
|
<string>/open</string>
|
||||||
</map>
|
</map>
|
||||||
<key>SinguCompleteNameProfiles</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>Use the complete name "Display Name (legacy.name)" in profiles, instead of following the choice set by PhoenixNameSystem.</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>Boolean</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<boolean>0</boolean>
|
|
||||||
</map>
|
|
||||||
<key>SinguDefaultEaseIn</key>
|
<key>SinguDefaultEaseIn</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -873,6 +917,17 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<real>0</real>
|
<real>0</real>
|
||||||
</map>
|
</map>
|
||||||
|
<key>SinguFollowDistance</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Distance at which to follow objects and avatars at, from menus that offer follow (minimum 0.5)</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>F32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
</map>
|
||||||
<key>SinguLastKnownReleaseBuild</key>
|
<key>SinguLastKnownReleaseBuild</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
<llsd>
|
|
||||||
<map>
|
|
||||||
<key>CrashSubmitBehavior</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>Controls behavior when viewer crashes (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>2</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>S32</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
</map>
|
|
||||||
</map>
|
|
||||||
</llsd>
|
|
||||||
@@ -43,13 +43,6 @@
|
|||||||
<key>Requirement</key>
|
<key>Requirement</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
<key>CrashSettings</key>
|
|
||||||
<map>
|
|
||||||
<key>Name</key>
|
|
||||||
<string>settings_crash_behavior.xml</string>
|
|
||||||
<key>Requirement</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
</map>
|
|
||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
<key>User</key>
|
<key>User</key>
|
||||||
@@ -65,11 +58,6 @@
|
|||||||
<key>NameFromSetting</key>
|
<key>NameFromSetting</key>
|
||||||
<string>ClientSettingsFile</string>
|
<string>ClientSettingsFile</string>
|
||||||
</map>
|
</map>
|
||||||
<key>CrashSettings</key>
|
|
||||||
<map>
|
|
||||||
<key>Name</key>
|
|
||||||
<string>settings_crash_behavior.xml</string>
|
|
||||||
</map>
|
|
||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
<key>Account</key>
|
<key>Account</key>
|
||||||
|
|||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>1.0799999237060547</real>
|
||||||
|
<real>0.98999994993209839</real>
|
||||||
|
<real>0.77999997138977051</real>
|
||||||
|
<real>1.0799999237060547</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>0.64736837148666382</real>
|
||||||
|
<real>0.48414888978004456</real>
|
||||||
|
<real>0.81999999284744263</real>
|
||||||
|
<real>0.40999999642372131</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.49548381567001343</real>
|
||||||
|
<real>0.45999997854232788</real>
|
||||||
|
<real>0.51999998092651367</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.4100000062111997</real>
|
||||||
|
<real>0.4100000062111997</real>
|
||||||
|
<real>0.4100000062111997</real>
|
||||||
|
<real>0.4100000062111997</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.14000000059604645</real>
|
||||||
|
<real>0.62000000476837158</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>0.35999998450279236</real>
|
||||||
|
<real>0.56999999284744263</real>
|
||||||
|
<real>0.12999999523162842</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.35999998450279236</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1.0000000149011612</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.199999791580112</real>
|
||||||
|
<real>10.010999679880427</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.29999998211860657</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1.0000000149011612</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>7.9999997979030013e-005</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1.0000000149011612</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>5.4000000953674316</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1.0000000149011612</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>1.0932743549346924</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>2.1699998378753662</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1.0000000149011612</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.19999980926513672</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-0.55000001192092896</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>0.31999999284744263</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.17999999225139618</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>0.39627334475517273</real>
|
||||||
|
<real>0.89494067430496216</real>
|
||||||
|
<real>-0.20505768060684204</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>805</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1.0000000149011612</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>28</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>0.25999999046325684</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>2.0332944393157959</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.69882339239120483</real>
|
||||||
|
<real>0.8258824348449707</real>
|
||||||
|
<real>1.0799999237060547</real>
|
||||||
|
<real>0.35999998450279236</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>2</real>
|
||||||
|
<real>2</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.57999998331069946</real>
|
||||||
|
<real>0.87000000476837158</real>
|
||||||
|
<real>0.75</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>1.6884100437164307</real>
|
||||||
|
<real>0.52609699964523315</real>
|
||||||
|
<real>0.073541670078411725</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.99999994039535522</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.088005410620646</real>
|
||||||
|
<real>10.010458310484864</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>5.1599996368167922e-005</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.80000001192092896</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>3.091327428817749</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>0.69569998979568481</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.19999980926513672</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-2.5</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>3</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.59999996423721313</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>0.0098020657896995544</real>
|
||||||
|
<real>0.9807855486869812</real>
|
||||||
|
<real>0.1948426365852356</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>4000</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>22</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>0</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>1.7671445608139038</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>1.5</real>
|
||||||
|
<real>1.5</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>1.8235294818878174</real>
|
||||||
|
<real>1.2352941036224365</real>
|
||||||
|
<real>1.5411765575408936</real>
|
||||||
|
<real>0.60784316062927246</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1.2000000476837158</real>
|
||||||
|
<real>1.4039216041564941</real>
|
||||||
|
<real>1.6392157077789307</real>
|
||||||
|
<real>0.81960785388946533</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>1.2000000476837158</real>
|
||||||
|
<real>1.4039216041564941</real>
|
||||||
|
<real>1.6392157077789307</real>
|
||||||
|
<real>0.81960785388946533</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.57999998331069946</real>
|
||||||
|
<real>0.87000000476837158</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>1.6884100437164307</real>
|
||||||
|
<real>0.52609699964523315</real>
|
||||||
|
<real>0.073541670078411725</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.96579998731613159</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.088005410620646</real>
|
||||||
|
<real>10.010458310484864</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.00020660000154748559</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>6.2000002861022949</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>0.29530972242355347</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>0.95649999380111694</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>9.4000005722045898</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-0.44999998807907104</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>2.059999942779541</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>0.268882155418396</real>
|
||||||
|
<real>0.38268527388572693</real>
|
||||||
|
<real>-0.88388597965240479</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>788</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>22</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>0.1029166579246521</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>2.7488915920257568</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>1.5</real>
|
||||||
|
<real>1.5</real>
|
||||||
|
<real>1.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.76829999685287476</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.125</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.059000000357627869</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.49940033104544</real>
|
||||||
|
<real>10.011000058908452</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.26999998092651367</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.00025079998886212707</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>14</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>0.19477875530719757</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>16.80000114440918</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-0.59999996423721313</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1.1499999761581421</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.17000000178813934</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>-0.14745019376277924</real>
|
||||||
|
<real>0.64778679609298706</real>
|
||||||
|
<real>0.74741601943969727</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>4000</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>21</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>1.7856996059417725</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>0.70467567443847656</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.76829999685287476</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.125</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.059000000357627869</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.49940033104544</real>
|
||||||
|
<real>10.011000058908452</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.26999998092651367</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.00025079998886212707</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>14</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>0.19477875530719757</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>16.80000114440918</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-0.59999996423721313</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1.1499999761581421</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.17000000178813934</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>-0.14745019376277924</real>
|
||||||
|
<real>0.64778679609298706</real>
|
||||||
|
<real>0.74741601943969727</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>4000</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>21</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>1.7856996059417725</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>0.70467567443847656</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.76829999685287476</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.125</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.059000000357627869</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.49940033104544</real>
|
||||||
|
<real>10.011000058908452</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.26999998092651367</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.00025079998886212707</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>14</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>0.19477875530719757</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>3.3912999629974365</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>16.80000114440918</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-0.59999996423721313</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1.1499999761581421</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.17000000178813934</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>-0.14745019376277924</real>
|
||||||
|
<real>0.64778679609298706</real>
|
||||||
|
<real>0.74741601943969727</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>4000</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>21</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>1.7856996059417725</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>0.70467567443847656</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0.15000000596046448</real>
|
||||||
|
<real>0.15000000596046448</real>
|
||||||
|
<real>0.15000000596046448</real>
|
||||||
|
<real>0.05000000074505806</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>0.89999997615814209</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.93999999761581421</real>
|
||||||
|
<real>0.22999998927116394</real>
|
||||||
|
<real>0.38409999012947083</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0.50999999046325684</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.31279999017715454</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.199999809265137</real>
|
||||||
|
<real>10.01099967956543</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.43999999761581421</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>7.3799994424916804e-005</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>13.199999809265137</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>1.9477875232696533</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>0</boolean>
|
||||||
|
<boolean>0</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>1.3999999761581421</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>5</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-0.47999998927116394</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>0.69999998807907104</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.26999998092651367</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>-0.51655691862106323</real>
|
||||||
|
<real>0.83146905899047852</real>
|
||||||
|
<real>-0.20451940596103668</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>242</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>22</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>0</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>0.98174667358398438</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>2.6999998092651367</real>
|
||||||
|
<real>2.6999998092651367</real>
|
||||||
|
<real>2.6999998092651367</real>
|
||||||
|
<real>0.89999997615814209</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>0.89999997615814209</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>2</real>
|
||||||
|
<real>2</real>
|
||||||
|
<real>2</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.22615529217625469</real>
|
||||||
|
<real>0.22615529217625469</real>
|
||||||
|
<real>0.22615529217625469</real>
|
||||||
|
<real>0.99999702096404042</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.88000003558816353</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.125</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.41999998688697815</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.49940033104544</real>
|
||||||
|
<real>10.011000058908452</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.26999998092651367</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.0003761999832931906</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>31.80000114440918</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>0</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>5.3999996185302734</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-0.74999994039535522</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>3.6292644654378239</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.017144030545153739</real>
|
||||||
|
<real>0.19915600403562983</real>
|
||||||
|
<real>0.19915600403562983</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0.29445916414260864</real>
|
||||||
|
<real>-0.95566403865814209</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>869.42607640502217</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>21</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>1.7856996059417725</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>2.842703104019165</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0.1875</real>
|
||||||
|
<real>0.1875</real>
|
||||||
|
<real>0.1875</real>
|
||||||
|
<real>0.0625</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>0.89999997615814209</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>0.89999997615814209</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.40999999642372131</real>
|
||||||
|
<real>0.40999999642372131</real>
|
||||||
|
<real>0.40999999642372131</real>
|
||||||
|
<real>0.40999999642372131</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>1.6884100437164307</real>
|
||||||
|
<real>0.52609699964523315</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>1.6884100437164307</real>
|
||||||
|
<real>0.52609699964523315</real>
|
||||||
|
<real>0.125</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.41999998688697815</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.199999809265137</real>
|
||||||
|
<real>10.01099967956543</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.44999998807907104</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.00013000000035390258</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>21.700000762939453</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>1.9477875232696533</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>1.3999999761581421</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>5</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-0.47999998927116394</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>0.69999998807907104</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.20999999344348907</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>-0.51655691862106323</real>
|
||||||
|
<real>0.83146905899047852</real>
|
||||||
|
<real>-0.20451940596103668</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>242</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>22</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>0</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>0.98174667358398438</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>2.6999998092651367</real>
|
||||||
|
<real>2.6999998092651367</real>
|
||||||
|
<real>2.6999998092651367</real>
|
||||||
|
<real>0.89999997615814209</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0.1875</real>
|
||||||
|
<real>0.1875</real>
|
||||||
|
<real>0.1875</real>
|
||||||
|
<real>0.0625</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>0.89999997615814209</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>1.7999999523162842</real>
|
||||||
|
<real>0.89999997615814209</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>1.6884100437164307</real>
|
||||||
|
<real>0.52609699964523315</real>
|
||||||
|
<real>0.99409997463226318</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>1.6884100437164307</real>
|
||||||
|
<real>0.52609699964523315</real>
|
||||||
|
<real>0.125</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.49579998850822449</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.70001220703125</real>
|
||||||
|
<real>10.01099967956543</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.29999998211860657</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.00015750000602565706</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>4.5999999046325684</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>1.9477875232696533</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>1.3999999761581421</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>5</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-0.47999998927116394</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>1.7400000095367432</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.070000000298023224</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>-0.51655691862106323</real>
|
||||||
|
<real>0.83146905899047852</real>
|
||||||
|
<real>-0.20451940596103668</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>11</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>22</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>0</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>0.98174667358398438</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>2.6999998092651367</real>
|
||||||
|
<real>2.6999998092651367</real>
|
||||||
|
<real>2.6999998092651367</real>
|
||||||
|
<real>0.89999997615814209</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.76829999685287476</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.00039999998989515007</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.49940033104544</real>
|
||||||
|
<real>10.011000058908452</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.19999998807907104</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.0010865998920053244</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>1000</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>1.5016813278198242</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
<boolean>1</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>0.17999999225139618</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>40</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>-10</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>5</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>5</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>0.97396135330200195</real>
|
||||||
|
<real>0.21645671129226685</real>
|
||||||
|
<real>-0.067422725260257721</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>2077</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>21</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>0</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>2.9234089851379395</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<llsd>
|
||||||
|
<map>
|
||||||
|
<key>ambient</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_density</key>
|
||||||
|
<array>
|
||||||
|
<real>0.39999997615814209</real>
|
||||||
|
<real>0.39999997615814209</real>
|
||||||
|
<real>0.39999997615814209</real>
|
||||||
|
<real>0.19999998807907104</real>
|
||||||
|
</array>
|
||||||
|
<key>blue_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_color</key>
|
||||||
|
<array>
|
||||||
|
<real>0.22617273092134837</real>
|
||||||
|
<real>0.2261830306064212</real>
|
||||||
|
<real>0.22618354559006093</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density1</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_pos_density2</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0.12499716758729562</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scale</key>
|
||||||
|
<array>
|
||||||
|
<real>0.22999998927116394</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_scroll_rate</key>
|
||||||
|
<array>
|
||||||
|
<real>10.499370784775238</real>
|
||||||
|
<real>10.011009025563908</real>
|
||||||
|
</array>
|
||||||
|
<key>cloud_shadow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.26999998092651367</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>density_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>0.00089999998454004526</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>distance_multiplier</key>
|
||||||
|
<array>
|
||||||
|
<real>100</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>east_angle</key>
|
||||||
|
<real>0</real>
|
||||||
|
<key>enable_cloud_scroll</key>
|
||||||
|
<array>
|
||||||
|
<boolean>0</boolean>
|
||||||
|
<boolean>0</boolean>
|
||||||
|
</array>
|
||||||
|
<key>gamma</key>
|
||||||
|
<array>
|
||||||
|
<real>1</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>glow</key>
|
||||||
|
<array>
|
||||||
|
<real>0.19999980926513672</real>
|
||||||
|
<real>0.0010000000474974513</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_density</key>
|
||||||
|
<array>
|
||||||
|
<real>0.5</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>haze_horizon</key>
|
||||||
|
<array>
|
||||||
|
<real>0.32999998331069946</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>0.19915600121021271</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>lightnorm</key>
|
||||||
|
<array>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
<real>-4.3711388286737929e-008</real>
|
||||||
|
<real>0</real>
|
||||||
|
</array>
|
||||||
|
<key>max_y</key>
|
||||||
|
<array>
|
||||||
|
<real>4000</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>0</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
<key>preset_num</key>
|
||||||
|
<integer>18</integer>
|
||||||
|
<key>star_brightness</key>
|
||||||
|
<real>0</real>
|
||||||
|
<key>sun_angle</key>
|
||||||
|
<real>1.5707963705062866</real>
|
||||||
|
<key>sunlight_color</key>
|
||||||
|
<array>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>3</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
</llsd>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user