diff --git a/README.mingw.md b/README.mingw.md index 34214299f..76d1a8754 100644 --- a/README.mingw.md +++ b/README.mingw.md @@ -4,37 +4,45 @@ implementation and that specially is important where OpenType specification is or wasn't that clear. For having access to Uniscribe on Linux/macOS these steps are recommended: -1. Install Wine from your favorite package manager. +1. Install Wine from your favorite package manager. On Fedora that's `dnf install wine`. 2. And `mingw-w64` compiler. - With `brew` on macOS, you can have it like `brew install mingw-w64` + With `brew` on macOS, you can have it like `brew install mingw-w64`. + On Fedora, with `dnf install mingw32-gcc-c++`, or `dnf install mingw64-gcc-c++` for the + 64-bit Windows. -3. Download and put [this](https://drive.google.com/open?id=0B3_fQkxDZZXXbWltRGd5bjVrUDQ) - on your `~/.local/i686-w64-mingw32`. - -4. Replace all the instances of `/home/behdad/.local/i586-mingw32msvc` - and `/home/behdad/.local/i686-w64-mingw32` with `<$HOME>/.local/i686-w64-mingw32` - on that folder. (`<$HOME>` replace it with `/home/XXX` or `/Users/XXX` on macOS) - - Probably you shouldn't replace the ones are inside binaries. +3. Install cross-compiled dependency packages. Alternatively see [^1] below. + On Fedora that would be `dnf install mingw32-glib2 mingw32-cairo mingw32-freetype` + for 32-bit, or `dnf install mingw64-glib2 mingw64-cairo mingw64-freetype` for 64-bit. 5. `NOCONFIGURE=1 ./autogen.sh && mkdir winbuild && cd winbuild` -6. `../mingw32.sh && cd ..` +6. Run `../mingw32.sh` for 32-bit build, or `../mingw64.sh` for 64-bit. This configures + HarfBuzz for cross-compiling. It enables Uniscribe backend as well. -7. `make -Cwinbuild` +7. `make` -Now you can use hb-shape using `wine winbuild/util/hb-shape.exe` but if you like to -to use the original Uniscribe, +Now you can use hb-shape using `wine util/hb-shape.exe` but if you like to shape with +the Microsoft Uniscribe, 8. Bring a 32bit version of `usp10.dll` for yourself from `C:\Windows\SysWOW64\usp10.dll` of your - Windows installation (assuming you have a 64-bit installation, otherwise `C:\Windows\System32\usp10.dll`) - that it is not a DirectWrite proxy ([for more info](https://en.wikipedia.org/wiki/Uniscribe)). + Windows installation (assuming you have a 64-bit installation, otherwise + `C:\Windows\System32\usp10.dll`) that it is not a DirectWrite proxy + ([for more info](https://en.wikipedia.org/wiki/Uniscribe)). Rule of thumb, your `usp10.dll` should have a size more than 500kb, otherwise it is designed to work with DirectWrite which Wine can't work with its original one. + You want a Uniscribe from Windows 7 or older. - Put the dll on the folder you are going to run the next command, + Put the DLL in the folder you are going to run the next command, -9. `WINEDLLOVERRIDES="usp10=n" wine winbuild/util/hb-shape.exe fontname.ttf -u 0061,0062,0063 --shaper=uniscribe` +9. `WINEDLLOVERRIDES="usp10=n" wine util/hb-shape.exe fontname.ttf -u 0061,0062,0063 --shaper=uniscribe` (`0061,0062,0063` means `abc`, use test/shaping/hb-unicode-decode to generate ones you need) + + +[^1] Download and put [this](https://drive.google.com/open?id=0B3_fQkxDZZXXbWltRGd5bjVrUDQ) + in your `~/.local/i686-w64-mingw32`. Then replace all the instances of + `/home/behdad/.local/i586-mingw32msvc` and `/home/behdad/.local/i686-w64-mingw32` + with `<$HOME>/.local/i686-w64-mingw32` on that folder. + (`<$HOME>` replace it with `/home/XXX` or `/Users/XXX` on macOS) + You shouldn't replace the instances of those inside binary files. diff --git a/RELEASING.md b/RELEASING.md index c82fc55a9..bcc639058 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -46,27 +46,21 @@ HarfBuzz release walk-through checklist: 10. Build win32 bundle. - a. Put contents of [this](https://drive.google.com/open?id=0B3_fQkxDZZXXbWltRGd5bjVrUDQ) on your `~/.local/i686-w64-mingw32`, + a. Build Win32 binaries. See [README.mingw.md](README.mingw.md). - b. Run `../mingw32.sh` script to configure harfbuzz with mingw in a subdirectory - (eg. winbuild/), - - c. make - - d. Back in the parent directory, run `./UPDATE.sh`(available below) to build win32 - bundle. + b. TODO. 11. Copy all artefacts to users.freedesktop.org and move them into `/srv/www.freedesktop.org/www/software/harfbuzz/release` There should be four files. Eg.: ``` --rw-r--r-- 1 behdad eng 1592693 Jul 18 11:25 harfbuzz-1.4.7.tar.bz2 --rw-r--r-- 1 behdad eng 89 Jul 18 11:34 harfbuzz-1.4.7.tar.bz2.sha256 --rw-r--r-- 1 behdad eng 339 Jul 18 11:34 harfbuzz-1.4.7.tar.bz2.sha256.asc +-rw-r--r-- 1 behdad eng 1592693 Jul 18 11:25 harfbuzz-1.4.7.tar.xz +-rw-r--r-- 1 behdad eng 89 Jul 18 11:34 harfbuzz-1.4.7.tar.xz.sha256 +-rw-r--r-- 1 behdad eng 339 Jul 18 11:34 harfbuzz-1.4.7.tar.xz.sha256.asc -rw-r--r-- 1 behdad eng 2895619 Jul 18 11:34 harfbuzz-1.4.7-win32.zip ``` -12. While doing that, quickly double-check the size of the .tar.bz2 and .zip +12. While doing that, quickly double-check the size of the .tar.xz and .zip files against their previous releases to make sure nothing bad happened. They should be in the ballpark, perhaps slightly larger. Sometimes they do shrink, that's not by itself a stopper. @@ -76,39 +70,3 @@ HarfBuzz release walk-through checklist: 14. Go to GitHub release page [here](https://github.com/harfbuzz/harfbuzz/releases), edit the tag, upload artefacts and NEWS entry and save. - - -## UPDATE.sh -```bash -#!/bin/bash - -v=$1 - -if test "x$v" = x; then - echo "usage: UPDATE.sh micro-version" - exit 1 -fi - -dir_prefix=harfbuzz-1.4. -dir_suffix=-win32 -dir=$dir_prefix$v$dir_suffix -dir_old=$dir_prefix$((v-1))$dir_suffix -if test -d "$dir"; then - echo "New dir $dir exists; not overwriting" - exit 1 -fi -if ! test -d "$dir_old"; then - echo "Old dir $dir_old does NOT exist; aborting" - exit 1 -fi -set -ex -cp -a "$dir_old" "$dir.tmp" -rm -f "$dir.tmp"/GDX32.dll -rm -f "$dir.tmp"/usp10.dll -cp ../winbuild/src/.libs/libharfbuzz-0.dll{,.def} $dir.tmp/ -cp ../winbuild/util/.libs/hb-{shape,view}.exe $dir.tmp/ -i686-w64-mingw32-strip $dir.tmp/{hb-shape.exe,hb-view.exe,libharfbuzz-0.dll} -mv $dir.tmp $dir -zip -r $dir.zip $dir -echo Bundle $dir.zip ready -```