Skip to content

Commit b1c47dc

Browse files
committed
Merge upstream/master: import code improvements, keep custom build system
- Deepzoom support: NexusFile interface extended with loadDZNode/dropDZNode/loadDZTex/dropDZTex - New loaders: tsloader (.ts files), colormap support for .ts properties - Scale vector support in all loaders (ply, obj, stl) - ObjLoader: improved MTL discovery (searches for mtllib directive in .obj) - PlyLoader: disable textures when no texture filenames found - Renderer: fix log2 redefinition on Windows - New CLI options: --scale (-W), --colormap (-K) - nexus3d threejs package added - Updated CI workflows - Corto submodule updated to latest master (d240e69) - Fixed upstream bug in stlloader.cpp (scale[2] applied to wrong axis) Preserved local customizations: - Root CMakeLists.txt (Qt5::Core/Gui, static libs, build options) - nxsedit CMakeLists.txt (nxsedit commented out, only nxscompress) - NEXUS_VERSION kept at 4.3 - NexusFile abstraction layer fully preserved
2 parents a1fb837 + 2bc3739 commit b1c47dc

54 files changed

Lines changed: 4509 additions & 198 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: 'Build and Deploy'
2+
description: 'Build and Deploy'
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Setup MSVC
8+
uses: ilammy/msvc-dev-cmd@v1
9+
- name: Install Qt
10+
uses: jurplel/install-qt-action@v4
11+
if: ${{ matrix.os != 'macos-latest' && matrix.os != 'ubuntu-22.04-arm' }}
12+
with:
13+
cache: true
14+
version: '5.15.2'
15+
- name: Setup Env variables
16+
shell: bash
17+
id: envs
18+
run: |
19+
echo "name=VCINSTALLDIR::C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC" >> $GITHUB_ENV
20+
ARCH=$(uname -m)
21+
echo "arch=$ARCH" >> $GITHUB_OUTPUT
22+
- name: Clone VCG
23+
shell: bash
24+
run: |
25+
cd ..
26+
git clone --single-branch --branch devel https://github.com/cnr-isti-vclab/vcglib
27+
- name: Install dependencies Linux
28+
shell: bash
29+
if: ${{ runner.os == 'Linux' }}
30+
run: |
31+
sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libglew-dev ninja-build
32+
- name: Install dependencies Linux arm
33+
shell: bash
34+
if: ${{ matrix.os == 'ubuntu-22.04-arm' }}
35+
run: |
36+
sudo apt-get install -y qtbase5-dev qt5-qmake
37+
- name: Install dependencies macOS arm
38+
shell: bash
39+
if: ${{ matrix.os == 'macos-latest' }}
40+
run: |
41+
brew install qt@5
42+
echo Qt5_DIR=$(brew --prefix qt@5) >> $GITHUB_ENV
43+
echo $(brew --prefix qt@5)/bin >> $GITHUB_PATH
44+
- name: Ccache
45+
uses: hendrikmuhs/ccache-action@v1.2
46+
with:
47+
key: ${{ matrix.os }}-${{ github.ref }}
48+
- name: Configure and Build
49+
shell: bash
50+
run: |
51+
mkdir build
52+
mkdir install
53+
cd build
54+
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_INSTALL_PREFIX=../install ..
55+
ninja
56+
ninja install
57+
- name: Deploy Linux
58+
shell: bash
59+
if: ${{ runner.os == 'Linux' }}
60+
run: |
61+
cd install
62+
# download linuxdeployqt
63+
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-${{ steps.envs.outputs.arch }}.AppImage
64+
chmod +x linuxdeploy-${{ steps.envs.outputs.arch }}.AppImage
65+
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-qt-${{ steps.envs.outputs.arch }}.AppImage
66+
chmod +x linuxdeploy-plugin-qt-${{ steps.envs.outputs.arch }}.AppImage
67+
# deploy
68+
./linuxdeploy-${{ steps.envs.outputs.arch }}.AppImage --executable=$PWD/bin/nxsbuild --executable=$PWD/bin/nxscompress --executable=$PWD/bin/nxsedit --executable=$PWD/bin/nxsview --appdir=. --plugin qt
69+
rm -r bin
70+
rm linuxdeploy-${{ steps.envs.outputs.arch }}.AppImage linuxdeploy-plugin-qt-${{ steps.envs.outputs.arch }}.AppImage
71+
- name: Deploy MacOS
72+
shell: bash
73+
if: ${{ runner.os == 'macOS' }}
74+
run: |
75+
cd install
76+
macdeployqt nxsview.app -executable=nxsview.app/Contents/MacOS/nxsbuild -executable=nxsview.app/Contents/MacOS/nxscompress -executable=nxsview.app/Contents/MacOS/nxsedit
77+
rm -r bin
78+
rm -r lib
79+
- name: Deploy Windows
80+
shell: bash
81+
if: ${{ runner.os == 'Windows' }}
82+
run: |
83+
cd install/bin
84+
windeployqt nxsview.exe
85+
cd ..
86+
mv bin nexus_portable-${{ steps.envs.outputs.arch }}

.github/actions/upload/action.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: 'Upload'
2+
description: 'Upload'
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Setup Env variables
8+
shell: bash
9+
id: envs
10+
run: |
11+
ARCH=$(uname -m)
12+
echo "arch=$ARCH" >> $GITHUB_OUTPUT
13+
- name: Archive Linux
14+
shell: bash
15+
if: ${{ runner.os == 'Linux' }}
16+
run: |
17+
cd install
18+
tar -cvzf nexus-linux-${{ steps.envs.outputs.arch }}.tar.gz *
19+
- name: Upload nexus Linux
20+
uses: actions/upload-artifact@v4
21+
if: ${{ runner.os == 'Linux' }}
22+
with:
23+
name: nexus-linux-${{ steps.envs.outputs.arch }}
24+
path: install/nexus-linux-${{ steps.envs.outputs.arch }}.tar.gz
25+
- name: Archive MacOS
26+
shell: bash
27+
if: ${{ runner.os == 'macOS' }}
28+
run: |
29+
cd install
30+
tar -cvzf nxsview-macos-${{ steps.envs.outputs.arch }}.tar.gz *
31+
- name: Upload nxsview MacOS
32+
uses: actions/upload-artifact@v4
33+
if: ${{ runner.os == 'macOS' }}
34+
with:
35+
name: nxsview-macos-${{ steps.envs.outputs.arch }}
36+
path: install/nxsview-macos-${{ steps.envs.outputs.arch }}.tar.gz
37+
- name: Archive Windows
38+
shell: bash
39+
if: ${{ runner.os == 'Windows' }}
40+
run: |
41+
cd install
42+
powershell Compress-Archive -Path nexus_portable-${{ steps.envs.outputs.arch }} -DestinationPath nexus-windows-${{ steps.envs.outputs.arch }}.zip
43+
- name: Uploading Nexus Windows
44+
uses: actions/upload-artifact@v4
45+
if: ${{ runner.os == 'Windows' }}
46+
with:
47+
name: nexus-windows-${{ steps.envs.outputs.arch }}
48+
path: install/nexus-windows-${{ steps.envs.outputs.arch }}.zip

.github/workflows/BuildNexus.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: BuildNexus
2+
3+
on:
4+
[push, pull_request]
5+
6+
jobs:
7+
build_nexus:
8+
name: Build Nexus
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: ['ubuntu-22.04', 'ubuntu-22.04-arm', 'macos-15-intel', 'macos-latest', 'windows-latest']
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
- name: Build and Deploy
20+
uses: ./.github/actions/build_and_deploy
21+
- name: Upload
22+
uses: ./.github/actions/upload
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CreateRelease
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'New Nexus Version'
8+
required: true
9+
default: 'X.Y'
10+
11+
jobs:
12+
update_version:
13+
name: Update Version
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Update NEXUS_VERSION
18+
run: |
19+
echo ${{ github.event.inputs.version }} | tr -d '\n'> NEXUS_VERSION
20+
- name: Commit change
21+
uses: stefanzweifel/git-auto-commit-action@v5
22+
with:
23+
commit_message: Set Nexus version to ${{ github.event.inputs.version }}
24+
25+
build_nexus:
26+
name: Build Nexus
27+
needs: update_version
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
matrix:
31+
os: ['ubuntu-22.04', 'ubuntu-22.04-arm', 'macos-15-intel', 'macos-latest', 'windows-latest']
32+
steps:
33+
- uses: actions/checkout@v4
34+
with:
35+
submodules: recursive
36+
- name: Build and Deploy
37+
uses: ./.github/actions/build_and_deploy
38+
- name: Sign and Notarize
39+
uses: cnr-isti-vclab/sign-and-notarize@v1
40+
with:
41+
input-path: 'install/*.app'
42+
macos-certificate: '${{ secrets.MACOS_CERTIFICATE }}'
43+
macos-certificate-id: '${{ secrets.MACOS_CERT_ID }}'
44+
macos-certificate-password: '${{ secrets.MACOS_CERTIFICATE_PSSW }}'
45+
macos-notarization-team: '${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}'
46+
macos-notarization-user: '${{ secrets.MACOS_NOTARIZATION_USER }}'
47+
macos-notarization-password: '${{ secrets.MACOS_NOTARIZATION_PSSW }}'
48+
- name: Upload
49+
uses: ./.github/actions/upload
50+
51+
create_release:
52+
name: Create Release
53+
needs: build_nexus
54+
runs-on: ubuntu-latest
55+
steps:
56+
#download all the artifacts
57+
- name: Download Nexus Artifacts
58+
uses: actions/download-artifact@v4
59+
with:
60+
path: artifacts/
61+
62+
#Create release
63+
- name: Create Release
64+
uses: "ncipollo/release-action@v1"
65+
with:
66+
token: "${{ secrets.GITHUB_TOKEN }}"
67+
tag: v${{ github.event.inputs.version }}
68+
name: 'Nexus v${{ github.event.inputs.version }}'
69+
artifacts: |
70+
artifacts/n*/*

.github/workflows/Linux.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/MacOS.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/Windows.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

Config.cmake.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@PACKAGE_INIT@
2+
3+
include(CMakeFindDependencyMacro)
4+
find_dependency(vcglib)
5+
find_dependency(corto)
6+
7+
include ( "${CMAKE_CURRENT_LIST_DIR}/nexusTargets.cmake" )

0 commit comments

Comments
 (0)