Skip to content

Commit

Permalink
Merge branch 'develop' into feature/addGoogleTestAsSubmodule
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianFeldmann committed Jul 29, 2024
2 parents c910a9f + 6aadaea commit 36bdafe
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 124 deletions.
232 changes: 113 additions & 119 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
# QMAKE_COMMAND: qmake6
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - run: git fetch --prune --unshallow
# - name: Install Linux packages
# run: |
Expand All @@ -40,11 +38,10 @@ jobs:
# strategy:
# matrix:
# include:
# - os: macos-12
# - os: macos-13
# - os: macos-14
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - run: git fetch --prune --unshallow
# - name: Install packages
# run: |
Expand All @@ -63,22 +60,22 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
QT_FILE: qtBase_6.5.2_ubuntu20.zip
QT_FILE: qtBase_6.7.2_ubuntu20.zip
LIBDE265_REMOTE: libde265.so
LIBDE265_LOCAL: libde265-internals.so
ARTIFACT_NAME: YUView.Ubuntu20.AppImage
CPU_COUNT_COMMAND: nproc
- os: macos-11
QT_FILE: qtBase_6.5.2_mac11.zip
- os: macos-12
QT_FILE: qtBase_6.7.2_mac12.zip
LIBDE265_REMOTE: libde265.dylib
LIBDE265_LOCAL: libde265-internals.dylib
ARTIFACT_NAME: YUView-Mac11-BigSur.zip
ARTIFACT_NAME: YUView-Mac12-Monterey.zip
CPU_COUNT_COMMAND: sysctl -n hw.logicalcpu
- os: macos-12
QT_FILE: qtBase_6.5.2_mac12.zip
- os: macos-14
QT_FILE: qtBase_6.7.2_mac14.zip
LIBDE265_REMOTE: libde265.dylib
LIBDE265_LOCAL: libde265-internals.dylib
ARTIFACT_NAME: YUView-Mac12-Monterey.zip
ARTIFACT_NAME: YUView-Mac12-Sonoma.zip
CPU_COUNT_COMMAND: sysctl -n hw.logicalcpu
steps:
- uses: actions/checkout@v4
Expand All @@ -90,7 +87,7 @@ jobs:
cd ../../
mkdir -p YUViewQt/YUViewQt
cd YUViewQt/YUViewQt
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtBase-6.5.2/${{matrix.QT_FILE}} -o Qt.zip
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtBase-6.7.2/${{matrix.QT_FILE}} -o Qt.zip
unzip -qa Qt.zip
echo "$GITHUB_WORKSPACE/../../YUViewQt/YUViewQt/Qt/bin" >> $GITHUB_PATH
shell: bash
Expand Down Expand Up @@ -149,112 +146,109 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: artifacts/${{matrix.ARTIFACT_NAME}}
# build-windows:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# include:
# - os: windows-2019
# auto_update: true
# ARTIFACT_NAME: YUView-Win2019.zip
# QT_FILE: qtBase_6.5.2_win2019.zip
# - os: windows-2019
# auto_update: false
# ARTIFACT_NAME: YUView-Win2019-noautoupdate.zip
# QT_FILE: qtBase_6.5.2_win2019.zip
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - uses: ilammy/msvc-dev-cmd@v1
# - run: git fetch --prune --unshallow
# - name: Install Qt base
# run: |
# cd ../../
# mkdir -p YUViewQt/YUViewQt
# cd YUViewQt/YUViewQt
# curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtBase-6.5.2/${{matrix.QT_FILE}} -o Qt.zip
# 7z x Qt.zip
# echo "${{ github.workspace }}\..\..\YUViewQt\YUViewQt\Qt\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# - name: Install libde265
# run: |
# curl -L https://github.com/ChristianFeldmann/libde265/releases/download/v1.1/libde265.dll -o libde265.dll
# curl -L https://raw.githubusercontent.com/ChristianFeldmann/libde265/master/COPYING -o libde265License.txt
# - name: Install jom
# run: |
# choco install jom
# - name: Install openSSL
# run: |
# mkdir openSSL
# cd openSSL
# curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/openSSL1.1.1u/openSSL_1_1_1u_win2019.zip -o openSSL.zip
# 7z x openSSL.zip
# cd ..
# - name: Activate auto update
# run: sed -i -- "s/#define UPDATE_FEATURE_ENABLE 0/#define UPDATE_FEATURE_ENABLE 1/g" YUViewLib/src/common/Typedef.h
# shell: bash
# if: matrix.auto_update == true
# - name: Build
# run: |
# echo "Creating Build dir and entering it"
# mkdir build
# cd build
# echo "Qmake Version:"
# d:\a\YUViewQt\YUViewQt\Qt\bin\qmake --version
# echo "Executing qmake..."
# d:\a\YUViewQt\YUViewQt\Qt\bin\qmake CONFIG+=UNITTESTS ..
# echo "Executing jom:"
# jom
# - name: Run Unittests
# run: |
# D:\a\YUView\YUView\build\YUViewUnitTest\YUViewUnitTest
# - name: WindeployQT
# run: |
# mkdir deploy
# cd deploy
# cp ../build/YUViewApp/YUView.exe .
# d:\a\YUViewQt\YUViewQt\Qt\bin\windeployqt.exe --release --no-compiler-runtime YUView.exe
# cp ../openSSL/*.dll .
# mkdir decoder
# cp ..\libde265.dll decoder
# cp ..\libde265License.txt decoder
# cp ../LICENSE.GPL3 .
# cd ..
# python deployment/versioning.py -d deploy -o deploy/versioninfo.txt
# mkdir artifacts
# 7z a artifacts/YUView-Win.zip ./deploy/*
# - name: Wix Windows
# run: |
# cd ${{ github.workspace }}/deployment/wix
# cp 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\v142\MergeModules\Microsoft_VC142_CRT_x64.msm' .
# & "C:\Program Files (x86)\WiX Toolset v3.14\bin\heat.exe" dir ../../deploy -gg -dr APPLICATIONFOLDER -srd -sreg -cg YUViewComponents -out harvestedDirectory.wxs
# & "C:\Program Files (x86)\WiX Toolset v3.14\bin\candle.exe" -dConfiguration=Release -dOutDir=bin/Release/ '-dTargetExt=.msi' '-dTargetFileName=YUViewSetup.msi' -dTargetName=YUViewSetup -out obj/Release/ -arch x64 -ext "C:\Program Files (x86)\WiX Toolset v3.14\bin\WixUIExtension.dll" YUView.wxs
# & "C:\Program Files (x86)\WiX Toolset v3.14\bin\candle.exe" -dConfiguration=Release -dOutDir=bin/Release/ '-dTargetExt=.msi' '-dTargetFileName=YUViewSetup.msi' -dTargetName=YUViewSetup -out obj/Release/ -arch x64 harvestedDirectory.wxs
# & "C:\Program Files (x86)\WiX Toolset v3.14\bin\light.exe" -b ../../deploy -out bin/Release/YUViewSetup.msi -pdbout bin/Release/YUViewSetup.wixpdb -cultures:null -ext "C:\Program Files (x86)\WiX Toolset v3.14\bin\WixUIExtension.dll" -contentsfile obj/Release/YUViewSetup.wixproj.BindContentsFileListnull.txt -outputsfile obj/Release/YUViewSetup.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj/Release/YUViewSetup.wixproj.BindBuiltOutputsFileListnull.txt obj/Release/YUView.wixobj obj/Release/harvestedDirectory.wixobj
# cd ${{ github.workspace }}
# cp deployment/wix/bin/Release/YUViewSetup.msi ./
# if: matrix.auto_update == true
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# with:
# name: ${{matrix.ARTIFACT_NAME}}
# path: artifacts
# - name: Upload Windows installer Artifact
# uses: actions/upload-artifact@v4
# with:
# name: YUViewSetup.msi
# path: ./YUViewSetup.msi
# if: matrix.auto_update == true
# - name: Release Zip
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: artifacts/YUView-Win.zip
# - name: Release Installer
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/') && matrix.auto_update == true
# with:
# files: YUViewSetup.msi
build-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-2019
auto_update: true
ARTIFACT_NAME: YUView-Win2019.zip
QT_FILE: qtBase_6.7.2_win2019.zip
- os: windows-2019
auto_update: false
ARTIFACT_NAME: YUView-Win2019-noautoupdate.zip
QT_FILE: qtBase_6.7.2_win2019.zip
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- run: git fetch --prune --unshallow
- name: Install Qt base
run: |
cd ../../
mkdir -p YUViewQt/YUViewQt
cd YUViewQt/YUViewQt
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/QtBase-6.7.2/${{matrix.QT_FILE}} -o Qt.zip
7z x Qt.zip
echo "${{ github.workspace }}\..\..\YUViewQt\YUViewQt\Qt\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install libde265
run: |
curl -L https://github.com/ChristianFeldmann/libde265/releases/download/v1.1/libde265.dll -o libde265.dll
curl -L https://raw.githubusercontent.com/ChristianFeldmann/libde265/master/COPYING -o libde265License.txt
- name: Install jom
run: |
choco install jom
- name: Install openSSL
run: |
mkdir openSSL
cd openSSL
curl -L https://github.com/ChristianFeldmann/YUViewQt/releases/download/openSSL1.1.1w/openSSL_1_1_1w_win2019.zip -o openSSL.zip
7z x openSSL.zip
cd ..
- name: Activate auto update
run: sed -i -- "s/#define UPDATE_FEATURE_ENABLE 0/#define UPDATE_FEATURE_ENABLE 1/g" YUViewLib/src/common/Typedef.h
shell: bash
if: matrix.auto_update == true
- name: Build
run: |
echo "Creating Build dir and entering it"
mkdir build
cd build
echo "Qmake Version:"
d:\a\YUViewQt\YUViewQt\Qt\bin\qmake --version
echo "Executing qmake..."
d:\a\YUViewQt\YUViewQt\Qt\bin\qmake CONFIG+=UNITTESTS ..
echo "Executing jom:"
jom
- name: Run Unittests
run: D:\a\YUView\YUView\build\YUViewUnitTest\YUViewUnitTest
- name: WindeployQT
run: |
mkdir deploy
cd deploy
cp ../build/YUViewApp/YUView.exe .
d:\a\YUViewQt\YUViewQt\Qt\bin\windeployqt.exe --release --no-compiler-runtime YUView.exe
cp ../openSSL/*.dll .
mkdir decoder
cp ..\libde265.dll decoder
cp ..\libde265License.txt decoder
cp ../LICENSE.GPL3 .
cd ..
python deployment/versioning.py -d deploy -o deploy/versioninfo.txt
mkdir artifacts
7z a artifacts/YUView-Win.zip ./deploy/*
- name: Wix Windows
run: |
cd ${{ github.workspace }}/deployment/wix
cp 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\v142\MergeModules\Microsoft_VC142_CRT_x64.msm' .
& "C:\Program Files (x86)\WiX Toolset v3.14\bin\heat.exe" dir ../../deploy -gg -dr APPLICATIONFOLDER -srd -sreg -cg YUViewComponents -out harvestedDirectory.wxs
& "C:\Program Files (x86)\WiX Toolset v3.14\bin\candle.exe" -dConfiguration=Release -dOutDir=bin/Release/ '-dTargetExt=.msi' '-dTargetFileName=YUViewSetup.msi' -dTargetName=YUViewSetup -out obj/Release/ -arch x64 -ext "C:\Program Files (x86)\WiX Toolset v3.14\bin\WixUIExtension.dll" YUView.wxs
& "C:\Program Files (x86)\WiX Toolset v3.14\bin\candle.exe" -dConfiguration=Release -dOutDir=bin/Release/ '-dTargetExt=.msi' '-dTargetFileName=YUViewSetup.msi' -dTargetName=YUViewSetup -out obj/Release/ -arch x64 harvestedDirectory.wxs
& "C:\Program Files (x86)\WiX Toolset v3.14\bin\light.exe" -b ../../deploy -out bin/Release/YUViewSetup.msi -pdbout bin/Release/YUViewSetup.wixpdb -cultures:null -ext "C:\Program Files (x86)\WiX Toolset v3.14\bin\WixUIExtension.dll" -contentsfile obj/Release/YUViewSetup.wixproj.BindContentsFileListnull.txt -outputsfile obj/Release/YUViewSetup.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj/Release/YUViewSetup.wixproj.BindBuiltOutputsFileListnull.txt obj/Release/YUView.wixobj obj/Release/harvestedDirectory.wixobj
cd ${{ github.workspace }}
cp deployment/wix/bin/Release/YUViewSetup.msi ./
if: matrix.auto_update == true
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{matrix.ARTIFACT_NAME}}
path: artifacts
- name: Upload Windows installer Artifact
uses: actions/upload-artifact@v4
with:
name: YUViewSetup.msi
path: ./YUViewSetup.msi
if: matrix.auto_update == true
- name: Release Zip
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: artifacts/YUView-Win.zip
- name: Release Installer
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && matrix.auto_update == true
with:
files: YUViewSetup.msi

# How to upload files to the release:
# https://github.com/Blacksmoke16/oq/pull/47/files#diff-082c28d748ad2e3eecc5508d740d9417R9-R29
Expand Down
10 changes: 5 additions & 5 deletions YUViewLib/src/ui/ViewStateHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ public slots:
class splitViewWidgetState
{
public:
QPointF centerOffset;
double zoomFactor;
bool splitting;
double splittingPoint;
int viewMode;
QPointF centerOffset{};
double zoomFactor{};
bool splitting{};
double splittingPoint{};
int viewMode{};
};
splitViewWidgetState viewStates[8];

Expand Down

0 comments on commit 36bdafe

Please sign in to comment.