Skip to content

Commit

Permalink
[Misc] Rollback win32 to Py3.12, for prebuilt winsdk
Browse files Browse the repository at this point in the history
  • Loading branch information
melianmiko committed Feb 7, 2025
1 parent cf53295 commit 5eb3f41
Show file tree
Hide file tree
Showing 15 changed files with 104 additions and 94 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ name: Build & Test
on: push

jobs:
BuildExe:
build_exe:
name: Windows portable build
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v4
with:
python-version: 3.13
python-version: 3.12
cache: true
- name: Install Just
run: choco install just
Expand All @@ -22,7 +23,8 @@ jobs:
path: .\dist\*
if-no-files-found: error

TestAndBuildDebian:
build_deb:
name: Run PyTest and build Debian package
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 4 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Vagrant.configure("2") do |config|
win.vm.box = "gusztavvargadr/windows-11-24h2-enterprise"
win.vm.synced_folder ".", "C:\\openfreebuds"
win.vm.provider "vmware_desktop" do |v|
v.vmx["numvcpus"] = "4"
v.vmx["memsize"] = "4096"
v.gui = true
end

Expand All @@ -86,8 +88,8 @@ Vagrant.configure("2") do |config|
winget install -e --accept-source-agreements --no-upgrade --id Casey.Just
winget install -e --no-upgrade --id NSIS.NSIS
winget install -e --no-upgrade --id UPX.UPX
winget install -e --no-upgrade --id Python.Python.3.13
winget install -e --no-upgrade --id Microsoft.VisualStudio.2022.BuildTools --override "--passive --wait --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended"
winget install -e --no-upgrade --id Python.Python.3.12
# winget install -e --no-upgrade --id Microsoft.VisualStudio.2022.BuildTools --override "--passive --wait --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended"
SHELL

win.vm.provision "shell",
Expand Down
15 changes: 9 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set windows-shell := ["powershell.exe", "-c"]
set script-interpreter := ["python"]

# Tools
pyside6_dir := `python -c "
pyside6_dir := `pdm run python -c "
import os
try:
import PySide6
Expand Down Expand Up @@ -65,6 +65,9 @@ test:
prepare:
pdm install

vg_all:
vagrant halt -f
vagrant up --parallel


# ------------------------------------------------
Expand Down Expand Up @@ -220,20 +223,20 @@ win32: win32_installer win32_portable
[windows]
win32_installer: win32_bundle
New-Item -ItemType Directory -Force -Path ./dist
cd ./scripts/build_win32; makensis openfreebuds.nsi
mv ./scripts/build_win32/dist/openfreebuds.install.exe ./dist/openfreebuds_{{version}}_win32.exe
cd ./scripts; & "C:\Program Files (x86)\NSIS\Bin\makensis.exe" openfreebuds.nsi
mv -Force ./scripts/dist/openfreebuds.install.exe ./dist/openfreebuds_{{version}}_win32.exe

# Make windows portable executable
[windows]
win32_portable:
New-Item -ItemType Directory -Force -Path ./dist
cd ./scripts/build_win32; & pdm run pyinstaller openfreebuds_portable.spec
mv ./scripts/build_win32/dist/openfreebuds_portable.exe ./dist/openfreebuds_{{version}}_win32_portable.exe
cd ./scripts; & pdm run pyinstaller -y openfreebuds_portable.spec
mv -Force ./scripts/dist/openfreebuds_portable.exe ./dist/openfreebuds_{{version}}_win32_portable.exe

# Prepare ./dist/ for win32 installer build
[windows,private]
win32_bundle:
cd ./scripts/build_win32; pdm run pyinstaller openfreebuds.spec
cd ./scripts; pdm run pyinstaller -y openfreebuds.spec



Expand Down
79 changes: 73 additions & 6 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ dependencies = [
"qasync<1.0.0,>=0.27.1",
"pynput<2.0.0,>=1.7.7",
"pyqt6<7.0.0,>=6.7.1",
"dbus-next<1.0.0,>=0.2.3",
"winsdk==1.0.0b10; sys_platform == 'win32'",
"dbus-next<1.0.0,>=0.2.3; sys_platform == 'linux'",
]

[dependency-groups]
dev = [
"pytest<9.0.0,>=8.3.2",
"pytest-asyncio<1.0.0,>=0.24.0",
"pyinstaller==6.10.0; sys_platform == 'win32'",
# lrelease.exe provider
"pyside6>=6.8.2.1; sys_platform == 'win32'",
]
no_flatpak = [
"pyqt6<7.0.0,>=6.7.1",
Expand Down
2 changes: 2 additions & 0 deletions scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
dist
2 changes: 0 additions & 2 deletions scripts/build_win32/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/build_win32/make.cmd

This file was deleted.

16 changes: 0 additions & 16 deletions scripts/build_win32/make_portable.cmd

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/build_win32/make_qt.cmd

This file was deleted.

20 changes: 0 additions & 20 deletions scripts/build_win32/rename_release.py

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ block_cipher = None


a = Analysis(
["..\\..\\openfreebuds_qt\\launcher.py"],
["..\\openfreebuds_qt\\launcher.py"],
pathex=[],
binaries=[],
datas=[
('..\\..\\openfreebuds\\assets', 'openfreebuds\\assets'),
('..\\..\\openfreebuds_qt\\assets', 'openfreebuds_qt\\assets'),
('..\\openfreebuds\\assets', 'openfreebuds\\assets'),
('..\\openfreebuds_qt\\assets', 'openfreebuds_qt\\assets'),
],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
excludes=['PySide6'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@


a = Analysis(
["..\\..\\openfreebuds_qt\\launcher.py"],
["..\\openfreebuds_qt\\launcher.py"],
pathex=[],
binaries=[],
datas=[
('..\\..\\openfreebuds\\assets', 'openfreebuds\\assets'),
('..\\..\\openfreebuds_qt\\assets', 'openfreebuds_qt\\assets'),
('..\\openfreebuds\\assets', 'openfreebuds\\assets'),
('..\\openfreebuds_qt\\assets', 'openfreebuds_qt\\assets'),
],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
excludes=['PySide6'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
noarchive=False,
Expand Down
File renamed without changes.

0 comments on commit 5eb3f41

Please sign in to comment.