Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows build busters. #929

Merged
merged 1 commit into from
Nov 26, 2023
Merged
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
10 changes: 4 additions & 6 deletions .github/workflows/build_installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ on:
workflow_dispatch: {}
push:

env:
NATRON_BUILD_WORKSPACE: 'D:/nbw'
CI: 'True'

jobs:
win-installer:
name: Windows Installer
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
env:
CI: 'True'

steps:
- name: Checkout branch
Expand Down Expand Up @@ -41,7 +43,6 @@ jobs:
- name: Build
id: build
run: |
NATRON_BUILD_WORKSPACE=${GITHUB_WORKSPACE}/natron_build
NATRON_BUILD_WORKSPACE_UNIX=$(cygpath -u ${NATRON_BUILD_WORKSPACE})
mkdir ${NATRON_BUILD_WORKSPACE_UNIX}

Expand Down Expand Up @@ -76,8 +77,6 @@ jobs:
defaults:
run:
shell: msys2 {0}
env:
CI: 'True'

steps:
- name: Checkout branch
Expand Down Expand Up @@ -106,7 +105,6 @@ jobs:
- name: Build
id: build
run: |
NATRON_BUILD_WORKSPACE=${GITHUB_WORKSPACE}/natron_build
NATRON_BUILD_WORKSPACE_UNIX=$(cygpath -u ${NATRON_BUILD_WORKSPACE})
mkdir ${NATRON_BUILD_WORKSPACE_UNIX}

Expand Down
4 changes: 1 addition & 3 deletions Global/GlobalDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <Python.h>
// ***** END PYTHON BLOCK *****

#include <cstdint>
#include <utility>
#if defined(_WIN32)
#include <string>
Expand All @@ -47,9 +48,6 @@
#undef isalpha
#undef isalnum

#if !defined(Q_MOC_RUN) && !defined(SBK_RUN)
#include <cstdint>
#endif
#include <QtCore/QtGlobal>
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#include <QtCore/QForeachContainer>
Expand Down
27 changes: 20 additions & 7 deletions tools/jenkins/build-Windows-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,27 @@ $GSED -e "s/_VERSION_/${NATRON_VERSION_FULL}/;s#_RBVERSION_#${NATRON_GIT_BRANCH}
cp "$INC_PATH/config/"*.png "$INSTALLER_PATH/config/"

# make sure we have mt and qtifw
if [ ! -f "$SDK_HOME/bin/mt.exe" ] || [ ! -f "$SDK_HOME/bin/binarycreator.exe" ]; then
if [ ! -d "$SRC_PATH/natron-windows-installer" ]; then
( cd "$SRC_PATH";
$CURL "$THIRD_PARTY_BIN_URL/natron-windows-installer.zip" --output "$SRC_PATH/natron-windows-installer.zip"
unzip natron-windows-installer.zip
)

if ! which mt.exe; then
# Add Windows SDK to path so that mt.exe is available.
WIN_SDK_MAJOR_VERSION=10
WIN_SDK_BASE_PATH="/c/Program Files (x86)/Windows Kits/${WIN_SDK_MAJOR_VERSION}/bin"
WIN_SDK_VERSION=$(ls "${WIN_SDK_BASE_PATH}" | grep "${WIN_SDK_MAJOR_VERSION}." | sort -n | tail -1)
PATH="${WIN_SDK_BASE_PATH}/${WIN_SDK_VERSION}/x64/":${PATH}

if ! which mt.exe; then
echo "Failed to find mt.exe"
exit 1
fi
fi

if ! which binarycreator.exe && [ ! -f "/Setup.exe" ]; then
pacman -S mingw-w64-x86_64-qt-installer-framework

if ! which binarycreator.exe; then
echo "Failed to find binarycreator.exe"
exit 1
fi
cp "$SRC_PATH/natron-windows-installer/mingw$BITS/bin/"{archivegen.exe,binarycreator.exe,installerbase.exe,installerbase.manifest,repogen.exe,mt.exe} "$SDK_HOME/bin/"
fi

function installPlugin() {
Expand Down