Skip to content

Commit 93852d6

Browse files
Reverts #ad64219ae6c181932f6a5d5120aa83d732d17298
1 parent 2a8fee0 commit 93852d6

File tree

7 files changed

+61
-1
lines changed

7 files changed

+61
-1
lines changed

.github/workflows/qt5_6.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
- name: 👷 Build ${{ env.HINT }}
252252
shell: cmd
253253
run: |
254-
cmake --preset windows-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }}
254+
cmake --preset windows-${{ env.BUILD_TYPE }} -DGITHUB_ACTIONS ${{ steps.dependencies.outputs.cmakeArgs }}
255255
cmake --build --preset windows-${{ env.BUILD_TYPE }} --target package
256256
env:
257257
BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }}

include/effectengine/EffectModule.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#pragma once
22

33
#undef slots
4+
// Don't use debug Python APIs on Windows (GitHub Actions only)
5+
#if defined(GITHUB_ACTIONS) && defined(_MSC_VER) && defined(_DEBUG)
6+
#if _MSC_VER >= 1930
7+
#include <corecrt.h>
8+
#endif
9+
#undef _DEBUG
410
#include <Python.h>
11+
#define _DEBUG
12+
#else
13+
#include <Python.h>
14+
#endif
515
#define slots Q_SLOTS
616

717
#include <QJsonValue>

include/python/PythonInit.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#pragma once
22

33
#undef slots
4+
// Don't use debug Python APIs on Windows (GitHub Actions only)
5+
#if defined(GITHUB_ACTIONS) && defined(_MSC_VER) && defined(_DEBUG)
6+
#if _MSC_VER >= 1930
7+
#include <corecrt.h>
8+
#endif
9+
#undef _DEBUG
10+
#include <Python.h>
11+
#define _DEBUG
12+
#else
413
#include <Python.h>
14+
#endif
515
#define slots Q_SLOTS
616

717
///

include/python/PythonProgram.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@
44
#include <QString>
55

66
#undef slots
7+
// Don't use debug Python APIs on Windows (GitHub Actions only)
8+
#if defined(GITHUB_ACTIONS) && defined(_MSC_VER) && defined(_DEBUG)
9+
#if _MSC_VER >= 1930
10+
#include <corecrt.h>
11+
#endif
12+
#undef _DEBUG
713
#include <Python.h>
14+
#define _DEBUG
15+
#else
16+
#include <Python.h>
17+
#endif
818
#define slots Q_SLOTS
919

1020
#include <python/PythonUtils.h>

include/python/PythonUtils.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#pragma once
22

33
#undef slots
4+
// Don't use debug Python APIs on Windows (GitHub Actions only)
5+
#if defined(GITHUB_ACTIONS) && defined(_MSC_VER) && defined(_DEBUG)
6+
#if _MSC_VER >= 1930
7+
#include <corecrt.h>
8+
#endif
9+
#undef _DEBUG
10+
#include <Python.h>
11+
#define _DEBUG
12+
#else
413
#include <Python.h>
14+
#endif
515
#define slots Q_SLOTS
616

717
// decl

libsrc/effectengine/EffectEngine.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1+
// Don't use debug Python APIs on Windows (GitHub Actions only)
2+
#if defined(GITHUB_ACTIONS) && defined(_MSC_VER) && defined(_DEBUG)
3+
#if _MSC_VER >= 1930
4+
#include <corecrt.h>
5+
#endif
6+
#undef _DEBUG
17
#include <Python.h>
8+
#define _DEBUG
9+
#else
10+
#include <Python.h>
11+
#endif
212
#undef B0
313

414
// Qt includes

libsrc/utils/SysInfo.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
#include "HyperionConfig.h"
22

33
#if defined(ENABLE_EFFECTENGINE)
4+
// Don't use debug Python APIs on Windows (GitHub Actions only)
5+
#if defined(GITHUB_ACTIONS) && defined(_MSC_VER) && defined(_DEBUG)
6+
#if _MSC_VER >= 1930
7+
#include <corecrt.h>
8+
#endif
9+
#undef _DEBUG
10+
#include <Python.h>
11+
#define _DEBUG
12+
#else
413
#include <Python.h>
514
#endif
15+
#endif
616

717

818
#include "utils/SysInfo.h"

0 commit comments

Comments
 (0)