Skip to content

Commit c8d03a6

Browse files
committed
Trying to see if this solves the problem
1 parent cb529f0 commit c8d03a6

3 files changed

Lines changed: 23 additions & 9 deletions

File tree

.github/workflows/Publish Release.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ on:
99

1010
jobs:
1111
publish:
12-
runs-on: ubuntu-latest
12+
runs-on: windows-latest
1313
env:
14-
python_ver: 3.11
14+
python_ver: 3.11.4
1515

1616
steps:
1717
- uses: actions/checkout@v2
18-
- name: Set up Python ${{ env.python-version }}
18+
- name: Set up Python ${{ matrix.python-version }}
1919
uses: actions/setup-python@v2
2020
with:
21-
python-version: ${{ env.python-version }}
21+
python-version: ${{ matrix.python-version }}
2222
- name: get version
2323
id: version
2424
uses: notiz-dev/github-action-json-property@release
@@ -30,9 +30,12 @@ jobs:
3030
run: |
3131
python -m pip install --upgrade pip
3232
pip install -r ./requirements.txt -t ./lib
33-
cp ./lib/pywin32_system32/pythoncom311.dll .
34-
cp ./lib/pywin32_system32/pywintypes311.dll .
35-
zip -r Flow.Launcher.Plugin.MSOutlook.zip . -x '*.git*'
33+
- name: Compress Plugin
34+
run: Compress-Archive -Path * -DestinationPath Flow.Launcher.Plugin.MSOutlook.zip
35+
shell: pwsh
36+
- name: List ZIP file
37+
run: Get-ChildItem -Path . -Filter *.zip
38+
shell: pwsh
3639
- name: Publish
3740
if: success()
3841
uses: softprops/action-gh-release@v1

main.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,20 @@
33
from datetime import datetime, timedelta
44

55
parent_folder_path = os.path.abspath(os.path.dirname(__file__))
6-
sys.path.append(parent_folder_path)
76
sys.path.append(os.path.join(parent_folder_path, 'lib'))
87
sys.path.append(os.path.join(parent_folder_path, 'plugin'))
8+
sys.path.append(parent_folder_path)
9+
10+
# If pywin32 is vendored, add its DLL folder to the search path before importing win32com
11+
pywin32_system32 = os.path.join(parent_folder_path, 'lib', 'pywin32_system32')
12+
if os.path.isdir(pywin32_system32):
13+
try:
14+
# Python 3.8+: preferred way
15+
os.add_dll_directory(pywin32_system32)
16+
except Exception:
17+
# Fallback: prepend to PATH
18+
os.environ["PATH"] = pywin32_system32 + os.pathsep + os.environ.get("PATH", "")
19+
920

1021
from flowlauncher import FlowLauncher
1122
import webbrowser

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
flowlauncher
2-
pywin32==311
2+
pywin32

0 commit comments

Comments
 (0)