Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • NiranV.Dean/blackdragon
  • logue/blackdragon
2 results
Show changes
Commits on Source (8331)
Showing
with 2420 additions and 1641 deletions
* text=auto
# Sources
*.cpp text diff=cpp
*.h text diff=cpp
*.py text diff=python
# Visual Studio
*.sln text eol=crlf
*.vcproj text eol=crlf
*.vcxproj text eol=crlf
# Documents
*.txt text
*.xml text
indra/tools/vstool/README.txt -text
indra/newview/installers/windows/FILES_ARE_UNICODE_UTF-16LE.txt -text
# Graphics
*.png binary diff=exif
*.jpg binary diff=exif
*.jpeg binary diff=exif
*.gif binary diff=exif
*.tif binary
*.tiff binary
*.ico binary
*.svg text
*.eps binary
*.tga binary
*.j2k binary
*.j2c binary
*.icns binary
*.bmp binary
*.BMP binary
# Scripts
*.sh text eol=lf
*.bat text eol=crlf
# Viewer Files
*.db2 binary
*.llm binary
# Fonts
*.ttf binary
*.otf binary
# Mac
*.nib binary
*.exe binary
# Exclude files from exporting
.gitattributes export-ignore
.gitignore export-ignore
changelog:
exclude:
labels:
- ignore-for-release
authors:
- dependabot
categories:
- title: Breaking Changes 🛠
labels:
- semver-major
- breaking-change
- title: New Features 🎉
labels:
- semver-minor
- enhancement
- title: Other Changes
labels:
- '*'
name: Build
on:
workflow_dispatch:
pull_request:
push:
branches: ["*"]
tags: ["*"]
jobs:
build:
strategy:
matrix:
runner: [windows-large, macos-12-xl]
configuration: [Release, ReleaseOS]
python-version: ["3.11"]
include:
- runner: macos-12-xl
developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer"
exclude:
- runner: macos-12-xl
configuration: ReleaseOS
runs-on: ${{ matrix.runner }}
outputs:
viewer_channel: ${{ steps.build.outputs.viewer_channel }}
viewer_version: ${{ steps.build.outputs.viewer_version }}
imagename: ${{ steps.build.outputs.imagename }}
env:
AUTOBUILD_ADDRSIZE: 64
AUTOBUILD_BUILD_ID: ${{ github.run_id }}
AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }}
# authorizes fetching private constituent packages
AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }}
AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables
AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables
AUTOBUILD_VSVER: "170"
DEVELOPER_DIR: ${{ matrix.developer_dir }}
# Ensure that Linden viewer builds engage Bugsplat.
BUGSPLAT_DB: ${{ matrix.configuration != 'ReleaseOS' && 'SecondLife_Viewer_2018' || '' }}
BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
build_coverity: false
build_log_dir: ${{ github.workspace }}/.logs
build_viewer: true
BUILDSCRIPTS_SHARED: ${{ github.workspace }}/.shared
# extracted and committed to viewer repo
BUILDSCRIPTS_SUPPORT_FUNCTIONS: ${{ github.workspace }}/buildscripts_support_functions
GIT_REF: ${{ github.head_ref || github.ref }}
LL_SKIP_REQUIRE_SYSROOT: 1
# Setting this variable directs Linden's TUT test driver code to capture
# test-program log output at the specified level, but to display it only if
# the individual test fails.
LOGFAIL: DEBUG
master_message_template_checkout: ${{ github.workspace }}/.master-message-template
# Only set variants to the one configuration: don't let build.sh loop
# over variants, let GitHub distribute variants over multiple hosts.
variants: ${{ matrix.configuration }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout build variables
uses: actions/checkout@v4
with:
repository: secondlife/build-variables
ref: viewer
path: .build-variables
- name: Checkout master-message-template
uses: actions/checkout@v4
with:
repository: secondlife/master-message-template
path: .master-message-template
- name: Install autobuild and python dependencies
run: pip3 install autobuild llsd
- name: Cache autobuild packages
uses: actions/cache@v3
id: cache-installables
with:
path: .autobuild-installables
key: ${{ runner.os }}-64-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }}
restore-keys: |
${{ runner.os }}-64-${{ matrix.configuration }}-
${{ runner.os }}-64-
- name: Install windows dependencies
if: runner.os == 'Windows'
run: choco install nsis-unicode
- name: Build
id: build
shell: bash
env:
RUNNER_OS: ${{ runner.os }}
run: |
# set up things the viewer's build.sh script expects
set -x
mkdir -p "$build_log_dir"
mkdir -p "$BUILDSCRIPTS_SHARED/packages/lib/python"
source "$BUILDSCRIPTS_SUPPORT_FUNCTIONS"
if [[ "$OSTYPE" =~ cygwin|msys ]]
then
native_path() { cygpath --windows "$1"; }
shell_path() { cygpath --unix "$1"; }
else
native_path() { echo "$1"; }
shell_path() { echo "$1"; }
fi
finalize()
{
case "$1" in
true|0)
record_success "Build Succeeded"
;;
*)
record_failure "Build Failed with $1"
;;
esac
}
initialize_build()
{
echo "initialize_build"
}
initialize_version()
{
export revision="$AUTOBUILD_BUILD_ID"
}
python_cmd()
{
if [[ "x${1:0:1}" == "x-" ]] # -m, -c, etc.
then # if $1 is a switch, don't try to twiddle paths
"$(shell_path "$PYTHON_COMMAND")" "$@"
elif [[ "$(basename "$1")" == "codeticket.py" ]]
then # ignore any attempt to contact codeticket
echo "## $@"
else # running a script at an explicit path: fix path for Python
local script="$1"
shift
"$(shell_path "$PYTHON_COMMAND")" "$(native_path "$script")" "$@"
fi
}
repo_branch()
{
git -C "$1" branch | grep '^* ' | cut -c 3-
}
record_dependencies_graph()
{
echo "TODO: generate and post dependency graph"
}
# Since we're not uploading to codeticket, DO NOT sleep for minutes.
sleep()
{
echo "Not sleeping for $1 seconds"
}
export -f native_path shell_path finalize initialize_build initialize_version
export -f python_cmd repo_branch record_dependencies_graph sleep
## Useful for diagnosing Windows LLProcess/LLLeap test failures
##export APR_LOG="${RUNNER_TEMP}/apr.log"
export arch=$(uname | cut -b-6)
# Surprise! GH Windows runner's MINGW6 is a $arch value we've never
# seen before, so numerous tests don't know about it.
[[ "$arch" == "MINGW6" ]] && arch=CYGWIN
export AUTOBUILD="$(which autobuild)"
# Build with a tag like "Second_Life_Project_Shiny#abcdef0" to get a
# viewer channel "Second Life Project Shiny" (ignoring "#hash",
# needed to disambiguate tags).
if [[ "$GITHUB_REF_TYPE" == "tag" && "${GITHUB_REF_NAME:0:12}" == "Second_Life_" ]]
then viewer_channel="${GITHUB_REF_NAME%#*}"
export viewer_channel="${viewer_channel//_/ }"
else export viewer_channel="Second Life Test"
fi
echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT"
# On windows we need to point the build to the correct python
# as neither CMake's FindPython nor our custom Python.cmake module
# will resolve the correct interpreter location.
if [[ "$RUNNER_OS" == "Windows" ]]; then
export PYTHON="$(native_path "$(which python)")"
echo "Python location: $PYTHON"
export PYTHON_COMMAND="$PYTHON"
else
export PYTHON_COMMAND="python3"
fi
export PYTHON_COMMAND_NATIVE="$(native_path "$PYTHON_COMMAND")"
./build.sh
# Each artifact is downloaded as a distinct .zip file. Multiple jobs
# (per the matrix above) writing the same filepath to the same
# artifact name will *overwrite* that file. Moreover, they can
# interfere with each other, causing the upload to fail.
# https://github.com/actions/upload-artifact#uploading-to-the-same-artifact
# Given the size of our installers, and the fact that we typically
# only want to download just one instead of a single zip containing
# several, generate a distinct artifact name for each installer.
# If the matrix above can run multiple builds on the same
# platform, we must disambiguate on more than the platform name.
# e.g. if we were still running Windows 32-bit builds, we'd need to
# qualify the artifact with bit width.
if [[ "$AUTOBUILD_CONFIGURATION" == "ReleaseOS" ]]
then cfg_suffix='OS'
else cfg_suffix=''
fi
echo "artifact=$RUNNER_OS$cfg_suffix" >> $GITHUB_OUTPUT
- name: Upload executable
if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_app
uses: actions/upload-artifact@v3
with:
name: "${{ steps.build.outputs.artifact }}-app"
path: |
${{ steps.build.outputs.viewer_app }}
# The other upload of nontrivial size is the symbol file. Use a distinct
# artifact for that too.
- name: Upload symbol file
if: matrix.configuration != 'ReleaseOS'
uses: actions/upload-artifact@v3
with:
name: "${{ steps.build.outputs.artifact }}-symbols"
path: |
${{ steps.build.outputs.symbolfile }}
- name: Upload metadata
if: matrix.configuration != 'ReleaseOS'
uses: actions/upload-artifact@v3
with:
name: "${{ steps.build.outputs.artifact }}-metadata"
# emitted by build.sh, possibly multiple lines
path: |
${{ steps.build.outputs.metadata }}
- name: Upload physics package
uses: actions/upload-artifact@v3
# should only be set for viewer-private
if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.physicstpv
with:
name: "${{ steps.build.outputs.artifact }}-physics"
# emitted by build.sh, zero or one lines
path: |
${{ steps.build.outputs.physicstpv }}
sign-and-package-windows:
needs: build
runs-on: windows
steps:
- name: Sign and package Windows viewer
uses: secondlife/viewer-build-util/sign-pkg-windows@v1
with:
vault_uri: "${{ secrets.AZURE_KEY_VAULT_URI }}"
cert_name: "${{ secrets.AZURE_CERT_NAME }}"
client_id: "${{ secrets.AZURE_CLIENT_ID }}"
client_secret: "${{ secrets.AZURE_CLIENT_SECRET }}"
tenant_id: "${{ secrets.AZURE_TENANT_ID }}"
sign-and-package-mac:
needs: build
runs-on: macos-latest
steps:
- name: Unpack Mac notarization credentials
id: note-creds
shell: bash
run: |
# In NOTARIZE_CREDS_MACOS we expect to find:
# USERNAME="..."
# PASSWORD="..."
# TEAM_ID="..."
eval "${{ secrets.NOTARIZE_CREDS_MACOS }}"
echo "::add-mask::$USERNAME"
echo "::add-mask::$PASSWORD"
echo "::add-mask::$TEAM_ID"
echo "note_user=$USERNAME" >> "$GITHUB_OUTPUT"
echo "note_pass=$PASSWORD" >> "$GITHUB_OUTPUT"
echo "note_team=$TEAM_ID" >> "$GITHUB_OUTPUT"
# If we didn't manage to retrieve all of these credentials, better
# find out sooner than later.
[[ -n "$USERNAME" && -n "$PASSWORD" && -n "$TEAM_ID" ]]
- name: Sign and package Mac viewer
uses: secondlife/viewer-build-util/sign-pkg-mac@v1
with:
channel: ${{ needs.build.outputs.viewer_channel }}
imagename: ${{ needs.build.outputs.imagename }}
cert_base64: ${{ secrets.SIGNING_CERT_MACOS }}
cert_name: ${{ secrets.SIGNING_CERT_MACOS_IDENTITY }}
cert_pass: ${{ secrets.SIGNING_CERT_MACOS_PASSWORD }}
note_user: ${{ steps.note-creds.outputs.note_user }}
note_pass: ${{ steps.note-creds.outputs.note_pass }}
note_team: ${{ steps.note-creds.outputs.note_team }}
post-windows-symbols:
needs: build
runs-on: ubuntu-latest
steps:
- name: Post Windows symbols
uses: secondlife/viewer-build-util/post-bugsplat-windows@v1
with:
username: ${{ secrets.BUGSPLAT_USER }}
password: ${{ secrets.BUGSPLAT_PASS }}
database: "SecondLife_Viewer_2018"
channel: ${{ needs.build.outputs.viewer_channel }}
version: ${{ needs.build.outputs.viewer_version }}
post-mac-symbols:
needs: build
runs-on: ubuntu-latest
steps:
- name: Post Mac symbols
uses: secondlife/viewer-build-util/post-bugsplat-mac@v1
with:
username: ${{ secrets.BUGSPLAT_USER }}
password: ${{ secrets.BUGSPLAT_PASS }}
database: "SecondLife_Viewer_2018"
channel: ${{ needs.build.outputs.viewer_channel }}
version: ${{ needs.build.outputs.viewer_version }}
release:
needs: [sign-and-package-windows, sign-and-package-mac]
runs-on: ubuntu-latest
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_')
steps:
- uses: actions/download-artifact@v3
with:
name: Windows-installer
- uses: actions/download-artifact@v3
with:
name: macOS-installer
- uses: actions/download-artifact@v3
with:
name: Windows-metadata
- name: Rename windows metadata
run: |
mv autobuild-package.xml Windows-autobuild-package.xml
mv newview/viewer_version.txt Windows-viewer_version.txt
- uses: actions/download-artifact@v3
with:
name: macOS-metadata
- name: Rename macOS metadata
run: |
mv autobuild-package.xml macOS-autobuild-package.xml
mv newview/viewer_version.txt macOS-viewer_version.txt
# forked from softprops/action-gh-release
- uses: secondlife-3p/action-gh-release@v1
with:
# name the release page for the build number so we can find it
# easily (analogous to looking up a codeticket build page)
name: "v${{ github.run_id }}"
prerelease: true
generate_release_notes: true
# the only reason we generate a GH release is to post build products
fail_on_unmatched_files: true
files: |
*.dmg
*.exe
*-autobuild-package.xml
*-viewer_version.txt
name: pre-commit
on:
pull_request:
push:
branches: [main, contribute]
tags: [v*]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.0
name: Stale PRs
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
id: stale
with:
stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days
days-before-stale: 30
days-before-close: 7
exempt-pr-labels: blocked,must,should,keep
stale-pr-label: stale
- name: Print outputs
run: echo ${{ join(steps.stale.outputs.*, ',') }}
...@@ -7,9 +7,18 @@ ...@@ -7,9 +7,18 @@
*.pyc *.pyc
*.rej *.rej
*.swp *.swp
*.vcxproj
*.filters
*.sln
*.depend
*.stamp
*.rc
*~ *~
# Specific paths and/or names # Specific paths and/or names
CMakeCache.txt
cmake_install.cmake
LICENSES LICENSES
build-darwin-* build-darwin-*
build-linux-* build-linux-*
...@@ -17,14 +26,15 @@ debian/files ...@@ -17,14 +26,15 @@ debian/files
debian/secondlife-appearance-utility* debian/secondlife-appearance-utility*
debian/secondlife-viewer* debian/secondlife-viewer*
indra/.distcc indra/.distcc
indra/cmake/*
indra/out/*
indra/packages/*
build-vc80/ build-vc80/
build-vc100/ build-vc100/
build-vc120/ build-vc120/
build-vc120-32/ build-vc*-32/
build-vc120-64/ build-vc*-64/
build-vc150-32/
build-vc150-64/
build-vc160-64/
indra/CMakeFiles indra/CMakeFiles
indra/build-vc[0-9]* indra/build-vc[0-9]*
indra/lib/mono/1.0/*.dll indra/lib/mono/1.0/*.dll
...@@ -76,4 +86,7 @@ tarfile_tmp ...@@ -76,4 +86,7 @@ tarfile_tmp
trivial_change_force_build trivial_change_force_build
web/config.* web/config.*
web/locale.* web/locale.*
web/secondlife.com.* web/secondlife.com.*
\ No newline at end of file
.env
.vscode
471361eabfbf2865016a50e8087712b2266e83c7
\ No newline at end of file
264c7688ecdba8432a64f36a24e389eb85cbc10d
\ No newline at end of file
59b305ccfba9d4ba7935475d31f94b6ecfe415a4
\ No newline at end of file
[Viewer/Build]
* Changed compiler options for "Release with Debug" builds
* Changed compiler and linker options for "Release" builds
* Removed LL's changeset tags and added new (consistent) SL-X.Y.Z tags for releases
* Break into the debugger rather than forcing the process into an unrecoverable state for "llerrs" on non-release builds
-> Windows only
* Set the "UNATTENDED" flag to FALSE for all (Windows) *OS build configurations
* CATZ-234: Updated FMOD Ex library to v4.44.61 (Windows)
* CATZ-232: Updated OpenJPEG library to v1.5.2 (Windows)
* [FIXED] Viewer fails to compile with only the Windows 8 SDK installed
* [FIXED] JpegLib is built with "Whole Program Optimization" and causing slow linker performance
repos: repos:
- repo: https://bitbucket.org/lindenlab/git-hooks.git - repo: https://github.com/secondlife/git-hooks.git
rev: v1.0.0-beta2 rev: v1.0.0
hooks: hooks:
- id: opensource-license - id: opensource-license
- id: jira-issue
- id: llsd - id: llsd
- id: no-trigraphs - id: no-trigraphs
- id: copyright - id: copyright
...@@ -11,7 +10,7 @@ repos: ...@@ -11,7 +10,7 @@ repos:
files: \.(cpp|c|h|py|glsl|cmake|txt)$ files: \.(cpp|c|h|py|glsl|cmake|txt)$
exclude: language.txt exclude: language.txt
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0 rev: v4.4.0
hooks: hooks:
- id: check-xml - id: check-xml
- id: mixed-line-ending - id: mixed-line-ending
...@@ -37,7 +37,7 @@ BUILDSCRIPTS_PY3 = "true" ...@@ -37,7 +37,7 @@ BUILDSCRIPTS_PY3 = "true"
# All Linden Lab builds (and only Linden Lab builds) # All Linden Lab builds (and only Linden Lab builds)
# should use a viewer_channel that begins with "Second Life" # should use a viewer_channel that begins with "Second Life"
################################################################ ################################################################
viewer_channel = "Second Life Test" viewer_channel = "Black Dragon"
################################################################ ################################################################
......
<picture> Black Dragon Viewer
<source media="(prefers-color-scheme: dark)" srcset="doc/sl-logo-dark.png"> ====================
<source media="(prefers-color-scheme: light)" srcset="doc/sl-logo.png"> This project manages the source code for the
<img alt="Second Life Logo" src="doc/sl-logo.png"> [Black Dragon](https://niranv-sl.blogspot.de/) Viewer.
</picture>
**[Second Life][] is a free 3D virtual world where users can create, connect and chat with others from around the This source is available as open source; for details on licensing, see
world.** This repository contains the source code for the official client. [the licensing page on the Second Life wiki](https://wiki.secondlife.com/wiki/Linden_Lab_Official:Second_Life_Viewer_Licensing_Program)
## Open Source For information on how to use and contribute to this, see
[the open source portal on the wiki](https://wiki.secondlife.com/wiki/Open_Source_Portal).
Second Life provides a huge variety of tools for expression, content creation, socialization and play. Its vibrancy is To download the current default version, visit
only possible because of input and contributions from its residents. The client codebase has been open source since [the download page](https://secondlife.com/support/downloads). For
2007 and is available under the LGPL license. The [Open Source Portal][] contains additional information about Linden even newer versions try
Lab's open source history and projects. [the Alternate Viewers page](https://wiki.secondlife.com/wiki/Linden_Lab_Official:Alternate_Viewers)
## Download
Most people use a pre-built viewer release to access Second Life. Windows and macOS builds are
[published on the official website][download]. More experimental viewers, such as release candidates and
project viewers, are detailed on the [Alternate Viewers page](https://releasenotes.secondlife.com/viewer.html).
### Third Party Viewers
Third party maintained forks, which include Linux compatible builds, are indexed in the [Third Party Viewer Directory][tpv].
## Build Instructions
[Windows](https://wiki.secondlife.com/wiki/Build_the_Viewer_on_Windows)
[Mac](https://wiki.secondlife.com/wiki/Build_the_Viewer_on_macOS)
[Linux](https://wiki.secondlife.com/wiki/Build_the_Viewer_on_Linux)
## Contribute
Help make Second Life better! You can get involved with improvements by filing bugs, suggesting enhancements, submitting
pull requests and more. See the [open source portal][] for details.
[Second Life]: https://secondlife.com/
[download]: https://secondlife.com/support/downloads/
[tpv]: http://wiki.secondlife.com/wiki/Third_Party_Viewer_Directory
[open source portal]: http://wiki.secondlife.com/wiki/Open_Source_Portal
This diff is collapsed.
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
# * The special style in which python is invoked is intentional to permit # * The special style in which python is invoked is intentional to permit
# use of a native python install on windows - which requires paths in DOS form # use of a native python install on windows - which requires paths in DOS form
cleanup="true"
retry_cmd() retry_cmd()
{ {
max_attempts="$1"; shift max_attempts="$1"; shift
...@@ -110,6 +112,34 @@ installer_CYGWIN() ...@@ -110,6 +112,34 @@ installer_CYGWIN()
fi fi
} }
[[ -n "$GITHUB_OUTPUT" ]] || fatal "Need to export GITHUB_OUTPUT"
# The following is based on the Warning for GitHub multiline output strings:
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
# Build up these arrays as we go
metadata=()
symbolfile=()
physicstpv=()
# and dump them to GITHUB_OUTPUT when done
cleanup="$cleanup ; \
arrayoutput metadata ; \
arrayoutput symbolfile ; \
arrayoutput physicstpv"
trap "$cleanup" EXIT
arrayoutput()
{
local outputname="$1"
# append "[*]" to the array name so array indirection works
local array="$1[*]"
local IFS='
'
echo "$outputname<<$EOF
${!array}
$EOF" >> "$GITHUB_OUTPUT"
}
pre_build() pre_build()
{ {
local variant="$1" local variant="$1"
...@@ -121,7 +151,7 @@ pre_build() ...@@ -121,7 +151,7 @@ pre_build()
RELEASE_CRASH_REPORTING=ON RELEASE_CRASH_REPORTING=ON
HAVOK=ON HAVOK=ON
SIGNING=() SIGNING=()
if [ "$arch" == "Darwin" -a "$variant" == "Release" ] if [[ "$arch" == "Darwin" && "$variant" == "Release" ]]
then SIGNING=("-DENABLE_SIGNING:BOOL=YES" \ then SIGNING=("-DENABLE_SIGNING:BOOL=YES" \
"-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.") "-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.")
fi fi
...@@ -145,21 +175,29 @@ pre_build() ...@@ -145,21 +175,29 @@ pre_build()
VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")" VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")"
fi fi
# don't spew credentials into build log # expect these variables to be set in the environment from GitHub secrets
bugsplat_sh="$build_secrets_checkout/bugsplat/bugsplat.sh" if [[ -n "$BUGSPLAT_DB" ]]
set +x then
if [ -r "$bugsplat_sh" ] # don't spew credentials into build log
then # show that we're doing this, just not the contents set +x
echo source "$bugsplat_sh" if [[ -z "$BUGSPLAT_USER" || -z "$BUGSPLAT_PASS" ]]
source "$bugsplat_sh" then
# older mechanism involving build-secrets repo -
# if build_secrets_checkout isn't set, report its name
bugsplat_sh="${build_secrets_checkout:-\$build_secrets_checkout}/bugsplat/bugsplat.sh"
if [ -r "$bugsplat_sh" ]
then # show that we're doing this, just not the contents
echo source "$bugsplat_sh"
source "$bugsplat_sh"
else
fatal "BUGSPLAT_USER or BUGSPLAT_PASS missing, and no $bugsplat_sh"
fi
fi
set -x
export BUGSPLAT_USER BUGSPLAT_PASS
fi fi
set -x
# honor autobuild_configure_parameters same as sling-buildscripts
eval_autobuild_configure_parameters=$(eval $(echo echo $autobuild_configure_parameters))
"$autobuild" configure --quiet -c $variant \ "$autobuild" configure --quiet -c $variant -- \
${eval_autobuild_configure_parameters:---} \
-DPACKAGE:BOOL=ON \ -DPACKAGE:BOOL=ON \
-DHAVOK:BOOL="$HAVOK" \ -DHAVOK:BOOL="$HAVOK" \
-DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \ -DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \
...@@ -181,13 +219,17 @@ package_llphysicsextensions_tpv() ...@@ -181,13 +219,17 @@ package_llphysicsextensions_tpv()
# nat 2016-12-21: without HAVOK, can't build PhysicsExtensions_TPV. # nat 2016-12-21: without HAVOK, can't build PhysicsExtensions_TPV.
if [ "$variant" = "Release" -a "${HAVOK:-}" != "OFF" ] if [ "$variant" = "Release" -a "${HAVOK:-}" != "OFF" ]
then then
test -r "$build_dir/packages/llphysicsextensions/autobuild-tpv.xml" || fatal "No llphysicsextensions_tpv autobuild configuration found" tpvconfig="$build_dir/packages/llphysicsextensions/autobuild-tpv.xml"
tpvconfig=$(native_path "$build_dir/packages/llphysicsextensions/autobuild-tpv.xml") test -r "$tpvconfig" || fatal "No llphysicsextensions_tpv autobuild configuration found"
"$autobuild" build --quiet --config-file "$tpvconfig" -c Tpv || fatal "failed to build llphysicsextensions_tpv" # SL-19942: autobuild ignores -c switch if AUTOBUILD_CONFIGURATION set
unset AUTOBUILD_CONFIGURATION
"$autobuild" build --quiet --config-file "$(native_path "$tpvconfig")" -c Tpv \
|| fatal "failed to build llphysicsextensions_tpv"
# capture the package file name for use in upload later... # capture the package file name for use in upload later...
PKGTMP=`mktemp -t pgktpv.XXXXXX` PKGTMP=`mktemp -t pgktpv.XXXXXX`
trap "rm $PKGTMP* 2>/dev/null" 0 cleanup="$cleanup ; rm $PKGTMP* 2>/dev/null"
trap "$cleanup" EXIT
"$autobuild" package --quiet --config-file "$tpvconfig" --results-file "$(native_path $PKGTMP)" || fatal "failed to package llphysicsextensions_tpv" "$autobuild" package --quiet --config-file "$tpvconfig" --results-file "$(native_path $PKGTMP)" || fatal "failed to package llphysicsextensions_tpv"
tpv_status=$? tpv_status=$?
if [ -r "${PKGTMP}" ] if [ -r "${PKGTMP}" ]
...@@ -209,11 +251,7 @@ build() ...@@ -209,11 +251,7 @@ build()
if $build_viewer if $build_viewer
then then
begin_section "autobuild $variant" begin_section "autobuild $variant"
# honor autobuild_build_parameters same as sling-buildscripts "$autobuild" build --no-configure -c $variant || fatal "failed building $variant"
eval_autobuild_build_parameters=$(eval $(echo echo $autobuild_build_parameters))
"$autobuild" build --no-configure -c $variant \
$eval_autobuild_build_parameters \
|| fatal "failed building $variant"
echo true >"$build_dir"/build_ok echo true >"$build_dir"/build_ok
end_section "autobuild $variant" end_section "autobuild $variant"
...@@ -313,12 +351,20 @@ begin_section "coding policy check" ...@@ -313,12 +351,20 @@ begin_section "coding policy check"
# this far. Running coding policy checks on one platform *should* suffice... # this far. Running coding policy checks on one platform *should* suffice...
if [[ "$arch" == "Darwin" ]] if [[ "$arch" == "Darwin" ]]
then then
# install the git-hooks dependencies git_hooks_reqs="$git_hooks_checkout/requirements.txt"
pip install -r "$(native_path "$git_hooks_checkout/requirements.txt")" || \ if [[ -r "$(shell_path "$git_hooks_reqs")" ]]
fatal "pip install git-hooks failed" then
# validate the branch we're about to build # install the git-hooks dependencies
python_cmd "$git_hooks_checkout/coding_policy_git.py" --all_files || \ pip install -r "$(native_path "$git_hooks_reqs")" || \
fatal "coding policy check failed" fatal "pip install git-hooks failed"
fi
git_hooks_script="$git_hooks_checkout/coding_policy_git.py"
if [[ -r "$(shell_path "$git_hooks_script")" ]]
then
# validate the branch we're about to build
python_cmd "$(native_path "$git_hooks_script")" --all_files || \
fatal "coding policy check failed"
fi
fi fi
end_section "coding policy check" end_section "coding policy check"
...@@ -353,6 +399,7 @@ do ...@@ -353,6 +399,7 @@ do
begin_section "Autobuild metadata" begin_section "Autobuild metadata"
python_cmd "$helpers/codeticket.py" addoutput "Autobuild Metadata" "$build_dir/autobuild-package.xml" --mimetype text/xml \ python_cmd "$helpers/codeticket.py" addoutput "Autobuild Metadata" "$build_dir/autobuild-package.xml" --mimetype text/xml \
|| fatal "Upload of autobuild metadata failed" || fatal "Upload of autobuild metadata failed"
metadata+=("$build_dir/autobuild-package.xml")
if [ "$arch" != "Linux" ] if [ "$arch" != "Linux" ]
then then
record_dependencies_graph "$build_dir/autobuild-package.xml" # defined in buildscripts/hg/bin/build.sh record_dependencies_graph "$build_dir/autobuild-package.xml" # defined in buildscripts/hg/bin/build.sh
...@@ -366,8 +413,11 @@ do ...@@ -366,8 +413,11 @@ do
if [ -r "$build_dir/newview/viewer_version.txt" ] if [ -r "$build_dir/newview/viewer_version.txt" ]
then then
begin_section "Viewer Version" begin_section "Viewer Version"
python_cmd "$helpers/codeticket.py" addoutput "Viewer Version" "$(<"$build_dir/newview/viewer_version.txt")" --mimetype inline-text \ viewer_version="$(<"$build_dir/newview/viewer_version.txt")"
python_cmd "$helpers/codeticket.py" addoutput "Viewer Version" "$viewer_version" --mimetype inline-text \
|| fatal "Upload of viewer version failed" || fatal "Upload of viewer version failed"
metadata+=("$build_dir/newview/viewer_version.txt")
echo "viewer_version=$viewer_version" >> "$GITHUB_OUTPUT"
end_section "Viewer Version" end_section "Viewer Version"
fi fi
;; ;;
...@@ -376,12 +426,14 @@ do ...@@ -376,12 +426,14 @@ do
then then
record_event "Doxygen warnings generated; see doxygen_warnings.log" record_event "Doxygen warnings generated; see doxygen_warnings.log"
python_cmd "$helpers/codeticket.py" addoutput "Doxygen Log" "$build_dir/doxygen_warnings.log" --mimetype text/plain ## TBD python_cmd "$helpers/codeticket.py" addoutput "Doxygen Log" "$build_dir/doxygen_warnings.log" --mimetype text/plain ## TBD
metadata+=("$build_dir/doxygen_warnings.log")
fi fi
if [ -d "$build_dir/doxygen/html" ] if [ -d "$build_dir/doxygen/html" ]
then then
tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3 "$build_dir/doxygen/html" tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3 "$build_dir/doxygen/html"
python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.bz2" \ python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.bz2" \
|| fatal "Upload of doxygen tarball failed" || fatal "Upload of doxygen tarball failed"
metadata+=("$build_dir/viewer-doxygen.tar.bz2")
fi fi
;; ;;
*) *)
...@@ -486,64 +538,29 @@ then ...@@ -486,64 +538,29 @@ then
if $build_viewer if $build_viewer
then then
begin_section "Uploads" begin_section "Uploads"
# Upload installer # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file.
package=$(installer_$arch) if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ]
if [ x"$package" = x ] || test -d "$package"
then then
fatal "No installer found from `pwd`" # BugSplat wants to see xcarchive.zip
succeeded=$build_coverity # e.g. build-darwin-x86_64/newview/Release/Second Life Test.xcarchive.zip
else symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.xcarchive.zip"
# Upload base package. if [[ ! -f "$symbol_file" ]]
retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput Installer "$package" \
|| fatal "Upload of installer failed"
wait_for_codeticket
# Upload additional packages.
for package_id in $additional_packages
do
package=$(installer_$arch "$package_id")
if [ x"$package" != x ]
then then
retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \ # symbol tarball we prep for (e.g.) Breakpad
|| fatal "Upload of installer $package_id failed" symbol_file="$VIEWER_SYMBOL_FILE"
wait_for_codeticket
else
record_failure "Failed to find additional package for '$package_id'."
fi fi
done # Upload crash reporter file
symbolfile+=("$symbol_file")
if [ "$last_built_variant" = "Release" ] fi
then
# nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file.
if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ]
then
# Upload crash reporter file
retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \
|| fatal "Upload of symbolfile failed"
wait_for_codeticket
fi
# Upload the llphysicsextensions_tpv package, if one was produced
# *TODO: Make this an upload-extension
if [ -r "$build_dir/llphysicsextensions_package" ]
then
llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package)
retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \
|| fatal "Upload of physics extensions package failed"
fi
fi
# Run upload extensions # Upload the llphysicsextensions_tpv package, if one was produced
# Ex: bugsplat # Only upload this package when building the private repo so the
if [ -d ${build_dir}/packages/upload-extensions ]; then # artifact is private.
for extension in ${build_dir}/packages/upload-extensions/*.sh; do if [[ "x$GITHUB_REPOSITORY" == "xsecondlife/viewer-private" && \
begin_section "Upload Extension $extension" -r "$build_dir/llphysicsextensions_package" ]]
. $extension then
[ $? -eq 0 ] || fatal "Upload of extension $extension failed" llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package)
wait_for_codeticket physicstpv+=("$llphysicsextensions_package")
end_section "Upload Extension $extension"
done
fi
fi fi
end_section "Uploads" end_section "Uploads"
else else
......
# standalone functions from sling-buildscripts
set_build_number_to_revision()
{
record_event "buildNumber $revision"
}
record_event()
{
echo "=== $@"
}
begin_section()
{
record_event "START $*"
sections+=("$*")
}
end_section()
{
# accommodate dumb Mac bash 3, which doesn't understand array[-1]
local last=$(( ${#sections[@]} - 1 ))
record_event "END ${*:-${sections[$last]}}"
unset "sections[$last]"
}
record_success()
{
record_event "SUCCESS $*"
}
record_failure()
{
record_event "FAILURE $*" >&2
}
fatal()
{
record_failure "$@"
finalize false
exit 1
}
# redefined fail for backward compatibility
alias fail=fatal
pass()
{
exit 0
}
export -f set_build_number_to_revision
export -f record_event
export -f begin_section
export -f end_section
export -f record_success
export -f record_failure
export -f fatal
export -f pass
export sections
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
BASEDIR=opt/linden
VIEWER_PKG=blackdragon-viewer
VIEWER_PACKAGEDIR=build-linux-i686/newview/packaged
VIEWER_DESTDIR=$(CURDIR)/debian/$(VIEWER_PKG)
VIEWER_VERSION:=$(shell dpkg-parsechangelog | grep ^Version | sed 's/^Version: //')
VIEWER_INSTALLDIR:=$(BASEDIR)/viewer/BlackDragon-i686-$(VIEWER_VERSION)
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
#$(MAKE)
#docbook-to-man debian/blackdragon-viewer.sgml > blackdragon-viewer.1
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
#-$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/blackdragon-viewer.
for file in $$(find $(VIEWER_PACKAGEDIR) -type f -o -type l | sed 's~$(VIEWER_PACKAGEDIR)/~~'); do \
# create containing directory \
install -v -m 755 -o root -g root -d "$$(dirname "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file")"; \
PERM=644; \
if [ -x "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
PERM=755; \
fi; \
if [ -L "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
REAL="$$( readlink -f $(VIEWER_PACKAGEDIR)/$$file )"; \
RELATIVE="$$( echo $$REAL | sed 's~$(CURDIR)/$(VIEWER_PACKAGEDIR)/~~' )"; \
echo dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
else \
install -v -m $$PERM -o root -g root "$(VIEWER_PACKAGEDIR)/$$file" "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file"; \
fi; \
done
dh_link -p $(VIEWER_PKG) /$(VIEWER_INSTALLDIR)/blackdragon /usr/bin/blackdragon
dh_link -p $(VIEWER_PKG) $(BASEDIR)/viewer/BlackDragon-i686-$(VIEWER_VERSION) $(BASEDIR)/viewer/BlackDragon
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# To add an init script, uncomment this line and edit debian/init.d and
# customize debian/blackdragon-viewer.default to suit your needs.
# dh_installinit
# To add cron jobs, uncomment this line and make a crontab file named
# debian/cron.d, and it will be installed in /etc/cron.d/
# dh_installcron
# dh_installinfo
dh_installman
dh_link
# dh_strip
dh_compress
# dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
# dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
...@@ -19,6 +19,7 @@ Agathos Frascati ...@@ -19,6 +19,7 @@ Agathos Frascati
CT-317 CT-317
CT-352 CT-352
Ai Austin Ai Austin
SL-19399
Aiko Ying Aiko Ying
Aimee Trescothick Aimee Trescothick
SNOW-227 SNOW-227
...@@ -237,6 +238,9 @@ Ansariel Hiller ...@@ -237,6 +238,9 @@ Ansariel Hiller
SL-15227 SL-15227
SL-15398 SL-15398
SL-18432 SL-18432
SL-19140
SL-4126
SL-20224
Aralara Rajal Aralara Rajal
Arare Chantilly Arare Chantilly
CHUIBUG-191 CHUIBUG-191
...@@ -282,7 +286,12 @@ Beq Janus ...@@ -282,7 +286,12 @@ Beq Janus
SL-11300 SL-11300
SL-15709 SL-15709
SL-16021 SL-16021
SL-18202
SL-18586
SL-18592
SL-18637 SL-18637
SL-19317
SL-19660
Beth Walcher Beth Walcher
Bezilon Kasei Bezilon Kasei
Biancaluce Robbiani Biancaluce Robbiani
...@@ -373,6 +382,7 @@ Charlie Sazaland ...@@ -373,6 +382,7 @@ Charlie Sazaland
Chaser Zaks Chaser Zaks
BUG-225599 BUG-225599
BUG-227485 BUG-227485
SL-16874
Cherry Cheevers Cherry Cheevers
ChickyBabes Zuzu ChickyBabes Zuzu
Chorazin Allen Chorazin Allen
...@@ -490,6 +500,8 @@ Evangelista Emerald ...@@ -490,6 +500,8 @@ Evangelista Emerald
Faelon Swordthain Faelon Swordthain
Farallon Greyskin Farallon Greyskin
VWR-2036 VWR-2036
Fawrsk
SL-18893
Feep Larsson Feep Larsson
VWR-447 VWR-447
VWR-1314 VWR-1314
...@@ -582,6 +594,10 @@ Henri Beauchamp ...@@ -582,6 +594,10 @@ Henri Beauchamp
VWR-1320 VWR-1320
VWR-1406 VWR-1406
VWR-4157 VWR-4157
SL-15175
SL-19110
SL-19159
[NO JIRA] (fullbright HUD alpha fix)
herina Bode herina Bode
Hikkoshi Sakai Hikkoshi Sakai
VWR-429 VWR-429
...@@ -882,6 +898,7 @@ Kitty Barnett ...@@ -882,6 +898,7 @@ Kitty Barnett
STORM-2149 STORM-2149
MAINT-7581 MAINT-7581
MAINT-7081 MAINT-7081
SL-18988
Kolor Fall Kolor Fall
Komiko Okamoto Komiko Okamoto
Korvel Noh Korvel Noh
...@@ -913,6 +930,8 @@ LSL Scientist ...@@ -913,6 +930,8 @@ LSL Scientist
Lamorna Proctor Lamorna Proctor
Lares Carter Lares Carter
Larry Pixel Larry Pixel
Lars Næsbye Christensen
SL-20054
Laurent Bechir Laurent Bechir
Leal Choche Leal Choche
Lenae Munz Lenae Munz
...@@ -920,6 +939,8 @@ Lexi Frua ...@@ -920,6 +939,8 @@ Lexi Frua
Lillie Cordeaux Lillie Cordeaux
Lilly Zenovka Lilly Zenovka
Lizzy Macarthur Lizzy Macarthur
Logue Takacs
INTL-490
Luban Yiyuan Luban Yiyuan
Luc Starsider Luc Starsider
Luminous Luminos Luminous Luminos
...@@ -1125,6 +1146,7 @@ Nicky Dasmijn ...@@ -1125,6 +1146,7 @@ Nicky Dasmijn
SL-14541 SL-14541
SL-16438 SL-16438
SL-17218 SL-17218
SL-17238
SL-17585 SL-17585
Nicky Perian Nicky Perian
OPEN-1 OPEN-1
...@@ -1171,6 +1193,12 @@ Ollie Kubrick ...@@ -1171,6 +1193,12 @@ Ollie Kubrick
Orenj Marat Orenj Marat
Orion Delphis Orion Delphis
Oryx Tempel Oryx Tempel
PanteraPolnocy
SL-18891
SL-18904
SL-18937
SL-19207
SL-19681
Parvati Silverweb Parvati Silverweb
Patric Mills Patric Mills
VWR-2645 VWR-2645
...@@ -1381,6 +1409,7 @@ Sovereign Engineer ...@@ -1381,6 +1409,7 @@ Sovereign Engineer
OPEN-343 OPEN-343
SL-11625 SL-11625
BUG-229030 BUG-229030
SL-14696
SL-14705 SL-14705
SL-14706 SL-14706
SL-14707 SL-14707
...@@ -1388,6 +1417,14 @@ Sovereign Engineer ...@@ -1388,6 +1417,14 @@ Sovereign Engineer
SL-14732 SL-14732
SL-15096 SL-15096
SL-16127 SL-16127
SL-18249
SL-18394
SL-18412
SL-18497
SL-18525
SL-18534
SL-19690
SL-19336
SpacedOut Frye SpacedOut Frye
VWR-34 VWR-34
VWR-45 VWR-45
...@@ -1650,6 +1687,8 @@ Zi Ree ...@@ -1650,6 +1687,8 @@ Zi Ree
VWR-25588 VWR-25588
STORM-1790 STORM-1790
STORM-1842 STORM-1842
SL-18348
SL-18593
Zipherius Turas Zipherius Turas
VWR-76 VWR-76
VWR-77 VWR-77
......
...@@ -4,22 +4,34 @@ ...@@ -4,22 +4,34 @@
# other commands to guarantee full compatibility # other commands to guarantee full compatibility
# with the version specified # with the version specified
## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support ## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support
cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) ## 3.13/12 is needed for add_link_options/add_compile_definitions
## 3.14 added FILE CREATE_LINK
set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING ## 3.16 is needed for target_precompile_headers
"The root project/makefile/solution name. Defaults to SecondLife.") ## Nicky: Ideally we want at least 3.21 for good preset support
## We're not there yet, but once done, there is a kludge in Linking.cmake
# "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
set(ROOT_PROJECT_NAME "BlackDragon" CACHE STRING
"The root project/makefile/solution name. Defaults to BlackDragon.")
project(${ROOT_PROJECT_NAME}) project(${ROOT_PROJECT_NAME})
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_BINARY_DIR}")
include(conanbuildinfo OPTIONAL RESULT_VARIABLE USE_CONAN )
if( USE_CONAN )
set( USE_CONAN ON )
set( USE_AUTOBUILD_3P OFF )
conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN NO_AUTOBUILD_3P)
else()
set( USE_CONAN OFF )
set( USE_AUTOBUILD_3P ON )
endif()
include(Variables) include(Variables)
include(BuildVersion) include(BuildVersion)
set(LEGACY_STDIO_LIBS)
if (WINDOWS)
set(LEGACY_STDIO_LIBS legacy_stdio_definitions)
endif (WINDOWS)
if (NOT CMAKE_BUILD_TYPE) if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Build type. One of: Debug Release RelWithDebInfo" FORCE) "Build type. One of: Debug Release RelWithDebInfo" FORCE)
...@@ -59,8 +71,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llplugin) ...@@ -59,8 +71,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
add_subdirectory(${LIBS_OPEN_PREFIX}llui) add_subdirectory(${LIBS_OPEN_PREFIX}llui)
add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components) add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
if( LL_TESTS )
# Legacy C++ tests. Build always, run if LL_TESTS is true. # Legacy C++ tests. Build always, run if LL_TESTS is true.
add_subdirectory(${VIEWER_PREFIX}test) add_subdirectory(${VIEWER_PREFIX}test)
endif()
if (ENABLE_MEDIA_PLUGINS) if (ENABLE_MEDIA_PLUGINS)
# viewer media plugins # viewer media plugins
...@@ -72,7 +86,6 @@ if (LINUX) ...@@ -72,7 +86,6 @@ if (LINUX)
include(LLAppearanceUtility) include(LLAppearanceUtility)
add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR}) add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
endif (INSTALL_PROPRIETARY) endif (INSTALL_PROPRIETARY)
add_dependencies(viewer linux-crash-logger-strip-target)
elseif (WINDOWS) elseif (WINDOWS)
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
if (EXISTS ${VIEWER_DIR}win_setup) if (EXISTS ${VIEWER_DIR}win_setup)
...@@ -87,12 +100,6 @@ if (WINDOWS) ...@@ -87,12 +100,6 @@ if (WINDOWS)
endif (EXISTS ${VIEWER_DIR}win_setup) endif (EXISTS ${VIEWER_DIR}win_setup)
endif (WINDOWS) endif (WINDOWS)
# sets the 'startup project' for debugging from visual studio.
set_property(
DIRECTORY ${VIEWER_PREFIX}
PROPERTY VS_STARTUP_PROJECT secondlife-bin
)
if (USE_BUGSPLAT) if (USE_BUGSPLAT)
if (BUGSPLAT_DB) if (BUGSPLAT_DB)
message(STATUS "Building with BugSplat; database '${BUGSPLAT_DB}'") message(STATUS "Building with BugSplat; database '${BUGSPLAT_DB}'")
...@@ -104,10 +111,16 @@ else (USE_BUGSPLAT) ...@@ -104,10 +111,16 @@ else (USE_BUGSPLAT)
endif (USE_BUGSPLAT) endif (USE_BUGSPLAT)
add_subdirectory(${VIEWER_PREFIX}newview) add_subdirectory(${VIEWER_PREFIX}newview)
add_dependencies(viewer secondlife-bin) add_dependencies(viewer blackdragon-bin)
add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL) add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL)
# sets the 'startup project' for debugging from visual studio.
set_property(
DIRECTORY ${VIEWER_PREFIX}
PROPERTY VS_STARTUP_PROJECT ${VIEWER_BINARY_NAME}
)
if (LL_TESTS) if (LL_TESTS)
# Define after the custom targets are created so # Define after the custom targets are created so
# individual apps can add themselves as dependencies # individual apps can add themselves as dependencies
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
# Also realize that CMAKE_CXX_FLAGS may already be partially populated on # Also realize that CMAKE_CXX_FLAGS may already be partially populated on
# entry to this file. # entry to this file.
#***************************************************************************** #*****************************************************************************
include_guard()
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
include(Variables) include(Variables)
...@@ -27,25 +25,27 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}") ...@@ -27,25 +25,27 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}")
# as well? # as well?
# Portable compilation flags. # Portable compilation flags.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}") add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE})
# Because older versions of Boost.Bind dumped placeholders _1, _2 et al. into
# the global namespace, Boost now requires either BOOST_BIND_NO_PLACEHOLDERS
# to avoid that or BOOST_BIND_GLOBAL_PLACEHOLDERS to state that we require it
# -- which we do. Without one or the other, we get a ton of Boost warnings.
add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS)
# Configure crash reporting # Configure crash reporting
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds") 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") set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
if(RELEASE_CRASH_REPORTING) if(RELEASE_CRASH_REPORTING)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DLL_SEND_CRASH_REPORTS=1") add_compile_definitions( LL_SEND_CRASH_REPORTS=1)
endif() endif()
if(NON_RELEASE_CRASH_REPORTING) if(NON_RELEASE_CRASH_REPORTING)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DLL_SEND_CRASH_REPORTS=1") add_compile_definitions( LL_SEND_CRASH_REPORTS=1)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1") endif()
endif()
# Don't bother with MinSizeRel or Debug builds.
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING
"Supported build types." FORCE)
# Don't bother with a MinSizeRel or Debug builds.
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING "Supported build types." FORCE)
# Platform-specific compilation flags. # Platform-specific compilation flags.
...@@ -60,104 +60,91 @@ if (WINDOWS) ...@@ -60,104 +60,91 @@ if (WINDOWS)
# http://www.cmake.org/pipermail/cmake/2009-September/032143.html # http://www.cmake.org/pipermail/cmake/2009-September/032143.html
string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
# Without PreferredToolArchitecture=x64, as of 2020-06-26 the 32-bit
# compiler on our TeamCity build hosts has started running out of virtual
# memory for the precompiled header file.
# CP changed to only append the flag for 32bit builds - on 64bit builds,
# locally at least, the build output is spammed with 1000s of 'D9002'
# warnings about this switch being ignored.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
if( ADDRESS_SIZE EQUAL 32 )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64")
endif()
# Preserve first-pass-through versions (ie no FORCE overwrite). Prevents recursive addition of /Zo (04/2021)
set(OG_CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} CACHE STRING "OG_CXX_FLAGS_RELEASE")
set(OG_CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} CACHE STRING "OG_CXX_FLAGS_RELWITHDEBINFO")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"${OG_CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Zo"
CACHE STRING "C++ compiler release-with-debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE
"${OG_CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /Zo"
CACHE STRING "C++ compiler release options" FORCE)
# zlib has assembly-language object files incompatible with SAFESEH # zlib has assembly-language object files incompatible with SAFESEH
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099") add_link_options(/LARGEADDRESSAWARE
/SAFESEH:NO
set(CMAKE_CXX_STANDARD_LIBRARIES "") /NODEFAULTLIB:LIBCMT
set(CMAKE_C_STANDARD_LIBRARIES "") /IGNORE:4099)
add_definitions( add_definitions(
/DNOMINMAX -DNOMINMAX
# /DDOM_DYNAMIC # For shared library colladadom # /DDOM_DYNAMIC # For shared library colladadom
) )
add_compile_options( add_compile_options(
/GS /Zo
/TP /GS
/W3 /TP
/c /W3
/Zc:forScope /c
/nologo /Zc:forScope
/Oy- /nologo
# /arch:SSE2 /Oy-
/fp:fast /fp:fast
/MP
) )
# Nicky: x64 implies SSE2 # Nicky: x64 implies SSE2
if( ADDRESS_SIZE EQUAL 32 ) if( ADDRESS_SIZE EQUAL 32 )
add_definitions( /arch:SSE2 ) add_compile_options( /arch:SSE2 )
endif() endif()
# Are we using the crummy Visual Studio KDU build workaround? # Are we using the crummy Visual Studio KDU build workaround?
if (NOT VS_DISABLE_FATAL_WARNINGS) if (NOT VS_DISABLE_FATAL_WARNINGS)
add_definitions(/WX) add_compile_options(/WX)
endif (NOT VS_DISABLE_FATAL_WARNINGS) endif (NOT VS_DISABLE_FATAL_WARNINGS)
#ND: When using something like buildcache (https://github.com/mbitsnbites/buildcache)
# to make those wrappers work /Zi must be changed to /Z7, as /Zi due to it's nature is not compatible with caching
if( ${CMAKE_CXX_COMPILER_LAUNCHER} MATCHES ".*cache.*")
add_compile_options( /Z7 )
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
endif (WINDOWS) endif (WINDOWS)
if (LINUX) if (LINUX)
set(CMAKE_SKIP_RPATH TRUE) set(CMAKE_SKIP_RPATH TRUE)
add_definitions(-D_FORTIFY_SOURCE=2) # EXTERNAL_TOS
# force this platform to accept TOS via external browser
set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}")
# LL_IGNORE_SIGCHLD
# gcc 4.3 and above don't like the LL boost and also # don't catch SIGCHLD in our base application class for the viewer - some of
# cause warnings due to our use of deprecated headers # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The
add_definitions(-Wno-parentheses) # viewer doesn't need to catch SIGCHLD anyway.
add_definitions( add_compile_definitions(
-D_REENTRANT _REENTRANT
) _FORTIFY_SOURCE=2
EXTERNAL_TOS
APPID=secondlife
LL_IGNORE_SIGCHLD
)
add_compile_options( add_compile_options(
-fexceptions -fexceptions
-fno-math-errno -fno-math-errno
-fno-strict-aliasing -fno-strict-aliasing
-fsigned-char -fsigned-char
-msse2 -msse2
-mfpmath=sse -mfpmath=sse
-pthread -pthread
) -Wno-parentheses
-Wno-deprecated
# force this platform to accept TOS via external browser -fvisibility=hidden
add_definitions(-DEXTERNAL_TOS) )
add_definitions(-DAPPID=secondlife)
add_compile_options(-fvisibility=hidden)
# don't catch SIGCHLD in our base application class for the viewer - some of
# our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The
# viewer doesn't need to catch SIGCHLD anyway.
add_definitions(-DLL_IGNORE_SIGCHLD)
if (ADDRESS_SIZE EQUAL 32) if (ADDRESS_SIZE EQUAL 32)
add_compile_options(-march=pentium4) add_compile_options(-march=pentium4)
endif (ADDRESS_SIZE EQUAL 32) endif (ADDRESS_SIZE EQUAL 32)
#add_compile_options(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
if (NOT USESYSTEMLIBS) # this stops us requiring a really recent glibc at runtime
# this stops us requiring a really recent glibc at runtime add_compile_options(-fno-stack-protector)
add_compile_options(-fno-stack-protector) # linking can be very memory-hungry, especially the final viewer link
# linking can be very memory-hungry, especially the final viewer link set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
endif (NOT USESYSTEMLIBS)
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
endif (LINUX) endif (LINUX)
...@@ -173,62 +160,28 @@ if (DARWIN) ...@@ -173,62 +160,28 @@ if (DARWIN)
# see Variables.cmake. # see Variables.cmake.
string(REPLACE "-gdwarf-2" "-g${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}" string(REPLACE "-gdwarf-2" "-g${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}"
CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# The viewer code base can now be successfully compiled with -std=c++14. But set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
# turning that on in the generic viewer-build-variables/variables file would
# potentially require tweaking each of our ~50 third-party library builds.
# Until we decide to set -std=c++14 in viewer-build-variables/variables, set
# it locally here: we want to at least prevent inadvertently reintroducing
# viewer code that would fail with C++14.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -std=c++14")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
# NOTE: it's critical that the optimization flag is put in front. # NOTE: it's critical that the optimization flag is put in front.
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
## Really?? On developer machines too? ## Really?? On developer machines too?
##set(ENABLE_SIGNING TRUE) ##set(ENABLE_SIGNING TRUE)
##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") ##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
endif (DARWIN)
# required for clang-15/xcode-15 since our boost package still uses deprecated std::unary_function/binary_function
# see https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#C++-Standard-Library
add_compile_definitions(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
endif (DARWIN)
if (LINUX OR DARWIN) if (LINUX OR DARWIN)
if (CMAKE_CXX_COMPILER MATCHES ".*clang") set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs)
set(CMAKE_COMPILER_IS_CLANGXX 1)
endif (CMAKE_CXX_COMPILER MATCHES ".*clang")
if (CMAKE_COMPILER_IS_GNUCXX)
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
elseif (CMAKE_COMPILER_IS_CLANGXX)
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
endif()
if (NOT GCC_DISABLE_FATAL_WARNINGS) if (NOT GCC_DISABLE_FATAL_WARNINGS)
set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") list(APPEND GCC_WARNINGS -Werror)
endif (NOT GCC_DISABLE_FATAL_WARNINGS) endif (NOT GCC_DISABLE_FATAL_WARNINGS)
set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor )
set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m${ADDRESS_SIZE}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m${ADDRESS_SIZE}")
endif (LINUX OR DARWIN)
if (USESYSTEMLIBS)
add_definitions(-DLL_USESYSTEMLIBS=1)
if (LINUX AND ADDRESS_SIZE EQUAL 32)
add_definitions(-march=pentiumpro)
endif (LINUX AND ADDRESS_SIZE EQUAL 32)
else (USESYSTEMLIBS)
set(${ARCH}_linux_INCLUDES
atk-1.0
glib-2.0
gstreamer-0.10
gtk-2.0
pango-1.0
)
endif (USESYSTEMLIBS)
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) add_compile_options(${GCC_WARNINGS})
add_compile_options(-m${ADDRESS_SIZE})
endif (LINUX OR DARWIN)
\ No newline at end of file