Skip to content

Commit

Permalink
Merge branch 'update-winbuild'
Browse files Browse the repository at this point in the history
  • Loading branch information
flozz committed Nov 22, 2022
2 parents 9ef99b1 + 8872e0d commit 277b851
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 441 deletions.
29 changes: 24 additions & 5 deletions winbuild/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,48 @@ Requirements
To build YOGA Image Optimizer for Windows, you must first install the following
dependencies:

* Python 3.9:
* Windows 11:

* Download (VM): https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/

* Install Chocolatey (optional, but simpler setup):

* Run in PowerShell as administrator:
``Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))``
* NOTE: all ``choco`` commands should be run as administrator

* Python 3.10:

* 64bit version
* Must be added to the PATH (there is a checkbox during the installation)
* Virtualenv must be installed and available in the PATH too
* Download: https://www.python.org/
* Choco: ``choco install python``

* Git:

* Download: https://git-scm.com/
* Choco: ``choco install git``

* MSYS2:

* Install it at default location (``C:\msys64``)
* Download: https://www.msys2.org/
* Choco: ``choco install msys2``

* Git:

* Download: https://git-scm.com/
* Visual Studio 17 (2022)

* Visual Studio 16 (2019)
* Already installed in the Windows 11 Dev VM, else use Chocolatey
* Choco: ``choco install visualstudio2022-workload-vctools``

* Inno Setup

* Install it at default location (``C:\Program Files (x86)\Inno Setup 6\\``)
or change its path in ``build-installer.bat``
* Download: https://jrsoftware.org/isinfo.php
* Choco: ``choco install innosetup``

Restart to finish setup.


Building YOGA Image Optimizer for Windows
Expand Down
12 changes: 4 additions & 8 deletions winbuild/build-gtk.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SET GVSBUILD_REV=9b10978a8c5aa539f4280feeaa69bc5cc8bf9fbf
SET GVSBUILD_REV=2022.4.1
SET ROOTDIR=%CD%

:: Get or update gvsbuild
Expand All @@ -14,20 +14,16 @@ IF NOT EXIST build\gvsbuild (
git checkout %GVSBUILD_REV%
)

:: Install the Python version that will be used to build...
:: Install the Python version that will be used to build
python build.py build ^
-p x64 ^
--vs-ver 16 ^
--vs-ver 17 ^
python

:: ... and patch it to allow our build to work
COPY %ROOTDIR%\winbuild\patch\cygwinccompiler.py ^
C:\gtk-build\tools\python.3.9.2\tools\lib\distutils\cygwinccompiler.py

:: build Gtk with introspection enabled and Adwaita
python build.py build ^
-p x64 ^
--vs-ver 16 ^
--vs-ver 17 ^
--enable-gi ^
gtk3 adwaita-icon-theme

Expand Down
1 change: 1 addition & 0 deletions winbuild/build-yoga.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ python -m nuitka ^
--include-package=PIL ^
--include-package-data=yoga_image_optimizer ^
--plugin-enable=multiprocessing ^
--plugin-enable=gi ^
--windows-disable-console ^
--windows-icon-from-ico=winbuild\icon.ico ^
--standalone ^
Expand Down
Loading

0 comments on commit 277b851

Please sign in to comment.