Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: Build

on:
workflow_dispatch:
inputs:
installer_type:
description: 'Windows installer type'
type: choice
options:
- velopack
- nsis
default: 'velopack'
pull_request:
push:
branches: ["main", "release/*", "project/*"]
Expand Down Expand Up @@ -84,6 +92,8 @@ jobs:
# 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 }}
# Pass USE_VELOPACK to CMake when using Velopack installer (default) - Windows and macOS
autobuild_configure_parameters: ${{ (contains(matrix.runner, 'windows') || contains(matrix.runner, 'macos')) && (github.event.inputs.installer_type || 'velopack') == 'velopack' && '-- -DUSE_VELOPACK:BOOL=ON' || '' }}
steps:
- name: Checkout code
uses: actions/checkout@v5
Expand Down Expand Up @@ -126,6 +136,17 @@ jobs:
with:
token: ${{ github.token }}

- name: Setup .NET for Velopack
if: (runner.os == 'Windows' || runner.os == 'macOS') && (github.event.inputs.installer_type || 'velopack') == 'velopack'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Install Velopack CLI
if: (runner.os == 'Windows' || runner.os == 'macOS') && (github.event.inputs.installer_type || 'velopack') == 'velopack'
shell: bash
run: dotnet tool install -g vpk

- name: Build
id: build
shell: bash
Expand Down Expand Up @@ -271,6 +292,14 @@ jobs:
path: |
${{ steps.build.outputs.viewer_app }}

# Upload Velopack Releases directory (contains nupkg and RELEASES for updates)
- name: Upload Velopack releases
if: steps.build.outputs.velopack_releases
uses: actions/upload-artifact@v4
with:
name: "${{ steps.build.outputs.artifact }}-releases"
path: ${{ steps.build.outputs.velopack_releases }}

# The other upload of nontrivial size is the symbol file. Use a distinct
# artifact for that too.
- name: Upload symbol file
Expand Down Expand Up @@ -310,13 +339,14 @@ jobs:
steps:
- name: Sign and package Windows viewer
if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID
uses: secondlife/viewer-build-util/sign-pkg-windows@v2.0.4
uses: secondlife/viewer-build-util/sign-pkg-windows@geenz/velopack
with:
vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}"
cert_name: "${{ env.AZURE_CERT_NAME }}"
client_id: "${{ env.AZURE_CLIENT_ID }}"
client_secret: "${{ env.AZURE_CLIENT_SECRET }}"
tenant_id: "${{ env.AZURE_TENANT_ID }}"
installer_type: "${{ github.event.inputs.installer_type || 'velopack' }}"

sign-and-package-mac:
env:
Expand Down Expand Up @@ -439,6 +469,10 @@ jobs:
with:
pattern: "*-metadata"

- uses: actions/download-artifact@v4
with:
pattern: "*-releases"

- name: Rename metadata
run: |
cp Windows-metadata/autobuild-package.xml Windows-autobuild-package.xml
Expand All @@ -464,12 +498,14 @@ jobs:
generate_release_notes: true
target_commitish: ${{ github.sha }}
append_body: true
fail_on_unmatched_files: true
fail_on_unmatched_files: false
files: |
macOS-installer/*.dmg
Windows-installer/*.exe
*-autobuild-package.xml
*-viewer_version.txt
Windows-releases/*
macOS-releases/*

- name: post release URL
run: |
Expand Down
50 changes: 50 additions & 0 deletions autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2914,6 +2914,56 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>description</key>
<string>Voxelized Hierarchical Approximate Convex Decomposition</string>
</map>
<key>velopack</key>
<map>
<key>platforms</key>
<map>
<key>windows64</key>
<map>
<key>archive</key>
<map>
<key>creds</key>
<string>github</string>
<key>hash</key>
<string>81a97ec4fc491011726097e6dc8359f537fa7935</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://api.github.com/repos/secondlife-3p/3p-velopack/releases/assets/343914203</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
<key>darwin64</key>
<map>
<key>archive</key>
<map>
<key>creds</key>
<string>github</string>
<key>hash</key>
<string>17b1373f15b33cd86ca30743a383bf4de63d5c09</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://api.github.com/repos/secondlife-3p/3p-velopack/releases/assets/343914198</string>
</map>
<key>name</key>
<string>darwin64</string>
</map>
</map>
<key>license</key>
<string>MIT</string>
<key>license_file</key>
<string>LICENSES/velopack.txt</string>
<key>copyright</key>
<string>Velopack Ltd.</string>
<key>version</key>
<string>a2592d1.21222737470</string>
<key>name</key>
<string>velopack</string>
<key>description</key>
<string>Velopack C/C++ Library</string>
</map>
</map>
<key>package_description</key>
<map>
Expand Down
1 change: 1 addition & 0 deletions indra/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ set(cmake_SOURCE_FILES
UI.cmake
UnixInstall.cmake
Variables.cmake
Velopack.cmake
VHACD.cmake
ViewerMiscLibs.cmake
VisualLeakDetector.cmake
Expand Down
2 changes: 1 addition & 1 deletion indra/cmake/Python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ elseif (WINDOWS)
foreach(hive HKEY_CURRENT_USER HKEY_LOCAL_MACHINE)
# prefer more recent Python versions to older ones, if multiple versions
# are installed
foreach(pyver 3.13 3.12 3.11 3.10 3.9 3.8 3.7)
foreach(pyver 3.14 3.13 3.12 3.11 3.10 3.9 3.8 3.7)
list(APPEND regpaths "[${hive}\\SOFTWARE\\Python\\PythonCore\\${pyver}\\InstallPath]")
endforeach()
endforeach()
Expand Down
68 changes: 68 additions & 0 deletions indra/cmake/Velopack.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# -*- cmake -*-
# Velopack installer and update framework integration
# https://velopack.io/

include_guard()

# USE_VELOPACK controls whether to use Velopack for installer packaging (instead of NSIS/DMG)
option(USE_VELOPACK "Use Velopack for installer packaging" OFF)

if (WINDOWS)
include(Prebuilt)
use_prebuilt_binary(velopack)

add_library(ll::velopack INTERFACE IMPORTED)

target_include_directories(ll::velopack SYSTEM INTERFACE
${LIBS_PREBUILT_DIR}/include/velopack
)

target_link_libraries(ll::velopack INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/velopack_libc.lib
)

# Windows system libraries required by Velopack
target_link_libraries(ll::velopack INTERFACE
winhttp
ole32
shell32
shlwapi
version
userenv
ws2_32
bcrypt
ntdll
)

target_compile_definitions(ll::velopack INTERFACE LL_VELOPACK=1)

elseif (DARWIN)
include(Prebuilt)
use_prebuilt_binary(velopack)

add_library(ll::velopack INTERFACE IMPORTED)

target_include_directories(ll::velopack SYSTEM INTERFACE
${LIBS_PREBUILT_DIR}/include/velopack
)

target_link_libraries(ll::velopack INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/libvelopack_libc.a
)

# macOS system frameworks required by Velopack (Rust static library dependencies)
target_link_libraries(ll::velopack INTERFACE
"-framework Foundation"
"-framework Security"
"-framework SystemConfiguration"
"-framework AppKit"
"-framework CoreFoundation"
"-framework CoreServices"
"-framework IOKit"
"-liconv"
"-lresolv"
)

target_compile_definitions(ll::velopack INTERFACE LL_VELOPACK=1)

endif()
3 changes: 2 additions & 1 deletion indra/lib/python/indra/util/llmanifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def get_default_platform(dummy):
for use by a .bat file.""",
default=None),
dict(name='versionfile',
description="""The name of a file containing the full version number."""),
description="""The name of a file containing the full version number.""",
default=None),
]

def usage(arguments, srctree=""):
Expand Down
15 changes: 15 additions & 0 deletions indra/newview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ include(TinyEXR)
include(ThreeJS)
include(Tracy)
include(UI)
include(Velopack)
include(ViewerMiscLibs)
include(ViewerManager)
include(VisualLeakDetector)
Expand Down Expand Up @@ -659,6 +660,7 @@ set(viewer_SOURCE_FILES
llurllineeditorctrl.cpp
llurlwhitelist.cpp
llversioninfo.cpp
llvvmquery.cpp
llviewchildren.cpp
llviewerassetstats.cpp
llviewerassetstorage.cpp
Expand Down Expand Up @@ -1337,6 +1339,7 @@ set(viewer_HEADER_FILES
llurllineeditorctrl.h
llurlwhitelist.h
llversioninfo.h
llvvmquery.h
llviewchildren.h
llviewerassetstats.h
llviewerassetstorage.h
Expand Down Expand Up @@ -1456,6 +1459,8 @@ if (DARWIN)
LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.h)
LIST(APPEND viewer_SOURCE_FILES llfilepicker_mac.mm)
LIST(APPEND viewer_HEADER_FILES llfilepicker_mac.h)
LIST(APPEND viewer_SOURCE_FILES llvelopack.cpp)
LIST(APPEND viewer_HEADER_FILES llvelopack.h)

set_source_files_properties(
llappviewermacosx-objc.mm
Expand Down Expand Up @@ -1518,16 +1523,19 @@ if (WINDOWS)

list(APPEND viewer_SOURCE_FILES
llappviewerwin32.cpp
llvelopack.cpp
llwindebug.cpp
)
set_source_files_properties(
llappviewerwin32.cpp
llvelopack.cpp
PROPERTIES
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
)

list(APPEND viewer_HEADER_FILES
llappviewerwin32.h
llvelopack.h
llwindebug.h
)

Expand Down Expand Up @@ -1941,6 +1949,7 @@ if (WINDOWS)
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
"--velopack=${USE_VELOPACK}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=$<CONFIG>
"--channel=${VIEWER_CHANNEL}"
Expand Down Expand Up @@ -2064,6 +2073,10 @@ if (USE_DISCORD)
target_link_libraries(${VIEWER_BINARY_NAME} ll::discord_sdk )
endif ()

if (TARGET ll::velopack)
target_link_libraries(${VIEWER_BINARY_NAME} ll::velopack )
endif ()

if( TARGET ll::intel_memops )
target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops )
endif()
Expand Down Expand Up @@ -2261,9 +2274,11 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
--bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER}
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
"--velopack=${USE_VELOPACK}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=$<CONFIG>
"--channel=${VIEWER_CHANNEL}"
Expand Down
12 changes: 11 additions & 1 deletion indra/newview/app_settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4237,7 +4237,17 @@
<key>Value</key>
<string>0.0.0</string>
</map>

<key>LastInstallVersion</key>
<map>
<key>Comment</key>
<string>Version number of last instance of the viewer that you installed</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
<key>LimitDragDistance</key>
<map>
<key>Comment</key>
Expand Down
Loading
Loading