Compare commits

...

2 Commits

Author SHA1 Message Date
al 9e0d7a34cd update README with win32 build info 12 months ago
al 773734e6be added crossfile for win32 12 months ago
  1. 50
      README.md
  2. 31
      win32-cross.txt

@ -1,8 +1,20 @@
# books
Automatic cropping tool for cropping to books
An intelligent bulk cropping tool
## Build
## Download
Linux and Windows are both supported.
Windows binaries are available [here](https://git.sugol.org/al/books/releases).
## Building from Source
### Dependencies
- opencv4
- gtkmm-4.0
- cairomm-1.16
- meson
- GCC or clang. C++11 support required
### Linux
@ -12,16 +24,44 @@ This project uses the meson build system:
$ meson build
$ cd build
$ ninja
```
And install with
```
$ sudo ninja install
```
### Windows
Since this project uses GTK4, it's a bit difficult here (there's no GTK4 installer for Win32 just yet). However, I have built using cygwin & it seems to work ok.
There are a couple of options for building Windows binaries. Either you can
compile natively using `msys2`, or cross-compile from Linux.
TODO: Actual build instructions
*MSVC is unsupported*
## License
#### Native
Install `msys2` and build as you would on Linux
#### Cross-compilation
A cross-file is included for building Windows binaries on Linux
(`win32-cross.txt`). This file may need tweaking depending on how your `mingw`
installation is configured. Make sure to install the relevant mingw
dependencies.
Build as you would for Linux, but substitute the first step with `meson setup
build --cross-file=win32-cross.txt`.
Good luck!
#### Packaging
A script for packaging Windows builds is included under `scripts/dist-win32.sh`.
This should work with either `msys2` or a cross-compiled build, but you may need
to tweak the `MINGW` variable to match your mingw installation path.
The script will package the compiled executable, `.dll`s and icons into a zip
archive for distribution.
## License
Copyright © 2021 Alister Sanders (alister@sugol.org)
Permission is hereby granted, free of charge, to any person obtaining a copy of

@ -0,0 +1,31 @@
[binaries]
c='x86_64-w64-mingw32-gcc'
cpp='x86_64-w64-mingw32-g++'
fortran='x86_64-w64-mingw32-gfortran'
ar='x86_64-w64-mingw32-gcc-ar'
pkgconfig='x86_64-w64-mingw32-pkg-config'
ranlib='x86_64-w64-mingw32-gcc-ranlib'
strip='x86_64-w64-mingw32-strip'
windres='x86_64-w64-mingw32-windres'
cmake='x86_64-w64-mingw32-cmake'
ld='x86_64-w64-mingw32-ld'
exe_wrapper='wine'
[properties]
root='x86_64-w64-mingw32'
sys_root='/usr/x86_64-w64-mingw32'
needs_exe_wrapper=true
[built-in options]
c_args=['-D_FORTIFY_SOURCE=2', '-D_GLIBCXX_ASSERTIONS', '-O2', '-pipe', '-fno-plt', '-fexceptions', '--param=ssp-buffer-size=4', '-Wformat', '-Werror=format-security', '-fcf-protection']
cpp_args=['-D_FORTIFY_SOURCE=2', '-D_GLIBCXX_ASSERTIONS', '-O2', '-pipe', '-fno-plt', '-fexceptions', '--param=ssp-buffer-size=4', '-Wformat', '-Werror=format-security', '-fcf-protection']
c_link_args=['-Wl,-O1,--sort-common,--as-needed', '-fstack-protector']
cpp_link_args=['-Wl,-O1,--sort-common,--as-needed', '-fstack-protector']
prefix='/usr/x86_64-w64-mingw32/'
[host_machine]
system='windows'
cpu_family='x86_64'
cpu='x86_64'
endian='little'
Loading…
Cancel
Save