File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,9 @@ jobs:
270
270
run : |
271
271
python -m pip install -r requirements-dev.txt
272
272
273
+ # Modify PyInstaller to enable NvOptimusEnablement and AmdPowerXpressRequestHighPerformance
274
+ ./build_util/modify_pyinstaller.bash
275
+
273
276
# Download pyopenjtalk dictionary
274
277
# try 5 times, sleep 5 seconds before retry
275
278
for i in $(seq 5); do
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -eux
4
+
5
+ pyinstaller_version=$( pyinstaller -v)
6
+ tempdir=$( mktemp -dt modify_pyinstaller.XXXXXXXX)
7
+ trap ' rm -rf "$tempdir"' EXIT
8
+ git clone https://github.com/pyinstaller/pyinstaller.git " $tempdir " -b " v$pyinstaller_version " --depth 1
9
+ cat > " $tempdir /bootloader/src/symbols.c" << EOF
10
+ #ifdef _WIN32
11
+ #include <windows.h>
12
+
13
+ // https://docs.nvidia.com/gameworks/content/technologies/desktop/optimus.htm
14
+ __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
15
+
16
+ // https://gpuopen.com/learn/amdpowerxpressrequesthighperformance/
17
+ __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
18
+ #endif
19
+ EOF
20
+ (cd " $tempdir /bootloader" && python ./waf all)
21
+ pip install -U " $tempdir "
You can’t perform that action at this time.
0 commit comments