Ansariel 2022-12-19 22:43:39 +01:00
commit 351442cc42
8 changed files with 264 additions and 99 deletions

View File

@ -2,84 +2,181 @@ name: Build viewer
on: push
env:
AUTOBUILD_VARIABLES_FILE: ${{github.workspace}}/build-variables/variables
EXTRA_ARGS: -DFMODSTUDIO=Off -DUSE_KDU=Off
EXTRA_ARGS: -DFMODSTUDIO=ON -DUSE_KDU=ON --crashreporting
build_secrets_checkout: ${{github.workspace}}/signing
jobs:
build_matrix:
strategy:
matrix:
os: [macos-11,ubuntu-18.04,windows-2022]
os: [macos-10.15,ubuntu-18.04,windows-2022]
grid: [sl,os]
addrsize: [64,32]
exclude:
- os: ubuntu-18.04
addrsize: 32
- os: macos-11
- os: macos-10.15
addrsize: 32
runs-on: ${{ matrix.os }}
steps:
- name: Set OS flag
if: matrix.grid == 'os'
run: echo "FS_GRID=-DOPENSIM:BOOL=ON" >> $GITHUB_ENV
shell: bash
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
if: runner.os != 'Windows'
id: py311
with:
python-version: '3.11'
cache: 'pip'
- run: pip3 install -r requirements.txt
- name: Check python version
run: python -V
- name: Checkout build var
uses: actions/checkout@v3
with:
repository: FirestormViewer/fs-build-variables
path: build-variables
- name: Setup rclone and download the folder
uses: beqjanus/setup-rclone@main
with:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
- name: Set SL flag
if: matrix.grid == 'sl'
run: echo "FS_GRID=-DOPENSIM:BOOL=OFF" >> $GITHUB_ENV
shell: bash
- name: Get the code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set OS flag
if: matrix.grid == 'os'
run: echo "FS_GRID=-DOPENSIM:BOOL=ON" >> $GITHUB_ENV
shell: bash
- name: Checkout build var
uses: actions/checkout@v3
with:
repository: FirestormViewer/fs-build-variables
path: build-variables
- name: Set channel name
if: matrix.addrsize == '64'
run: echo "FS_RELEASE_CHAN=Releasex64" >> $GITHUB_ENV
shell: bash
- name: Set channel name for 32 bit
if: matrix.addrsize == '32'
run: echo "FS_RELEASE_CHAN=Release" >> $GITHUB_ENV
shell: bash
- name: Set SL flag
if: matrix.grid == 'sl'
run: echo "FS_GRID=-DOPENSIM:BOOL=OFF -DHAVOK_TPV:BOOL=ON" >> $GITHUB_ENV
shell: bash
- name: set VSVER for Windows builds
if: runner.os == 'Windows'
run: echo "AUTOBUILD_VSVER=170" >> $GITHUB_ENV
shell: bash
- name: Get the code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install required Ubuntu packages
if: runner.os == 'Linux'
run: sudo apt-get install python3-setuptools mesa-common-dev libgl1-mesa-dev libxinerama-dev libxrandr-dev libpulse-dev libglu1-mesa-dev
- name: Checkout build var
uses: actions/checkout@v3
with:
repository: FirestormViewer/fs-build-variables
path: build-variables
- name: install autobuild
run: pip3 install git+https://github.com/Nicky-D/autobuild@main_nd
- name: rclone the private 3p packages on Windows
if: runner.os == 'Windows'
run: 'rclone copy fs_bundles: --include "*windows*bz2" .'
- name: rclone the private 3p packages on MacOS
if: runner.os == 'MacOS'
run: 'rclone copy fs_bundles: --include "*darwin*bz2" .'
- name: rclone the private 3p packages on Linux
if: runner.os == 'Linux'
run: 'rclone copy fs_bundles: --include "*linux*bz2" .'
- name: install autobuild
run: pip3 install llbase
- name: set VSVER for Windows builds
if: runner.os == 'Windows'
run: echo "AUTOBUILD_VSVER=170" >> $GITHUB_ENV
shell: bash
- name: Install certificate
if: runner.os == 'macOS'
env:
FS_CERT: ${{ secrets.FS_CERT }}
FS_CERT_PASS: ${{ secrets.FS_CERT_PASS }}
FS_KEYCHAIN_PASS: ${{ secrets.FS_KEYCHAIN_PASS }}
NOTARIZE_CREDS: ${{ secrets.NOTARIZE_CREDS }}
run: |
mkdir -p ${build_secrets_checkout}/code-signing-osx
echo -n "$FS_CERT" | base64 --decode --output ${build_secrets_checkout}/code-signing-osx/fs-cert.p12
echo -n "$FS_CERT_PASS" >${build_secrets_checkout}/code-signing-osx/password.txt
echo -n "$NOTARIZE_CREDS" | base64 --decode --output ${build_secrets_checkout}/code-signing-osx/notarize_creds.sh
security create-keychain -p "$FS_KEYCHAIN_PASS" ~/Library/Keychains/viewer.keychain
security set-keychain-settings -lut 21600 ~/Library/Keychains/viewer.keychain
security unlock-keychain -p "$FS_KEYCHAIN_PASS" ~/Library/Keychains/viewer.keychain
security import ${build_secrets_checkout}/code-signing-osx/fs-cert.p12 -P "$FS_CERT_PASS" -A -t cert -f pkcs12 -k ~/Library/Keychains/viewer.keychain
security set-key-partition-list -S apple-tool:,apple:, -s -k "$FS_KEYCHAIN_PASS" -t private ~/Library/Keychains/viewer.keychain
security list-keychain -d user -s ~/Library/Keychains/viewer.keychain
- name: Install required Ubuntu packages
if: runner.os == 'Linux'
run: sudo apt-get install python3-setuptools mesa-common-dev libgl1-mesa-dev libxinerama-dev libxrandr-dev libpulse-dev libglu1-mesa-dev
- name: install autobuild
run: pip3 install git+https://github.com/Nicky-D/autobuild@main_nd
- name: Configure
run: autobuild configure -c ReleaseFS -A${{matrix.addrsize}} -- --package --chan ${{github.ref_name}} ${{env.EXTRA_ARGS}} ${{env.FS_GRID}}
shell: bash
- name: build
run: autobuild build -c ReleaseFS -A${{matrix.addrsize}} --no-configure
shell: bash
- name: install autobuild
run: pip3 install llbase
- name: publish ${{ matrix.os }} artifacts
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip
path: |
build-*/newview/Release/*Setup.exe
build-*/newview/Release/*.xz
- name: edit installables (64 bit)
if: runner.os == 'Windows' && matrix.addrsize == 64
run: |
autobuild installables edit llphysicsextensions_tpv platform=windows${{matrix.addrsize}} url='file:///\${{ github.workspace }}\llphysicsextensions_tpv-1.0.571939-windows${{matrix.addrsize}}-571939.tar.bz2'
autobuild installables edit fmodstudio platform=windows${{matrix.addrsize}} url='file:///\${{ github.workspace }}\fmodstudio-2.02.09-windows${{matrix.addrsize}}-222890941.tar.bz2'
shell: bash
- name: publish ${{ matrix.os }} artifacts
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip
path: build-linux-*/newview/*.xz
- name: edit installables (32 bit)
if: runner.os == 'Windows' && matrix.addrsize == 32
run: |
autobuild installables edit llphysicsextensions_tpv platform=windows url='file:///\${{ github.workspace }}\llphysicsextensions_tpv-1.0.571939-windows-571939.tar.bz2'
autobuild installables edit fmodstudio platform=windows url='file:///\${{ github.workspace }}\fmodstudio-2.02.09-windows-222890940.tar.bz2'
shell: bash
- name: publish ${{ matrix.os }} artifacts
if: runner.os == 'macOS'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip
path: build-darwin-*/newview/*.dmg
- name: edit installables (32/64 agnostic)
if: runner.os == 'Windows'
run: |
autobuild installables edit kdu platform=windows url='file:///\${{ github.workspace }}\kdu-8.2-windows-212351246.tar.bz2'
shell: bash
- name: edit installables
if: runner.os == 'macOS'
run: |
autobuild installables edit llphysicsextensions_tpv platform=darwin${{matrix.addrsize}} url='file:////${{ github.workspace }}/llphysicsextensions_tpv-1.0.571939-darwin${{matrix.addrsize}}-571939.tar.bz2'
autobuild installables edit kdu platform=darwin url='file:////${{ github.workspace }}/kdu-8.2-darwin-212431232.tar.bz2'
autobuild installables --debug edit fmodstudio platform=darwin${{matrix.addrsize}} url='file:////${{ github.workspace }}/fmodstudio-2.02.09-darwin${{matrix.addrsize}}-5.tar.bz2'
shell: bash
- name: edit installables
if: runner.os == 'Linux'
run: |
autobuild installables edit kdu platform=linux${{matrix.addrsize}} url='file:////${{ github.workspace }}/kdu-8.2-linux${{matrix.addrsize}}_bionic-220911445.tar.bz2'
autobuild installables edit fmodstudio platform=linux${{matrix.addrsize}} url='file:////${{ github.workspace }}/fmodstudio-2.02.09-linux${{matrix.addrsize}}-222891103.tar.bz2'
shell: bash
- name: Configure
run: autobuild configure --debug -c ReleaseFS -A${{matrix.addrsize}} -- --package --chan ${{env.FS_RELEASE_CHAN}} ${{env.EXTRA_ARGS}} ${{env.FS_GRID}}
shell: bash
- name: build
run: autobuild build --debug -c ReleaseFS -A${{matrix.addrsize}} --no-configure
shell: bash
- name: publish Windows artifacts
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip
path: |
build-*/newview/Release/*Setup.exe
build-*/newview/Release/*.xz
- name: publish Linux artifacts
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip
path: |
build-linux-*/newview/*.xz
build-linux-*/newview/*.bz2
- name: publish MacOS artifacts
if: runner.os == 'macOS'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip
path: |
build-darwin-*/newview/*.dmg
build-darwin-*/newview/*.bz2

View File

@ -888,7 +888,7 @@ LLSD LLModel::writeModel(
mdl[model_names[idx]][i]["TriangleList"] = indices;
if (skinning)
if (skinning && idx != LLModel::LOD_PHYSICS)
{
//write out skin weights

View File

@ -372,6 +372,7 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool
{
try
{
LL_DEBUGS("Window") << "post( callable ) to work queue" << LL_ENDL; // <FS:Beq/> extra debug for threaded window handler
getQueue().post(std::forward<CALLABLE>(func));
}
catch (const LLThreadSafeQueueInterrupt&)
@ -5111,7 +5112,10 @@ void LLWindowWin32::LLWindowWin32Thread::run()
//process any pending functions
getQueue().runPending();
}
// <FS:Beq> This is very verbose even for debug so it has it's own debug tag
LL_DEBUGS("WindowVerbose") << "PreCheck Done - closed=" << getQueue().isClosed() << " size=" << getQueue().size() << LL_ENDL;
// </FS:Beq>
// update available vram once every 3 seconds
static LLFrameTimer vramTimer;
if (vramTimer.getElapsedTimeF32() > 3.f)
@ -5127,6 +5131,7 @@ void LLWindowWin32::LLWindowWin32Thread::run()
}
#endif
}
logger.always("done - queue closed on windows thread.");// <FS:Beq/> extra debug for threaded window handler
//clean up DXGI/D3D resources
if (mDXGIAdapter)

View File

@ -1756,7 +1756,9 @@ bool LLAppViewer::doFrame()
{
LLVoiceClient::getInstance()->terminate();
}
// <FS:Beq> [FIRE-32453] [BUG-232971] disconnect sooner to force the cache write.
persistCachesAndSettings();
// </FS:Beq>
disconnectViewer();
resumeMainloopTimeout();
}
@ -2028,13 +2030,11 @@ bool LLAppViewer::cleanup()
// Give any remaining SLPlugin instances a chance to exit cleanly.
LLPluginProcessParent::shutdown();
// <FS:Beq> [FIRE-32453] [BUG-232971] disconnect sooner to force the cache write.
// disconnectViewer();
// LLViewerCamera::deleteSingleton();
// LL_INFOS() << "Viewer disconnected" << LL_ENDL;
disconnectViewer();
LLViewerCamera::deleteSingleton();
// </FS:Beq>
LL_INFOS() << "Viewer disconnected" << LL_ENDL;
if (gKeyboard)
{
gKeyboard->resetKeys();
@ -4828,8 +4828,7 @@ void LLAppViewer::removeDumpDir()
void LLAppViewer::forceQuit()
{
// <FS:Beq> [FIRE-32453] [BUG-232971] disconnect sooner to force the cache write.
disconnectViewer();
LL_INFOS() << "Viewer disconnected" << LL_ENDL;
persistCachesAndSettings();
// </FS:Beq>
LLApp::setQuitting();
}
@ -6326,14 +6325,48 @@ void LLAppViewer::idleNetwork()
mAgentRegionLastAlive = this_region_alive;
}
}
void LLAppViewer::persistCachesAndSettings()
{
// Save inventory to disk if appropriate
if (gInventory.isInventoryUsable()
&& gAgent.getID().notNull()) // Shouldn't be null at this stage
{
LL_INFOS() << "Saving Inventory Cache" << LL_ENDL;
gInventory.cache(gInventory.getRootFolderID(), gAgent.getID());
if (gInventory.getLibraryRootFolderID().notNull()
&& gInventory.getLibraryOwnerID().notNull())
{
gInventory.cache(
gInventory.getLibraryRootFolderID(),
gInventory.getLibraryOwnerID());
}
LL_INFOS() << "Saving Inventory Cache : COMPLETED" << LL_ENDL;
}
else
{
LL_INFOS() << "Not Saving Inventory Cache : Inventory is currently unusable" << LL_ENDL;
}
// Persist name cache
LLAvatarNameCache::instance().setCustomNameCheckCallback(LLAvatarNameCache::custom_name_check_callback_t()); // <FS:Ansariel> Contact sets
LL_INFOS() << "Saving Name Cache" << LL_ENDL;
saveNameCache();
LL_INFOS() << "Saving Name Cache : COMPLETED" << LL_ENDL;
// Save experience cache if appropriate
if (LLExperienceCache::instanceExists())
{
LL_INFOS() << "Saving Experience Cache" << LL_ENDL;
LLExperienceCache::instance().cleanup();
LL_INFOS() << "Saving Experience Cache : COMPLETED" << LL_ENDL;
}
}
void LLAppViewer::disconnectViewer()
{
if (gDisconnected)
{
return;
}
gDisconnected = TRUE;// <FS:Beq> [FIRE-32453] [BUG-232971] disconnect sooner to force the cache write.
//
// Cleanup after quitting.
//
@ -6363,30 +6396,32 @@ void LLAppViewer::disconnectViewer()
{
LLSelectMgr::getInstance()->deselectAll();
}
// <FS:Beq> [FIRE-32453] [BUG-232971] Persist before disconnect
// Moved to separate function
// // save inventory if appropriate
// if (gInventory.isInventoryUsable()
// && gAgent.getID().notNull()) // Shouldn't be null at this stage
// {
// gInventory.cache(gInventory.getRootFolderID(), gAgent.getID());
// if (gInventory.getLibraryRootFolderID().notNull()
// && gInventory.getLibraryOwnerID().notNull())
// {
// gInventory.cache(
// gInventory.getLibraryRootFolderID(),
// gInventory.getLibraryOwnerID());
// }
// }
// save inventory if appropriate
if (gInventory.isInventoryUsable()
&& gAgent.getID().notNull()) // Shouldn't be null at this stage
{
gInventory.cache(gInventory.getRootFolderID(), gAgent.getID());
if (gInventory.getLibraryRootFolderID().notNull()
&& gInventory.getLibraryOwnerID().notNull())
{
gInventory.cache(
gInventory.getLibraryRootFolderID(),
gInventory.getLibraryOwnerID());
}
}
LLAvatarNameCache::instance().setCustomNameCheckCallback(LLAvatarNameCache::custom_name_check_callback_t()); // <FS:Ansariel> Contact sets
saveNameCache();
if (LLExperienceCache::instanceExists())
{
// TODO: LLExperienceCache::cleanup() logic should be moved to
// cleanupSingleton().
LLExperienceCache::instance().cleanup();
}
// LLAvatarNameCache::instance().setCustomNameCheckCallback(LLAvatarNameCache::custom_name_check_callback_t()); // <FS:Ansariel> Contact sets
// saveNameCache();
// if (LLExperienceCache::instanceExists())
// {
// // TODO: LLExperienceCache::cleanup() logic should be moved to
// // cleanupSingleton().
// LLExperienceCache::instance().cleanup();
// }
// </FS:Beq>
// close inventory interface, close all windows
LLSidepanelInventory::cleanup();
@ -6416,7 +6451,7 @@ void LLAppViewer::disconnectViewer()
LLDestroyClassList::instance().fireCallbacks();
cleanup_xfer_manager();
// gDisconnected = TRUE; // <FS:Beq/> [FIRE-32453] [BUG-232971] disconnect sooner to force the cache write.
gDisconnected = TRUE;
// Pass the connection state to LLUrlEntryParcel not to attempt
// parcel info requests while disconnected.

View File

@ -283,6 +283,7 @@ private:
void idleNetwork();
void sendLogoutRequest();
void persistCachesAndSettings();
void disconnectViewer();
// *FIX: the app viewer class should be some sort of singleton, no?

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="simple_outfit_snapshot" title="Photo de la tenue">
<button label="Photographier" name="new_snapshot_btn" />
<button label="Sauver ([UPLOAD_COST]L$)" name="save_btn" />
<button label="Annuler" name="cancel_btn" />
</floater>

View File

@ -609,13 +609,15 @@ class WindowsManifest(ViewerManifest):
print ("Skipping GLOD library (assumming linked statically)")
# Get fmodstudio dll if needed
if self.args['fmodstudio'] == 'ON':
# if self.args['fmodstudio'] == 'ON':
if self.args['fmodstudio'].lower() == 'on':
if(self.args['configuration'].lower() == 'debug'):
self.path("fmodL.dll")
else:
self.path("fmod.dll")
if self.args['openal'] == 'ON':
# if self.args['openal'] == 'ON':
if self.args['openal'].lower() == 'on':
# Get openal dll
self.path("OpenAL32.dll")
self.path("alut.dll")
@ -1344,6 +1346,7 @@ class DarwinManifest(ViewerManifest):
with self.prefix(src="", dst="Contents"): # everything goes in Contents
bugsplat_db = self.args.get('bugsplat')
print(f"debug: bugsplat_db={bugsplat_db}")
if bugsplat_db:
# Inject BugsplatServerURL into Info.plist if provided.
Info_plist = self.dst_path_of("Info.plist")
@ -1477,17 +1480,26 @@ class DarwinManifest(ViewerManifest):
self.path2basename(relpkgdir, libfile)
# Fmod studio dylibs (vary based on configuration)
if self.args['fmodstudio'] == 'ON':
# <FS:Beq> Fix intolerant processing of booleans
# if self.args['fmodstudio'].lower() == 'ON':
usefmod = self.args['fmodstudio'].lower()
print(f"debug: fmodstudio={usefmod}")
if usefmod == 'on':
if self.args['configuration'].lower() == 'debug':
print("debug: fmodstudio is used in debug")
for libfile in (
"libfmodL.dylib",
):
dylibs += path_optional(os.path.join(debpkgdir, libfile), libfile)
else:
print("debug: fmodstudio is used in release")
for libfile in (
"libfmod.dylib",
):
print("debug: adding {} to dylibs for fmodstudio".format(path_optional(os.path.join(relpkgdir, libfile), libfile)))
dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
print(f"debug: dylibs = {dylibs}")
# our apps
executable_path = {}
@ -1832,7 +1844,12 @@ class DarwinManifest(ViewerManifest):
finally:
# Unmount the image even if exceptions from any of the above
self.run_command(['hdiutil', 'detach', '-force', devfile])
for tries in range(10):
try:
self.run_command(['hdiutil', 'detach', '-force', devfile])
except ManifestError as err:
print(f"detach failed on attempt {tries}")
time.sleep(1)
print("Converting temp disk image to final disk image")
self.run_command(['hdiutil', 'convert', sparsename, '-format', 'UDZO',
@ -2199,7 +2216,8 @@ class Linux_i686_Manifest(LinuxManifest):
print("tcmalloc files not found, skipping")
pass
if self.args['fmodstudio'] == 'ON':
# if self.args['fmodstudio'] == 'ON':
if self.args['fmodstudio'].lower() == 'on':
try:
self.path("libfmod.so")
self.path("libfmod.so*")
@ -2240,7 +2258,8 @@ class Linux_x86_64_Manifest(LinuxManifest):
# is now in the slvoice package, and we need to just use it as is.
# self.path("libopenal32.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
if self.args['fmodstudio'] == 'ON':
# if self.args['fmodstudio'] == 'ON':
if self.args['fmodstudio'].lower() == 'on':
try:
self.path("libfmod.so")
self.path("libfmod.so*")

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
llbase==1.2.11
git+https://github.com/Nicky-D/autobuild@main_nd#egg=autobuild