forked from JeeH-K/FLASHViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.63 KB
/
test_embedded_tk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Test Embedded
on:
push:
branches: ["develop", "deploy"]
pull_request:
branches: ["develop", "deploy"]
release:
types: [published]
jobs:
build-embedded:
runs-on: windows-latest
env:
PYTHON_VERSION: 3.11.0
steps:
- name: Set up Python (regular distribution)
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }} # Use the same version as the embeddable version
- name: Setup python embeddable version
run: |
# Create a directory for the embeddable Python version
mkdir python-${{ env.PYTHON_VERSION }}
# Download and unzip the embeddable Python version
curl -O https://www.python.org/ftp/python/${{ env.PYTHON_VERSION }}/python-${{ env.PYTHON_VERSION }}-embed-amd64.zip
unzip python-${{ env.PYTHON_VERSION }}-embed-amd64.zip -d python-${{ env.PYTHON_VERSION }}
rm python-${{ env.PYTHON_VERSION }}-embed-amd64.zip
# Define paths for the regular Python distribution and the embeddable distribution
$PYTHON_DIR="${{ runner.tool_cache }}/Python/${{ env.PYTHON_VERSION }}/x64" # Path from actions/setup-python
$EMBED_DIR="python-${{ env.PYTHON_VERSION }}"
mkdir -p $EMBED_DIR/Lib/tkinter
mkdir -p $EMBED_DIR/tcl
# Copy necessary Tkinter files from the regular Python distribution
cp -r $PYTHON_DIR/Lib/tkinter* $EMBED_DIR/Lib/tkinter/
cp -r $PYTHON_DIR/tcl* $EMBED_DIR/tcl/
cp $PYTHON_DIR/DLLs/_tkinter.pyd $EMBED_DIR/
cp $PYTHON_DIR/DLLs/tcl86t.dll $EMBED_DIR/
cp $PYTHON_DIR/DLLs/tk86t.dll $EMBED_DIR/