Commit Graph

87 Commits (9c9f555ae3169ef97ef0155b579cf8a15c4f1040)

Author SHA1 Message Date
Hecklezz 6a522ed3fb Initial fixes for 2025.07 to compile on MacOS 2025-10-17 15:25:28 +10:00
Ansariel b99cf9fb86 Merge branch 'project/mac_universal' of https://github.com/secondlife/viewer
# Conflicts:
#	autobuild.xml
#	indra/cmake/00-Common.cmake
#	indra/cmake/APR.cmake
#	indra/cmake/Audio.cmake
#	indra/cmake/Boost.cmake
#	indra/cmake/Copy3rdPartyLibs.cmake
#	indra/cmake/LLKDU.cmake
#	indra/cmake/LLPrimitive.cmake
#	indra/cmake/Meshoptimizer.cmake
#	indra/cmake/NGHTTP2.cmake
#	indra/cmake/OPENAL.cmake
#	indra/llaudio/llvorbisencode.cpp
#	indra/llcommon/linden_common.h
#	indra/llcommon/llcommon.cpp
#	indra/llcommon/llfasttimer.cpp
#	indra/llcommon/llfasttimer.h
#	indra/llcommon/llfile.cpp
#	indra/llcommon/llmemory.h
#	indra/llcommon/llprofiler.h
#	indra/llcommon/llthreadsafequeue.h
#	indra/llfilesystem/lldir_win32.cpp
#	indra/llkdu/llimagej2ckdu.cpp
#	indra/llkdu/llimagej2ckdu.h
#	indra/llkdu/llkdumem.h
#	indra/llplugin/slplugin/CMakeLists.txt
#	indra/llrender/llfontfreetype.cpp
#	indra/llrender/llfontfreetype.h
#	indra/llwindow/CMakeLists.txt
#	indra/llwindow/llopenglview-objc.mm
#	indra/llwindow/llwindowmacosx-objc.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/media_plugins/cef/CMakeLists.txt
#	indra/newview/CMakeLists.txt
#	indra/newview/llappviewer.cpp
#	indra/newview/llface.cpp
#	indra/newview/pipeline.cpp
#	indra/newview/viewer_manifest.py
2025-09-05 14:55:37 +02:00
Rye 2b44464a14 Fix up windows build error in GHA 2025-08-28 06:08:13 -04:00
Rye a455d3ee7d Introduce build system and preprocessor support for ARM64 2025-02-11 05:04:08 -05:00
Ansariel 1cca913ba7 Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/cmake/CMakeLists.txt
#	indra/llprimitive/lldaeloader.cpp
#	indra/llprimitive/llmodelloader.cpp
#	indra/llrender/llgl.h
#	indra/llrender/llrender.h
#	indra/llui/llurlentry.cpp
#	indra/llui/llurlentry.h
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llvoavatar.cpp
2024-09-13 18:54:12 +02:00
Ansariel Hiller 74205607b7
Clean up Windows build (#2562)
* APR_DECLARE_STATIC and APU_DECLARE_STATIC gets already defined in APR.cmake
* Move both _CRT_SECURE_NO_WARNINGS and _WINSOCK_DEPRECATED_NO_WARNINGS definitions to 00-Common.cmake
* Always define WIN32_LEAN_AND_MEAN and include subset of Windows API by default
* Remove llwin32headerslean.h and remove unnecessary WIN32_LEAN_AND_MEAN definition handling in llwin32headers.h
* Clean up includes of Windows API headers
* Get rid of workaround to link against IPHLPAPI.lib in lluuid.cpp - this seems to have been an issue in the past that has been fixed
2024-09-13 17:28:48 +03:00
Ansariel 088cc2ea35 Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llcommon/llpointer.h
#	indra/llcommon/llqueuedthread.cpp
#	indra/llfilesystem/llfilesystem.cpp
#	indra/llui/llconsole.cpp
#	indra/llui/llkeywords.cpp
#	indra/llui/llstatgraph.cpp
#	indra/llui/llvirtualtrackball.cpp
#	indra/newview/llagentcamera.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llfloateremojipicker.cpp
#	indra/newview/llfloaterimnearbychathandler.cpp
#	indra/newview/llfloatersettingsdebug.cpp
#	indra/newview/llfloatersnapshot.cpp
#	indra/newview/llglsandbox.cpp
#	indra/newview/llnetmap.cpp
#	indra/newview/llpanelface.cpp
#	indra/newview/llpanelpermissions.cpp
#	indra/newview/llpanelplaceprofile.cpp
#	indra/newview/llstartup.cpp
#	indra/newview/llviewermessage.cpp
#	indra/newview/llvocache.cpp
#	indra/newview/llworldmapview.cpp
2024-07-09 02:25:42 +02:00
Andrey Lihatskiy cd5d35ddab
Merge pull request #1945 from Ansariel/develop_msvc7
Remove ancient MSVC7 code
2024-07-09 00:43:36 +03:00
Ansariel 499a717f62 Remove ancient MSVC7 code 2024-07-08 20:46:45 +02:00
Ansariel 9fdca96f8b Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now 2024-07-08 20:27:14 +02:00
Ansariel c809ca9dff Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer 2024-06-11 02:56:51 +02:00
Ansariel 9f6b8484df Re-enable compiler warnings C4127, C4512 & C4706
Disable particular CRT and WinSock API warnings for functions Microsoft considers unsafe/deprecated
2024-06-11 01:56:08 +03:00
Ansariel 591c75ebaf Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llappearance/llavatarappearance.cpp
#	indra/llmath/llvolume.cpp
#	indra/llmessage/llcorehttputil.cpp
#	indra/llrender/llgl.cpp
#	indra/newview/installers/darwin/apple-notarize.sh
#	indra/newview/llappviewer.cpp
#	indra/newview/llface.cpp
#	indra/newview/llfloater360capture.cpp
#	indra/newview/llfloateremojipicker.cpp
#	indra/newview/llpanelpeople.cpp
#	indra/newview/llviewertexture.cpp
#	indra/newview/viewer_manifest.py
2024-06-10 21:53:31 +02:00
Ansariel c0fad3028f Re-enable compiler warnings C4018, C4100, C4231 and C4506 2024-06-10 16:42:43 +02:00
Ansariel a17fd2352a Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llcharacter/llkeyframemotion.cpp
#	indra/llcharacter/llmotioncontroller.cpp
#	indra/llcrashlogger/llcrashlogger.cpp
#	indra/llimage/llimagetga.cpp
#	indra/llmessage/llregionflags.h
#	indra/llprimitive/lldaeloader.cpp
#	indra/llprimitive/llmodel.cpp
#	indra/llrender/llrendertarget.cpp
#	indra/llui/llconsole.cpp
#	indra/llui/llkeywords.cpp
#	indra/llui/llscrolllistctrl.cpp
#	indra/llui/lltextbase.cpp
#	indra/llui/lltexteditor.cpp
#	indra/llui/llurlentry.cpp
#	indra/newview/llappearancemgr.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llfloaterworldmap.cpp
#	indra/newview/llgiveinventory.cpp
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llpanelpeople.cpp
#	indra/newview/llpanelpermissions.cpp
#	indra/newview/llpanelteleporthistory.cpp
#	indra/newview/llvocache.cpp
2024-06-09 16:11:24 +02:00
Ansariel b42f9d836b Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings 2024-06-01 15:49:26 +02:00
Ansariel c082f6f67a Re-enable compiler warning C4800 (performance warning) 2024-05-30 13:11:50 +02:00
Ansariel 5f1a19af72 Merge remote-tracking branch 'LL/marchcat/x-ws-merge'
# Conflicts:
#	autobuild.xml
#	indra/linux_crash_logger/llcrashloggerlinux.cpp
#	indra/newview/llappviewerlinux_api.h
#	indra/newview/llappviewerlinux_api_dbus.cpp
#	indra/newview/llappviewerlinux_api_dbus.h
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llcallbacklist.cpp
#	indra/newview/llimpanel.h
2024-05-01 12:30:57 +02:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Ansariel 4a1ef323ae Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer 2021-11-29 19:40:28 +01:00
Nat Goodspeed af5c5a994b SL-16207: Update llstring.h handling of different string types.
In llpreprocessor.h, consider the case of clang on Windows: #define
LL_WCHAR_T_NATIVE there as well as for the Microsoft compiler with /Zc:wchar_t
switch.

In stdtypes.h, inject a LLWCHAR_IS_WCHAR_T symbol to allow the preprocessor to
make decisions about when the types are identical.

llstring.h's conversion logic deals with three types of wide strings
(LLWString, std::wstring and utf16string) based on three types of wide char
(llwchar, wchar_t and U16, respectively). Sometimes they're three distinct
types, sometimes wchar_t is identical to llwchar and sometimes wchar_t is
identical to U16. Rationalize the three cases using ll_convert_u16_alias() and
new ll_convert_wstr_alias() macros.

stringize.h was directly calling wstring_to_utf8str() and utf8str_to_wstring(),
which was producing errors with VS 2019 clang since there isn't actually a
wstring_to_utf8str(std::wstring) overload. Use ll_convert<std::string>()
instead, since that redirects to the relevant ll_convert_wide_to_string()
function. (And now you see why we've been trying to migrate to the uniform
ll_convert<target>() wrapper!) Similarly, call ll_convert<std::wstring>()
instead of a two-step conversion from utf8str_to_wstring(), producing LLWString,
then a character-by-character copy from LLWString to std::wstring. That
isn't even correct: on Windows, we should be encoding from UTF32 to UTF16.
2021-10-27 13:01:37 -04:00
Nicky a336802ba3 FIRE-31221 workaround for newer glibc versions, patch from Lance Corrimal. 2021-10-16 18:49:05 +02:00
Ansariel 93f1998a47 Merge branch 'DRTVWR-525' of https://bitbucket.org/lindenlab/viewer 2021-01-08 23:06:41 +01:00
Dave Houlton 7cd076c796 DRTVWR-510 remove all LL_SOLARIS conditionals 2020-10-08 17:16:22 -06:00
Nat Goodspeed 939d350548 SL-793: Add LL_PRETTY_FUNCTION macro wrapping __PRETTY_FUNCTION__
which is, of course, different in Visual Studio (__FUNCSIG__).

Use LL_PRETTY_FUNCTION in DEBUG output instead of plain __FUNCTION__.
2020-03-25 18:39:20 -04:00
Nicky e6e66a953e Merge with viewer-vs2017 2019-06-06 14:37:27 +02:00
Nat Goodspeed ebcfbf277e Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2019-06-05 14:15:15 -04:00
Nat Goodspeed 8e2b8401d5 SL-793: Add LL_PRETTY_FUNCTION macro wrapping __PRETTY_FUNCTION__
which is, of course, different in Visual Studio (__FUNCSIG__).

Use LL_PRETTY_FUNCTION in DEBUG output instead of plain __FUNCTION__.
2018-12-29 10:19:01 -05:00
Ansariel 8b6392c0aa Merge viewer-bugsplat 2018-12-16 13:04:08 +01:00
Nat Goodspeed 9ffcafb64b SL-10153: Introduce ll_convert, windows_message() templates.
Add ll_convert<TO, FROM> template, used as (e.g.):
ll_convert<std::string>(value_of_some_other_string_type);
There is no generic template implementation -- the template exists solely to
provide generic aliases for a bewildering family of llstring.h string-
conversion functions with highly-specific names. There's a generic
implementation, though, for the degenerate case where FROM and TO are
identical.

Add ll_convert<> specialization aliases for most of the string-conversion
functions declared in llstring.h, including the Windows-specific ones
involving llutf16string and std::wstring.

Add a mini-lecture in llstring.h about appropriate use of string types on
Windows.

Add LL_WCHAR_T_NATIVE llpreprocessor.h macro so we can detect whether to
provide separate conversions for llutf16string and std::wstring, or whether
those would collide because the types are identical.

Add inline ll_convert_wide_to_string(const std::wstring&) overloads so caller
isn't required to call arg.c_str(), which naturally permits an ll_convert
alias.

Add ll_convert_wide_to_wstring(), ll_convert_wstring_to_wide() as placeholders
for converting between Windows std::wstring and Linden LLWString, with
corresponding ll_convert aliases. We don't yet have library code to perform
such conversions officially; for now, just copy characters.

Add LLStringUtil::getenv(key) and getoptenv(key) functions. The latter returns
boost::optional<string_type> in case the caller needs to detect absence of a
given environment variable rather than simply accepting a default value.
Naturally getenv(), which accepts a default, is implemented using getoptenv().
getoptenv(), in turn, is implemented using an underlying llstring_getoptenv().

On Windows, llstring_getoptenv() returns boost::optional<std::wstring> (based
on GetEnvironmentVariableW()), whereas elsewhere, llstring_getoptenv() returns
boost::optional<std::string> (based on classic Posix getenv()).

The beauty of generic ll_convert is that the portable LLStringUtilBase<T>::
getoptenv() template can call the platform-specific llstring_getoptenv() and
transparently perform whatever conversion is necessary to return the desired
string_type.

Add windows_message<T>(error) template, with an overload that implicitly calls
GetLastError(). We provide a single concrete windows_message<std::wstring>()
implementation because that's what we get from Windows FormatMessageW() --
everything else is a generic conversion to the desired target string type.

This obviates llprocess.cpp's previous WindowsErrorString() implementation --
reimplement using windows_message<std::string>().
2018-12-14 10:48:43 -05:00
Ansariel 0f121d042d Merge viewer-bugsplat 2018-07-27 11:19:42 +02:00
Nat Goodspeed ed891c60de SL-821: Add LL_TO_WSTRING() macro to llpreprocessor.h.
Also use existing LL_TO_STRING() macro to stringize LL_VIEWER_CHANNEL in
llversioninfo.cpp and its tests.
2018-05-17 05:33:14 -04:00
Nicky 985730a52c Merge. 2017-05-18 17:40:24 +02:00
Nat Goodspeed ae0b3149ba DRTVWR-418: Fix a round of compile errors surfaced by -std=c++11.
These are mostly things that were in fact erroneous, but accepted by older
compilers.

This changeset has not yet been built with Visual Studio 2013 or Linux gcc,
even with -std=c++11.

This changeset has not been built *without* -std=c++11. It should be used in
conjunction with a corresponding change to LL_BUILD_DARWIN_BASE_SWITCHES in
viewer-build-variables/variables.

This is a work in progress. We do not assert that this changeset completes the
work needed to turn on -std=c++11, even on the Mac.
2017-02-23 16:49:49 -05:00
Nicky 2290d5ed16 Merge with viewer64, first pass. 2017-01-10 19:33:15 +01:00
Nat Goodspeed f5e9839627 DRTVWR-418: Replace preprocessor tests for Windows-specific _M_AMD64
with tests on ADDRESS_SIZE, which is now set on the compiler command line.
2016-11-16 15:39:00 -05:00
Tonya Souther cc4ef52b97 Build fixes for C++11 on OS X. Includes several rebuilt libraries. 2016-06-21 15:57:18 -05:00
Nicky a590d1c63a Windows z64: Disable warning 4267 via llpreprocessor rather than cmake files
(transplanted from 165fa5852652a1da005cf3b2201c192f028efd43)
2016-04-24 12:51:26 +02:00
Ansariel 3192fe832f Merge viewer-quickgraphics 2016-03-08 01:41:31 +01:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Nicky 006190f2a1 Merge with tools update. 2015-05-05 13:09:27 +02:00
Cinder 6df6aef621 OPEN-282 - Define LL_THREAD_LOCAL for our platforms in order to unify TLS support 2014-11-19 22:27:36 -07:00
Tank_Master 6babf8abd2 Merge LL 3.7.7 2014-06-09 11:29:57 -07:00
Richard Linden cbe397ad13 changed fast timer over to using macro
another attempt to move mem stat into base class
2013-09-05 14:04:13 -07:00
Richard Linden a7aed07a5b broke out llunit.h into llunittype.h and llunits.h for unit declarations
changed unit declarations macros to make a lot more sense
2013-08-27 13:41:19 -07:00
Richard Linden e1c09b9b59 fixed eol type 2013-08-26 18:21:19 -07:00
Richard Linden 662d6a1771 added compile time warnings to use of deprecated llinfos, llwarns, etc. 2013-08-26 10:51:08 -07:00
Richard Linden ea45b8acd2 BUILDFIX: refactored decltype out into traits class 2013-08-19 14:17:17 -07:00
Richard Linden 296ec41e16 BUILDFIX: abstracted decltype into macro LLTYPEOF for temporary
gcc 4.1/4.2 support
2013-08-19 11:57:33 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00