Initial checkin of Pika from heckimp

This commit is contained in:
2023-09-25 15:35:21 -07:00
commit 891e999216
6761 changed files with 5240685 additions and 0 deletions

View File

@ -0,0 +1,37 @@
# This is a 'suppressionFile' for buildbot warnings
# We use isn.*t because UTF-8 might be interpreted as ASCII...
# Ignore warning from gtk-doc during make
: .*html:.*: warning: no link for: .*
: .*warning: .* unused declarations.*They should be added to .* in the appropriate place.*
: .*warning: Field description for .* is missing in source code comment block.*
: .*warning: Field descriptions for .* are missing in source code comment block.*
: .*warning: Property .* has no documentation.*
: .*warning: Section .* is not defined in the .* file.*
: .*warning: Value descriptions for .* are missing in source code comment block.*
# This will die in PIKA 3.0, don't bother fixing...
: .*pika-composite-.* warning: function declaration isn.*t a prototype.*
: .*pika-composite-.* warning: unused variable .*
# Well-known harmless warnings
: .*gtkitemfactory.h:47: warning: function declaration isn.*t a prototype.*
# Who cares
: .*pika.desktop: warning: value .* contains .* more than once.*
: ^libtool: install: warning:.*
# Annoying plug-ins/imagemap warnings in generated files, not easily
# fixed properly
: <stdout>.* warning: .*yyunput.* defined but not used
: <stdout>.* warning: .*input.* defined but not used
# Comes from AM_PROG_LIBTOOL, not much we can do
: ^configure.ac:157: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body$
# jas_config.h redefines PACKAGE_NAME etc
: .*jas_config.h:.*:1: warning: .* redefined$
: .*config.h:.*:1: warning: this is the location of the previous definition$
# Tons of deprecation warnings, hopefully we never have to fix these...
: .*file-.*: warning: .* is deprecated \(declared at .*/png.h:.*\)$

View File

@ -0,0 +1,24 @@
# This file is an outdated incomplete experiment for a Docker-based build environment and won't get you a working build environment. It was created just before our switch to GitLab CI and became mostly obsolete due to this.
# pikabuilder-base
FROM debian:testing
ENV PREFIX=/export/output
ENV PATH=$PREFIX/bin:$PATH
ENV PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
ENV APT_GET_OPTIONS="-o APT::Install-Recommends=0 -y"
RUN apt-get update
# Installing the build environment
RUN apt-get install $APT_GET_OPTIONS build-essential devscripts fakeroot quilt dh-make automake libdistro-info-perl less nano
# Installing additional dependencies for babl
# none needed
# Installing additional dependencies for GEGL
RUN apt-get install $APT_GET_OPTIONS libglib2.0-dev libjson-c-dev libjson-glib-dev libgexiv2-dev libcairo2-dev libpango1.0-dev libjpeg62-turbo-dev libsuitesparse-dev libspiro-dev libopenexr-dev libwebp-dev
# Installing additional dependencies for PIKA
RUN apt-get install $APT_GET_OPTIONS xsltproc gtk-doc-tools libgtk2.0-dev libtiff5-dev libbz2-dev liblzma-dev librsvg2-dev liblcms2-dev python-cairo-dev python-gtk2-dev glib-networking libaa1-dev libgs-dev libpoppler-glib-dev libmng-dev libwmf-dev libxpm-dev libasound2-dev

233
build/flatpak/README.md Normal file
View File

@ -0,0 +1,233 @@
# PIKA Flatpak HowTo
## Stable and Development releases
The Flathub repository hosts our stable and development point releases:
https://github.com/flathub/technology.heckin.PIKA
We recommend to look at the `README.md` file in respectively the `master` or
`beta` branches of this repository to know more about release procedures.
## Nightly builds
Flathub does not host nightly builds, therefore we publish them on GNOME's
Nightly repository. Our "nightlies" are actually "weeklies" through a [Gitlab job
schedule named "Flatpak
nightly"](https://gitlab.gnome.org/GNOME/pika/-/pipeline_schedules).
This job will build whatever is on PIKA's repository `master` branch (this
branch should be kept buildable and usable at all time, not only for scheduled
jobs, but also for all contributors to be able to improve PIKA at all time).
The nightly manifest file is: `build/flatpak/technology.heckin.PIKA-nightly.json`
This file should remain as close as possible to the development manifest
(`technology.heckin.PIKA.json` file on the `beta` branch of the Flathub repository) which
itself should remain as close as possible to the stable manifest
(`technology.heckin.PIKA.json` file on the `master` branch of the Flathub repository),
since the nightly manifest is meant to become beta eventually, which itself is
meant to become stable eventually.
Base rule to update the nightly build manifest:
* Regularly `technology.heckin.PIKA-nightly.json` should be diffed and synced with
development and stable `technology.heckin.PIKA.json`, in particular for all the
dependencies (which are mostly the same across all 3 builds).
* A merge request with the label `5. Flatpak package` will contain the `flatpak`
job, hence allowing theoretically to build a standalone flatpak (without being
published to the nightly repository) for MR code. In practice, jobs have an
1-hour timeout and our flatpak takes longer than 1 hour to build (there is an
exception in our repository, but only for the `master` branch), so we often
need to publish to `master` after mostly a visual review.
## Custom Flatpak builds (for development)
Most contributors simply build PIKA the "old-school" way, nevertheless some
projects are starting to use `flatpak` as a development environment. Here is how
this can be done, as far as our knowledge goes.
Note 1
: The below process is about using flatpak as a development environment, not for
proper [releases to a
repository](https://docs.flatpak.org/en/latest/flatpak-builder.html), neither
for creating [standalone
bundles](https://docs.flatpak.org/en/latest/single-file-bundles.html)
Note 2
: since we usually only use flatpak for releases, not for development, there may
be better ways to make a flatpak development environment. We welcome any
proposed improvement to this file.
* Dependencies:
- flatpak (at least 0.9.5)
- flatpak-builder (at least 0.9.5, when the option `--export-only` has been
added to `flatpak-builder` so that the build and the export can be made in 2
separate steps while using the high level procedure.)
- appstream-compose
Note 1
: there are packages of `flatpak` and `flatpak-builder` for [most
distributions](http://flatpak.org/getting.html).
Note 2
: `appstream-compose` is used to parse the appdata file and generate the
appstream (metadata like comments, etc.).
On Fedora, this is provided by the package `libappstream-glib`, on Ubuntu by
`appstream-util`
* Install the runtimes and the corresponding SDKs if you haven't already:
```sh
flatpak remote-add --user --from gnome https://nightly.gnome.org/gnome-nightly.flatpakrepo
flatpak install --user gnome org.gnome.Platform/x86_64/master org.gnome.Sdk/x86_64/master
flatpak install --user gnome org.gnome.Platform/aarch64/master org.gnome.Sdk/aarch64/master
```
Or simply update them if you have already installed them:
```sh
flatpak update
```
* Setup some recommended build options:
```sh
export BUILD_OPTIONS="--ccache --keep-build-dirs --force-clean"
```
We recommend using `ccache` to improve build speed, and to keep build dirs
(these will be found in `.flatpak-builder/build/` relatively to the work
directory; you may manually delete these once you are done to save space) for
later debugging if ever any configuration or build issue arises.
* Choose what architecture to build and where you will "install" your flatpak:
```sh
# Architectures supported with PIKA flatpak are one of 'x86_64' or 'aarch64':
export ARCH="x86_64"
# Path where build files are stored
export INSTALLDIR="`pwd`/${ARCH}"
```
* Build the flatpak up to PIKA itself (not included):
```sh
flatpak-builder $BUILD_OPTIONS --arch="$ARCH" --stop-at=pika \
"${INSTALLDIR}" technology.heckin.PIKA-nightly.json 2>&1 \
| tee pika-nightly-flatpak.log
```
The build log will be outputted on `stdout` as well as being stored in a file
`pika-nightly-flatpak.log`.
* Now we'll want to build PIKA itself, yet not from a clean repository clone
(which is what the manifest provides) but from your local checkout, so that
you can include any custom code:
```sh
flatpak build "${INSTALLDIR}" meson setup --prefix=/app/ --libdir=/app/lib/ _pika ../../ 2>&1 | tee -a pika-nightly-flatpak.log
flatpak build "${INSTALLDIR}" ninja -C _pika 2>&1 | tee -a pika-nightly-flatpak.log
flatpak build "${INSTALLDIR}" ninja -C _pika install 2>&1 | tee -a pika-nightly-flatpak.log
```
This assumes you are currently within `build/flatpak/`, therefore the
repository source is 2 parent-folders away (`../../`). The build artifacts
will be inside the `_pika/` subfolders, and finally it will be installed with
the rest of the flatpak inside `$INSTALLDIR`.
* For development purpose, you don't need to export the flatpak to a repository
or even install it. Just run it directly from your build directory:
```sh
flatpak-builder --run "${INSTALLDIR}" technology.heckin.PIKA-nightly.json pika-2.99
```
## Maintaining the manifests
* PIKA uses Flatpak's [GNOME runtime](http://flatpak.org/runtimes.html), which
contains a base of libraries, some of which are dependencies of PIKA.
While both the stable and development versions should use the latest stable
runtime version, the nightly manifest uses the `master` version, which is more
of a *rolling release*.
* Other PIKA dependencies which are not available in the GNOME runtime
should be built along as modules within PIKA's flatpak.
Check format in `technology.heckin.PIKA-nightly.json` and add modules if
necessary. For more options, check [flatpak builder's manifest
format](http://flatpak.org/flatpak/flatpak-docs.html#flatpak-builder).
* On the other hand, if we increased the runtime version in particular (or when
the `master` runtime evolves), some modules may no longer be necessary and can
be removed from our manifest.
A flatpak is a layered set of modules. Our PIKA build in particular is
built over the GNOME runtime, itself built over the Freedesktop
runtime, itself based on a yocto-built image.
Other than by trial and error, you can find the installed dependencies
by running:
```sh
flatpak run --devel --command=bash org.gnome.Sdk//master
```
Or if you already have a build:
```
flatpak run --devel --command=bash technology.heckin.PIKA//master
```
Inside the flatpak sandbox, PIKA's manifest can be read with:
```sh
less /app/manifest.json
```
GNOME and Freedesktop's module lists (generated manifest as the SDK is built
from BuildStream):
```sh
less /usr/manifest.json
```
* Some sources have set a `x-checker-data` property which makes it possible to
check for updates using
[flatpak-external-data-checker](https://github.com/flathub/flatpak-external-data-checker).
To run the tool either install it locally, via flatpak or via OCI image.
The OCI image is not straightforward at first but is the least intrusive
if you already have docker or podman installed:
```sh
cd <path-to-pika-repo>/flatpak/build
podman run --rm --privileged -v "$(pwd):/run/host:rw" ghcr.io/flathub/flatpak-external-data-checker:latest /run/host/technology.heckin.PIKA-nightly.json
```
Our prefered backend for the checker is Anitya, a database maintained
by the Fedora project. To set up a new dependency check by Anitya:
1. verify it is available in the database: https://release-monitoring.org/
2. then copy the project ID which is the number in the project URI
within the database.
3. Finally add a "x-checker-data" field within the "source" dictionary
in the manifest with type "anitya", the "project-id" and a
"url-template".
4. We usually want to depend on stable releases only, i.e. set
"stable-only to `true`. On exceptional cases, for very valid
reasons only, we might bypass this limitation, adding a comment
explaining why we use an unstable release.
* For the development releases and nightly builds, we added the
`desktop-file-name-prefix` property. For a stable release, the property line
can be removed from the manifest.
* For a stable release, set top `"branch":"stable"`, and inside the
"pika", "babl" and "gegl" modules, set "tag" to the git tag (ex:
`PIKA_2_10_34`) and "commit" to the git commit hash for this tag.
* For a development release, set top `"branch":"beta"`, and inside the
"pika", "babl" and "gegl" modules, set "tag" to the git tag (ex:
`PIKA_2_99_14`) and "commit" to the git commit hash for this tag.
* For a nightly build, set top "branch":"master", and inside the
"pika", "babl" and "gegl" modules, set "branch" to "master", and
remove any "commit" line.

View File

@ -0,0 +1,119 @@
diff -Naur SuiteSparse-5.11.0/Makefile SuiteSparse-5.11.0.patched/Makefile
--- SuiteSparse-5.11.0/Makefile 2021-05-18 15:01:16.000000000 +0200
+++ SuiteSparse-5.11.0.patched/Makefile 2021-07-22 02:03:40.698984882 +0200
@@ -35,7 +35,7 @@
endif
( cd SPQR && $(MAKE) )
( cd GraphBLAS && $(MAKE) JOBS=$(JOBS) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' )
- ( cd SLIP_LU && $(MAKE) )
+# ( cd SLIP_LU && $(MAKE) )
# ( cd PIRO_BAND && $(MAKE) )
# ( cd SKYLINE_SVD && $(MAKE) )
@@ -46,27 +46,27 @@
# (note that CSparse is not installed; CXSparse is installed instead)
install: metisinstall gbinstall moninstall
( cd SuiteSparse_config && $(MAKE) install )
# ( cd Mongoose && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' install )
( cd AMD && $(MAKE) install )
- ( cd BTF && $(MAKE) install )
+# ( cd BTF && $(MAKE) install )
( cd CAMD && $(MAKE) install )
( cd CCOLAMD && $(MAKE) install )
( cd COLAMD && $(MAKE) install )
( cd CHOLMOD && $(MAKE) install )
- ( cd CXSparse && $(MAKE) install )
- ( cd LDL && $(MAKE) install )
- ( cd KLU && $(MAKE) install )
+# ( cd CXSparse && $(MAKE) install )
+# ( cd LDL && $(MAKE) install )
+# ( cd KLU && $(MAKE) install )
( cd UMFPACK && $(MAKE) install )
- ( cd RBio && $(MAKE) install )
+# ( cd RBio && $(MAKE) install )
ifneq (,$(GPU_CONFIG))
( cd SuiteSparse_GPURuntime && $(MAKE) install )
( cd GPUQREngine && $(MAKE) install )
endif
- ( cd SPQR && $(MAKE) install )
+# ( cd SPQR && $(MAKE) install )
# ( cd GraphBLAS && $(MAKE) JOBS=$(JOBS) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' install )
# ( cd PIRO_BAND && $(MAKE) install )
# ( cd SKYLINE_SVD && $(MAKE) install )
- ( cd SLIP_LU && $(MAKE) install )
+# ( cd SLIP_LU && $(MAKE) install )
$(CP) README.md $(INSTALL_DOC)/SuiteSparse_README.md
chmod 644 $(INSTALL_DOC)/SuiteSparse_README.md
@@ -110,7 +110,7 @@
( cd SuiteSparse_GPURuntime && $(MAKE) uninstall )
( cd GPUQREngine && $(MAKE) uninstall )
( cd SPQR && $(MAKE) uninstall )
- ( cd SLIP_LU && $(MAKE) uninstall )
+# ( cd SLIP_LU && $(MAKE) uninstall )
# ( cd PIRO_BAND && $(MAKE) uninstall )
# ( cd SKYLINE_SVD && $(MAKE) uninstall )
ifeq (,$(MY_METIS_LIB))
@@ -126,26 +126,26 @@
# the static library
library: metis
( cd SuiteSparse_config && $(MAKE) )
- ( cd Mongoose && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' library )
+# ( cd Mongoose && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' library )
( cd AMD && $(MAKE) library )
- ( cd BTF && $(MAKE) library )
+# ( cd BTF && $(MAKE) library )
( cd CAMD && $(MAKE) library )
( cd CCOLAMD && $(MAKE) library )
( cd COLAMD && $(MAKE) library )
( cd CHOLMOD && $(MAKE) library )
- ( cd KLU && $(MAKE) library )
- ( cd LDL && $(MAKE) library )
+# ( cd KLU && $(MAKE) library )
+# ( cd LDL && $(MAKE) library )
( cd UMFPACK && $(MAKE) library )
( cd CSparse && $(MAKE) library )
- ( cd CXSparse && $(MAKE) library )
- ( cd RBio && $(MAKE) library )
+# ( cd CXSparse && $(MAKE) library )
+# ( cd RBio && $(MAKE) library )
ifneq (,$(GPU_CONFIG))
( cd SuiteSparse_GPURuntime && $(MAKE) library )
( cd GPUQREngine && $(MAKE) library )
endif
- ( cd SPQR && $(MAKE) library )
- ( cd GraphBLAS && $(MAKE) JOBS=$(JOBS) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' library )
- ( cd SLIP_LU && $(MAKE) library )
+# ( cd SPQR && $(MAKE) library )
+# ( cd GraphBLAS && $(MAKE) JOBS=$(JOBS) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' library )
+# ( cd SLIP_LU && $(MAKE) library )
# ( cd PIRO_BAND && $(MAKE) library )
# ( cd SKYLINE_SVD && $(MAKE) library )
@@ -173,7 +173,7 @@
endif
( cd SPQR && $(MAKE) static )
( cd GraphBLAS && $(MAKE) JOBS=$(JOBS) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' static )
- ( cd SLIP_LU && $(MAKE) static )
+# ( cd SLIP_LU && $(MAKE) static )
# ( cd PIRO_BAND && $(MAKE) static )
# ( cd SKYLINE_SVD && $(MAKE) static )
@@ -200,7 +200,7 @@
- ( cd SuiteSparse_GPURuntime && $(MAKE) purge )
- ( cd GPUQREngine && $(MAKE) purge )
- ( cd SPQR && $(MAKE) purge )
- - ( cd SLIP_LU && $(MAKE) purge )
+# - ( cd SLIP_LU && $(MAKE) purge )
# - ( cd PIRO_BAND && $(MAKE) purge )
# - ( cd SKYLINE_SVD && $(MAKE) purge )
- $(RM) MATLAB_Tools/*/*.mex* MATLAB_Tools/spok/private/*.mex*
@@ -227,7 +227,7 @@
- ( cd SuiteSparse_GPURuntime && $(MAKE) clean )
- ( cd GPUQREngine && $(MAKE) clean )
- ( cd SPQR && $(MAKE) clean )
- - ( cd SLIP_LU && $(MAKE) clean )
+# - ( cd SLIP_LU && $(MAKE) clean )
# - ( cd PIRO_BAND && $(MAKE) clean )
# - ( cd SKYLINE_SVD && $(MAKE) clean )

View File

@ -0,0 +1,13 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="no" encoding="UTF-8"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="//release[@date='TODO']"/>
</xsl:stylesheet>

View File

@ -0,0 +1,846 @@
{
"app-id": "technology.heckin.PIKA",
"branch": "master",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"command": "pika-2.99",
"separate-locales": false,
"rename-desktop-file": "pika.desktop",
"rename-icon": "pika",
"copy-icon": true,
"finish-args": [
"--share=ipc",
"--share=network",
"--socket=fallback-x11",
"--socket=wayland",
"--device=dri",
"--filesystem=host",
"--filesystem=xdg-config/PIKA",
"--filesystem=xdg-config/gtk-3.0",
"--filesystem=/tmp",
"--filesystem=xdg-run/gvfs",
"--filesystem=xdg-run/gvfsd",
"--talk-name=org.gtk.vfs",
"--talk-name=org.gtk.vfs.*",
"--talk-name=org.freedesktop.FileManager1",
"--talk-name=org.gnome.Shell.Screenshot",
"--talk-name=org.kde.kwin.Screenshot"
],
"tags": [
"GTK+3",
"nightly"
],
"desktop-file-name-prefix": "(Nightly) ",
"cleanup": [
"/include",
"/lib/pkgconfig",
"/share/pkgconfig",
"/share/aclocal",
"/man",
"/share/man",
"/share/gtk-doc",
"/share/vala",
"*.la",
"*.a"
],
"modules": [
{
"name": "appstream-glib",
"buildsystem": "meson",
"config-opts": [
"-Dstemmer=false",
"-Drpm=false",
"-Dfonts=false",
"-Ddep11=false"
],
"sources": [
{
"type": "archive",
"url": "https://people.freedesktop.org/~hughsient/appstream-glib/releases/appstream-glib-0.8.2.tar.xz",
"sha256": "71256500add5048d6f08878904708b3d0c3875f402e0adcd358e91d47dcd8b96",
"x-checker-data": {
"type": "anitya",
"project-id": 14018,
"stable-only": true,
"url-template": "https://people.freedesktop.org/~hughsient/appstream-glib/releases/appstream-glib-$version.tar.xz"
}
}
]
},
{
"name": "gexiv2",
"modules": [
{
"name": "exiv2",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DEXIV2_ENABLE_BMFF=ON",
"-DEXIV2_ENABLE_INIH=OFF"
],
"builddir": true,
"cleanup": [
"/bin",
"/share"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/Exiv2/exiv2/releases/download/v0.28.0/exiv2-0.28.0-Source.tar.gz",
"sha256": "89af3b5ef7277753ef7a7b5374ae017c6b9e304db3b688f1948e73e103491f3d",
"x-checker-data": {
"type": "anitya",
"project-id": 769,
"stable-only": true,
"url-template": "https://github.com/Exiv2/exiv2/releases/download/v$version/exiv2-$version-Source.tar.gz"
}
}
]
}
],
"buildsystem": "meson",
"config-opts": [
"-Dintrospection=false",
"-Dpython3=false",
"-Dvapi=false"
],
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/gexiv2/0.14/gexiv2-0.14.2.tar.xz",
"sha256": "2a0c9cf48fbe8b3435008866ffd40b8eddb0667d2212b42396fdf688e93ce0be",
"x-checker-data": {
"type": "anitya",
"project-id": 1626,
"stable-only": true,
"url-template": "https://download.gnome.org/sources/gexiv2/$major.$minor/gexiv2-$version.tar.xz"
}
}
]
},
{
"name" : "openexr",
"config-opts": [
"-DBUILD_SHARED_LIBS=ON",
"-DOPENEXR_INSTALL_EXAMPLES=OFF",
"-DBUILD_TESTING=OFF",
"-DOPENEXR_INSTALL_PKG_CONFIG=ON"
],
"cleanup": [
"/bin",
"/share/doc",
"/lib/libIlmImfUtil*"
],
"builddir" : true,
"buildsystem" : "cmake-ninja",
"sources" : [
{
"type": "archive",
"url": "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.10.tar.gz",
"sha256": "6e0fd3f0eb1cb907bd3593830ea2b3431b85f22a6f18f99f8cfa099fec70067d",
"x-checker-data": {
"type": "anitya",
"project-id": 13289,
"stable-only": true,
"url-template": "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v$version.tar.gz"
}
}
],
"modules": [
{
"name" : "imath",
"config-opts": [
"-DBUILD_SHARED_LIBS=ON",
"-DBUILD_TESTING=OFF",
"-DIMATH_INSTALL_PKG_CONFIG=ON"
],
"builddir" : true,
"buildsystem" : "cmake-ninja",
"sources" : [
{
"type": "archive",
"url" : "https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v3.1.9.tar.gz",
"sha256": "f1d8aacd46afed958babfced3190d2d3c8209b66da451f556abd6da94c165cf3",
"x-checker-data": {
"type": "anitya",
"project-id": 223366,
"stable-only": true,
"url-template": "https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v$version.tar.gz"
}
}
]
}
]
},
{
"name": "poppler",
"modules": [
{
"name": "popplerdata",
"buildsystem": "cmake-ninja",
"builddir": true,
"sources": [
{
"type": "archive",
"url": "https://poppler.freedesktop.org/poppler-data-0.4.12.tar.gz",
"sha256": "c835b640a40ce357e1b83666aabd95edffa24ddddd49b8daff63adb851cdab74",
"x-checker-data": {
"type": "anitya",
"project-id": 3687,
"stable-only": true,
"url-template": "https://poppler.freedesktop.org/poppler-data-$version.tar.gz"
}
}
]
}
],
"config-opts": [
"-DENABLE_GOBJECT_INTROSPECTION=OFF",
"-DENABLE_CPP=OFF",
"-DOpenJPEG_DIR=/usr/lib64/openjpeg-2.3",
"-DENABLE_BOOST=OFF",
"-DWITH_NSS3:BOOL=OFF",
"-DENABLE_QT5:BOOL=OFF"
],
"cleanup": [
"/bin",
"/share"
],
"buildsystem": "cmake-ninja",
"builddir": true,
"sources": [
{
"type": "archive",
"url": "https://poppler.freedesktop.org/poppler-23.08.0.tar.xz",
"sha256": "4a4bf7fc903b9f1a2ab7d04b7c5d8220db9bc6261cc73fdb9a826dc272f49aa8",
"x-checker-data": {
"type": "anitya",
"project-id": 3686,
"stable-only": true,
"url-template": "https://poppler.freedesktop.org/poppler-$version.tar.xz"
}
}
]
},
{
"name": "aalib",
"config-opts": [
"--disable-static",
"--with-slang-driver=no"
],
"cleanup": [
"/bin",
"/info",
"/man"
],
"sources": [
{
"type": "archive",
"url": "https://src.fedoraproject.org/repo/pkgs/rpms/aalib/aalib-1.4rc5.tar.gz/9801095c42bba12edebd1902bcf0a990/aalib-1.4rc5.tar.gz",
"sha256": "fbddda9230cf6ee2a4f5706b4b11e2190ae45f5eda1f0409dc4f99b35e0a70ee"
},
{
"type": "shell",
"commands": [
"cp -p /usr/share/automake-*/config.{sub,guess} ."
]
}
]
},
{
"name": "libmng",
"config-opts": [
"--disable-static"
],
"cleanup": [
"/share"
],
"sources": [
{
"type": "archive",
"url": "https://src.fedoraproject.org/repo/pkgs/rpms/libmng/libmng-2.0.3.tar.gz/7e9a12ba2a99dff7e736902ea07383d4/libmng-2.0.3.tar.gz",
"sha256": "cf112a1fb02f5b1c0fce5cab11ea8243852c139e669c44014125874b14b7dfaa"
}
]
},
{
"name": "libwmf",
"config-opts": [
"--disable-static",
"--disable-dependency-tracking"
],
"cleanup": [
"/share/doc",
"/bin"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/caolanm/libwmf/archive/refs/tags/v0.2.13.tar.gz",
"sha512": "f45a936c9bc98fc1a5f2b0808b497119e4dcd3c132615fdddb7583e5719c7d1d7f85c16ebf313cad453e5b7ae3508bf6b80c4ed2b42322b7dec295d8f4eb86ce",
"x-checker-data": {
"type": "anitya",
"project-id": 230209,
"stable-only": true,
"url-template": "https://github.com/caolanm/libwmf/archive/refs/tags/v$version.tar.gz"
}
},
{
"type": "shell",
"commands": [
"cp -p /usr/share/automake-*/config.{sub,guess} .",
"autoreconf -vfi"
]
}
]
},
{
"name": "ghostscript",
"config-opts": [
"--disable-cups"
],
"make-args": [
"so"
],
"make-install-args": [
"soinstall"
],
"cleanup": [
"/bin",
"/share/man",
"/share/doc"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10012/ghostscript-10.01.2.tar.gz",
"sha512": "11887850d440b8bbd8b83b8b58df8c743cf94be8fdbcfbda1a5fce55ce7c6a963d94b41a4ebcf1ba48f64f8af01e76dec789e2711212b1f7a32f98c42d75e0ff",
"x-checker-data": {
"//": "Bypass broken url-template with anitya checker - See https://github.com/flathub/flatpak-external-data-checker/issues/360",
"type": "json",
"url": "https://api.github.com/repos/ArtifexSoftware/ghostpdl-downloads/releases/latest",
"version-query": ".name | split(\" \") | .[1]",
"url-query": ".assets[] | select(.name|test(\"^ghostscript-(.*).tar.gz$\")) | .browser_download_url"
}
},
{
"type": "shell",
"commands": [
"cp -p /usr/share/automake-*/config.{sub,guess} freetype/builds/unix/",
"cp -p /usr/share/automake-*/config.{sub,guess} ijs/",
"cp -p /usr/share/automake-*/config.{sub,guess} jpeg/",
"cp -p /usr/share/automake-*/config.{sub,guess} libpng/",
"cp -p /usr/share/automake-*/config.{sub,guess} lcms2mt/",
"cp -p /usr/share/automake-*/config.{sub,guess} tiff/config/",
"rm -rf libpng/pngread.c"
]
}
]
},
{
"name": "libmypaint",
"config-opts": [
"--disable-gegl",
"--disable-introspection"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/mypaint/libmypaint/releases/download/v1.6.1/libmypaint-1.6.1.tar.xz",
"sha256": "741754f293f6b7668f941506da07cd7725629a793108bb31633fb6c3eae5315f",
"x-checker-data": {
"type": "anitya",
"project-id": 12974,
"stable-only": true,
"url-template": "https://github.com/mypaint/libmypaint/releases/download/v$version/libmypaint-$version.tar.xz"
}
}
],
"modules": [
{
"name": "json-c",
"buildsystem": "cmake-ninja",
"sources": [
{
"type": "git",
"url": "https://github.com/json-c/json-c.git",
"tag": "json-c-0.16-20220414",
"commit": "2f2ddc1f2dbca56c874e8f9c31b5b963202d80e7",
"x-checker-data": {
"type": "git",
"tag-pattern": "^json-c-([\\d.]+)-[\\d]+$"
}
}
]
},
{
"//": "Copy from shared-modules to avoid submodules on dev repo.",
"name": "intltool",
"cleanup": [
"*"
],
"sources": [
{
"type": "archive",
"url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz",
"sha256": "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd",
"x-checker-data": {
"type": "anitya",
"project-id": 1385,
"stable-only": true,
"url-template": "https://launchpad.net/intltool/trunk/$version/+download/intltool-$version.tar.gz"
}
}
]
}
]
},
{
"name": "mypaint-brushes",
"sources": [
{
"type": "archive",
"url": "https://github.com/mypaint/mypaint-brushes/releases/download/v1.3.1/mypaint-brushes-1.3.1.tar.xz",
"sha256": "fef66ffc241b7c5cd29e9c518e933c739618cb51c4ed4d745bf648a1afc3fe70",
"x-checker-data": {
"type": "anitya",
"project-id": 17096,
"stable-only": true,
"versions": {
"<": "2.0.0"
},
"url-template": "https://github.com/mypaint/mypaint-brushes/releases/download/v$version/mypaint-brushes-$version.tar.xz"
}
}
]
},
{
"//": "Shamelessly taken from org.octave.Octave manifest!",
"name": "SuiteSparse",
"no-autogen": true,
"make-args": [
"BLAS=-lopenblas",
"LAPACK=",
"library"
],
"make-install-args": [
"BLAS=-lopenblas",
"LAPACK=",
"INSTALL_LIB=/app/lib",
"INSTALL_INCLUDE=/app/include/suitesparse",
"library"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v5.13.0.tar.gz",
"sha256": "59c6ca2959623f0c69226cf9afb9a018d12a37fab3a8869db5f6d7f83b6b147d",
"x-checker-data": {
"type": "anitya",
"project-id": 4908,
"stable-only": true,
"//": "patches don't apply. Avoiding flathubbot to spam us with broken updates",
"versions": {
"<": "6.0.0"
},
"url-template": "https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v$version.tar.gz"
}
},
{
"type": "patch",
"path": "patches/suitesparse-reduce-build.patch"
}
],
"modules": [
{
"name": "openblas",
"no-autogen": true,
"make-args": [
"DYNAMIC_ARCH=1",
"FC=gfortran",
"NO_CBLAS=1",
"NO_LAPACKE=1",
"USE_OPENMP=0"
],
"make-install-args": [
"PREFIX=/app"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/xianyi/OpenBLAS/archive/v0.3.23.tar.gz",
"sha256": "5d9491d07168a5d00116cdc068a40022c3455bf9293c7cb86a65b1054d7e5114",
"x-checker-data": {
"type": "anitya",
"project-id": 2540,
"stable-only": true,
"url-template": "https://github.com/xianyi/OpenBLAS/archive/v$version.tar.gz"
}
}
]
}
]
},
{
"name": "libheif",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DWITH_GDK_PIXBUF=OFF"
],
"cleanup": [
"/bin",
"/share/thumbnailers"
],
"modules": [
{
"name": "libde265",
"config-opts": [
"--disable-dec265",
"--disable-encoder",
"--disable-sherlock265"
],
"cleanup": [
"/bin"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/strukturag/libde265/releases/download/v1.0.12/libde265-1.0.12.tar.gz",
"sha256": "62185ea2182e68cf68bba20cc6eb4c287407b509cf0a827d7ddb75614db77b5c",
"x-checker-data": {
"type": "anitya",
"project-id": 11239,
"stable-only": true,
"url-template": "https://github.com/strukturag/libde265/releases/download/v$version/libde265-$version.tar.gz"
}
}
]
},
{
"name": "libx265",
"buildsystem": "cmake",
"subdir": "source",
"config-opts": [
"-DEXTRA_LIB='libx265-10.a;libx265-12.a'",
"-DEXTRA_LINK_FLAGS=-L.",
"-DLINKED_10BIT=ON",
"-DLINKED_12BIT=ON"
],
"cleanup": [
"/bin"
],
"sources": [
{
"type": "archive",
"url": "https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.5.tar.gz",
"sha256": "e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8",
"x-checker-data": {
"type": "anitya",
"project-id": 7275,
"stable-only": true,
"url-template": "https://bitbucket.org/multicoreware/x265_git/downloads/x265_$version.tar.gz"
}
},
{
"type": "shell",
"commands": [
"ln -s ${FLATPAK_DEST}/lib/libx265-10.a",
"ln -s ${FLATPAK_DEST}/lib/libx265-12.a",
"rm -fr ${FLATPAK_DEST}/lib/libx265.so*"
]
}
],
"modules": [
{
"name": "libx265-10bpc",
"buildsystem": "cmake",
"subdir": "source",
"config-opts": [
"-DHIGH_BIT_DEPTH=ON",
"-DEXPORT_C_API=OFF",
"-DENABLE_SHARED=OFF",
"-DENABLE_CLI=OFF",
"-DENABLE_ASSEMBLY=OFF"
],
"sources": [
{
"type": "archive",
"url": "https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.5.tar.gz",
"sha256": "e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8",
"x-checker-data": {
"type": "anitya",
"project-id": 7275,
"stable-only": true,
"url-template": "https://bitbucket.org/multicoreware/x265_git/downloads/x265_$version.tar.gz"
}
}
],
"post-install": [
"mv ${FLATPAK_DEST}/lib/libx265.a ${FLATPAK_DEST}/lib/libx265-10.a"
]
},
{
"name": "libx265-12bpc",
"buildsystem": "cmake",
"subdir": "source",
"config-opts": [
"-DHIGH_BIT_DEPTH=ON",
"-DEXPORT_C_API=OFF",
"-DENABLE_SHARED=OFF",
"-DENABLE_CLI=OFF",
"-DENABLE_ASSEMBLY=OFF",
"-DMAIN12=ON"
],
"sources": [
{
"type": "archive",
"url": "https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.5.tar.gz",
"sha256": "e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8",
"x-checker-data": {
"type": "anitya",
"project-id": 7275,
"stable-only": true,
"url-template": "https://bitbucket.org/multicoreware/x265_git/downloads/x265_$version.tar.gz"
}
}
],
"post-install": [
"mv ${FLATPAK_DEST}/lib/libx265.a ${FLATPAK_DEST}/lib/libx265-12.a"
]
}
]
}
],
"sources": [
{
"type": "archive",
"url": "https://github.com/strukturag/libheif/releases/download/v1.16.2/libheif-1.16.2.tar.gz",
"sha256": "7f97e4205c0bd9f9b8560536c8bd2e841d1c9a6d610401eb3eb87ed9cdfe78ea",
"x-checker-data": {
"type": "anitya",
"project-id": 64439,
"stable-only": true,
"url-template": "https://github.com/strukturag/libheif/releases/download/v$version/libheif-$version.tar.gz"
}
}
]
},
{
"name": "luajit",
"no-autogen": true,
"cleanup": [
"/lib/*.a",
"/include",
"/lib/pkgconfig",
"/share/man"
],
"sources": [
{
"type": "archive",
"url": "https://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz",
"sha256": "1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3",
"x-checker-data": {
"type": "anitya",
"project-id": 6444,
"stable-only": false,
"url-template": "https://luajit.org/download/LuaJIT-$version.tar.gz"
}
},
{
"type": "shell",
"commands": [
"sed -i 's|/usr/local|/app|' ./Makefile"
]
}
],
"post-install": [
"ln -s /app/bin/luajit-2.1.0-beta3 /app/bin/luajit"
]
},
{
"name": "lua-lgi",
"buildsystem": "meson",
"sources": [
{
"type": "git",
"url": "https://github.com/pavouk/lgi.git",
"commit": "c21f35fccae87fd4e3625d4c878f584b7255d6f6"
}
]
},
{
"name": "xmu",
"sources": [
{
"type": "archive",
"url": "https://xorg.freedesktop.org/releases/individual/lib/libXmu-1.1.3.tar.bz2",
"sha256": "9c343225e7c3dc0904f2122b562278da5fed639b1b5e880d25111561bac5b731"
}
]
},
{
"name": "cairo",
"buildsystem": "meson",
"sources": [
{
"type": "archive",
"url": "https://cairographics.org/snapshots/cairo-1.17.8.tar.xz",
"sha256": "5b10c8892d1b58d70d3f0ba5b47863a061262fa56b9dc7944161f8c8b783bc64",
"x-checker-data": {
"type": "anitya",
"project-id": 247,
"stable-only": true,
"url-template": "https://cairographics.org/snapshots/cairo-$version.tar.xz"
}
}
]
},
{
"name": "qoi",
"buildsystem": "simple",
"build-commands": [
"install -D qoi.h /app/include/qoi.h"
],
"sources": [
{
"type": "git",
"url": "https://github.com/phoboslab/qoi.git",
"commit": "f6dffaf1e8170cdd79945a4fb60f6403e447e020"
}
]
},
{
"name": "cfitsio",
"config-opts": [
"--enable-reentrant"
],
"make-args": ["shared"],
"cleanup": [
"/include",
"/lib/*.a",
"/lib/*.la",
"/lib/pkgconfig"
],
"sources": [
{
"type": "archive",
"url": "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.2.0.tar.gz",
"sha256": "eba53d1b3f6e345632bb09a7b752ec7ced3d63ec5153a848380f3880c5d61889"
}
]
},
{
"name": "babl",
"buildsystem": "meson",
"config-opts": [
"-Dwith-docs=false"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/babl.git",
"branch": "master"
}
]
},
{
"name": "gegl",
"buildsystem": "meson",
"config-opts": [
"-Ddocs=false",
"-Dworkshop=true"
],
"cleanup": [
"/bin"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/gegl.git",
"branch": "master"
}
],
"modules": [
{
"name": "maxflow",
"buildsystem": "cmake-ninja",
"cleanup": [
"/bin"
],
"sources": [
{
"type": "git",
"url": "https://github.com/gerddie/maxflow.git",
"commit": "6ac148f164b9567ac81fbb4ebb36112f850c902b"
}
]
},
{
"name": "graphviz",
"buildsystem": "autotools",
"sources": [
{
"type": "archive",
"url": "https://gitlab.com/graphviz/graphviz/-/archive/8.0.5/graphviz-8.0.5.tar.gz",
"sha256": "dd06f45f5bbcb1c7cbc67adab5359da2cd4b40533dc7c7424b3fc0e998bbd6c9",
"x-checker-data": {
"type": "anitya",
"project-id": 1249,
"stable-only": true,
"url-template": "https://gitlab.com/graphviz/graphviz/-/archive/$version/graphviz-$version.tar.gz"
}
}
],
"cleanup": [
"/bin/??",
"/bin/????*",
"/bin/fdp",
"/bin/nop",
"/lib/libgvpr*",
"/lib/liblab*",
"*.la",
"/lib/graphviz/libgvplugin_core*",
"/lib/graphviz/libgvplugin_g*",
"/lib/graphviz/libgvplugin_neato_layout*",
"/lib/graphviz/libgvplugin_poppler*",
"/lib/graphviz/libgvplugin_rsvg*",
"/lib/graphviz/libgvplugin_visio*",
"/lib/graphviz/libgvplugin_webp*",
"/lib/graphviz/libgvplugin_xlib*",
"/share"
]
}
]
},
{
"name": "pika",
"buildsystem": "meson",
"config-opts": [
"-Dg-ir-doc=false",
"-Dgi-docgen=disabled",
"-Dicc-directory=/run/host/usr/share/color/icc/",
"-Dbuild-id=technology.heckin.PIKA.flatpak.nightly",
"-Dcheck-update=no"
],
"cleanup": [
"/bin/pikatool-2.99",
"/bin/pika-console-2.99"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/pika.git",
"branch": "master"
},
{
"type": "shell",
"commands": [
"xsltproc -o desktop/technology.heckin.PIKA.appdata.xml.in.in build/flatpak/remove-future-appdata-release.xslt desktop/technology.heckin.PIKA.appdata.xml.in.in"
]
}
]
}
]
}

View File

@ -0,0 +1,43 @@
#!/bin/sh
#
# Wrapper script to use for the Meson test setup.
#
# Define the "UI_TEST" for all tests that should run headless
if [ -n "${UI_TEST}" ]; then
# Use Xvfb to simulate a graphical session; note that this needs
# a new enough version which has the -d option.
#
# Also use dbus-run-session to make sure parallel tests aren't failing
# as they simultaneously try to own the "technology.heckin.PIKA.UI" D-Bus name
# This is weird but basically on a Debian testing/bookworm, apparently
# the --auto-display (neither the short version -d) option does not
# exist and ends up in error:
# > xvfb-run: unrecognized option '--auto-display'
# There only --auto-servernum works fine.
#
# On a recent Fedora (33 in my case), the later exists but a few of
# the tests fail with some weirder:
# > /usr/bin/xvfb-run: line 186: kill: (53539) - No such process
# There using --auto-display instead (supposed to deprecate
# --auto-servernum) works instead, but only in its short form (-d).
# The long form --auto-display also results in the "unrecognized
# option" error even though the help output lists it.
# Yep it's a huge mess.
xvfb-run 2>&1|grep --quiet auto-display
HAS_AUTO_DISPLAY="$?"
if [ "$HAS_AUTO_DISPLAY" -eq 0 ]; then
OPT="-d"
else
OPT="--auto-servernum"
fi
xvfb-run $OPT --server-args="-screen 0 1280x1024x24" \
dbus-run-session -- "$@"
else
# Run the executable directly,
# i.e. no need to run Xvfb (which will have a timeout)
"$@"
fi

View File

@ -0,0 +1,44 @@
From 4f4d89506f58a64b4829b1bb239bab9e46d63727 Mon Sep 17 00:00:00 2001
From: Jehan <jehan@girinstud.io>
Date: Tue, 19 Jan 2021 12:42:31 +0100
Subject: [PATCH] src: do not override explicitly requested grayscale
antialiasing.
If CAIRO_ANTIALIAS_DEFAULT is selected and system is set to subpixel, it
is perfectly normal to switch to CAIRO_ANTIALIAS_SUBPIXEL.
But when the calling application specifically requested
CAIRO_ANTIALIAS_GRAY then Cairo should honor the request.
This is an issue we have had for years in PIKA, where text on images
would render differently depending on the system the file is opened on.
This is obviously not right as a graphics work should be system
independant and allow the creator to decide if one wants a text to have
grayscale or subpixel rendering (a settings which would stick when
sharing the work file). Cairo should not override this.
The CAIRO_ANTIALIAS_DEFAULT settings exists exactly for this (when we
want Cairo to choose for us, in a system-dependant way); other settings
are when we need system independance.
Thanks to Adam Fontenot for initial investigations and tests on this and
other contributors before this.
---
src/cairo-ft-font.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index d2221edec..1f5befec3 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1945,8 +1945,7 @@ _cairo_ft_options_merge (cairo_ft_options_t *options,
}
if (other->base.antialias == CAIRO_ANTIALIAS_SUBPIXEL &&
- (options->base.antialias == CAIRO_ANTIALIAS_DEFAULT ||
- options->base.antialias == CAIRO_ANTIALIAS_GRAY)) {
+ options->base.antialias == CAIRO_ANTIALIAS_DEFAULT) {
options->base.antialias = CAIRO_ANTIALIAS_SUBPIXEL;
options->base.subpixel_order = other->base.subpixel_order;
}
--
GitLab

View File

@ -0,0 +1,22 @@
diff -Naur cairo-1.16.0/src/cairo-composite-rectangles.c cairo-1.16.0.patched/src/cairo-composite-rectangles.c
--- cairo-1.16.0/src/cairo-composite-rectangles.c 2018-08-17 03:10:53.000000000 +0200
+++ cairo-1.16.0.patched/src/cairo-composite-rectangles.c 2021-09-26 15:52:04.410502567 +0200
@@ -431,18 +431,6 @@
if (! _cairo_composite_rectangles_init (extents, surface, op, source, clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
- /* Computing the exact bbox and the overlap is expensive.
- * First perform a cheap test to see if the glyphs are all clipped out.
- */
- if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK &&
- _cairo_scaled_font_glyph_approximate_extents (scaled_font,
- glyphs, num_glyphs,
- &extents->mask))
- {
- if (! _cairo_rectangle_intersect (&extents->bounded, &extents->mask))
- return CAIRO_INT_STATUS_NOTHING_TO_DO;
- }
-
status = _cairo_scaled_font_glyph_device_extents (scaled_font,
glyphs, num_glyphs,
&extents->mask,

BIN
build/windows/fileicon.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

View File

@ -0,0 +1,70 @@
crossroad source msys2
mkdir _deps && cd _deps
# babl
crossroad install lcms2 && \
git clone --depth 1 https://gitlab.gnome.org/GNOME/babl.git && cd babl && \
crossroad meson setup _build/ -Denable-gir=false -Dlibdir=lib && \
ninja -C _build install || exit 1
cd ..
# GEGL
crossroad install cairo graphviz json-glib && \
git clone --depth 1 https://gitlab.gnome.org/GNOME/gegl.git && cd gegl && \
crossroad meson setup _build/ -Dintrospection=false -Dsdl2=disabled -Dlibdir=lib && \
ninja -C _build install || exit 1
cd ..
# preparing PIKA
LIBMNG=
if [ "x$CROSSROAD_PLATFORM" = "xw64" ]; then
# For some reason, file-mng plug-in fails to link in its i686 build.
# Just disable it for now on i686 only.
LIBMNG="libmng"
fi
crossroad install appstream-glib \
aalib \
atk \
cfitsio \
drmingw \
gexiv2 \
glib2 \
glib-networking \
json-c \
ghostscript \
gobject-introspection \
gobject-introspection-runtime \
iso-codes \
libheif \
libiff \
libilbm \
libjxl \
$LIBMNG \
libmypaint mypaint-brushes \
libwebp \
libwmf \
openexr \
poppler poppler-data \
qoi \
xpm-nox
if [ $? -ne 0 ]; then
echo "Installation of pre-built dependencies failed.";
exit 1;
fi
if [ "x$CROSSROAD_PLATFORM" = "xw64" ]; then
# Generate the loaders.cache file for GUI image support.
# Note: this is mostly for distribution so I initially wanted to
# have these in "win64-nightly" job but "win32-nightly" also
# requires the same file (and I fail to install wine32) whereas
# Gitlab "needs" field requires jobs to be from a prior stage. So I
# generate this here, with dependencies.
wine ${CROSSROAD_PREFIX}/bin/gdk-pixbuf-query-loaders.exe ${CROSSROAD_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll > ${CROSSROAD_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
sed -i "s&$CROSSROAD_PREFIX/&&" ${CROSSROAD_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
sed -i '/.dll\"/s*/*\\\\*g' ${CROSSROAD_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
fi

View File

@ -0,0 +1,74 @@
#!/bin/bash
set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export ARTIFACTS_SUFFIX="-w32"
export MSYS2_ARCH="i686"
# vapi build fails on 32-bit, with no error output. Let's just drop
# it for this architecture.
export BABL_OPTIONS="-Denable-vapi=false"
export GEGL_OPTIONS="-Dvapigen=disabled"
export MSYS_PREFIX="/c/msys64/mingw32/"
else
export ARTIFACTS_SUFFIX="-w64"
export MSYS2_ARCH="x86_64"
export BABL_OPTIONS=""
export GEGL_OPTIONS=""
export MSYS_PREFIX="/c/msys64/mingw64/"
fi
# Update everything
pacman --noconfirm -Suy
# Install the required packages
pacman --noconfirm -S --needed \
base-devel \
mingw-w64-$MSYS2_ARCH-toolchain \
mingw-w64-$MSYS2_ARCH-autotools \
mingw-w64-$MSYS2_ARCH-meson \
\
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-crt-git \
mingw-w64-$MSYS2_ARCH-glib-networking \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-lcms2 \
mingw-w64-$MSYS2_ARCH-lensfun \
mingw-w64-$MSYS2_ARCH-libspiro \
mingw-w64-$MSYS2_ARCH-maxflow \
mingw-w64-$MSYS2_ARCH-openexr \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-suitesparse \
mingw-w64-$MSYS2_ARCH-vala
export GIT_DEPTH=1
export PIKA_PREFIX="`realpath ./_install`${ARTIFACTS_SUFFIX}"
export PATH="$PIKA_PREFIX/bin:$PATH"
export PKG_CONFIG_PATH="${PIKA_PREFIX}/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="${PIKA_PREFIX}/share/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="${PIKA_PREFIX}/lib:${LD_LIBRARY_PATH}"
export ACLOCAL_FLAGS="-I/c/msys64/mingw64/share/aclocal"
export XDG_DATA_DIRS="${PIKA_PREFIX}/share:/mingw64/share/"
## babl and GEGL (follow master branch) ##
git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git _babl
git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git _gegl
mkdir _babl/_build
cd _babl/_build
meson setup -Dprefix="${PIKA_PREFIX}" -Dwith-docs=false \
${BABL_OPTIONS} ..
ninja
ninja install
mkdir ../../_gegl/_build
cd ../../_gegl/_build
meson setup -Dprefix="${PIKA_PREFIX}" -Ddocs=false \
-Dcairo=enabled -Dumfpack=enabled \
-Dopenexr=enabled -Dworkshop=true \
${GEGL_OPTIONS} ..
ninja
ninja install
cd ../..

View File

@ -0,0 +1,120 @@
#!/bin/bash
set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export ARTIFACTS_SUFFIX="-w32"
export MSYS2_ARCH="i686"
export MSYS2_PREFIX="/c/msys64/mingw32"
export PIKA_OPTIONS="-Dvala=disabled"
else
export ARTIFACTS_SUFFIX="-w64"
export MSYS2_ARCH="x86_64"
export MSYS2_PREFIX="/c/msys64/mingw64/"
fi
export ACLOCAL_FLAGS="-I${MSYS2_PREFIX}/share/aclocal"
export PATH="${MSYS2_PREFIX}/bin:$PATH"
# Update everything
pacman --noconfirm -Suy
# Install the required packages
pacman --noconfirm -S --needed \
base-devel \
mingw-w64-$MSYS2_ARCH-toolchain \
mingw-w64-$MSYS2_ARCH-autotools \
mingw-w64-$MSYS2_ARCH-ccache \
mingw-w64-$MSYS2_ARCH-meson \
\
mingw-w64-$MSYS2_ARCH-aalib \
mingw-w64-$MSYS2_ARCH-appstream-glib \
mingw-w64-$MSYS2_ARCH-atk \
mingw-w64-$MSYS2_ARCH-brotli \
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-cfitsio \
mingw-w64-$MSYS2_ARCH-drmingw \
mingw-w64-$MSYS2_ARCH-gexiv2 \
mingw-w64-$MSYS2_ARCH-ghostscript \
mingw-w64-$MSYS2_ARCH-gi-docgen \
mingw-w64-$MSYS2_ARCH-glib-networking \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-gobject-introspection-runtime \
mingw-w64-$MSYS2_ARCH-graphviz \
mingw-w64-$MSYS2_ARCH-gtk3 \
mingw-w64-$MSYS2_ARCH-headers-git \
mingw-w64-$MSYS2_ARCH-iso-codes \
mingw-w64-$MSYS2_ARCH-json-c \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-lcms2 \
mingw-w64-$MSYS2_ARCH-lensfun \
mingw-w64-$MSYS2_ARCH-libarchive \
mingw-w64-$MSYS2_ARCH-libheif \
mingw-w64-$MSYS2_ARCH-libiff \
mingw-w64-$MSYS2_ARCH-libilbm \
mingw-w64-$MSYS2_ARCH-libjxl \
mingw-w64-$MSYS2_ARCH-libmypaint \
mingw-w64-$MSYS2_ARCH-libspiro \
mingw-w64-$MSYS2_ARCH-libwebp \
mingw-w64-$MSYS2_ARCH-libwmf \
mingw-w64-$MSYS2_ARCH-luajit \
mingw-w64-$MSYS2_ARCH-maxflow \
mingw-w64-$MSYS2_ARCH-mypaint-brushes \
mingw-w64-$MSYS2_ARCH-openexr \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-poppler \
mingw-w64-$MSYS2_ARCH-poppler-data \
mingw-w64-$MSYS2_ARCH-python \
mingw-w64-$MSYS2_ARCH-python-gobject \
mingw-w64-$MSYS2_ARCH-qoi \
mingw-w64-$MSYS2_ARCH-shared-mime-info \
mingw-w64-$MSYS2_ARCH-suitesparse \
mingw-w64-$MSYS2_ARCH-vala \
mingw-w64-$MSYS2_ARCH-xpm-nox
# XXX We've got a weird error when the prefix is in the current dir.
# Until we figure it out, this trick seems to work, even though it's
# completely ridiculous.
mv "_install${ARTIFACTS_SUFFIX}" ~
export PIKA_PREFIX="`realpath ~/_install`${ARTIFACTS_SUFFIX}"
export PATH="$PIKA_PREFIX/bin:$PATH"
export PKG_CONFIG_PATH="${PIKA_PREFIX}/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="${PIKA_PREFIX}/share/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="${PIKA_PREFIX}/lib:${LD_LIBRARY_PATH}"
export ACLOCAL_FLAGS="-I/c/msys64/mingw32/share/aclocal"
export XDG_DATA_DIRS="${PIKA_PREFIX}/share:/mingw64/share/"
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
# XXX Do not enable ccache this way because it breaks
# gobject-introspection rules. Let's see later for ccache.
# See: https://github.com/msys2/MINGW-packages/issues/9677
#export CC="ccache gcc"
#ccache --zero-stats
#ccache --show-stats
mkdir "_build${ARTIFACTS_SUFFIX}"
cd "_build${ARTIFACTS_SUFFIX}"
# We disable javascript as we are not able for the time being to add a
# javascript interpreter with GObject Introspection (GJS/spidermonkey
# and Seed/Webkit are the 2 contenders so far, but they are not
# available on MSYS2 and we are told it's very hard to build them).
# TODO: re-enable javascript plug-ins when we can figure this out.
meson .. -Dprefix="${PIKA_PREFIX}" \
-Ddirectx-sdk-dir="${MSYS2_PREFIX}" \
-Djavascript=disabled \
-Dbuild-id=technology.heckin.PIKA_official \
-Dgi-docgen=disabled \
${PIKA_OPTIONS}
ninja
ninja install
cd ..
#ccache --show-stats
# XXX Moving back the prefix to be used as artifacts.
mv "${PIKA_PREFIX}" .

View File

@ -0,0 +1,169 @@
#!/usr/bin/python3
################################################################################
# Small python script to retrieve DLL dependencies with objdump
################################################################################
################################################################################
# Usage example
#
# python3 dll_link.py /path/to/run.exe /winenv/ /path/install
#
# In this case, the DLL dependencies for executable run.exe will be extracted
# and copied into /path/install/bin folder. To copy the DLL, the root path to
# Windows environnment should be passed, here /winenv/.
import argparse
import os
import subprocess
import re
import shutil
import sys
################################################################################
# Global variables
# Sets for executable and system DLL
dlls = set()
sys_dlls = set()
# Previously done DLLs in previous runs
done_dlls = set()
# Common paths
bindir = 'bin'
################################################################################
# Functions
# Main function
def main(binary, srcdirs, destdir, debug, dll_file):
global done_dlls
try:
if dll_file is not None:
with open(dll_file, 'r') as f:
done_dlls = { line.strip() for line in f if len(line.strip()) != 0 }
except FileNotFoundError:
pass
sys.stdout.write("{} (INFO): searching for dependencies of {} in {}.\n".format(os.path.basename(__file__),
binary, ', '.join(srcdirs)))
find_dependencies(os.path.abspath(binary), srcdirs)
if debug in ['debug-only', 'debug-run']:
if debug == 'debug-only':
print("Running in debug-only mode (no DLL moved) for '{}'".format(binary))
else:
print("Running with debug output for '{}'".format(binary))
if len(dlls) > 0:
sys.stdout.write("Needed DLLs:\n\t- ")
sys.stdout.write("\n\t- ".join(list(dlls)))
print()
if len(sys_dlls) > 0:
sys.stdout.write('System DLLs:\n\t- ')
sys.stdout.write("\n\t- ".join(sys_dlls))
print()
removed_dlls = sys_dlls & dlls
if len(removed_dlls) > 0:
sys.stdout.write('Non installed DLLs:\n\t- ')
sys.stdout.write("\n\t- ".join(removed_dlls))
print()
installed_dlls = dlls - sys_dlls
if len(installed_dlls) > 0:
sys.stdout.write('Installed DLLs:\n\t- ')
sys.stdout.write("\n\t- ".join(installed_dlls))
print()
if debug == 'debug-run':
copy_dlls(dlls - sys_dlls, srcdirs, destdir)
else:
copy_dlls(dlls - sys_dlls, srcdirs, destdir)
if dll_file is not None:
with open(dll_file, 'w') as f:
f.write("\n".join(set.union(done_dlls, dlls, sys_dlls)))
def find_dependencies(obj, srcdirs):
'''
List DLLs of an object file in a recursive way.
'''
if obj in set.union(done_dlls, sys_dlls):
# Already processed, either in a previous run of the script
# (done_dlls) or in this one.
return True
if not os.path.isabs(obj):
for srcdir in srcdirs:
abs_dll = os.path.join(srcdir, bindir, obj)
abs_dll = os.path.abspath(abs_dll)
if find_dependencies(abs_dll, srcdirs):
return True
else:
# Found in none of the srcdirs: consider it a system DLL
sys_dlls.add(os.path.basename(obj))
return False
elif os.path.exists(obj):
# If DLL exists, extract dependencies.
objdump = None
result = subprocess.run(['file', obj], stdout=subprocess.PIPE)
file_type = result.stdout.decode('utf-8')
if 'PE32+' in file_type:
objdump = 'x86_64-w64-mingw32-objdump'
elif 'PE32' in file_type:
objdump = 'i686-w64-mingw32-objdump'
if objdump is None:
sys.stderr.write('File type of {} unknown: {}\n'.format(obj, file_type))
sys.exit(1)
elif shutil.which(objdump) is None:
# For native objdump case.
objdump = 'objdump.exe'
if shutil.which(objdump) is None:
sys.stderr.write("Executable doesn't exist: {}\n".format(objdump))
sys.exit(1)
result = subprocess.run([objdump, '-p', obj], stdout=subprocess.PIPE)
out = result.stdout.decode('utf-8')
# Parse lines with DLL Name instead of lib*.dll directly
for match in re.finditer(r"DLL Name: *(\S+.dll)", out, re.MULTILINE):
dll = match.group(1)
if dll not in set.union(done_dlls, dlls, sys_dlls):
dlls.add(dll)
find_dependencies(dll, srcdirs)
return True
else:
return False
# Copy a DLL set into the /destdir/bin directory
def copy_dlls(dll_list, srcdirs, destdir):
destbin = os.path.join(destdir, bindir)
os.makedirs(destbin, exist_ok=True)
for dll in dll_list:
if not os.path.exists(os.path.join(destbin, dll)):
# Do not overwrite existing files.
for srcdir in srcdirs:
full_file_name = os.path.join(srcdir, bindir, dll)
if os.path.isfile(full_file_name):
sys.stdout.write("{} (INFO): copying {} to {}\n".format(os.path.basename(__file__), full_file_name, destbin))
shutil.copy(full_file_name, destbin)
break
else:
# This should not happen. We determined that the dll is in one
# of the srcdirs.
sys.stderr.write("Missing DLL: {}\n".format(dll))
sys.exit(1)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--debug', dest='debug',
choices=['debug-only', 'debug-run', 'run-only'], default = 'run-only')
parser.add_argument('--output-dll-list', dest='dll_file', action = 'store', default = None)
parser.add_argument('bin')
parser.add_argument('src', nargs='+')
parser.add_argument('dest')
args = parser.parse_args(sys.argv[1:])
main(args.bin, args.src, args.dest, args.debug, args.dll_file)

View File

@ -0,0 +1,97 @@
# Install Inno Setup.
wget https://jrsoftware.org/download.php/is.exe
./is.exe //SILENT //SUPPRESSMSGBOXES //CURRENTUSER //SP- //LOG="innosetup.log"
# Install unofficial language files. These are translations of "unknown
# translation quality or might not be maintained actively".
# Cf. https://jrsoftware.org/files/istrans/
ISCCDIR=`grep "Dest filename:.*ISCC.exe" innosetup.log | sed 's/.*Dest filename: *\|ISCC.exe//g'`
ISCCDIR=`cygpath -u "$ISCCDIR"`
mkdir -p "${ISCCDIR}/Languages/Unofficial"
cd "${ISCCDIR}/Languages/Unofficial"
download_lang ()
{
langfile="$1"
rm -f "$langfile"
wget "https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/$langfile"
downloaded="$?"
if [ $downloaded -ne 0 ]; then
echo "Download of '$langfile' failed."
exit 1
fi
}
download_lang_official ()
{
langfile="$1"
rm -f "$langfile"
wget "https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/$langfile"
downloaded="$?"
if [ $downloaded -ne 0 ]; then
echo "Download of '$langfile' failed."
exit 1
fi
}
add_bom ()
{
langfile="$1"
file "$langfile" |grep "with BOM" 2>&1 > /dev/null
has_bom="$?"
if [ $has_bom -ne 0 ]; then
sed -i "1s/^/\xEF\xBB\xBF/" "$langfile"
fi
}
download_lang Basque.isl
download_lang ChineseSimplified.isl
download_lang ChineseTraditional.isl
# Supposed to be UTF-8 yet missing BOM.
add_bom ChineseTraditional.isl
download_lang EnglishBritish.isl
download_lang Esperanto.isl
download_lang Galician.isl
download_lang Georgian.isl
download_lang Greek.isl
download_lang Indonesian.isl
download_lang Korean.isl
download_lang Latvian.isl
download_lang Lithuanian.isl
download_lang Malaysian.isl
download_lang Marathi.islu
download_lang Romanian.isl
download_lang Swedish.isl
download_lang Vietnamese.isl
cd -
# Hungarian is not in a release yet, but was moved from Unofficial
cd "${ISCCDIR}/Languages/"
download_lang_official Hungarian.isl
cd -
# Copy generated language files into the source directory.
cp _build/build/windows/installer/lang/*isl build/windows/installer/lang
# Copy generated welcome images into the source directory.
cp _build/build/windows/installer/*bmp build/windows/installer/
# Construct now the installer.
VERSION=`grep -rI '\<version *:' meson.build | head -1 | sed "s/^.*version *: *'\([0-9]\+\.[0-9]\+\.[0-9]\+\)' *,.*$/\1/"`
#MAJOR_VERSION=`echo $VERSION | sed "s/^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)$/\1/"`
#MINOR_VERSION=`echo $VERSION | sed "s/^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)$/\2/"`
#MICRO_VERSION=`echo $VERSION | sed "s/^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)$/\3/"`
cd build/windows/installer
./compile.bat ${VERSION} ../../.. pika-w32 pika-w64 ../../.. pika-w32 pika-w64
# Test if the installer was created and return success/failure.
if [ -f "_Output/pika-${VERSION}-setup.exe" ]; then
cd _Output/
INSTALLER="pika-${VERSION}-setup.exe"
sha256sum $INSTALLER > ${INSTALLER}.SHA256SUMS
sha512sum $INSTALLER > ${INSTALLER}.SHA512SUMS
exit 0
else
exit 1
fi

View File

@ -0,0 +1,218 @@
#!/bin/bash
set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export ARTIFACTS_SUFFIX="-w32"
export MSYS2_ARCH="i686"
export MSYS_PREFIX="/c/msys64/mingw32/"
export PATH="/mingw32/bin:$PATH"
export PIKA_DISTRIB=`realpath ./pika-w32`
else
export ARTIFACTS_SUFFIX="-w64"
export MSYS2_ARCH="x86_64"
export MSYS_PREFIX="/c/msys64/mingw64/"
export PATH="/mingw64/bin:$PATH"
export PIKA_DISTRIB=`realpath ./pika-w64`
fi
# Update everything
pacman --noconfirm -Suy
# Install the required packages
pacman --noconfirm -S --needed \
base-devel \
mingw-w64-$MSYS2_ARCH-binutils \
mingw-w64-$MSYS2_ARCH-toolchain \
mingw-w64-$MSYS2_ARCH-ccache \
\
mingw-w64-$MSYS2_ARCH-aalib \
mingw-w64-$MSYS2_ARCH-appstream-glib \
mingw-w64-$MSYS2_ARCH-atk \
mingw-w64-$MSYS2_ARCH-brotli \
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-cfitsio \
mingw-w64-$MSYS2_ARCH-drmingw \
mingw-w64-$MSYS2_ARCH-gexiv2 \
mingw-w64-$MSYS2_ARCH-ghostscript \
mingw-w64-$MSYS2_ARCH-glib2 \
mingw-w64-$MSYS2_ARCH-glib-networking \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-gobject-introspection-runtime \
mingw-w64-$MSYS2_ARCH-graphviz \
mingw-w64-$MSYS2_ARCH-gtk3 \
mingw-w64-$MSYS2_ARCH-iso-codes \
mingw-w64-$MSYS2_ARCH-json-c \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-lcms2 \
mingw-w64-$MSYS2_ARCH-lensfun \
mingw-w64-$MSYS2_ARCH-libarchive \
mingw-w64-$MSYS2_ARCH-libheif \
mingw-w64-$MSYS2_ARCH-libjxl \
mingw-w64-$MSYS2_ARCH-libmypaint \
mingw-w64-$MSYS2_ARCH-libspiro \
mingw-w64-$MSYS2_ARCH-libwebp \
mingw-w64-$MSYS2_ARCH-libwmf \
mingw-w64-$MSYS2_ARCH-lua51-lgi \
mingw-w64-$MSYS2_ARCH-luajit \
mingw-w64-$MSYS2_ARCH-maxflow \
mingw-w64-$MSYS2_ARCH-mypaint-brushes \
mingw-w64-$MSYS2_ARCH-openexr \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-poppler \
mingw-w64-$MSYS2_ARCH-poppler-data \
mingw-w64-$MSYS2_ARCH-python \
mingw-w64-$MSYS2_ARCH-python3-gobject \
mingw-w64-$MSYS2_ARCH-qoi \
mingw-w64-$MSYS2_ARCH-shared-mime-info \
mingw-w64-$MSYS2_ARCH-suitesparse \
mingw-w64-$MSYS2_ARCH-vala \
mingw-w64-$MSYS2_ARCH-xpm-nox
export PIKA_PREFIX="`realpath ./_install`${ARTIFACTS_SUFFIX}"
export PATH="$PIKA_PREFIX/bin:$PATH"
# Package ressources.
mkdir -p ${PIKA_DISTRIB}
cp -fr ${PIKA_PREFIX}/etc ${PIKA_DISTRIB}
cp -fr ${PIKA_PREFIX}/include ${PIKA_DISTRIB}
#cp -fr ${PIKA_PREFIX}/ssl ${PIKA_DISTRIB}
cp -fr ${PIKA_PREFIX}/share ${PIKA_DISTRIB}
# Package executables.
mkdir ${PIKA_DISTRIB}/bin
cp -fr ${PIKA_PREFIX}/bin/pika*.exe ${PIKA_DISTRIB}/bin/
# With the native Windows build, it's directly in bin/
#mkdir ${PIKA_DISTRIB}/libexec
#cp -fr ${PIKA_PREFIX}/libexec/pika*.exe ${PIKA_DISTRIB}/libexec/
# Add a wrapper at tree root, less messy than having to look for the
# binary inside bin/, in the middle of all the DLLs.
echo "bin\pika-2.99.exe" > ${PIKA_DISTRIB}/pika.cmd
# Package library data and modules.
cp -fr ${MSYS_PREFIX}/etc/fonts ${PIKA_DISTRIB}/etc/
cp -fr ${MSYS_PREFIX}/etc/gtk-3.0 ${PIKA_DISTRIB}/etc/
mkdir ${PIKA_DISTRIB}/lib/
cp -fr ${PIKA_PREFIX}/lib/pika ${PIKA_DISTRIB}/lib/
cp -fr ${PIKA_PREFIX}/lib/gegl-0.4 ${PIKA_DISTRIB}/lib/
cp -fr ${PIKA_PREFIX}/lib/babl-0.1 ${PIKA_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/lib/girepository-1.0 ${PIKA_DISTRIB}/lib/
cp -fr ${PIKA_PREFIX}/lib/girepository-1.0/* ${PIKA_DISTRIB}/lib/girepository-1.0/
cp -fr ${MSYS_PREFIX}/lib/gio ${PIKA_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/lib/gdk-pixbuf-2.0 ${PIKA_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/lib/gtk-3.0 ${PIKA_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/lib/python3.11 ${PIKA_DISTRIB}/lib/
cp -fr ${MSYS_PREFIX}/share/ghostscript ${PIKA_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/glib-2.0 ${PIKA_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/libthai ${PIKA_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/libwmf ${PIKA_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/mypaint-data ${PIKA_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/poppler ${PIKA_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/share/lua/ ${PIKA_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/lib/lua/ ${PIKA_DISTRIB}/lib/
# XXX Are these themes really needed?
cp -fr ${MSYS_PREFIX}/share/themes ${PIKA_DISTRIB}/share/
# Only copy from langs supported in PIKA.
for dir in ${PIKA_DISTRIB}/share/locale/*/; do
lang=`basename "$dir"`;
# TODO: ideally we could be a bit more accurate and copy only the
# language files from our dependencies and iso_639.mo. But let's go
# with this for now, especially as each lang may have different
# translation availability.
if [ -d "${MSYS_PREFIX}/share/locale/${lang}/LC_MESSAGES/" ]; then
cp -fr "${MSYS_PREFIX}/share/locale/${lang}/LC_MESSAGES/"*.mo "${PIKA_DISTRIB}/share/locale/${lang}/LC_MESSAGES/"
fi
done;
# Only one iso-codes file is useful.
mkdir -p ${PIKA_DISTRIB}/share/xml/iso-codes
cp -fr ${MSYS_PREFIX}/share/xml/iso-codes/iso_639.xml ${PIKA_DISTRIB}/share/xml/iso-codes/
# Adwaita can be used as the base icon set.
cp -fr ${MSYS_PREFIX}/share/icons/Adwaita ${PIKA_DISTRIB}/share/icons/
# XXX Why are these for exactly?
cp -fr ${MSYS_PREFIX}/bin/gspawn*.exe ${PIKA_DISTRIB}/bin/
# We save the list of already copied DLLs to keep a state between dll_link runs.
rm -f done-dll.list
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/gspawn-win*-helper.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX} ${PIKA_DISTRIB} --output-dll-list done-dll.list
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/gspawn-win*-helper-console.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
# XXX Does not look like it's needed anymore. Check?
cp -fr ${MSYS_PREFIX}/bin/gdk-pixbuf-query-loaders.exe ${PIKA_DISTRIB}/bin/
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/gdk-pixbuf-query-loaders.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
# XXX Why is bzip2.exe needed?
cp -fr ${MSYS_PREFIX}/bin/bzip2.exe ${PIKA_DISTRIB}/bin/
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/bzip2.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
# Executables for supported interpreters.
cp -fr ${MSYS_PREFIX}/bin/pythonw.exe ${PIKA_DISTRIB}/bin/
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/pythonw.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
cp -fr ${MSYS_PREFIX}/bin/python3w.exe ${PIKA_DISTRIB}/bin/
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/python3w.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
cp -fr ${MSYS_PREFIX}/bin/python3.exe ${PIKA_DISTRIB}/bin/
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/python3.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
cp -fr ${MSYS_PREFIX}/bin/luajit.exe ${PIKA_DISTRIB}/bin/
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/luajit.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
# Executable for "gegl:introspect" from graphviz package.
cp -fr ${MSYS_PREFIX}/bin/dot.exe ${PIKA_DISTRIB}/bin/
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/dot.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
# Generate share/glib-2.0/schemas/gschemas.compiled
glib-compile-schemas --targetdir=${PIKA_DISTRIB}/share/glib-2.0/schemas ${PIKA_DISTRIB}/share/glib-2.0/schemas
# Package needed DLLs only
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/pika-2.99.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/pika-console-2.99.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/pika-debug-resume.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/pika-debug-tool-2.99.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/pika-test-clipboard-2.99.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/pikatool-2.99.exe ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
for dll in ${PIKA_DISTRIB}/lib/babl-0.1/*.dll; do
python3 build/windows/gitlab-ci/dll_link.py $dll ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list;
done
for dll in ${PIKA_DISTRIB}/lib/gegl-0.4/*.dll; do
python3 build/windows/gitlab-ci/dll_link.py $dll ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list;
done
for dll in ${PIKA_DISTRIB}/lib/gio/modules/*.dll; do
python3 build/windows/gitlab-ci/dll_link.py $dll ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list;
done
for dll in ${PIKA_DISTRIB}/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll; do
python3 build/windows/gitlab-ci/dll_link.py $dll ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list;
done
for dll in ${PIKA_DISTRIB}/lib/pika/2.99/modules/*.dll; do
python3 build/windows/gitlab-ci/dll_link.py $dll ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list;
done
for dll in ${PIKA_DISTRIB}/lib/pika/2.99/plug-ins/*/*.exe; do
python3 build/windows/gitlab-ci/dll_link.py $dll ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list;
done
# Libraries for GObject Introspection.
cp -fr ${MSYS_PREFIX}/bin/libgirepository-1.0-1.dll ${PIKA_DISTRIB}/bin/
python3 build/windows/gitlab-ci/dll_link.py ${PIKA_DISTRIB}/bin/libgirepository-1.0-1.dll ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list
for dll in ${PIKA_DISTRIB}/lib/python3.11/site-packages/*/*.dll; do
python3 build/windows/gitlab-ci/dll_link.py $dll ${PIKA_PREFIX}/ ${MSYS_PREFIX}/ ${PIKA_DISTRIB} --output-dll-list done-dll.list;
done

View File

@ -0,0 +1,22 @@
#!/bin/bash
if [ -z "$1" ]
then
find . \( -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' \) -type f -exec objcopy -v --only-keep-debug '{}' '{}'.debug \;
find . \( -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' \) -type f -exec objcopy -v --add-gnu-debuglink='{}'.debug '{}' --strip-unneeded \;
find . -iname '*.debug' -exec "$0" {} +
else
while [ -n "$1" ]
do
FP="$1"
NAME="${FP##*/}"
DIR="${FP%/*}"
echo "$FP -> $DIR/.debug"
if [ ! -d "$DIR/.debug" ]
then
mkdir "$DIR/.debug"
fi
mv "$FP" "$DIR/.debug"
shift
done
fi

View File

@ -0,0 +1,60 @@
#if 0
[Files]
#endif
//process list of 32bit PIKA files that are installed on x64 (for TWAIN support)
#pragma option -e-
#define protected
#define FileHandle
#define FileLine
#define ReplPos
#define ReplStr
#define Line=0
#define SRC_DIR PIKA_DIR32
//avoid too much nesting
#sub DoActualWork
#if Copy(FileLine,Len(FileLine),1)=="\"
//include whole directory
Source: "{#SRC_DIR}\{#FileLine}*"; DestDir: "{app}\32\{#Copy(FileLine,1,Len(FileLine)-1)}"; Components: pika32on64; Flags: recursesubdirs restartreplace replacesameversion uninsrestartdelete ignoreversion
#else
//include files from a certain directory
#define OutputDir Copy(FileLine,1,RPos("\",FileLine)-1)
Source: "{#SRC_DIR}\{#FileLine}"; DestDir: "{app}\32\{#OutputDir}"; Components: pika32on64; Flags: restartreplace replacesameversion uninsrestartdelete ignoreversion
#endif
#endsub
#sub Process32on64Line
#if !defined(Finished)
//show that something's happening
#expr Line=Line+1
#pragma message "Processing 32on64.list line " + Str(Line)
#if Copy(FileLine,1,1)=="#" || FileLine==""
//skip comments and empty lines
#elif Copy(FileLine,1,1)=="!"
#if Copy(FileLine,2)=="PIKA"
#expr SRC_DIR=PIKA_DIR32
#elif Copy(FileLine,2)=="GTK"
#expr SRC_DIR=DEPS_DIR32
#elif Copy(FileLine,2)=="end"
#define public Finished 1
//finished
#else
#error "Unknown command: "+FileLine
#endif
#else
#expr DoActualWork
#endif
#endif
#endsub
#for {FileHandle = FileOpen(AddBackslash(SourcePath)+"32on64.list"); \
FileHandle && !FileEof(FileHandle); FileLine = FileRead(FileHandle)} \
Process32on64Line
#if FileHandle
#expr FileClose(FileHandle)
#endif

View File

@ -0,0 +1,15 @@
#list of 32bit files to install on x64
!GTK
etc\fonts\
#lib\gtk-2.0\2.10.0\loaders\*.dll
#lib\gtk-2.0\modules\*.dll
lib\gdk-pixbuf-2.0\2.10.0\loaders\*.dll
lib\gdk-pixbuf-2.0\2.10.0\loaders.cache
lib\babl-0.1\*.dll
lib\gegl-0.4\*.dll
share\themes\
bin\gspawn*.exe
bin\*.dll
!PIKA
bin\*.dll
!end

View File

@ -0,0 +1,504 @@
[Code]
(* MessageWithURL
*
* Copyright (c) 2010-2011 Jernej Simončič
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must
* not claim that you wrote the original software. If you use this
* software in a product, an acknowledgment in the product
* documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must
* not be misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*)
(* * * * * * * * * *
* MessageWithURL(Message: TArrayOfString; Title: String: ButtonText: TArrayOfString; Typ: TMsgBoxType;
* DefaultButton, CancelButton: Integer): Integer;
*
* Parameters:
* Title dialog box caption
* Message messages to display; if a message starts with _, the text following it up to the first space character
* is interpreted as URL, and the rest of the message is used as clickable text for that URL
* Typ icon to show
* ButtonText buttons to show under the text
* DefaultButton default button (first button = 1)
* CancelButton cancel button (first button = 1)
*
* Return value button that was clicked (first button = 1); if running in silent mode, DefaultButton is returned
*)
function MessageWithURL(Message: TArrayOfString; const Title: String; ButtonText: TArrayOfString; const Typ: TMsgBoxType;
const DefaultButton, CancelButton: Integer): Integer; forward;
function GetSystemMetrics(nIndex: Integer): Integer; external 'GetSystemMetrics@User32 stdcall';
function GetDialogBaseUnits(): Integer; external 'GetDialogBaseUnits@User32 stdcall';
//function GetSysColor(nIndex: Integer): DWORD; external 'GetSysColor@user32.dll stdcall';
function LoadIcon(hInstance: Integer; lpIconName: Integer): Integer; external 'LoadIconW@user32 stdcall';
//function LoadImage(hinst: Integer; lpszName: Integer; uType: Cardinal; cxDesired, cyDesired: Integer; fuLoad: Cardinal): Integer; external 'LoadImageW@user32 stdcall';
function DrawIcon(hdc: HBitmap; x,y: Integer; hIcon: Integer): Integer; external 'DrawIcon@user32 stdcall';
//function DrawIconEx(hdc: HBitmap; xLeft,yTop: Integer; hIcon: Integer; cxWidth, cyWidth: Integer; istepIfAniCur: Cardinal; hbrFlickerFreeDraw: Integer; diFlags: Cardinal): Integer; external 'DrawIconEx@user32 stdcall';
//function DestroyIcon(hIcon: Integer): Integer; external 'DestroyIcon@user32 stdcall';
function DrawFocusRect(hDC: Integer; var lprc: TRect): BOOL; external 'DrawFocusRect@user32 stdcall';
type
TArrayOfButton = Array of TNewButton;
const
//borders around message
MWU_LEFTBORDER = 25;
MWU_RIGHTBORDER = MWU_LEFTBORDER;
MWU_TOPBORDER = 26;
MWU_BOTTOMBORDER = MWU_TOPBORDER;
//space between elements (icon-text and between buttons)
MWU_HORZSPACING = 8;
//space between labels
MWU_VERTSPACING = 4;
//button sizes
MWU_BUTTONHEIGHT = 24;
MWU_MINBUTTONWIDTH = 86;
//height of area where buttons are placed
MWU_BUTTONAREAHEIGHT = 45;
SM_CXSCREEN = 0;
SM_CXICON = 11;
SM_CYICON = 12;
SM_CXICONSPACING = 38;
SM_CYICONSPACING = 39;
//COLOR_HOTLIGHT = 26;
OIC_HAND = 32513;
OIC_QUES = 32514;
OIC_BANG = 32515;
OIC_NOTE = 32516;
LR_DEFAULTSIZE = $00000040;
LR_SHARED = $00008000;
IMAGE_BITMAP = 0;
IMAGE_ICON = 1;
IMAGE_CURSOR = 2;
DI_IMAGE = 1;
DI_MASK = 2;
DI_NORMAL = DI_IMAGE or DI_MASK;
DI_DEFAULTSIZE = 8;
var
URLList: TArrayOfString;
TextLabel: Array of TNewStaticText;
URLFocusImg: Array of TBitmapImage;
SingleLineHeight: Integer;
procedure UrlClick(Sender: TObject);
var ErrorCode: Integer;
begin
ShellExecAsOriginalUser('open',URLList[TNewStaticText(Sender).Tag],'','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
end;
// calculates maximum width of text labels
// also counts URLs, and sets the length of URLList accordingly
function Message_CalcLabelWidth(var Message: TArrayOfString; MessageForm: TSetupForm): Integer;
var MeasureLabel: TNewStaticText;
i,URLCount,DlgUnit,ScreenWidth: Integer;
begin
MeasureLabel := TNewStaticText.Create(MessageForm);
with MeasureLabel do
begin
Parent := MessageForm;
Left := 0;
Top := 0;
AutoSize := True;
end;
MeasureLabel.Caption := 'X';
SingleLineHeight := MeasureLabel.Height;
Result := 0; //minimum width
URLCount := 0;
for i := 0 to GetArrayLength(Message) - 1 do
begin
if Length(Message[i]) < 1 then //simplifies things
Message[i] := ' ';
if Message[i][1] <> '_' then
MeasureLabel.Caption := Message[i] //not an URL
else
begin //URL - check only the displayed text
if Pos(' ',Message[i]) > 0 then
MeasureLabel.Caption := Copy(Message[i],Pos(' ',Message[i])+1,Length(Message[i]))
else
MeasureLabel.Caption := Copy(Message[i],2,Length(Message[i]));
URLCount := URLCount + 1;
end;
if MeasureLabel.Width > Result then
Result := MeasureLabel.Width;
end;
MeasureLabel.Free;
SetArrayLength(URLList,URLCount); //needed later - no need to do a special loop just for this
SetArrayLength(URLFocusImg,URLCount);
DlgUnit := GetDialogBaseUnits() and $FFFF; //ensure the dialog isn't too wide
ScreenWidth := GetSystemMetrics(SM_CXSCREEN);
if Result > ((278 * DlgUnit) div 4) then //278 is from http://blogs.msdn.com/b/oldnewthing/archive/2011/06/24/10178386.aspx
Result := ((278 * DlgUnit) div 4);
if Result > (ScreenWidth * 3) div 4 then
Result := (ScreenWidth * 3) div 4;
end;
//find the longest button
function Message_CalcButtonWidth(const ButtonText: TArrayOfString; MessageForm: TSetupForm): Integer;
var MeasureLabel: TNewStaticText;
i: Integer;
begin
MeasureLabel := TNewStaticText.Create(MessageForm);
with MeasureLabel do
begin
Parent := MessageForm;
Left := 0;
Top := 0;
AutoSize := True;
end;
Result := ScaleX(MWU_MINBUTTONWIDTH - MWU_HORZSPACING * 2); //minimum width
for i := 0 to GetArrayLength(ButtonText) - 1 do
begin
MeasureLabel.Caption := ButtonText[i]
if MeasureLabel.Width > Result then
Result := MeasureLabel.Width;
end;
MeasureLabel.Free;
Result := Result + ScaleX(MWU_HORZSPACING * 2); //account for borders
end;
procedure Message_Icon(const Typ: TMsgBoxType; TypImg: TBitmapImage);
var TypRect: TRect;
Icon: THandle;
TypIcon: Integer;
begin
TypRect.Left := 0;
TypRect.Top := 0;
TypRect.Right := GetSystemMetrics(SM_CXICON);
TypRect.Bottom := GetSystemMetrics(SM_CYICON);
case Typ of
mbInformation:
TypIcon := OIC_NOTE;
mbConfirmation:
TypIcon := OIC_QUES;
mbError:
TypIcon := OIC_BANG;
else
TypIcon := OIC_HAND;
end;
//TODO: icon loads with wrong size when using Large Fonts (SM_CXICON/CYICON is 40, but 32x32 icon loads - find out how to get the right size)
Icon := LoadIcon(0,TypIcon);
//Icon := LoadImage(0,TypIcon,IMAGE_ICON,0,0,LR_SHARED or LR_DEFAULTSIZE);
with TypImg do
begin
Left := ScaleX(MWU_LEFTBORDER);
Top := ScaleY(MWU_TOPBORDER);
Center := False;
Stretch := False;
AutoSize := True;
Bitmap.Width := GetSystemMetrics(SM_CXICON);
Bitmap.Height := GetSystemMetrics(SM_CYICON);
Bitmap.Canvas.Brush.Color := TPanel(Parent).Color;
Bitmap.Canvas.FillRect(TypRect);
DrawIcon(Bitmap.Canvas.Handle,0,0,Icon); //draws icon scaled
//DrawIconEx(Bitmap.Canvas.Handle,0,0,Icon,0,0,0,0,DI_NORMAL {or DI_DEFAULTSIZE}); //draws icon without scaling
end;
//DestroyIcon(Icon); //not needed with LR_SHARED or with LoadIcon
end;
procedure Message_SetUpURLLabel(URLLabel: TNewStaticText; const Msg: String; const URLNum: Integer);
var Blank: TRect;
begin
with URLLabel do
begin
if Pos(' ',Msg) > 0 then
begin
Caption := Copy(Msg,Pos(' ',Msg)+1,Length(Msg));
URLList[URLNum] := Copy(Msg, 2, Pos(' ',Msg)-1);
end
else
begin //no text after URL - display just URL
URLList[URLNum] := Copy(Msg, 2, Length(Msg));
Caption := URLList[URLNum];
end;
Hint := URLList[URLNum];
ShowHint := True;
Font.Color := GetSysColor(COLOR_HOTLIGHT);
Font.Style := [fsUnderline];
Cursor := crHand;
OnClick := @UrlClick;
Tag := URLNum; //used to find the URL to open and bitmap to draw focus rectangle on
if Height = SingleLineHeight then //shrink label to actual text width
WordWrap := False;
TabStop := True; //keyboard accessibility
TabOrder := URLNum;
end;
URLFocusImg[URLNum] := TBitmapImage.Create(URLLabel.Parent); //focus rectangle needs a bitmap - prepare it here
with URLFocusImg[URLNum] do
begin
Left := URLLabel.Left - 1;
Top := URLLabel.Top - 1;
Stretch := False;
AutoSize := True;
Parent := URLLabel.Parent;
Bitmap.Width := URLLabel.Width + 2;
Bitmap.Height := URLLabel.Height + 2;
SendToBack;
Blank.Left := 0;
Blank.Top := 0;
Blank.Right := Width;
Blank.Bottom := Height;
Bitmap.Canvas.Brush.Color := TPanel(Parent).Color;
Bitmap.Canvas.FillRect(Blank);
end;
end;
procedure Message_SetUpLabels(Message: TArrayOfString; TypImg: TBitmapImage;
const DialogTextWidth: Integer; MessagePanel: TPanel);
var i,URLNum,dy: Integer;
begin
SetArrayLength(TextLabel,GetArrayLength(Message));
URLNum := 0;
for i := 0 to GetArrayLength(TextLabel) - 1 do
begin
TextLabel[i] := TNewStaticText.Create(MessagePanel);
with TextLabel[i] do
begin
Parent := MessagePanel;
Left := TypImg.Left + TypImg.Width + ScaleX(MWU_HORZSPACING);
if i = 0 then
Top := TypImg.Top
else
Top := TextLabel[i-1].Top + TextLabel[i-1].Height + ScaleY(MWU_VERTSPACING);
WordWrap := True;
AutoSize := True;
Width := DialogTextWidth;
if Message[i][1] <> '_' then
Caption := Message[i]
else
begin // apply URL formatting
Message_SetUpURLLabel(TextLabel[i], Message[i], URLNum);
URLNum := URLNum + 1;
end;
end;
end;
i := GetArrayLength(TextLabel) - 1;
if TextLabel[i].Top + TextLabel[i].Height < TypImg.Top + TypImg.Height then //center labels vertically
begin
dy := (TypImg.Top + TypImg.Height - TextLabel[i].Top - TextLabel[i].Height) div 2;
for i := 0 to GetArrayLength(TextLabel) - 1 do
TextLabel[i].Top := TextLabel[i].Top + dy;
end;
end;
procedure Message_SetUpButtons(var Button: TArrayOfButton; ButtonText: TArrayOfString;
const ButtonWidth, DefaultButton, CancelButton: Integer; MessageForm: TSetupForm);
var i: Integer;
begin
SetArrayLength(Button,GetArrayLength(ButtonText));
for i := 0 to GetArrayLength(Button) - 1 do
begin
Button[i] := TNewButton.Create(MessageForm);
with Button[i] do
begin
Parent := MessageForm;
Width := ButtonWidth;
Height := ScaleY(MWU_BUTTONHEIGHT);
if i = 0 then
begin
Left := MessageForm.ClientWidth - (ScaleX(MWU_HORZSPACING) + ButtonWidth) * GetArrayLength(ButtonText);
Top := MessageForm.ClientHeight - ScaleY(MWU_BUTTONAREAHEIGHT) +
ScaleY(MWU_BUTTONAREAHEIGHT - MWU_BUTTONHEIGHT) div 2;
end else
begin
Left := Button[i-1].Left + ScaleX(MWU_HORZSPACING) + ButtonWidth;
Top := Button[i-1].Top;
end;
Caption := ButtonText[i];
ModalResult := i + 1;
//set the initial focus to the default button
TabOrder := ((i - (DefaultButton - 1)) + GetArrayLength(Button)) mod (GetArrayLength(Button));
if DefaultButton = i + 1 then
Default := True;
if CancelButton = i + 1 then
Cancel := True;
end;
end;
end;
//find out if URL label has focus
//draw focus rectangle around it if so and return index of focused label
function Message_FocusLabel(): Integer;
var i: Integer;
FocusRect: TRect;
begin
Result := -1;
for i := 0 to GetArrayLength(URLFocusImg) - 1 do //clear existing focus rectangle
begin
FocusRect.Left := 0;
FocusRect.Top := 0;
FocusRect.Right := URLFocusImg[i].Bitmap.Width;
FocusRect.Bottom := URLFocusImg[i].Bitmap.Height;
URLFocusImg[i].Bitmap.Canvas.FillRect(FocusRect);
end;
for i := 0 to GetArrayLength(TextLabel) - 1 do
begin
if TextLabel[i].Focused then
begin
Result := i;
FocusRect.Left := 0;
FocusRect.Top := 0;
FocusRect.Right := URLFocusImg[TextLabel[i].Tag].Bitmap.Width;
FocusRect.Bottom := URLFocusImg[TextLabel[i].Tag].Bitmap.Height;
DrawFocusRect(URLFocusImg[TextLabel[i].Tag].Bitmap.Canvas.Handle, FocusRect);
end;
end;
end;
//TNewStaticText doesn't have OnFocus - handle that here
//(not perfect - if you focus label with keyboard, then focus a button with mouse, the label keeps it's underline)
procedure Message_KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
var URLIdx: Integer;
begin
case Key of
9,37..40: //tab, arrow keys
begin
Message_FocusLabel();
end;
13,32: //enter, spacebar
begin
URLIdx := Message_FocusLabel(); //get focused label
if URLIdx > -1 then
UrlClick(TextLabel[URLIdx]);
end;
end;
end;
function MessageWithURL(Message: TArrayOfString; const Title: String; ButtonText: TArrayOfString; const Typ: TMsgBoxType;
const DefaultButton, CancelButton: Integer): Integer;
var MessageForm: TSetupForm;
Button: TArrayOfButton;
DialogTextWidth, ButtonWidth: Integer;
MessagePanel: TPanel;
TypImg: TBitmapImage;
i: Integer;
begin
if (not IsUninstaller and WizardSilent) or (IsUninstaller and UninstallSilent) then
begin
Result := DefaultButton;
exit;
end;
MessageForm := CreateCustomForm();
MessageForm.Caption := Title;
if (CancelButton = 0) or (CancelButton > GetArrayLength(ButtonText)) then //no cancel button - remove close button
MessageForm.BorderIcons := MessageForm.BorderIcons - [biSystemMenu];
MessagePanel := TPanel.Create(MessageForm); //Vista-style background
with MessagePanel do
begin
Parent := MessageForm;
BevelInner := bvNone;
BevelOuter := bvNone;
BevelWidth := 0;
ParentBackground := False;
Color := clWindow;
Left := 0;
Top := 0;
end;
DialogTextWidth := Message_CalcLabelWidth(Message, MessageForm);
ButtonWidth := Message_CalcButtonWidth(ButtonText, MessageForm);
TypImg := TBitmapImage.Create(MessagePanel);
TypImg.Parent := MessagePanel;
Message_Icon(Typ, TypImg);
Message_SetUpLabels(Message, TypImg, DialogTextWidth, MessagePanel);
i := GetArrayLength(TextLabel) - 1;
MessagePanel.ClientHeight := TextLabel[i].Top + TextLabel[i].Height + ScaleY(MWU_BOTTOMBORDER);
MessagePanel.ClientWidth := DialogTextWidth + TypImg.Width + TypImg.Left + ScaleX(MWU_HORZSPACING + MWU_RIGHTBORDER);
if MessagePanel.ClientWidth <
(ButtonWidth + ScaleX(MWU_HORZSPACING)) * GetArrayLength(ButtonText) + ScaleX(MWU_HORZSPACING) then //ensure buttons fit
MessagePanel.ClientWidth := (ButtonWidth + ScaleX(MWU_HORZSPACING)) * GetArrayLength(ButtonText) + ScaleX(MWU_HORZSPACING);
MessageForm.ClientWidth := MessagePanel.Width;
MessageForm.ClientHeight := MessagePanel.Height + ScaleY(MWU_BUTTONAREAHEIGHT);
Message_SetUpButtons(Button, ButtonText, ButtonWidth, DefaultButton, CancelButton, MessageForm);
MessageForm.OnKeyUp := @Message_KeyUp; //needed for keyboard access of URL labels
MessageForm.KeyPreView := True;
Result := MessageForm.ShowModal;
for i := 0 to GetArrayLength(TextLabel) - 1 do
TextLabel[i].Free;
SetArrayLength(TextLabel,0);
for i := 0 to GetArrayLength(URLFocusImg) - 1 do
URLFocusImg[i].Free;
SetArrayLength(URLFocusImg,0);
MessageForm.Release;
end;

View File

@ -0,0 +1,52 @@
[Registry]
#pragma option -e-
#define protected
Root: HKA; Subkey: "Software\Classes\Applications\pika-{#MAJOR}.{#MINOR}.exe"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\Applications\pika-{#MAJOR}.{#MINOR}.exe"; ValueType: string; ValueName: "FriendlyAppName"; ValueData: "PIKA"
Root: HKA; Subkey: "Software\Classes\Applications\pika-{#MAJOR}.{#MINOR}.exe\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\pika-{#MAJOR}.{#MINOR}.exe,1"
Root: HKA; Subkey: "Software\Classes\Applications\pika-{#MAJOR}.{#MINOR}.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\pika-{#MAJOR}.{#MINOR}.exe"" ""%1"""
Root: HKA; Subkey: "Software\PIKA {#MAJOR}.{#MINOR}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\PIKA {#MAJOR}.{#MINOR}\Capabilities"; ValueType: string; ValueName: "ApplicationName"; ValueData: "PIKA"
Root: HKA; Subkey: "Software\PIKA {#MAJOR}.{#MINOR}\Capabilities"; ValueType: string; ValueName: "ApplicationIcon"; ValueData: "{app}\bin\pika-{#MAJOR}.{#MINOR}.exe,0"
Root: HKA; Subkey: "Software\PIKA {#MAJOR}.{#MINOR}\Capabilities"; ValueType: string; ValueName: "ApplicationDescription"; ValueData: "PIKA is a free raster graphics editor used for image retouching and editing, free-form drawing, converting between different image formats, and more specialized tasks."
Root: HKA; Subkey: "Software\RegisteredApplications"; ValueType: string; ValueName: "PIKA {#MAJOR}.{#MINOR}"; ValueData: "Software\PIKA {#MAJOR}.{#MINOR}\Capabilities"; Flags: uninsdeletevalue
#define FileHandle
#define FileLine
#define Line=0
#sub ProcessAssociation
#if !defined(Finished)
#if Copy(FileLine,1,1)=="#" || FileLine==""
//skip comments and empty lines
#else
#pragma message "Processing associations.list: " + FileLine
;
Root: HKA; Subkey: "Software\Classes\.{#FileLine}\OpenWithProgids"; ValueType: string; ValueName: "PIKA2.{#FileLine}"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\PIKA2.{#FileLine}"; ValueType: string; ValueName: ""; ValueData: "PIKA {#ICON_VERSION}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\PIKA2.{#FileLine}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\pika-{#MAJOR}.{#MINOR}.exe,1"
Root: HKA; Subkey: "Software\Classes\PIKA2.{#FileLine}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\pika-{#MAJOR}.{#MINOR}.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\pika-{#MAJOR}.{#MINOR}.exe\SupportedTypes"; ValueType: string; ValueName: ".{#FileLine}"; ValueData: ""
Root: HKA; Subkey: "Software\PIKA {#MAJOR}.{#MINOR}\Capabilities\FileAssociations"; ValueType: string; ValueName: ".{#FileLine}"; ValueData: "PIKA2.{#FileLine}"
#endif
#endif
#endsub
#for {FileHandle = FileOpen(AddBackslash(SourcePath)+"associations.list"); \
FileHandle && !FileEof(FileHandle); FileLine = FileRead(FileHandle)} \
ProcessAssociation
#if FileHandle
#expr FileClose(FileHandle)
#endif
;special case for .ico files
Root: HKA; Subkey: "Software\Classes\.ico\OpenWithProgids"; ValueType: string; ValueName: "PIKA2.ico"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\PIKA2.ico"; ValueType: string; ValueName: ""; ValueData: "PIKA {#ICON_VERSION}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\PIKA2.ico\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "%1"
Root: HKA; Subkey: "Software\Classes\PIKA2.ico\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\pika-{#MAJOR}.{#MINOR}.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\pika-{#MAJOR}.{#MINOR}.exe\SupportedTypes"; ValueType: string; ValueName: ".ico"; ValueData: ""
Root: HKA; Subkey: "Software\PIKA {#MAJOR}.{#MINOR}\Capabilities\FileAssociations"; ValueType: string; ValueName: ".ico"; ValueData: "PIKA2.{#FileLine}"

View File

@ -0,0 +1,80 @@
xcf
ani
avif
bmp
dds
g3
cel
cur
dcm
dcx
dicom
exr
gif
heif
heic
icns
jp2
j2k
j2c
jpc
jxl
pcx
pcc
pdf
png
pnm
ppm
pgm
pbm
pfm
pam
ps
eps
psp
tub
pspimage
im1
im8
im24
im32
rs
ras
svg
tga
vda
icb
vst
tif
tiff
webp
wmf
apm
xpm
xwd
fit
fits
fli
flc
jpg
jpeg
jpe
psd
sgi
rgb
rgba
bw
icon
pix
matte
mask
alpha
als
xbm
ora
qoi
wbmp
acbm
iff
ilbm
lbm

View File

@ -0,0 +1,50 @@
@echo off
if [%1]==[] goto help
if [%2]==[] goto help
if [%3]==[] goto help
if [%4]==[] goto help
if [%5]==[] goto help
if [%6]==[] goto help
if [%7]==[] goto help
set VER=%~1
set PIKA_BASE=%~2
set PIKA32=%~3
set PIKA64=%~4
set DEPS_BASE=%~5
set DEPS32=%~6
set DEPS64=%~7
if [%INNOPATH%]==[] (
FOR /F "usebackq tokens=5,* skip=2" %%A IN (`REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 6_is1" /v "Inno Setup: App Path" /reg:32`) DO set INNOPATH=%%B
) else (if [%INNOPATH%]==[] (
FOR /F "usebackq tokens=5,* skip=2" %%A IN (`REG QUERY "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 6_is1" /v "Inno Setup: App Path" /reg:32`) DO set INNOPATH=%%B
))
if not exist "%INNOPATH%\iscc.exe" goto noinno
::i'd use %*, but shift has no effect on it
shift
shift
shift
shift
shift
shift
shift
set PARAMS=
:doparams
if "%1"=="" goto paramsdone
set PARAMS=%PARAMS% %1
shift
goto doparams
:paramsdone
"%INNOPATH%\iscc.exe" -DVERSION="%VER%" -DPIKA_DIR="%PIKA_BASE%" -DDIR32="%PIKA32%" -DDIR64="%PIKA64%" -DDEPS_DIR="%DEPS_BASE%" -DDDIR32="%DEPS32%" -DDDIR64="%DEPS64%" -DDEBUG_SYMBOLS -DPYTHON -DLUA %PARAMS% pika3264.iss
goto :eof
:help
echo Usage: %~n0%~x0 ver.si.on pika_base_dir pika_x86_dir pika_x64_dir deps_base_dir deps_x86_dir deps_x64_dir [iscc_parameters]
echo Example: %~n0%~x0 2.9.4 X:\pika-output\2.9-dev x86 x64 x:\pika-deps x86 x64 -DPYTHON -DDEBUG_SYMBOLS
goto :eof
:noinno
echo Inno Setup path could not be read from Registry - install Inno Setup or set INNOPATH environment variable pointing at it's
echo install directory
goto :eof

View File

@ -0,0 +1,36 @@
;allow specific configuration files to be overridden by files in a specific directory
#if 0
[Files]
#endif
#define FindHandle
#define FindResult
#sub ProcessConfigFile
#define FileName FindGetFileName(FindHandle)
Source: "{code:GetExternalConfDir}\{#FileName}"; DestDir: "{app}\{#ConfigDir}"; Flags: external restartreplace; Check: CheckExternalConf('{#FileName}')
#if BaseDir != PIKA_DIR32
Source: "{code:GetExternalConfDir}\{#FileName}"; DestDir: "{app}\32\{#ConfigDir}"; Components: pika32on64; Flags: external restartreplace; Check: CheckExternalConf('{#FileName}')
#endif
#endsub
#sub ProcessConfigDir
#emit ';; ' + ConfigDir
#emit ';; ' + BaseDir
#for {FindHandle = FindResult = FindFirst(AddBackslash(BaseDir) + AddBackSlash(ConfigDir) + "*", 0); \
FindResult; FindResult = FindNext(FindHandle)} ProcessConfigFile
#if FindHandle
#expr FindClose(FindHandle)
#endif
#endsub
#define public BaseDir PIKA_DIR32
#define public ConfigDir "etc\pika\2.0"
#expr ProcessConfigDir
#define public BaseDir DEPS_DIR32
#define public ConfigDir "etc\gtk-2.0"
#expr ProcessConfigDir
#define public ConfigDir "etc\fonts"
#expr ProcessConfigDir

View File

@ -0,0 +1,61 @@
//directories to source files from
#if !defined(VERSION)
#error "VERSION must be defined"
#endif
#define public
#if !defined(VER_DIR)
#if defined(REVISION)
#define VER_DIR VERSION + "-" + REVISION
#else
#define VER_DIR VERSION
#endif
#endif
#ifndef DIR32
#define DIR32 "i686-w64-mingw32"
#endif
#ifndef DIR64
#define DIR64 "x86_64-w64-mingw32"
#endif
#ifndef PIKA_DIR
#define PIKA_DIR "N:\pika\output\" + VER_DIR
#endif
#ifndef DEPS_DIR
#define DEPS_DIR "N:\pika\deps"
#endif
//32-bit PIKA base directory (result of make install)
#ifndef PIKA_DIR32
#define PIKA_DIR32 PIKA_DIR + "\" + DIR32
#endif
//64-bit PIKA base directory (result of make install)
#ifndef PIKA_DIR64
#define PIKA_DIR64 PIKA_DIR + "\" + DIR64
#endif
#ifndef DDIR32
#define DDIR32 DIR32
#endif
#ifndef DDIR64
#define DDIR64 DIR64
#endif
//32-bit dependencies directory
#ifndef DEPS_DIR32
#define DEPS_DIR32 DEPS_DIR + "\" + DDIR32
#endif
//64-bit dependencies directory
#ifndef DEPS_DIR64
#define DEPS_DIR64 DEPS_DIR + "\" + DDIR64
#endif
#ifdef PYTHON
//python source directory
#ifndef PY_DIR
#define PY_DIR "N:\common\python2.7"
#endif
#endif

View File

@ -0,0 +1,60 @@
#if 0
[Files]
#endif
#if PLATFORM==32
#define DIR DIR32
#define DDIR DDIR32
#elif PLATFORM==64
#define DIR DIR64
#define DDIR DDIR64
#else
#error "Unknown PLATFORM:" + PLATFORM
#endif
Source: "{#PIKA_DIR}\{#DIR}\*.dll"; DestDir: "{app}"; Components: pika{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#PIKA_DIR}\{#DIR}\*.exe"; DestDir: "{app}"; Excludes: "\lib\pika\{#DIR_VER}\plug-ins\twain\twain.exe,\lib\pika\{#DIR_VER}\plug-ins\file-ps\file-ps.exe,\bin\pika.exe,\bin\pika-console.exe"; Components: pika{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
#ifdef DEBUG_SYMBOLS
Source: "{#PIKA_DIR}\{#DIR}\*.debug"; DestDir: "{app}"; Components: pika{#PLATFORM} and debug; Flags: recursesubdirs restartreplace uninsrestartdelete ignoreversion
#endif
Source: "{#PIKA_DIR}\{#DIR}\lib\pika\{#DIR_VER}\extensions\*.*"; Excludes: "*.debug"; DestDir: "{app}\lib\pika\{#DIR_VER}\extensions"; Components: pika{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
#ifdef DEBUG_SYMBOLS
Source: "{#PIKA_DIR}\{#DIR}\lib\pika\{#DIR_VER}\extensions\*.debug"; DestDir: "{app}\lib\pika\{#DIR_VER}\extensions"; Components: pika{#PLATFORM} and debug; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
#endif
Source: "{#PIKA_DIR}\{#DIR}\lib\pika\{#DIR_VER}\plug-ins\file-ps\file-ps.exe"; DestDir: "{app}\lib\pika\{#DIR_VER}\plug-ins\file-ps"; Components: gs and pika{#PLATFORM}; Flags: restartreplace ignoreversion uninsrestartdelete
Source: "{#PIKA_DIR}\{#DIR}\lib\girepository-1.0\*.*"; DestDir: "{app}\lib\girepository-1.0"; Components: pika{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\lib\girepository-1.0\*.*"; DestDir: "{app}\lib\girepository-1.0"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\bin\*.dll"; DestDir: "{app}\bin"; Excludes: "\bin\libgs*.dll,\bin\lua*.dll"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\bin\libgs*.dll"; DestDir: "{app}\bin"; Components: gs and deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
#ifdef DEBUG_SYMBOLS
Source: "{#DEPS_DIR}\{#DDIR}\bin\.debug\*.dll.debug"; DestDir: "{app}\bin\.debug"; Components: deps{#PLATFORM} and debug; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete skipifsourcedoesntexist
Source: "{#DEPS_DIR}\{#DDIR}\lib\*.debug"; DestDir: "{app}\lib"; Components: deps{#PLATFORM} and debug; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete skipifsourcedoesntexist
#endif
Source: "{#DEPS_DIR}\{#DDIR}\bin\gspawn-win*.exe"; DestDir: "{app}\bin"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\bin\gdk-pixbuf-query-loaders.exe"; DestDir: "{app}\bin"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\bin\bzip2.exe"; DestDir: "{app}\bin"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace uninsrestartdelete ignoreversion
Source: "{#DEPS_DIR}\{#DDIR}\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache"; DestDir: "{app}\lib\gdk-pixbuf-2.0\2.10.0\"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\lib\babl-0.1\*.dll"; DestDir: "{app}\lib\babl-0.1"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\lib\gdk-pixbuf-2.0\*.dll"; DestDir: "{app}\lib\gdk-pixbuf-2.0"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\lib\gegl-0.4\*.dll"; DestDir: "{app}\lib\gegl-0.4"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\lib\gio\*.dll"; DestDir: "{app}\lib\gio"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
;Source: "{#DEPS_DIR}\{#DDIR}\lib\gtk-3.0\*.dll"; DestDir: "{app}\lib\gtk-3.0"; Components: deps{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
;python scripts
#ifdef PYTHON
Source: "{#DEPS_DIR}\{#DDIR}\bin\python3w.exe"; DestDir: "{app}\bin"; DestName: "pythonw.exe"; Components: py and pika{#PLATFORM}; Flags: restartreplace uninsrestartdelete ignoreversion
Source: "{#DEPS_DIR}\{#DDIR}\bin\python3.exe"; DestDir: "{app}\bin"; DestName: "python.exe"; Components: py and pika{#PLATFORM}; Flags: restartreplace uninsrestartdelete ignoreversion
Source: "{#DEPS_DIR}\{#DDIR}\bin\libpython3.11.dll"; DestDir: "{app}\bin"; Components: py and pika{#PLATFORM}; Flags: restartreplace uninsrestartdelete ignoreversion
Source: "{#DEPS_DIR}\{#DDIR}\lib\python3.11\*"; DestDir: "{app}\lib\python3.11"; Components: py and pika{#PLATFORM}; Flags: recursesubdirs restartreplace uninsrestartdelete ignoreversion
#endif
#ifdef LUA
Source: "{#DEPS_DIR}\{#DDIR}\bin\luajit.exe"; DestDir: "{app}\bin"; Components: lua and pika{#PLATFORM}; Flags: restartreplace uninsrestartdelete ignoreversion
Source: "{#DEPS_DIR}\{#DDIR}\bin\lua51.dll"; DestDir: "{app}\bin"; Components: lua and pika{#PLATFORM}; Flags: restartreplace uninsrestartdelete ignoreversion
Source: "{#DEPS_DIR}\{#DDIR}\share\lua\*"; DestDir: "{app}\share\lua"; Components: lua and pika{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\lib\lua\*"; DestDir: "{app}\lib\lua"; Components: lua and pika{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
#endif

View File

@ -0,0 +1,179 @@
{\rtf1\ansi\ansicpg1250\deff0\deflang1060\deflangfe1060{\fonttbl{\f0\fswiss\fprq2\fcharset238 Verdana;}{\f1\fmodern\fprq1\fcharset238 Lucida Console;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\keepn\nowidctlpar\sb100\sa200\qc\b\f0\fs28 GNU GENERAL PUBLIC LICENSE\par
\pard\nowidctlpar\sa60\qc\b0\fs16 Version 3, 29 June 2007\par
\pard\sa60 Copyright \'a9 2007 Free Software Foundation, Inc. <{\field{\*\fldinst{HYPERLINK "http://fsf.org/"}}{\fldrslt{\ul\cf1 http://fsf.org/}}}\f0\fs16 >\par
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.\par
\pard\keepn\nowidctlpar\sb100\sa100\qc\b\fs20 Preamble\par
\pard\nowidctlpar\sa60\b0\fs16 The GNU General Public License is a free, copyleft license for software and other kinds of works.\par
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.\par
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.\par
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.\par
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\par
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.\par
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.\par
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.\par
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.\par
The precise terms and conditions for copying, distribution and modification follow.\par
\pard\keepn\nowidctlpar\sb100\sa100\qc\b\fs20 TERMS AND CONDITIONS\par
\pard\keepn\nowidctlpar\sb100\sa100\fs16 0. Definitions.\par
\pard\nowidctlpar\sa60\b0\ldblquote This License\rdblquote refers to version 3 of the GNU General Public License.\par
\ldblquote Copyright\rdblquote also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.\par
\ldblquote The Program\rdblquote refers to any copyrightable work licensed under this License. Each licensee is addressed as \ldblquote you\rdblquote . \ldblquote Licensees\rdblquote and\ldblquote recipients\rdblquote may be individuals or organizations.\par
To \ldblquote modify\rdblquote a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a \ldblquote modified version\rdblquote of the earlier work or a work \ldblquote based on\rdblquote the earlier work.\par
A \ldblquote covered work\rdblquote means either the unmodified Program or a work based on the Program.\par
To \ldblquote propagate\rdblquote a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.\par
To \ldblquote convey\rdblquote a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.\par
An interactive user interface displays \ldblquote Appropriate Legal Notices\rdblquote to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 1. Source Code.\par
\pard\nowidctlpar\sa60\b0 The \ldblquote source code\rdblquote for a work means the preferred form of the work for making modifications to it. \ldblquote Object code\rdblquote means any non-source form of a work.\par
A \ldblquote Standard Interface\rdblquote means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.\par
The \ldblquote System Libraries\rdblquote of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A\ldblquote Major Component\rdblquote , in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.\par
The \ldblquote Corresponding Source\rdblquote for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.\par
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.\par
The Corresponding Source for a work in source code form is that same work.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 2. Basic Permissions.\par
\pard\nowidctlpar\sa60\b0 All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.\par
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.\par
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\par
\pard\nowidctlpar\sa60\b0 No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.\par
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 4. Conveying Verbatim Copies.\par
\pard\nowidctlpar\sa60\b0 You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.\par
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 5. Conveying Modified Source Versions.\par
\pard\nowidctlpar\sa60\b0 You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:\par
\pard\nowidctlpar\fi-360\li720\sa60 a)\tab The work must carry prominent notices stating that you modified it, and giving a relevant date. \par
b)\tab The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to \ldblquote keep intact all notices\rdblquote . \par
c)\tab You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. \par
d)\tab If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.\par
\pard\nowidctlpar\sa60 A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an\ldblquote aggregate\rdblquote if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 6. Conveying Non-Source Forms.\par
\pard\nowidctlpar\sa60\b0 You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:\par
\pard\nowidctlpar\fi-360\li720\sa60 a)\tab Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. \par
b)\tab Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. \par
c)\tab Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. \par
d)\tab Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. \par
e)\tab Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.\par
\pard\nowidctlpar\sa60 A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.\par
A \ldblquote User Product\rdblquote is either (1) a \ldblquote consumer product\rdblquote , which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, \ldblquote normally used\rdblquote refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.\par
\ldblquote Installation Information\rdblquote for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.\par
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).\par
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.\par
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 7. Additional Terms.\par
\pard\nowidctlpar\sa60\b0\ldblquote Additional permissions\rdblquote are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.\par
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.\par
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:\par
\pard\nowidctlpar\fi-360\li720\sa60 a)\tab Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or \par
b)\tab Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or \par
c)\tab Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or \par
d)\tab Limiting the use for publicity purposes of names of licensors or authors of the material; or \par
e)\tab Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or \par
f)\tab Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. \par
\pard\nowidctlpar\sa60 All other non-permissive additional terms are considered \ldblquote further restrictions\rdblquote within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.\par
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.\par
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 8. Termination.\par
\pard\nowidctlpar\sa60\b0 You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).\par
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.\par
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.\par
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 9. Acceptance Not Required for Having Copies.\par
\pard\nowidctlpar\sa60\b0 You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 10. Automatic Licensing of Downstream Recipients.\par
\pard\nowidctlpar\sa60\b0 Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.\par
An \ldblquote entity transaction\rdblquote is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.\par
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 11. Patents.\par
\pard\nowidctlpar\sa60\b0 A \ldblquote contributor\rdblquote is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's \ldblquote contributor version\rdblquote .\par
A contributor's \ldblquote essential patent claims\rdblquote are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, \ldblquote control\rdblquote includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.\par
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.\par
In the following three paragraphs, a \ldblquote patent license\rdblquote is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To \ldblquote grant\rdblquote such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.\par
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. \ldblquote Knowingly relying\rdblquote means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.\par
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.\par
A patent license is \ldblquote discriminatory\rdblquote if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.\par
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 12. No Surrender of Others' Freedom.\par
\pard\nowidctlpar\sa60\b0 If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 13. Use with the GNU Affero General Public License.\par
\pard\nowidctlpar\sa60\b0 Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 14. Revised Versions of this License.\par
\pard\nowidctlpar\sa60\b0 The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.\par
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License \ldblquote or any later version\rdblquote applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.\par
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.\par
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 15. Disclaimer of Warranty.\par
\pard\nowidctlpar\sa60\b0 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \ldblquote AS IS\rdblquote WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 16. Limitation of Liability.\par
\pard\nowidctlpar\sa60\b0 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\par
\pard\keepn\nowidctlpar\sb100\sa100\b 17. Interpretation of Sections 15 and 16.\par
\pard\nowidctlpar\sa120\b0 If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.\par
\pard\nowidctlpar\sb120\sa120\qc END OF TERMS AND CONDITIONS\par
\pard\keepn\nowidctlpar\sb100\sa100\qc\b\fs20 How to Apply These Terms to Your New Programs\fs16\par
\pard\nowidctlpar\sa60\b0 If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.\par
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the \ldblquote copyright\rdblquote line and a pointer to where the full notice is found.\par
\pard\nowidctlpar\li454\sb120\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631\f1 <one line to give the program's name and a brief idea of what it does.>\par
\pard\nowidctlpar\li454\sl480\slmult1\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 Copyright (C) <year> <name of author>\par
\pard\nowidctlpar\li454\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 This program is free software: you can redistribute it and/or modify\par
it under the terms of the GNU General Public License as published by\par
the Free Software Foundation, either version 3 of the License, or\par
\pard\nowidctlpar\li454\sl480\slmult1\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 (at your option) any later version.\par
\pard\nowidctlpar\li454\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 This program is distributed in the hope that it will be useful,\par
but WITHOUT ANY WARRANTY; without even the implied warranty of\par
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\par
\pard\nowidctlpar\li454\sl480\slmult1\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 GNU General Public License for more details.\par
\pard\nowidctlpar\li454\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 You should have received a copy of the GNU General Public License\par
\pard\li454\sa120\sl240\slmult1 along with this program. If not, see <{\field{\*\fldinst{HYPERLINK "https://www.gnu.org/licenses/"}}{\fldrslt{\ul\cf1 https://www.gnu.org/licenses/}}}\f1\fs16 >.\par
\pard\nowidctlpar\sa60\f0 Also add information on how to contact you by electronic and paper mail.\par
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:\par
\pard\nowidctlpar\li454\sb120\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631\f1 <program> Copyright (C) <year> <name of author>\par
\pard\nowidctlpar\li454\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\par
This is free software, and you are welcome to redistribute it\par
\pard\nowidctlpar\li454\sa120\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 under certain conditions; type `show c' for details.\par
\pard\nowidctlpar\sa60\f0 The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an \ldblquote about box\rdblquote .\par
\pard You should also get your employer (if you work as a programmer) or school, if any, to sign a \ldblquote copyright disclaimer\rdblquote for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <{\field{\*\fldinst{HYPERLINK "https://www.gnu.org/licenses/"}}{\fldrslt{\ul\cf1 https://www.gnu.org/licenses/}}}\f0\fs16 >.\par
\pard\sa200\sl240\slmult1 The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <{\field{\*\fldinst{HYPERLINK "http://www.gnu.org/philosophy/why-not-lgpl.html"}}{\fldrslt{\ul\cf1 http://www.gnu.org/philosophy/why-not-lgpl.html}}}\f0\fs16 >.\par
\pard\nowidctlpar\qj\f1\fs12 PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2\par
\pard\nowidctlpar\sa120\qj --------------------------------------------\par
\pard\nowidctlpar\qj 1. This LICENSE AGREEMENT is between the Python Software Foundation\par
("PSF"), and the Individual or Organization ("Licensee") accessing and\par
otherwise using this software ("Python") in source or binary form and\par
\pard\nowidctlpar\sa120\qj its associated documentation.\par
\pard\nowidctlpar\qj 2. Subject to the terms and conditions of this License Agreement, PSF\par
hereby grants Licensee a nonexclusive, royalty-free, world-wide\par
license to reproduce, analyze, test, perform and/or display publicly,\par
prepare derivative works, distribute, and otherwise use Python\par
alone or in any derivative version, provided, however, that PSF's\par
License Agreement and PSF's notice of copyright, i.e., "Copyright (c)\par
2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation; All Rights\par
Reserved" are retained in Python alone or in any derivative version \par
\pard\nowidctlpar\sa120\qj prepared by Licensee.\par
\pard\nowidctlpar\qj 3. In the event Licensee prepares a derivative work that is based on\par
or incorporates Python or any part thereof, and wants to make\par
the derivative work available to others as provided herein, then\par
Licensee hereby agrees to include in any such work a brief summary of\par
\pard\nowidctlpar\sa120\qj the changes made to Python.\par
\pard\nowidctlpar\qj 4. PSF is making Python available to Licensee on an "AS IS"\par
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\par
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND\par
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\par
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT\par
\pard\nowidctlpar\sa120\qj INFRINGE ANY THIRD PARTY RIGHTS.\par
\pard\nowidctlpar\qj 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON\par
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS\par
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,\par
\pard\nowidctlpar\sa120\qj OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\par
\pard\nowidctlpar\qj 6. This License Agreement will automatically terminate upon a material\par
\pard\nowidctlpar\sa120\qj breach of its terms and conditions.\par
\pard\nowidctlpar\qj 7. Nothing in this License Agreement shall be deemed to create any\par
relationship of agency, partnership, or joint venture between PSF and\par
Licensee. This License Agreement does not grant permission to use PSF\par
trademarks or trade name in a trademark sense to endorse or promote\par
\pard\nowidctlpar\sa120\qj products or services of Licensee, or any third party.\par
\pard\nowidctlpar\qj 8. By copying, installing or otherwise using Python, Licensee\par
agrees to be bound by the terms and conditions of this License\par
Agreement.\fs15\par
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 KiB

View File

@ -0,0 +1,3 @@
#!/bin/bash
sed "1s/^/\xEF\xBB\xBF/" "$1" > "$2"

View File

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"
xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0">
<its:translateRule selector="/pika-ms-installer-config" translate="no"/>
<its:translateRule selector="//value" translate="yes"/>
<gt:escapeRule selector="//value" escape="no"/>
</its:rules>

View File

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<locatingRules>
<locatingRule name="PikaMsInstallerConfig" pattern="*.xml">
<documentRule localName="pika-ms-installer-config" target="pika-ms-installer-config.its"/>
</locatingRule>
</locatingRules>

View File

@ -0,0 +1,132 @@
# First we use the XML file to be able to do gettext translation
ms_installer_config_xml = i18n.merge_file(
input : 'setup.isl.xml.in',
output: '@BASENAME@',
data_dirs: meson.current_source_dir(),
po_dir: po_windows_installer_dir,
install: false,
)
languages = [
{ 'code': 'bg', },
{ 'code': 'ca', },
{ 'code': 'cs', },
{ 'code': 'da', },
{ 'code': 'de', },
{ 'code': 'el', },
{ 'code': 'en', 'default': true, },
{ 'code': 'en_GB', },
{ 'code': 'eo', },
{ 'code': 'es', },
{ 'code': 'eu', },
{ 'code': 'fi', },
{ 'code': 'fr', },
{ 'code': 'gl', },
{ 'code': 'he', },
{ 'code': 'hu', },
{ 'code': 'id', },
{ 'code': 'is', },
{ 'code': 'it', },
{ 'code': 'ja', },
{ 'code': 'ka', },
{ 'code': 'kab', 'langname': 'Taqbaylit' },
{ 'code': 'ko', },
{ 'code': 'lt', },
{ 'code': 'lv', },
{ 'code': 'mr', },
{ 'code': 'ms', },
{ 'code': 'nl', },
{ 'code': 'pl', },
{ 'code': 'pt', },
{ 'code': 'pt_BR', },
{ 'code': 'ro', },
{ 'code': 'ru', },
{ 'code': 'sk', },
{ 'code': 'sl', },
{ 'code': 'sv', },
{ 'code': 'tr', },
{ 'code': 'uk', },
{ 'code': 'vi', },
{ 'code': 'zh_CN', },
{ 'code': 'zh_TW', },
]
addbom = find_program(meson.current_source_dir() / 'addbom.sh')
# Then, we generate the .isl file for each language using some xsltproc magic
foreach language : languages
lang_code = language.get('code')
if 'default' in language
lang_check = 'value[not(@xml:lang)]'
else
lang_check = 'value[lang(\'@0@\')]'.format(lang_code)
endif
pika_ms_installer_lang_xsl = configure_file(
input: 'pika-ms-installer-config.xsl.in',
output: 'pika-ms-installer-config-@0@.xsl'.format(lang_code),
configuration: { 'LANG_CHECK': lang_check },
)
nobom_setup_isl = '@0@-nobom.setup.isl'.format(lang_code)
nobom_setup_isl_tmp = custom_target(nobom_setup_isl,
input : [ ms_installer_config_xml, pika_ms_installer_lang_xsl ],
output: nobom_setup_isl,
command: [
xsltproc,
'--xinclude',
'--output', '@OUTPUT@',
'@INPUT1@',
'@INPUT0@',
],
build_by_default: true,
)
setup_isl = '@0@.setup.isl'.format(lang_code)
# Inno-Setup absolutely requires a BOM to recognize UTF-8 files.
# Here I am working around 3 issues in meson:
# 1. We can't easily combine commands in meson. So either we combine
# them in an external script, or we run several custom_target(). I do
# a mix of both because custom_target() has too many bugs.
# 2. To concat a BOM to the file, I'd like to simply call this Python
# code:
# 'open("@OUTPUT@", "wb").write(b"\\xEF\\xBB\\xBF" + open("@INPUT@", "rb").read())'
# Unfortunately we can't pass several @INPUT@/@OUTPUT@ in a same arg.
# See: https://github.com/mesonbuild/meson/issues/7696
# 3. Antislashes are replaced with slashes in custom_target(). I tried
# some weird trick encoding a string to UTF-8 instead of using the
# well known BOM bytes directly. Unfortunately result was not
# consistent on all platforms (at least Linux and Windows).
# See https://github.com/mesonbuild/meson/issues/1564
custom_target(setup_isl,
input : [ nobom_setup_isl_tmp, 'addbom.sh' ],
output: [ setup_isl ],
command: [
addbom, '@INPUT0@', '@OUTPUT@'
],
build_by_default: true,
)
if 'langname' in language
# Some languages may have no default language file provided by
# InnoSetup. When this happens, we must at least complete a very
# basic file showing the language name, otherwise it shows as
# "English".
newlang_isl = '@0@.isl'.format(language.get('code'))
newlang_conf = configuration_data()
newlang_conf.set('LANGNAME', language.get('langname'))
configure_file(
input : 'newlang.isl.in',
output : newlang_isl,
configuration : newlang_conf
)
endif
endforeach
test('windows-installer-langs',
find_program('test-installer-langs.sh'),
env: [
'PIKA_TESTING_ABS_TOP_SRCDIR=' + meson.project_source_root(),
],
suite: 'build')

View File

@ -0,0 +1,15 @@
; A template to create the basic lang file for languages which are not
; made available by InnoSetup, not even in the Unofficial/ folder.
; See full list of languages:
; https://github.com/jrsoftware/issrc/tree/main/Files/Languages
;
; Without this, they show as English in the
; start list so we must add a language name (localized preferably) at
; the very least.
; See also the docs for the meanings of different fields:
; https://jrsoftware.org/ishelp/index.php?topic=langoptionssection
[LangOptions]
LanguageName=@LANGNAME@
LanguageID=$0
LanguageCodePage=0

View File

@ -0,0 +1,37 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:apply-templates select="pika-ms-installer-config" />
</xsl:template>
<xsl:template match="pika-ms-installer-config">
<xsl:apply-templates select="section" />
</xsl:template>
<xsl:template match="section">[<xsl:value-of select="@name"/>]
<xsl:apply-templates select="config" />
<xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template match="config">
<xsl:value-of select="@name"/>=<xsl:value-of select="."/>
<xsl:apply-templates select="@LANG_CHECK@" />
<xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template match="config">
<xsl:choose>
<xsl:when test="@LANG_CHECK@">
<xsl:value-of select="@name"/>=<xsl:apply-templates select="@LANG_CHECK@" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>=<xsl:apply-templates select="value[not(@xml:lang)]" />
</xsl:otherwise>
</xsl:choose>
<xsl:text>&#xA;</xsl:text>
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,326 @@
<?xml version='1.0' encoding='UTF-8'?>
<pika-ms-installer-config>
<section name="Messages">
<!-- InfoBefore page is used instead of license page because the GPL only concerns distribution, not use, and as such doesn't have to be accepted -->
<config name="WizardInfoBefore">
<value>License Agreement</value>
</config>
<config name="AboutSetupNote">
<value>Setup built by Jernej Simonèiè, jernej-pika@ena.si</value>
</config>
<config name="WinVersionTooLowError">
<value>This version of PIKA requires Windows 7, or a newer version of Windows.</value>
</config>
<config name="WindowsVersionNotSupported">
<value>This version of PIKA requires Windows 7, or a newer version of Windows.</value>
</config>
</section>
<section name="CustomMessages">
<!-- Shown before the wizard starts on development versions of PIKA -->
<config name="DevelopmentWarningTitle">
<value>Development version</value>
</config>
<!-- Shown before the wizard starts on development versions of PIKA -->
<config name="DevelopmentWarning">
<value>This is a development version of PIKA where some features may not be finished, or it may be unstable.%nThis version of PIKA is not intended for day-to-day work as it may be unstable, and you could lose your work.%nIf you encounter any problems, first verify that they haven't already been fixed in GIT before you contact the developers or report it in PIKA gitlab:%n_https://gitlab.gnome.org/GNOME/pika/issues%n%nDo you wish to continue with installation anyway?</value>
</config>
<config name="DevelopmentButtonContinue">
<value>&amp;Continue</value>
</config>
<config name="DevelopmentButtonExit">
<value>Exit</value>
</config>
<!--
<config name="XPSP3Recommended">
<value>Warning: you are running an unsupported version of Windows. Please update to at least Windows XP with Service Pack 3 before reporting any problems.</value>
</config>
-->
<config name="SSERequired">
<value>This version of PIKA requires a processor that supports SSE instructions.</value>
</config>
<config name="Require32BPPTitle">
<value>Display settings problem</value>
</config>
<config name="Require32BPP">
<value>Setup has detected that your Windows is not running in 32 bits-per-pixel display mode. This has been known to cause stability problems with PIKA, so it's recommended to change the display colour depth to 32BPP before continuing.</value>
</config>
<config name="Require32BPPContinue">
<value>&amp;Continue</value>
</config>
<config name="Require32BPPExit">
<value>E&amp;xit</value>
</config>
<config name="InstallOrCustomize">
<value>PIKA is now ready to be installed. Click the Install now button to install using the default settings, or click the Customize button if you'd like to have more control over what gets installed.</value>
</config>
<config name="Install">
<value>&amp;Install</value>
</config>
<config name="Customize">
<value>&amp;Customize</value>
</config>
<!-- Setup types -->
<config name="TypeCompact">
<value>Compact installation</value>
</config>
<!-- Setup types -->
<config name="TypeCustom">
<value>Custom installation</value>
</config>
<!-- Setup types -->
<config name="TypeFull">
<value>Full installation</value>
</config>
<!-- Text above component description -->
<config name="ComponentsDescription">
<value>Description</value>
</config>
<!-- Components -->
<config name="ComponentsPika">
<value>PIKA</value>
</config>
<!-- Components -->
<config name="ComponentsPikaDescription">
<value>PIKA and all default plug-ins</value>
</config>
<!-- Components -->
<config name="ComponentsDeps">
<value>Run-time libraries</value>
</config>
<!-- Components -->
<config name="ComponentsDepsDescription">
<value>Run-time libraries used by PIKA, including GTK Run-time Environment</value>
</config>
<!-- Components -->
<config name="ComponentsDebug">
<value>Debug symbols</value>
</config>
<!-- Components -->
<config name="ComponentsDebugDescription">
<value>Include information to help with debugging PIKA</value>
</config>
<!-- Components -->
<config name="ComponentsGtkWimp">
<value>MS-Windows engine for GTK</value>
</config>
<!-- Components -->
<config name="ComponentsGtkWimpDescription">
<value>Native Windows look for PIKA</value>
</config>
<!-- Components -->
<config name="ComponentsCompat">
<value>Support for old plug-ins</value>
</config>
<!-- Components -->
<config name="ComponentsCompatDescription">
<value>Install libraries needed by old third-party plug-ins</value>
</config>
<!-- Components -->
<config name="ComponentsTranslations">
<value>Translations</value>
</config>
<!-- Components -->
<config name="ComponentsTranslationsDescription">
<value>Translations</value>
</config>
<!-- Components -->
<config name="ComponentsPython">
<value>Python scripting</value>
</config>
<!-- Components -->
<config name="ComponentsPythonDescription">
<value>Allows you to use PIKA plugins written in Python scripting language.</value>
</config>
<!-- Components -->
<config name="ComponentsLua">
<value>Lua scripting</value>
</config>
<!-- Components -->
<config name="ComponentsLuaDescription">
<value>Allows you to use PIKA plugins written in Lua scripting language.</value>
</config>
<!-- Components -->
<config name="ComponentsMyPaint">
<value>MyPaint brushes</value>
</config>
<!-- Components -->
<config name="ComponentsMyPaintDescription">
<value>Install the default set of MyPaint brushes</value>
</config>
<!-- Components -->
<config name="ComponentsGhostscript">
<value>PostScript support</value>
</config>
<!-- Components -->
<config name="ComponentsGhostscriptDescription">
<value>Allow PIKA to load PostScript files</value>
</config>
<!-- Components, only when installing on x64 Windows -->
<config name="ComponentsPika32">
<value>Support for 32-bit plug-ins</value>
</config>
<!-- Compoments, only when installing on x64 Windows -->
<config name="ComponentsPika32Description">
<value>Include files necessary for using 32-bit plug-ins.%nRequired for Python support.</value>
</config>
<!-- Additional installation tasks -->
<config name="AdditionalIcons">
<value>Additional icons:</value>
</config>
<!-- Additional installation tasks -->
<config name="AdditionalIconsDesktop">
<value>Create a &amp;desktop icon</value>
</config>
<!-- Additional installation tasks -->
<config name="AdditionalIconsQuickLaunch">
<value>Create a &amp;Quick Launch icon</value>
</config>
<config name="RemoveOldPIKA">
<value>Remove previous PIKA version</value>
</config>
<!-- %1 is replaced by file name; this message should never appear (unless user runs out of disk space at the exact right moment) -->
<config name="ErrorChangingEnviron">
<value>There was a problem updating PIKA's environment in %1. If you get any errors loading the plug-ins, try uninstalling and re-installing PIKA.</value>
</config>
<!-- This message should never appear (unless user runs out of disk space at the exact right moment) -->
<config name="ErrorExtractingTemp">
<value>Error extracting temporary data.</value>
</config>
<!-- This message should never appear (unless user runs out of disk space at the exact right moment) -->
<config name="ErrorUpdatingPython">
<value>Error updating Python interpreter info.</value>
</config>
<!-- This message should never appear (unless user runs out of disk space at the exact right moment) -->
<config name="ErrorUpdatingMyPaint">
<value>Error updating MyPaint brushes info.</value>
</config>
<!-- %1 is replaced by file name; this message should never appear (unless user runs out of disk space at the exact right moment) -->
<config name="ErrorReadingPikaRC">
<value>There was an error updating %1.</value>
</config>
<!-- %1 is replaced by file name; this message should never appear (unless user runs out of disk space at the exact right moment) -->
<config name="ErrorUpdatingPikaRC">
<value>There was an error updating PIKA's configuration file %1.</value>
</config>
<!-- Displayed in Explorer's right-click menu -->
<config name="OpenWithPika">
<value>Edit with PIKA</value>
</config>
<!-- File associations page -->
<config name="SelectAssociationsCaption">
<value>Select file associations</value>
</config>
<!-- File associations page -->
<config name="SelectAssociationsExtensions">
<value>Extensions:</value>
</config>
<!-- File associations page -->
<config name="SelectAssociationsInfo1">
<value>Select the file types you wish to associate with PIKA</value>
</config>
<!-- File associations page -->
<config name="SelectAssociationsInfo2">
<value>This will make selected files open in PIKA when you double-click them in Explorer.</value>
</config>
<!-- File associations page -->
<config name="SelectAssociationsSelectAll">
<value>Select &amp;All</value>
</config>
<!-- File associations page -->
<config name="SelectAssociationsUnselectAll">
<value>Unselect &amp;All</value>
</config>
<!-- File associations page -->
<config name="SelectAssociationsSelectUnused">
<value>Select &amp;Unused</value>
</config>
<!-- Shown on summary screen just before starting the install -->
<config name="ReadyMemoAssociations">
<value>File types to associate with PIKA:</value>
</config>
<config name="RemovingOldVersion">
<value>Removing previous version of PIKA:</value>
</config>
<!-- %1 = version, %2 = installation directory; ran uninstaller, but it returned an error, or didn't remove everything -->
<config name="RemovingOldVersionFailed">
<value>PIKA %1 cannot be installed over your currently installed PIKA version, and the automatic uninstall of old version has failed.%n%nPlease remove the previous version of PIKA yourself before installing this version in %2, or choose a Custom install, and select a different installation folder.%n%nThe Setup will now exit.</value>
</config>
<!-- %1 = version, %2 = installation directory; couldn't find an uninstaller, or found several uninstallers -->
<config name="RemovingOldVersionCantUninstall">
<value>PIKA %1 cannot be installed over your currently installed PIKA version, and Setup couldn't determine how to remove the old version automatically.%n%nPlease remove the previous version of PIKA and any add-ons yourself before installing this version in %2, or choose a Custom install, and select a different installation folder.%n%nThe Setup will now exit.</value>
</config>
<config name="RebootRequiredFirst">
<value>Previous PIKA version was removed successfully, but Windows has to be restarted before the Setup can continue.%n%nAfter restarting your computer, Setup will continue next time an administrator logs in.</value>
</config>
<!-- Displayed if restart settings couldn't be read, or if the setup couldn't re-run itself -->
<config name="ErrorRestartingSetup">
<value>There was an error restarting the Setup. (%1)</value>
</config>
<config name="RemovingOldFiles">
<value>Cleaning up old files...</value>
</config>
<!-- Displayed while the files are being extracted; note the capitalisation! -->
<config name="Billboard1">
<value>Remember: PIKA is Free Software.%n%nPlease visit</value>
</config>
<!-- https://heckin.technology/AlderconeStudio/PIKApp (displayed between Billboard1 and Billboard2) -->
<config name="Billboard2">
<value>for free updates.</value>
</config>
<config name="SettingUpAssociations">
<value>Setting up file associations...</value>
</config>
<config name="SettingUpPyPika">
<value>Setting up environment for PIKA Python extension...</value>
</config>
<config name="SettingUpMyPaint">
<value>Setting up MyPaint brushes...</value>
</config>
<config name="SettingUpEnvironment">
<value>Setting up PIKA environment...</value>
</config>
<config name="SettingUpPikaRC">
<value>Setting up PIKA configuration for 32-bit plug-in support...</value>
</config>
<!-- Displayed on last page -->
<config name="LaunchPika">
<value>Launch PIKA</value>
</config>
<!-- Shown during uninstall when removing add-ons -->
<config name="UninstallingAddOnCaption">
<value>Removing add-on</value>
</config>
<config name="InternalError">
<value>Internal error (%1).</value>
</config>
<!-- Used by installer for add-ons (currently only help) -->
<config name="DirNotPika">
<value>PIKA does not appear to be installed in the selected directory. Continue anyway?</value>
</config>
</section>
</pika-ms-installer-config>

View File

@ -0,0 +1,55 @@
#!/bin/sh
# Make sure that the languages specified in the installer match the
# translations present. This check step is necessary to not forget new
# installer translations because we have a manual step.
INSTALLER_LANGS=`grep -rI '^Name:.*MessagesFile' ${PIKA_TESTING_ABS_TOP_SRCDIR}/build/windows/installer/pika3264.iss | \
sed 's/^Name: *"\([a-zA-Z_]*\)".*$/\1/' | sort`
# 'en' doesn't have a gettext file because it is the default.
INSTALLER_LANGS=`echo "$INSTALLER_LANGS" | tr '\n\r' ' ' | sed 's/\<en\> //'`
PO_LANGS=`ls ${PIKA_TESTING_ABS_TOP_SRCDIR}/po-windows-installer/*.po | \
sed 's%.*/po-windows-installer/\([a-zA-Z_]*\).po%\1%' | sort`
PO_LANGS=`echo "$PO_LANGS" | tr '\n\r' ' '`
if [ "$PO_LANGS" != "$INSTALLER_LANGS" ]; then
echo "Error: languages listed in the Windows installer script do not match the .po files in po-windows-installer/."
echo "- PO languages: $PO_LANGS"
echo "- Installer languages: $INSTALLER_LANGS"
echo "Please verify: build/windows/installer/pika3264.iss"
echo "Base language files can be found in: https://github.com/jrsoftware/issrc/tree/main/Files/Languages"
echo "If a new language is in Unofficial/, also edit/download it from:"
echo "build/windows/gitlab-ci/installer-pika-msys2.sh"
exit 1
fi
MESON_LANGS=`grep "'code':" ${PIKA_TESTING_ABS_TOP_SRCDIR}/build/windows/installer/lang/meson.build | \
sed "s/^.*'code': *'\([^']*\)'.*$/\1/" |sort`
MESON_LANGS=`echo "$MESON_LANGS" | tr '\n\r' ' ' | sed 's/\<en\> //'`
if [ "$PO_LANGS" != "$MESON_LANGS" ]; then
echo "Error: languages listed in the meson script do not match the .po files in po-windows-installer/."
echo "- PO languages: $PO_LANGS"
echo "- Meson languages: $MESON_LANGS"
echo "Please verify: build/windows/installer/lang/meson.build"
exit 1
fi
INSTALLER_LANGS=`grep -rI '^Name:.*MessagesFile.*Unofficial' ${PIKA_TESTING_ABS_TOP_SRCDIR}/build/windows/installer/pika3264.iss | \
sed 's/^.*Unofficial\\\\\([a-zA-Z_.]*\),.*$/\1/' | sort`
INSTALLER_LANGS=`echo "$INSTALLER_LANGS" | tr '\n\r' ' '`
PULLED_UNOFFICIAL=`grep '^download_lang [^(]' ${PIKA_TESTING_ABS_TOP_SRCDIR}/build/windows/gitlab-ci/installer-pika-msys2.sh | \
sed 's$^download_lang \([^.]*.isl.\?\)$\1$' | sort`
PULLED_UNOFFICIAL=`echo "$PULLED_UNOFFICIAL" | tr '\n\r' ' '`
if [ "$INSTALLER_LANGS" = "$PULLED_UNOFFICIAL" ]; then
exit 0
else
echo "Error: unofficial languages listed in the Windows installer script do not match the pulled InnoSetup files."
echo "- Pulled files: $PULLED_UNOFFICIAL"
echo "- Installer languages: $INSTALLER_LANGS"
echo "Please verify: build/windows/gitlab-ci/installer-pika-msys2.sh"
exit 1
fi

View File

@ -0,0 +1,41 @@
subdir('lang')
source_splash=meson.project_source_root() + '/data/images/pika-splash.png'
# make PIKA runnable without being installed.
env=environment()
menu_paths=meson.project_build_root() / 'menus:' + meson.project_source_root() / 'menus'
env.set('PIKA_TESTING_MENUS_PATH', menu_paths)
env.set('PIKA_TESTING_PLUGINDIRS', meson.project_build_root() / 'plug-ins:')
env.append('PIKA_TESTING_PLUGINDIRS', meson.project_build_root() / 'plug-ins/python')
env.append('PIKA_TESTING_PLUGINDIRS', meson.project_build_root() / 'plug-ins/common/test-plug-ins/')
env.prepend('GI_TYPELIB_PATH', meson.project_build_root() / 'libpika')
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libpika')
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libpikabase')
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libpikacolor')
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libpikaconfig')
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libpikamath')
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libpikamodule')
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libpikathumb')
env.prepend('LD_LIBRARY_PATH', meson.project_build_root() / 'libpikawidgets')
if enable_console_bin
pika_exe=pikaconsole_exe
else
pika_exe=pikamain_exe
endif
installsplash = custom_target('installsplash-devel.bmp',
input : [ 'splash2installer.py' ],
depend_files: [ source_splash ],
output: [ 'installsplash-devel.bmp', ],
command: [ pika_exe, '-nidfs', source_splash,
'--batch-interpreter', 'python-fu-eval',
'-b', '-', '--quit'],
feed: true,
build_by_default: true,
env: env
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
#if 0
[Code]
#endif
function Quote(const S: String): String;
begin
Result := '"' + S + '"';
end;
function AddParam(const S, P, V: String): String;
begin
if V <> '""' then
Result := S + ' /' + P + '=' + V;
end;
function AddSimpleParam(const S, P: String): String;
begin
Result := S + ' /' + P;
end;
procedure CreateRunOnceEntry;
var RunOnceData, SetupRestartData: String;
i: Integer;
begin
DebugMsg('CreateRunOnceEntry','Preparing for restart');
//RunOnce command-line is limited to 256 characters, so keep it to the bare minimum required to start setup
RunOnceData := Quote(ExpandConstant('{srcexe}')) + ' /resumeinstall=1';
RunOnceData := AddParam(RunOnceData, 'LANG', ExpandConstant('{language}'));
SetupRestartData := Quote(ExpandConstant('{srcexe}')) + ' /resumeinstall=2';
SetupRestartData := AddParam(SetupRestartData, 'LANG', ExpandConstant('{language}'));
SetupRestartData := AddParam(SetupRestartData, 'DIR', Quote(WizardDirValue));
//SetupRestartData := AddParam(SetupRestartData, 'GROUP', Quote(WizardGroupValue));
//if WizardNoIcons then
// SetupRestartData := AddSimpleParam(SetupRestartData, 'NOICONS');
SetupRestartData := AddParam(SetupRestartData, 'TYPE', Quote(WizardSetupType(False)));
SetupRestartData := AddParam(SetupRestartData, 'COMPONENTS', Quote(WizardSelectedComponents(False)));
SetupRestartData := AddParam(SetupRestartData, 'TASKS', Quote(WizardSelectedTasks(False)));
if Force32bitInstall then
SetupRestartData := AddSimpleParam(SetupRestartData, '32');
if ExpandConstant('{param:log|*}') <> '*' then
begin
SetupRestartData := AddParam(SetupRestartData, 'LOG', Quote(ExpandConstant('{param:log|*}')));
end else
begin
for i := 0 to ParamCount() do
if LowerCase(ParamStr(i)) = '/log' then
begin
RunOnceData := AddSimpleParam(RunOnceData,'LOG'); //multiple logs are created in %TEMP% when no filename is given
SetupRestartData := AddSimpleParam(SetupRestartData,'LOG');
break;
end;
end;
DebugMsg('CreateRunOnceEntry','RunOnce: ' + RunOnceData);
RegWriteStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\RunOnce', RunOnceName, RunOnceData);
DebugMsg('CreateRunOnceEntry','RunOnce: ' + SetupRestartData);
RegWriteStringValue(HKLM, 'Software\' + RunOnceName, '', SetupRestartData);
end;
procedure RestartMyself();
var CmdLine: String;
ResultCode: Integer;
begin
DebugMsg('RestartMyself','Continuing install after reboot (reexecuting setup)');
if RegValueExists(HKLM, 'Software\' + RunOnceName, '') then
begin
if RegQueryStringValue(HKLM, 'Software\' + RunOnceName, '', CmdLine) then
begin
RegDeleteKeyIncludingSubkeys(HKLM, 'Software\' + RunOnceName); //clean up
if not Exec('>',CmdLine,'',SW_SHOW,ewNoWait,ResultCode) then //bonus: don't block shell from loading, since RunOnce installer exits immediately
MsgBox(FmtMessage(CustomMessage('ErrorRestartingSetup'),[IntToStr(ResultCode)]), mbError, mb_Ok);
DebugMsg('RestartMyself','Result of running ' + CmdLine + ': ' + IntToStr(ResultCode));
end else
begin
MsgBox(FmtMessage(CustomMessage('ErrorRestartingSetup'),['-2']), mbError, mb_Ok);
DebugMsg('RestartMyself','Error reading HKLM\'+RunOnceName);
end;
end else
begin
MsgBox(FmtMessage(CustomMessage('ErrorRestartingSetup'),['-1']), mbError, mb_Ok);
DebugMsg('RestartMyself','HKLM\'+RunOnceName + ' not found in Registy');
end;
end;
function RestartSetupAfterReboot(): Boolean;
begin
if ExpandConstant('{param:resumeinstall|0}') = '1' then //called from RunOnce
begin
Result := False; //setup will just re-execute itself in this run
RestartMyself();
DebugMsg('RestartSetupAfterReboot','Phase 1 complete, exiting');
exit;
end else
if ExpandConstant('{param:resumeinstall|0}') = '2' then //setup re-executed itself
begin
Result := True;
InstallMode := imRebootContinue;
DebugMsg('RestartSetupAfterReboot','Continuing install after reboot');
end else
begin
Result := True; //normal install
end;
if InstallMode <> imRebootContinue then
if RegValueExists(HKLM, 'Software\Microsoft\Windows\CurrentVersion\RunOnce', RunOnceName) then
begin
DebugMsg('RestartSetupAfterReboot','System must be restarted first');
MsgBox(CustomMessage('RebootRequiredFirst'), mbError, mb_Ok);
Result := False;
end;
end;

View File

@ -0,0 +1,29 @@
[File Associations]
1=PIKA image:XCF
2=Adobe Photoshop(tm) image:PSD
3=Alias|Wavefront PowerAnimator:matte:mask:alpha:als:PIX
4=Compuserve GIF:GIF
5=Corel PaintShopPro image:PSP:PSPIMAGE:TUB
6=Digital Imaging and Communications in Medicine:DICOM:DCM
7=Fax G3 Image file:g3
8=Flexible Image Transport System:fit:fits
9=PIKA brush pipe:gih
10=PIKA brush:gbr:gpb
11=PIKA pattern:pat
12=JPEG image:JPEG:JPG
13=KISS CEL:CEL
14=Netpbm format:pnm:ppm:pgm:pbm
15=Portable Network Graphics:PNG
16=PostScript, Encapsulated PostScript:PS:EPS
17=Scalable Vector Graphics:svg
18=SGI image format:SGI:RGB:BW:ICON
19=SUN Raster Image:ras:im1:im8:im24:im32
20=Tagged Image File:tif:tiff
21=TrueVision Targa:tga
22=Windows and OS/2 Bitmaps:BMP
23=Windows Icon:ICO
24=Windows Metafile:wmf
25=X10 and X11 Bitmap:xbm:icon:bitmap
26=X Pixmap:xpm
27=X Window Dump:xwd
28=ZSoft Paintbrush image:PCX

View File

@ -0,0 +1,38 @@
image = Pika.list_images()[0]
config = Pika.get_pdb().lookup_procedure("file-bmp-save").create_config()
def export_scaled_img(image, target_width, target_height, export_path):
img = image.duplicate()
w = img.get_width()
h = img.get_height()
new_width = target_width
new_height = target_height
offx = 0
offy = 0
if w / target_width * target_height < h:
new_width = target_height / h * w
offx = (target_width - new_width) / 2
else:
new_height = target_width / w * h
offy = (target_height - new_height) / 2
img.scale(new_width, new_height)
img.resize(target_width, target_height, offx, offy)
# XXX: should we rather use the average color as border?
black = Pika.RGB()
black.set(0, 0, 0)
Pika.context_set_background(black)
drawables = img.list_selected_drawables()
for d in drawables:
d.resize_to_image_size()
config.set_property("image", img)
config.set_property("num-drawables", len(drawables))
config.set_property("drawables", Pika.ObjectArray.new(Pika.Drawable, drawables, False))
config.set_property("file", Gio.file_new_for_path(export_path))
Pika.get_pdb().run_procedure_config("file-bmp-save", config)
# These sizes are pretty much hardcoded, and in particular the ratio matters in
# InnoSetup. Or so am I told. XXX
export_scaled_img(image, 994, 692, 'build/windows/installer/installsplash-devel.bmp')
export_scaled_img(image, 497, 360, 'build/windows/installer/installsplash_small-devel.bmp')
export_scaled_img(image, 1160, 803, 'build/windows/installer/installsplash_big-devel.bmp')

View File

@ -0,0 +1,335 @@
#if 0
[Code]
#endif
function SplitRegParams(const pInf: String; var oRootKey: Integer; var oKey,oValue: String): Boolean;
var sRootKey: String;
d: Integer;
begin
Result := False;
d := Pos('/',pInf);
if d = 0 then
begin
DebugMsg('SplitRegParams','Malformed line (missing /): ' + pInf);
exit;
end;
sRootKey := Copy(pInf,1,d - 1);
oKey := Copy(pInf,d + 1,Length(pInf));
if oValue <> 'nil' then
begin
d := RevPos('\',oKey);
if d = 0 then
begin
DebugMsg('SplitRegParams','Malformed line (missing \): ' + pInf);
exit;
end;
oValue := Decode(Copy(oKey,d+1,Length(oKey)));
oKey := Copy(oKey,1,d-1);
end;
DebugMsg('SplitRegParams','Root: '+sRootKey+', Key:'+oKey + ', Value:'+oValue);
case sRootKey of
'HKCR': oRootKey := HKCR;
'HKLM': oRootKey := HKLM;
'HKU': oRootKey := HKU;
'HKCU': oRootKey := HKCU;
else
begin
DebugMsg('SplitRegParams','Unrecognised root key: ' + sRootKey);
exit;
end;
end;
Result := True;
end;
procedure UninstInfRegKey(const pInf: String; const pIfEmpty: Boolean);
var sKey,sVal: String;
iRootKey: Integer;
begin
sVal := 'nil';
if not SplitRegParams(pInf,iRootKey,sKey,sVal) then
exit;
if pIfEmpty then
begin
if not RegDeleteKeyIfEmpty(iRootKey,sKey) then
DebugMsg('UninstInfRegKey','RegDeleteKeyIfEmpty failed');
end
else
begin
if not RegDeleteKeyIncludingSubkeys(iRootKey,sKey) then
DebugMsg('UninstInfRegKey','RegDeleteKeyIncludingSubkeys failed');
end;
end;
procedure UninstInfRegVal(const pInf: String);
var sKey,sVal: String;
iRootKey: Integer;
begin
if not SplitRegParams(pInf,iRootKey,sKey,sVal) then
exit;
if not RegDeleteValue(iRootKey,sKey,sVal) then
DebugMsg('UninstInfREG','RegDeleteKeyIncludingSubkeys failed');
end;
procedure UninstInfFile(const pFile: String);
begin
DebugMsg('UninstInfFile','File: '+pFile);
if not DeleteFile(pFile) then
DebugMsg('UninstInfFile','DeleteFile failed');
end;
procedure UninstInfDir(const pDir: String);
begin
DebugMsg('UninstInfDir','Dir: '+pDir);
if not RemoveDir(pDir) then
DebugMsg('UninstInfDir','RemoveDir failed');
end;
procedure CreateMessageForm(var frmMessage: TForm; const pMessage: String);
var lblMessage: TNewStaticText;
begin
frmMessage := CreateCustomForm();
with frmMessage do
begin
BorderStyle := bsDialog;
ClientWidth := ScaleX(300);
ClientHeight := ScaleY(48);
Caption := CustomMessage('UninstallingAddOnCaption');
Position := poScreenCenter;
BorderIcons := [];
end;
lblMessage := TNewStaticText.Create(frmMessage);
with lblMessage do
begin
Parent := frmMessage;
AutoSize := True;
Caption := pMessage;
Top := (frmMessage.ClientHeight - Height) div 2;
Left := (frmMessage.ClientWidth - Width) div 2;
Visible := True;
end;
frmMessage.Show();
frmMessage.Refresh();
end;
procedure UninstInfRun(const pInf: String);
var Description,Prog,Params: String;
Split, ResultCode, Ctr: Integer;
frmMessage: TForm;
begin
DebugMsg('UninstInfRun',pInf);
Split := Pos('/',pInf);
if Split <> 0 then
begin
Description := Copy(pInf, 1, Split - 1);
Prog := Copy(pInf, Split + 1, Length(pInf));
end else
begin
Prog := pInf;
Description := '';
end;
Split := Pos('/',Prog);
if Split <> 0 then
begin
Params := Copy(Prog, Split + 1, Length(Prog));
Prog := Copy(Prog, 1, Split - 1);
end else
begin
Params := '';
end;
if not UninstallSilent then //can't manipulate uninstaller messages, so create a form instead
CreateMessageForm(frmMessage,Description);
DebugMsg('UninstInfRun','Running: ' + Prog + '; Params: ' + Params);
if Exec(Prog,Params,'',SW_SHOW,ewWaitUntilTerminated,ResultCode) then
begin
DebugMsg('UninstInfRun','Exec result: ' + IntToStr(ResultCode));
Ctr := 0;
while FileExists(Prog) do //wait a few seconds for the uninstaller to be deleted - since this is done by a program
begin //running from a temporary directory, the uninstaller we ran above will exit some time before
Sleep(UNINSTALL_CHECK_TIME); //it's removed from disk
Inc(Ctr);
if Ctr = (UNINSTALL_MAX_WAIT_TIME/UNINSTALL_CHECK_TIME) then //don't wait more than 5 seconds
break;
end;
end else
DebugMsg('UninstInfRun','Exec failed: ' + IntToStr(ResultCode) + ' (' + SysErrorMessage(ResultCode) + ')');
if not UninstallSilent then
frmMessage.Free();
end;
(*
uninst.inf documentation:
- Delete Registry keys (with all subkeys):
RegKey:<RootKey>/<SubKey>
RootKey = HKCR, HKLM, HKCU, HKU
SubKey = subkey to delete (warning: this will delete all keys under subkey, so be very careful with it)
- Delete empty registry keys:
RegKeyEmpty:<RootKey>/<SubKey>
RootKey = HKCR, HKLM, HKCU, HKU
SubKey = subkey to delete if empty
- Delete values from registry:
RegVal:<RootKey>/<SubKey>/Value
RootKey = HKCR, HKLM, HKCU, HKU
SubKey = subkey to delete Value from
Value = value to delete; \ and % must be escaped as %5c and %25
- Delete files:
File:<Path>
Path = full path to file
- Delete empty directories:
Dir:<Path>
- Run program with parameters:
Run:<description>/<path>/<params>
Directives are parsed from the end of the file backwards as the first step of uninstall.
IMPORTANT: From PIKA 2.10.12 onwards (Inno Setup 6 with support for per-user install), Registry keys referring to HKCR will be
processed by the installer as the first step of install (and the entries will be removed from uninst.inf), since file associations
code was rewritten.
*)
procedure ParseUninstInf();
var i,d: Integer;
sWhat: String;
begin
for i := GetArrayLength(asUninstInf) - 1 downto 0 do
begin
DebugMsg('ParseUninstInf',asUninstInf[i]);
if (Length(asUninstInf[i]) = 0) or (asUninstInf[i][1] = '#') then //skip comments and empty lines
continue;
d := Pos(':',asUninstInf[i]);
if d = 0 then
begin
DebugMsg('ParseUninstInf','Malformed line: ' + asUninstInf[i]);
continue;
end;
sWhat := Copy(asUninstInf[i],d+1,Length(asUninstInf[i]));
case Copy(asUninstInf[i],1,d) of
'RegKey:': UninstInfRegKey(sWhat,False);
'RegKeyEmpty:': UninstInfRegKey(sWhat,True);
'RegVal:': UninstInfRegVal(sWhat);
'File:': UninstInfFile(sWhat);
'Dir:': UninstInfDir(sWhat);
'Run:': UninstInfRun(sWhat);
end;
end;
end;
procedure CurUninstallStepChanged(CurStep: TUninstallStep);
begin
DebugMsg('CurUninstallStepChanged','');
case CurStep of
usUninstall:
begin
LoadStringsFromFile(ExpandConstant('{app}\uninst\uninst.inf'),asUninstInf);
ParseUninstInf();
end;
//usPostUninstall:
end;
end;
procedure AssociationsCleanUp();
var i, d, countNew,countUI: Integer;
asTemp, asNew: TArrayOfString;
sKey,sVal: String;
iRootKey: Integer;
begin
if FileExists(ExpandConstant('{app}\uninst\uninst.inf')) then
begin
DebugMsg('AssociationsCleanUp','Parsing old uninst.inf');
LoadStringsFromFile(ExpandConstant('{app}\uninst\uninst.inf'),asTemp);
countNew := 0;
countUI := 0;
SetArrayLength(asNew, GetArrayLength(asTemp));
SetArrayLength(asUninstInf, GetArrayLength(asTemp));
for i := 0 to GetArrayLength(asTemp) - 1 do //extract associations-related entries from uninst.inf
begin
if (Length(asTemp[i]) = 0) or (asTemp[i][1] = '#') then //comment/empty line
begin
asNew[countNew] := asTemp[i];
Inc(countNew);
continue;
end;
d := Pos(':',asTemp[i]);
if d = 0 then //something wrong, ignore
continue;
if Copy(asTemp[i],1,3) = 'Reg' then
begin
sVal := 'nil';
if not SplitRegParams(Copy(asTemp[i], d + 1, Length(asTemp[i])),iRootKey,sKey,sVal) then
continue; //malformed line, ignore
if iRootKey = HKCR then //old association, prepare for cleanup
begin
DebugMsg('AssociationsCleanUp','Preparing for cleanup: '+asTemp[i]);
asUninstInf[countUI] := asTemp[i];
Inc(countUI);
continue;
end;
end;
//something else, keep for new uninst.inf
asNew[countNew] := asTemp[i];
Inc(countNew);
end;
SetArrayLength(asNew, countNew);
SetArrayLength(asUninstInf, countUI);
SaveStringsToUTF8File(ExpandConstant('{app}\uninst\uninst.inf'), asNew, False); //replace uninst.inf with a cleaned one
ParseUninstInf(); //remove old associations
end;
end;

View File

@ -0,0 +1,177 @@
#if 0
[Code]
#endif
procedure DebugMsg(Const pProc,pMsg: String);
begin
Log('[Code] ' + pProc + #9 + pMsg);
end;
function BoolToStr(const b: Boolean): String;
begin
if b then
Result := 'True'
else
Result := 'False';
end;
function RevPos(const SearchStr, Str: string): Integer;
var i: Integer;
begin
if Length(SearchStr) < Length(Str) then
for i := (Length(Str) - Length(SearchStr) + 1) downto 1 do
begin
if Copy(Str, i, Length(SearchStr)) = SearchStr then
begin
Result := i;
exit;
end;
end;
Result := 0;
end;
function Replace(pSearchFor, pReplaceWith, pText: String): String;
begin
StringChangeEx(pText,pSearchFor,pReplaceWith,True);
Result := pText;
end;
function Count(What, Where: String): Integer;
begin
Result := 0;
if Length(What) = 0 then
exit;
while Pos(What,Where)>0 do
begin
Where := Copy(Where,Pos(What,Where)+Length(What),Length(Where));
Result := Result + 1;
end;
end;
//split text to array
procedure Explode(var ADest: TArrayOfString; aText, aSeparator: String);
var tmp: Integer;
begin
if aSeparator='' then
exit;
SetArrayLength(ADest,Count(aSeparator,aText)+1)
tmp := 0;
repeat
if Pos(aSeparator,aText)>0 then
begin
ADest[tmp] := Copy(aText,1,Pos(aSeparator,aText)-1);
aText := Copy(aText,Pos(aSeparator,aText)+Length(aSeparator),Length(aText));
tmp := tmp + 1;
end else
begin
ADest[tmp] := aText;
aText := '';
end;
until Length(aText)=0;
end;
function String2Utf8(const pInput: String): AnsiString;
var Output: AnsiString;
ret, outLen, nulPos: Integer;
begin
outLen := WideCharToMultiByte(CP_UTF8, 0, pInput, -1, Output, 0, 0, 0);
Output := StringOfChar(#0,outLen);
ret := WideCharToMultiByte(CP_UTF8, 0, pInput, -1, Output, outLen, 0, 0);
if ret = 0 then
RaiseException('WideCharToMultiByte failed: ' + IntToStr(GetLastError));
nulPos := Pos(#0,Output) - 1;
if nulPos = -1 then
nulPos := Length(Output);
Result := Copy(Output,1,nulPos);
end;
function Utf82String(const pInput: AnsiString): String;
var Output: AnsiString;
ret, outLen, nulPos: Integer;
begin
outLen := MultiByteToWideChar(CP_UTF8, 0, pInput, -1, Output, 0);
Output := StringOfChar(#0,outLen);
ret := MultiByteToWideChar(CP_UTF8, 0, pInput, -1, Output, outLen);
if ret = 0 then
RaiseException('MultiByteToWideChar failed: ' + IntToStr(GetLastError));
nulPos := Pos(#0,Output) - 1;
if nulPos = -1 then
nulPos := Length(Output);
Result := Copy(Output,1,nulPos);
end;
function SaveStringToUTF8File(const pFileName, pS: String; const pAppend: Boolean): Boolean;
begin
Result := SaveStringToFile(pFileName, String2Utf8(pS), pAppend);
end;
function LoadStringFromUTF8File(const pFileName: String; var oS: String): Boolean;
var Utf8String: AnsiString;
begin
Result := LoadStringFromFile(pFileName, Utf8String);
oS := Utf82String(Utf8String);
end;
procedure StatusLabel(const Status1,Status2: string);
begin
WizardForm.StatusLabel.Caption := Status1;
WizardForm.FilenameLabel.Caption := Status2;
WizardForm.Refresh();
end;
//reverse encoding done by Encode
function Decode(pText: String): String;
var p: Integer;
tmp: String;
begin
if Pos('%',pText) = 0 then
Result := pText
else
begin
Result := '';
while Length(pText) > 0 do
begin
p := Pos('%',pText);
if p = 0 then
begin
Result := Result + pText;
break;
end;
Result := Result + Copy(pText,1,p-1);
tmp := '$' + Copy(pText,p+1,2);
Result := Result + Chr(StrToIntDef(tmp,32));
pText := Copy(pText,p+3,Length(pText));
end;
end;
end;

View File

@ -0,0 +1,26 @@
//set the version string
#define public
#if !Defined(VERSION)
#error "VERSION must be defined"
#endif
#define GTK_VER=GetFileVersion(AddBackslash(DEPS_DIR64) + "bin\libgtk-win32-2.0-0.dll")
#define public
//used in the component list
#define GTK_VERSION=Copy(GTK_VER,1,RPos(".",GTK_VER)-1)
#define MAJOR=Copy(VERSION,1,Pos(".",VERSION)-1)
#define MINOR=Copy(VERSION,Pos(".",VERSION)+1)
#define MICRO=Copy(MINOR,Pos(".",MINOR)+1)
#expr MINOR=Copy(MINOR,1,Pos(".",MINOR)-1)
#if Int(MINOR) % 2 == 1
#define DEVEL="-dev"
#define DIR_VER=MAJOR + "." + MINOR
#else
#define DEVEL=""
#define DIR_VER=MAJOR + ".0"
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -0,0 +1,55 @@
Doing a Simple Build
====================
To begin with, you need to install jhbuild, mingw-w64, and a few other build-related dependencies.
If you're using debian, install these packages:
sudo apt-get install build-essential mingw-w64 git jhbuild automake autoconf libtool libgtk2.0-dev ragel bison flex gperf gtk-doc-tools nasm ruby cmake libxml-simple-perl
From there, in theory, you can simply clone this repo, cd into it, and run:
./build
That will build the development version of the pika.
If you'd rather build the stable version of the pika, run this instead:
MODULE=pika-stable ./build
If you'd like to build with debigging information, run:
BUILD_FLAVOUR=dbg ./build
What if it doesn't work out of the box?
=======================================
I've actually never had that work out of the box, so chances are you'll need to adjust things a bit.
If you get an error along the lines of `no: command not found` while building GTK+, then that means gdk-pixbuf-csource can't be found.
You can fix this by installing your distro's GTK+ 2 development package.
(libgtk2.0-dev on debian)
If you get an error that looks like this while building cairo:
In file included from getline.c:31:0:
cairo-missing.h:45:17: error: conflicting types for 'ssize_t'
In file included from /usr/lib/gcc/i486-mingw32/4.7.0/../../../../i486-mingw32/include/stdio.h:534:0,
from cairo-missing.h:36,
from getline.c:31:
/usr/lib/gcc/i486-mingw32/4.7.0/../../../../i486-mingw32/include/sys/types.h:118:18: note: previous declaration of 'ssize_t' was here
In file included from strndup.c:31:0:
cairo-missing.h:45:17: error: conflicting types for 'ssize_t'
In file included from /usr/lib/gcc/i486-mingw32/4.7.0/../../../../i486-mingw32/include/stdio.h:534:0,
from cairo-missing.h:36,
from strndup.c:31:
/usr/lib/gcc/i486-mingw32/4.7.0/../../../../i486-mingw32/include/sys/types.h:118:18: note: previous declaration of 'ssize_t' was here
Then you need to add `-D_SSIZE_T_DEFINED` to your MINGW_CFLAGS, like this:
export MINGW_CFLAGS="-D_SSIZE_T_DEFINED"
Other Scripts
=============
There are a few other scripts included in this repo:
* ./clean will remove all build artifacts (but leave the downloaded tarballs), leaving you with a clean setup.
* ./mkarchive will create self extracting archives of the pika.
* ./split-build will do a special build where it builds both pika-dev and pika-stable but the two builds share the same dependencies. The directories then needs to be merged using ./mkarchive.

View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
chmod a-w win32.cache
jhbuild --file=build.jhbuildrc $*
chmod u+w win32.cache

View File

@ -0,0 +1,264 @@
# -*- mode: python -*-
# This code is licensed under the GPLv2 License
# Derived work from the original freedesktop.org example.jhbuildrc
#
# This jhbuildrc file is created for the purpose of cross compile Gtk+
# with Mingw32 under Linux.
#
# Author: Alberto Ruiz <aruiz@gnome.org>
#
# modified by: Rolf Gebhardt <rg@klige.de>
#
moduleset = os.environ['PWD']+'/pika.moduleset'
module = os.environ.get('MODULE', 'pika-dev')
modules = [module]
flavour = os.environ.get('BUILD_FLAVOUR', 'rls')
if flavour == 'rls':
flavour_ext = ''
flavour_opt = ''
flavour_cflags = " -g "
else:
flavour_ext = '-dbg'
flavour_opt = "--enable-debug=yes"
flavour_cflags = " -g -O0 "
buildarch = os.environ.get('BUILD_ARCH', 'i686')
if buildarch != "i686" and buildarch != "x86_64":
print ("Warning: BUILD_ARCH not recognized")
# checkoutroot: path to download packages elsewhere
# prefix: target path to install the compiled binaries
checkoutroot = os.environ['PWD']+'/checkout/'
prefix = os.environ['PWD'] + '/targets/' + module + flavour_ext + '-' + buildarch + '/'
tarballdir = None
os.environ['prefix'] = prefix
searchprefix = os.environ['PWD']+'/targets/pika-common' + flavour_ext + '-' + buildarch + '/'
#The host value is obtained with the result of executing
#the config.guess script on any of the packages.
#This value must be valid for most linux/x86 out there
os.environ['HOST'] = 'x86_64-unknown-linux-gnu'
os.environ['TARGET'] = os.environ.get('MINGW_TARGET', buildarch + '-w64-mingw32')
os.environ['PKG_CONFIG_LIBDIR'] = ""
addpath('PKG_CONFIG_LIBDIR', os.path.join(searchprefix, 'lib', 'pkgconfig'))
addpath('PKG_CONFIG_LIBDIR', os.path.join(searchprefix, 'share', 'pkgconfig'))
os.environ['PKG_CONFIG_PATH'] = os.environ['PKG_CONFIG_LIBDIR']
#Prefix for all the tools
mingw_tool_prefix = os.environ.get('MINGW_TOOLPREFIX', os.environ.get('MINGW_LOCATION', '/usr') + '/bin/' + os.environ['TARGET'] + '-')
mingw_tools = {'ADDR2LINE': 'addr2line',
'AS': 'as', 'CC': 'gcc', 'CPP': 'cpp',
'Cppfilt': 'c++filt', 'CXX': 'g++',
'DLLTOOL': 'dlltool', 'DLLWRAP': 'dllwrap',
'GCOV': 'gcov', 'LD': 'ld', 'NM': 'nm',
'OBJCOPY': 'objcopy', 'OBJDUMP': 'objdump',
'READELF': 'readelf', 'SIZE': 'size',
'STRINGS': 'strings', 'WINDRES': 'windres',
'AR': 'ar', 'RANLIB': 'ranlib', 'STRIP': 'strip'}
#Exporting all as environment variables with its prefix
mingw_tools_args = str()
for tool in mingw_tools.keys():
fullpath_tool = mingw_tool_prefix + mingw_tools[tool]
os.environ[tool] = fullpath_tool
# Allow enabling ccache
if os.environ.get('MINGW_USE_CCACHE', '') == 'yes':
os.environ['CC'] = 'ccache ' + os.environ['CC']
os.environ['CPP'] = 'ccache ' + os.environ['CPP']
os.environ['CXX'] = 'ccache ' + os.environ['CXX']
# Clear DISPLAY (prevents wine from popping up dialogs on some machines)
os.environ['DISPLAY'] = ''
#Added another common env var name for windres
os.environ['RC'] = os.environ['WINDRES']
#Exporting tool flags environment variables
os.environ['LDFLAGS'] = '-L'+searchprefix+'/lib'
os.environ['CFLAGS'] = '-mms-bitfields -I'+searchprefix+'/include '
os.environ['CPPFLAGS'] = '-I'+searchprefix+'/include'
os.environ['CXXFLAGS'] = '-mms-bitfields'
os.environ['CFLAGS'] += os.environ.get('MINGW_CFLAGS', '')
os.environ['CFLAGS'] += flavour_cflags
os.environ['CXXFLAGS']+= flavour_cflags
# CMake stuff
cmakeargs += ' -DCMAKE_TOOLCHAIN_FILE=' + os.environ['PWD'] + '/toolchain.cmake '
cmakeargs += ' -DCMAKE_FIND_ROOT_PATH="' + searchprefix + ';' + prefix + '" '
#Don't install libraries in lib64, even if compiling on 64-bit machines
use_lib64 = False
#Make scripts run with the interpreter that's running this script
#(required wherever /usr/bin/python is python 3)
import sys
os.environ['PYTHON'] = os.environ.get("PYTHON", sys.executable)
#needed by win32/Makefile.gcc of zlib
os.environ['INCLUDE_PATH'] = prefix+'/include'
os.environ['LIBRARY_PATH'] = prefix+'/lib'
os.environ['BINARY_PATH'] = prefix+'/bin'
#Populating autogenargs
autogenargs = ' --build='+os.environ['HOST']
autogenargs += ' --host='+os.environ['TARGET']
autogenargs += ' --disable-docs'
autogenargs += ' --enable-all-warnings --enable-maintainer-mode'
autogenargs += ' --disable-static'
autogenargs += ' '+flavour_opt
for tool in ('AR', 'RANLIB', 'STRIP', 'AS',
'DLLTOOL', 'OBJDUMP', 'NM', 'WINDRES'):
autogenargs += ' '+tool+'="'+os.environ[tool]+'" '
#Module specific configure arguments
module_autogenargs['zlib'] = ' --prefix='+prefix+' --shared'
module_autogenargs['jasper'] = autogenargs + """ --enable-shared"""
module_autogenargs['gettext'] = autogenargs + """ --without-emacs \
--without-cvs \
--disable-curses \
--disable-java \
--disable-native-java \
--enable-relocatable \
--enable-threads=win32"""
module_autogenargs['glib2'] = autogenargs + """ --disable-gtk-doc \
--disable-modular-tests \
--cache-file=""" + os.environ['PWD'] + "/win32.cache"
module_autogenargs['cairo'] = autogenargs + """ --enable-xlib=no \
--enable-xlib-xrender=no \
--enable-xcb=no \
--enable-xcb-shm=no \
--enable-pthread=no \
--enable-win32-font=yes"""
module_autogenargs['pixman'] = autogenargs + """ --enable-gtk=no"""
module_autogenargs['pango'] = autogenargs + """ --disable-gtk-doc \
--enable-explicit-deps=no \
--with-included-modules"""
module_autogenargs['atk'] = autogenargs + """ --disable-glibtest \
--disable-gtk-doc \
--enable-introspection=no"""
module_autogenargs['gdk-pixbuf2']= autogenargs + """ --with-included-loaders"""
module_autogenargs['gtk2'] = autogenargs + """ --disable-glibtest \
--disable-gtk-doc \
--disable-cups"""
module_autogenargs['gtk3'] = autogenargs + """ --disable-glibtest \
--disable-gtk-doc \
--disable-cups \
--enable-gtk2-dependency"""
module_autogenargs['fontconfig'] = autogenargs + """ --with-arch=i686 \
--enable-libxml2"""
module_autogenargs['icu'] = autogenargs + """ --with-cross-build=$(pwd)/../icu-native/ """
module_autogenargs['libxml2'] = autogenargs + """ --with-python=no \
--with-iconv=yes \
--with-zlib=no """
module_autogenargs['librsvg'] = autogenargs + """ --enable-introspection=no"""
module_autogenargs['libsoup'] = autogenargs + """ --without-apache-httpd"""
module_autogenargs['libwmf'] = autogenargs + """ --disable-gd \
--without-x \
--with-freetype=""" + prefix
module_autogenargs['ghostscript']= autogenargs + """ --without-jasper \
--with-system-libtiff \
--without-x \
--disable-cups \
--disable-contrib """
module_autogenargs['libgexiv2'] = autogenargs + "--disable-introspection"
module_autogenargs['webkitgtk'] = autogenargs.replace ("--enable-debug=yes", "") + """ \
--with-gtk=2.0 \
--with-target=win32 \
--disable-webkit2 \
--disable-geolocation \
--disable-video \
--disable-spellcheck \
--disable-credential-storage \
--disable-fast-malloc \
--disable-debug \
--disable-debug-symbols \
--disable-debug-features \
\
--disable-gamepad \
--with-acceleration_backend=none"""
module_autogenargs['babl'] = autogenargs + """ --enable-introspection=no"""
module_autogenargs['gegl'] = autogenargs + """ --enable-introspection=no \
--with-sdl=no"""
module_autogenargs['pika-stable']= autogenargs + """ --disable-python \
--disable-gtk-doc """
module_autogenargs['pika-dev'] = autogenargs + """ --disable-python \
--disable-gtk-doc """
module_autogenargs['pika-gtk3'] = autogenargs + """ --disable-python \
--disable-gtk-doc """
module_autogenargs['gdb'] = autogenargs.replace ("--disable-static", "")
module_cmakeargs['openjpeg2'] = cmakeargs + " -DBUILD_PKGCONFIG_FILES=ON"
module_makeargs['mingw32-pthreads']= " CROSS=" + mingw_tool_prefix
module_extra_env.update (
{'mingw32-pthreads':
{'PREFIX': prefix, 'INSTALL': 'install'},
'webkitgtk':
{'CFLAGS': os.environ['CFLAGS'].replace ("-g", ""),
'CXXFLAGS': os.environ['CXXFLAGS'].replace ("-g", "") + ' -I' + checkoutroot + 'pthreads-w32-2-9-1-release -w'},
'ghostscript':
{'CFLAGS': os.environ['CFLAGS'].replace ("-O0", "").replace ("-mms-bitfields", ""), 'ac_cv_lib_pthread_pthread_create': 'no', 'CC': os.environ['CC'] + " -mms-bitfields"},
'icu-native': {},
'poppler-data':
{'PREFIX': prefix},
'freetype2':
{'LIBPNG_CFLAGS': ' ', 'LIBPNG_LDFLAGS': '-lpng'},
'cairo':
{'ax_cv_c_float_words_bigendian': 'no'},
'json-c':
{'ac_cv_func_malloc_0_nonnull': 'yes', 'ac_cv_func_realloc_0_nonnull': 'yes'}, # Erm... this is potentially bad...
# Ensure that pika doesn't get the host machine's freetype-config
'pika-dev':
{'FREETYPE_CONFIG': os.path.join(searchprefix, 'bin', 'freetype-config'),
'ac_cv_lib_bz2_BZ2_bzCompress': 'yes',
'WMF_CONFIG': os.path.join(searchprefix, 'bin', 'libwmf-config')},
'pika-stable':
{'FREETYPE_CONFIG': os.path.join(searchprefix, 'bin', 'freetype-config'),
'ac_cv_lib_bz2_BZ2_bzCompress': 'yes',
'WMF_CONFIG': os.path.join(searchprefix, 'bin', 'libwmf-config')},
'pika-gtk3':
{'FREETYPE_CONFIG': os.path.join(searchprefix, 'bin', 'freetype-config'),
'ac_cv_lib_bz2_BZ2_bzCompress': 'yes',
'WMF_CONFIG': os.path.join(searchprefix, 'bin', 'libwmf-config')},
})

View File

@ -0,0 +1,26 @@
#!/bin/bash
./build list -r -a | sort | while read line; do
# Parse jhbuild's module versions
COUPLE=`echo $line | grep -o -e "[^ :()]*"`
PACKAGE=`echo "$COUPLE" | sed -n 1p`
VERSION=`echo "$COUPLE" | sed -n 2p | grep -o -e "[^- :]*" | sed -n 1p`
# Filter out git versions (40 char hashes), and metamodules (empty strings)
if [ ${#VERSION} == 40 ] || [ ${#VERSION} == 0 ]; then
continue
fi
# Determine pacman's version of the package
PACVERSION=`pacman -Qi $PACKAGE | grep Version | grep -o -e "[^- :]*" | sed -n 2p`
# Filter out packages that pacman doesn't know about
if [ ${#PACVERSION} == 0 ]; then
continue
fi
# Warn if the versions are different
if [ "$VERSION" != "$PACVERSION" ]; then
echo $PACKAGE ":" $VERSION ":" $PACVERSION
fi
done

View File

@ -0,0 +1,18 @@
#!/bin/bash
pushd checkout
rm -rf *-*/
find . -maxdepth 1 -type f -atime +25 -print -delete
for gitdir in babl gegl pika; do
pushd $gitdir
git clean -xdf
popd
done
popd
if [[ "$1" != "--skip-targets" ]]; then
echo "Cleaning targets"
rm -rf targets/*
fi

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<moduleset>
<repository type="tarball" name="bzip.org" href="http://www.bzip.org/" />
<repository type="tarball" name="tukaani.org"
href="http://tukaani.org/" />
<repository type="tarball" name="zlib.net"
href="http://zlib.net/" />
<autotools id="bzip2">
<branch version="1.0.6" repo="bzip.org"
module="1.0.6/bzip2-1.0.6.tar.gz"
hash="md5:00b516f4704d4a7cb50a1d97e6e8e15b">
<!-- From http://ftp.suse.com/pub/people/sbrabec/bzip2/ -->
<patch file="bzip2-1.0.6-autoconfiscated.patch" strip="1" />
<!-- From openSUSE buildservice -->
<patch file="bzip2-1.0.5-slash.patch" strip="1" />
</branch>
</autotools>
<autotools id="xz" autogen-sh="configure">
<branch version="5.2.3" repo="tukaani.org"
module="xz/xz-5.2.3.tar.xz"
hash="sha256:7876096b053ad598c31f6df35f7de5cd9ff2ba3162e5a5554e4fc198447e0347">
</branch>
</autotools>
<autotools id="zlib" autogen-sh="configure" makeargs="-f win32/Makefile.gcc -e zlib1.dll SHARED_MODE=1" makeinstallargs="-f win32/Makefile.gcc -e install SHARED_MODE=1">
<branch version="1.2.11" repo="zlib.net"
module="zlib-1.2.11.tar.xz"
hash="sha256:4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066">
</branch>
</autotools>
</moduleset>

View File

@ -0,0 +1,3 @@
all:
mkdir -p $(DESTDIR)/$(DESTDIR)/bin/
#echo hi > $(DESTDIR)/$(DESTDIR)/bin/friendly.sh

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<moduleset>
<repository type="tarball" name="ftp.gnu.org"
href="http://ftp.gnu.org/gnu/" />
<repository type="tarball" name="sf.net"
href="http://downloads.sourceforge.net/project/" />
<autotools id="expat" autogen-sh="configure">
<branch version="2.1.0" repo="sf.net"
module="expat/expat/2.1.0/expat-2.1.0.tar.gz"
hash="sha1:b08197d146930a5543a7b99e871cba3da614f6f0">
</branch>
</autotools>
<autotools id="gdb" autogen-sh="configure" makeargs="-j1">
<branch version="7.9.1" repo="ftp.gnu.org"
module="gdb/gdb-7.9.1.tar.xz"
hash="sha1:04ba2906279b16b5f99c4f6b25942843a3717cdb">
</branch>
<dependencies>
<dep package="expat"/>
</dependencies>
</autotools>
</moduleset>

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<moduleset>
<repository type="tarball" name="gnu.org"
href="http://ftp.gnu.org/pub/gnu/" />
<repository type="tarball" name="gnome.org"
href="http://ftp.gnome.org/pub/gnome/sources/" />
<repository type="tarball" name="sourceware.org"
href="ftp://sourceware.org/pub/" />
<repository type="tarball" name="ftp.csx.cam.ac.uk"
href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/" />
<autotools id="iconv" autogen-sh="configure">
<branch version="1.14" repo="gnu.org"
module="libiconv/libiconv-1.14.tar.gz"
hash="sha256:72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613">
<patch file="iconv-fix-inline.patch" strip="1"/>
</branch>
</autotools>
<autotools id="gettext" autogen-sh="configure">
<branch version="0.19.4" repo="gnu.org"
module="gettext/gettext-0.19.4.tar.gz"
hash="sha256:8ac9f1ed1a5f8c4e656a2f37f5ba6b9ee04c4df79a575e876b0b6946aa417f3f">
<patch file="gettext_0_18_crossbuild_override_tools_fix.patch"/>
</branch>
<dependencies>
<dep package="iconv"/>
</dependencies>
</autotools>
<autotools id="libffi" autogen-sh="configure">
<branch version="3.2.1" repo="sourceware.org"
module="libffi/libffi-3.2.1.tar.gz"
hash="md5:83b89587607e3eb65c70d361f13bab43">
</branch>
</autotools>
<autotools id="pcre" autogen-sh="configure">
<branch version="8.40" repo="ftp.csx.cam.ac.uk"
module="pcre/pcre-8.40.tar.bz2"
hash="sha256:00e27a29ead4267e3de8111fcaa59b132d0533cdfdbdddf4b0604279acbcf4f4">
</branch>
</autotools>
<autotools id="glib2">
<branch version="2.50.2" repo="gnome.org"
module="glib/2.50/glib-2.50.2.tar.xz"
hash="sha256:be68737c1f268c05493e503b3b654d2b7f43d7d0b8c5556f7e4651b870acfbf5">
</branch>
<dependencies>
<dep package="gettext"/>
<dep package="iconv"/>
<dep package="pcre"/>
<dep package="zlib"/>
<dep package="libffi"/>
</dependencies>
</autotools>
</moduleset>

View File

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="UTF-8"?>
<moduleset>
<include href="glib.moduleset"/>
<include href="imglibs.moduleset"/>
<include href="compresslibs.moduleset"/>
<repository type="tarball" name="cairographics.org"
href="http://cairographics.org/releases/" />
<repository type="tarball" name="freedesktop.org"
href="http://www.freedesktop.org/software/" />
<repository type="tarball" name="gnome.org"
href="http://ftp.gnome.org/pub/gnome/sources/" />
<repository type="tarball" name="savannah.gnu.org"
href="http://download.savannah.gnu.org/releases/" />
<repository type="tarball" name="xmlsoft.org"
href="ftp://xmlsoft.org/" />
<repository type="git" name="anongit.freedesktop.org"
href="git://anongit.freedesktop.org/"/>
<repository type="tarball" name="icu-project.org"
href="http://download.icu-project.org/files/" />
<repository type="tarball" name="github-tarball"
href="https://github.com/"/>
<autotools id="cairo">
<branch version="1.14.8" repo="cairographics.org"
module="cairo-1.14.8.tar.xz"
hash="sha1:c6f7b99986f93c9df78653c3e6a3b5043f65145e">
</branch>
<dependencies>
<dep package="zlib"/>
<dep package="libpng"/>
<dep package="pixman"/>
<dep package="fontconfig"/>
<dep package="glib2"/>
</dependencies>
</autotools>
<autotools id="pixman" autogen-sh="configure">
<branch version="0.34.0" repo="cairographics.org"
module="pixman-0.34.0.tar.gz"
hash="sha1:a1b1683c1a55acce9d928fea1ab6ceb79142ddc7">
</branch>
</autotools>
<autotools id="pango" autogen-sh="configure">
<branch version="1.40.3" repo="gnome.org"
module="pango/1.40/pango-1.40.3.tar.xz"
hash="sha256:abba8b5ce728520c3a0f1535eab19eac3c14aeef7faa5aded90017ceac2711d3">
</branch>
<dependencies>
<dep package="cairo"/>
<dep package="pixman"/>
<dep package="glib2"/>
<dep package="fontconfig"/>
<dep package="harfbuzz"/>
</dependencies>
</autotools>
<autotools id="atk" autogen-sh="configure" makeinstallargs="install -j1">
<branch version="2.22.0" repo="gnome.org"
module="atk/2.22/atk-2.22.0.tar.xz"
hash="sha256:d349f5ca4974c9c76a4963e5b254720523b0c78672cbc0e1a3475dbd9b3d44b6">
</branch>
<dependencies>
<dep package="glib2"/>
</dependencies>
</autotools>
<autotools id="fontconfig" autogen-sh="configure" makeinstallargs="install -j1">
<branch version="2.12.1" repo="freedesktop.org"
module="fontconfig/release/fontconfig-2.12.1.tar.bz2"
hash="sha256:b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3">
</branch>
<dependencies>
<dep package="freetype2"/>
</dependencies>
</autotools>
<autotools id="freetype2" autogen-sh="configure">
<branch version="2.7.1" repo="savannah.gnu.org"
module="freetype/freetype-2.7.1.tar.bz2"
hash="sha256:3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88">
</branch>
<dependencies>
<dep package="bzip2"/>
<dep package="libxml2"/>
<dep package="libpng"/>
</dependencies>
</autotools>
<autotools id="icu" autogen-sh="source/runConfigureICU MinGW ">
<branch version="51.2" repo="icu-project.org"
checkoutdir="icu-mingw"
module="icu4c/51.2/icu4c-51_2-src.tgz"
hash="md5:072e501b87065f3a0ca888f1b5165709">
<patch file="icu-unexport-target.patch" strip="1"/>
<patch file="icu-fix-library-names.patch" strip="1"/>
</branch>
<dependencies>
<dep package="icu-native"/>
</dependencies>
</autotools>
<autotools id="icu-native" autogen-sh=" || env -i PATH=$PATH source/runConfigureICU Linux ; true " makeinstallargs=" -f ../../fake.mk ">
<branch version="51.2" repo="icu-project.org"
checkoutdir="icu-native"
module="icu4c/51.2/icu4c-51_2-src.tgz"
hash="md5:072e501b87065f3a0ca888f1b5165709">
<patch file="icu-unexport-target.patch" strip="1"/>
</branch>
</autotools>
<autotools id="harfbuzz">
<branch version="1.4.2" repo="freedesktop.org"
module="harfbuzz/release/harfbuzz-1.4.2.tar.bz2"
hash="sha256:8f234dcfab000fdec24d43674fffa2fdbdbd654eb176afbde30e8826339cb7b3">
</branch>
<dependencies>
<dep package="cairo"/>
<dep package="icu"/>
<dep package="freetype2"/>
</dependencies>
</autotools>
<autotools id="libxml2" autogen-sh="configure">
<branch version="2.9.4" repo="xmlsoft.org"
module="libxml2/libxml2-2.9.4.tar.gz"
hash="sha256:ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c">
</branch>
<dependencies>
<dep package="iconv"/>
</dependencies>
</autotools>
<autotools id="libxslt" autogen-sh="configure">
<branch version="1.1.28" repo="xmlsoft.org"
module="libxslt/libxslt-1.1.28.tar.gz"
hash="sha256:5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c">
<!-- From: OBS -->
<patch file="libxslt-1.1.26-w64.patch" strip="1"/>
</branch>
<dependencies>
<dep package="iconv"/>
<dep package="libxml2"/>
<dep package="zlib"/>
</dependencies>
</autotools>
<autotools id="gdk-pixbuf2" autogen-sh="configure">
<branch version="2.36.4" repo="gnome.org"
module="gdk-pixbuf/2.36/gdk-pixbuf-2.36.4.tar.xz"
hash="sha256:0b19901c3eb0596141d2d48ddb9dac79ad1524bdf59366af58ab38fcb9ee7463">
</branch>
<dependencies>
<dep package="glib2"/>
<dep package="imglibs"/>
</dependencies>
</autotools>
<autotools id="libepoxy" autogen-sh="configure">
<branch version="1.3.1" repo="github-tarball"
module="anholt/libepoxy/releases/download/v1.3.1/libepoxy-1.3.1.tar.bz2"
hash="sha256:1d8668b0a259c709899e1c4bab62d756d9002d546ce4f59c9665e2fc5f001a64">
</branch>
</autotools>
<autotools id="gtk2" autogen-sh="configure" makeargs=" || rm -f gtk/gtk.def &amp;&amp; make" makeinstallargs="install -j1">
<branch version="2.24.31" repo="gnome.org"
module="gtk+/2.24/gtk+-2.24.31.tar.xz"
hash="sha256:68c1922732c7efc08df4656a5366dcc3afdc8791513400dac276009b40954658">
</branch>
<dependencies>
<dep package="glib2"/>
<dep package="gdk-pixbuf2"/>
<dep package="cairo"/>
<dep package="atk"/>
<dep package="pango"/>
</dependencies>
</autotools>
<autotools id="gtk3" autogen-sh="configure" makeinstallargs="install -j1">
<branch version="3.16.5" repo="gnome.org"
module="gtk+/3.16/gtk+-3.16.5.tar.xz"
hash="sha256:b87c99d127eb962fc857c246b77a65322cdffd7dcbcf46a83bce2040e0f4bc31">
</branch>
<dependencies>
<dep package="glib2"/>
<dep package="gdk-pixbuf2"/>
<dep package="cairo"/>
<dep package="atk"/>
<dep package="pango"/>
<dep package="libepoxy"/>
</dependencies>
</autotools>
</moduleset>

View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<moduleset>
<repository type="tarball" name="jasper" href="http://www.ece.uvic.ca/~frodo/jasper/software/" />
<repository type="tarball" name="osgeo.org"
href="http://download.osgeo.org/" />
<repository type="tarball" name="sf.net"
href="http://downloads.sourceforge.net/project/" />
<repository type="tarball" name="download.sourceforge.net"
href="http://download.sourceforge.net/" />
<repository type="tarball" name="webmproject.org"
href="http://downloads.webmproject.org/releases/" />
<include href="compresslibs.moduleset"/>
<autotools id="libtiff" autogen-sh="configure">
<branch version="4.0.7" repo="osgeo.org"
module="libtiff/tiff-4.0.7.zip"
hash="sha256:6ba82d82b5abb508fc6c480c8ef63fd1c9bdea31735b30bc47bdebe2272087a7">
</branch>
<dependencies>
<dep package="libjpeg-turbo"/>
</dependencies>
</autotools>
<autotools id="libpng" autogen-sh="configure">
<branch version="1.6.28" repo="download.sourceforge.net"
module="libpng/libpng-1.6.28.tar.xz"
hash="md5:425354f86c392318d31aedca71019372">
</branch>
<dependencies>
<dep package="zlib"/>
</dependencies>
</autotools>
<autotools id="libjpeg-turbo" autogen-sh="configure">
<branch version="1.3.1" repo="sf.net"
module="libjpeg-turbo/1.3.1/libjpeg-turbo-1.3.1.tar.gz"
hash="sha1:5fa19252e5ca992cfa40446a0210ceff55fbe468">
<patch file="libjpeg-turbo-int32.patch" strip="1"/>
<patch file="libjpeg-turbo-boolean.patch" strip="1"/>
</branch>
</autotools>
<autotools id="jasper">
<branch version="1.900.1" repo="jasper"
module="jasper-1.900.1.zip"
hash="sha256:6b905a9c2aca2e275544212666eefc4eb44d95d0a57e4305457b407fe63f9494">
<!-- From openSUSE buildservice -->
<patch file="jasper-1.900.1-sleep.patch" strip="1"/>
<patch file="jasper-1.900.1-mingw32.patch" strip="1"/>
</branch>
<dependencies>
<dep package="libjpeg-turbo"/>
</dependencies>
</autotools>
<metamodule id="imglibs">
<dependencies>
<dep package="libpng"/>
<dep package="libtiff"/>
<dep package="libjpeg-turbo"/>
<dep package="jasper"/>
</dependencies>
</metamodule>
<autotools id="libmng" autogen-sh="configure">
<branch version="2.0.3" repo="sf.net"
module="libmng/libmng-devel/2.0.3/libmng-2.0.3.tar.xz"
hash="sha1:0f141482ffcef6f8cd4413f945a59310ac2e49af">
<patch file="libmng-no-undefined-makefile-in.patch" strip="1"/>
</branch>
<dependencies>
<dep package="zlib"/>
<dep package="libjpeg-turbo"/>
<dep package="lcms2"/>
</dependencies>
</autotools>
<autotools id="libwebp" autogen-sh="configure">
<branch version="0.6.0" repo="webmproject.org"
module="webp/libwebp-0.6.0.tar.gz"
hash="sha256:c928119229d4f8f35e20113ffb61f281eda267634a8dc2285af4b0ee27cf2b40">
</branch>
</autotools>
<cmake id="openjpeg2">
<branch version="2.1.0" repo="sf.net"
module="openjpeg.mirror/2.1.0/openjpeg-2.1.0.tar.gz"
hash="sha1:c2a255f6b51ca96dc85cd6e85c89d300018cb1cb">
</branch>
</cmake>
</moduleset>

View File

@ -0,0 +1,115 @@
#!/bin/env python3
import getopt, os, sys, tarfile
from xml.etree import ElementTree
def makearchive (dest, manifest, root):
"""Makes an archive for the given jhbuild manifest"""
filenames = None
with open (manifest, "r") as f:
filenames = f.readlines ()
rootlen = len (root)
with tarfile.open (dest, "w|bz2") as tar:
for name in filenames:
name = name.strip ()
arcname = name [rootlen:]
tar.add (name, arcname)
def parse_packagedb (packagedb_loc):
"""Parses a jhbuild packagedb.xml file"""
tree = ElementTree.parse (packagedb_loc)
root = tree.getroot ()
packages = [child.attrib for child in root]
return packages
def run (targets_loc, packages_loc):
# Set up directories
try:
os.mkdir (packages_loc)
except FileExistsError:
pass
# Loop over directories in targets/
for target_name in os.listdir (targets_loc):
target_loc = os.path.join (targets_loc, target_name)
packagedb_loc = os.path.join (targets_loc, target_name, "_jhbuild", "packagedb.xml")
manifests_loc = os.path.join (targets_loc, target_name, "_jhbuild", "manifests")
# Skip folders that aren't jhbuild output dirs
if not os.path.isfile (packagedb_loc):
continue
# Build arch
build_arch = ""
if target_name[-7:] == "-x86_64":
build_arch = "x86_64"
elif target_name[-5:] == "-i686":
build_arch = "i686"
else:
print ("Warning: BUILD_ARCH suffix not recognized")
# Create archives for each package
for package in parse_packagedb (packagedb_loc):
tar_name = package["package"] + '-' + build_arch + '-' + package["version"] + '.tar.bz2'
tar_loc = os.path.join (packages_loc, tar_name)
manifest_loc = os.path.join (manifests_loc, package["package"])
if os.path.isfile (tar_loc):
print ("Archive " + tar_name + " exists; Skipping")
continue
print ("Making " + tar_name)
try:
makearchive (tar_loc, manifest_loc, target_loc)
except FileNotFoundError as e:
print ()
print ("!!!!!!!! Warning: Creation of " + tar_name + " failed !!!!!!!!")
print (e)
print ()
try:
os.remove (tar_loc)
except FileNotFoundError:
pass
# Usage information
def usage ():
print ("""
Creates .tar.bz2 files for each of jhbuild's output packages
Available options:
-t, --target-directory=DIRECTORY
Output package files into DIRECTORY
""")
# Command line parameter parsing
def main ():
try:
opts, args = getopt.getopt (sys.argv[1:], "ht:", ["help", "target-directory="])
except getopt.GetoptError as err:
print (err)
usage ()
sys.exit (2)
packages_loc = None
for o, a in opts:
if o in ("-h", "--help"):
usage()
sys.exit()
elif o in ("-t", "--target-directory"):
packages_loc = a
else:
assert False, "unhandled option"
scriptdir_loc = os.path.dirname (os.path.realpath (__file__))
targets_loc = os.path.join (scriptdir_loc, "targets")
if packages_loc is None:
packages_loc = os.path.join (targets_loc, "packages")
run (targets_loc, packages_loc)
if __name__ == "__main__":
main ()

View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="UTF-8"?>
<moduleset>
<repository type="tarball" name="gnome.org"
href="http://ftp.gnome.org/pub/gnome/sources/" />
<repository type="tarball" name="icon-theme.freedesktop.org"
href="http://icon-theme.freedesktop.org/releases/" />
<repository type="tarball" name="tango.freedesktop.org"
href="http://tango.freedesktop.org/releases/" />
<repository type="tarball" name="sf.net"
href="http://downloads.sourceforge.net/project/" />
<repository type="tarball" name="pkg-isocodes"
href="http://pkg-isocodes.alioth.debian.org/downloads/" />
<repository type="tarball" name="poppler"
href="http://poppler.freedesktop.org/" />
<repository type="tarball" name="exiv2"
href="http://www.exiv2.org/" />
<repository type="tarball" name="json-c"
href="https://s3.amazonaws.com/json-c_releases/releases/" />
<repository type="git" name="github"
href="https://github.com/"/>
<include href="gtk+.moduleset"/>
<autotools id="libcroco" autogen-sh="configure">
<branch version="0.6.8" repo="gnome.org"
module="libcroco/0.6/libcroco-0.6.8.tar.xz"
hash="sha256:ea6e1b858c55219cefd7109756bff5bc1a774ba7a55f7d3ccd734d6b871b8570">
</branch>
<dependencies>
<dep package="glib2"/>
<dep package="libxml2"/>
</dependencies>
</autotools>
<autotools id="librsvg" autogen-sh="configure">
<branch version="2.40.9" repo="gnome.org"
module="librsvg/2.40/librsvg-2.40.9.tar.xz"
hash="sha256:13964c5d35357552b47d365c34215eee0a63bf0e6059b689f048648c6bf5f43a">
</branch>
<dependencies>
<dep package="glib2"/>
<dep package="gdk-pixbuf2"/>
<dep package="libxml2"/>
<dep package="cairo"/>
<dep package="pango"/>
<dep package="libcroco"/>
</dependencies>
</autotools>
<autotools id="lcms" autogen-sh="configure">
<branch version="1.19" repo="sf.net"
module="lcms/lcms/1.19/lcms-1.19.tar.gz"
hash="sha256:80ae32cb9f568af4dc7ee4d3c05a4c31fc513fc3e31730fed0ce7378237273a9">
</branch>
</autotools>
<autotools id="lcms2" autogen-sh="configure">
<branch version="2.8" repo="sf.net"
module="lcms/lcms/2.8/lcms2-2.8.tar.gz"
hash="sha1:e9535ec4a572b8fc7a1c405c35e6f4dc97714197">
</branch>
</autotools>
<autotools id="libexif" autogen-sh="configure">
<branch version="0.6.21" repo="sf.net"
module="libexif/libexif/0.6.21/libexif-0.6.21.tar.bz2"
hash="sha1:a52219b12dbc8d33fc096468591170fda71316c0">
</branch>
</autotools>
<autotools id="iso-codes" autogen-sh="configure">
<branch version="3.74" repo="pkg-isocodes"
module="iso-codes-3.74.tar.xz"
hash="sha256:21f4f3cea8fe09f5b53784522303a0e1e7d083964ecaf1c75b1441d4d9ec6aee">
</branch>
</autotools>
<autotools id="libwmf" autogen-sh=" || (make clean || true); ./configure">
<branch version="0.2.8.4" repo="sf.net"
module="wvware/libwmf/0.2.8.4/libwmf-0.2.8.4.tar.gz"
hash="sha1:822ab3bd0f5e8f39ad732f2774a8e9f18fc91e89">
<!-- sigh... upstream practically gone... so many patches. -->
<!-- from OBS -->
<patch file="libwmf/libwmf-0.2.8.3-nodocs.patch" strip="1"/>
<patch file="libwmf/libwmf-0.2.8.3-relocatablefonts.patch" strip="1"/>
<patch file="libwmf/libwmf-0.2.8.4-intoverflow.patch" strip="1"/>
<patch file="libwmf/libwmf-0.2.8.4-multiarchdevel.patch" strip="1"/>
<patch file="libwmf/libwmf-0.2.8.4-deps.patch" strip="1"/>
<patch file="libwmf/libwmf-0.2.8.4-reducesymbols.patch" strip="1"/>
<patch file="libwmf/libwmf-0.2.8.4-fallbackfont.patch" strip="1"/>
<patch file="libwmf/libwmf-0.2.8.4-useafterfree.patch" strip="1"/>
<!-- from archlinux -->
<patch file="libwmf/libwmf-0.2.8.4-libpng-1.5.patch" strip="1"/>
</branch>
<dependencies>
<dep package="freetype2"/>
<dep package="zlib"/>
<dep package="libpng"/>
<dep package="libjpeg-turbo"/>
</dependencies>
</autotools>
<autotools id="ghostscript" makeargs="so" makeinstallargs="soinstall">
<branch version="8.71" repo="sf.net"
module="ghostscript/GPL%20Ghostscript/8.71/ghostscript-8.71.tar.xz"
hash="sha1:aa2df7ba23abdfe95d36acec7333eac51768c47d">
<!-- From OBS -->
<patch file="ghostscript-8.71-windows.patch" strip="1"/>
<!-- Local patch: -->
<patch file="ghostscript-change-install-paths.patch" strip="1"/>
</branch>
<dependencies>
<dep package="libtiff"/>
</dependencies>
</autotools>
<autotools id="poppler-data" autogen-sh=" || true" makeinstallargs="install prefix=$PREFIX">
<branch version="0.4.7" repo="poppler"
module="poppler-data-0.4.7.tar.gz"
hash="sha1:556a5bebd0eb743e0d91819ba11fd79947d8c674">
</branch>
</autotools>
<autotools id="poppler" autogen-sh="configure">
<branch version="0.51.0" repo="poppler"
module="poppler-0.51.0.tar.xz"
hash="sha256:e997c9ad81a8372f2dd03a02b00692b8cc479c220340c8881edaca540f402c1f">
<!-- https://bugs.freedesktop.org/show_bug.cgi?id=91384 -->
<patch file="poppler-windows-h.patch" strip="1"/>
</branch>
<dependencies>
<dep package="freetype2"/>
<dep package="imglibs"/>
<dep package="cairo"/>
<dep package="openjpeg2"/>
</dependencies>
<suggests>
<dep package="poppler-data"/>
</suggests>
</autotools>
<cmake id="exiv2">
<branch version="0.25" repo="exiv2"
module="exiv2-0.25.tar.gz"
hash="md5:258d4831b30f75a01e0234065c6c2806">
<patch file="exiv2-add-wsock32.patch" strip="1"/>
</branch>
<dependencies>
<dep package="zlib"/>
<dep package="expat"/>
<dep package="iconv"/>
<dep package="gettext"/>
</dependencies>
</cmake>
<autotools id="libgexiv2" autogen-sh="configure">
<branch version="0.10.4" repo="gnome.org"
module="gexiv2/0.10/gexiv2-0.10.4.tar.xz"
hash="sha256:ad8d31afdc0a1932cc44c4cfcea449497c0d0b445c0ad2f9735707b306e71ca4">
</branch>
<dependencies>
<dep package="exiv2"/>
<dep package="glib2"/>
</dependencies>
</autotools>
<autotools id="hicolor-icon-theme" autogen-sh="configure">
<branch version="0.15" repo="icon-theme.freedesktop.org"
module="hicolor-icon-theme-0.15.tar.xz"
hash="sha256:9cc45ac3318c31212ea2d8cb99e64020732393ee7630fa6c1810af5f987033cc">
</branch>
</autotools>
<autotools id="icon-naming-utils" autogen-sh="configure">
<branch version="0.8.90" repo="tango.freedesktop.org"
module="icon-naming-utils-0.8.90.tar.bz2"
hash="sha256:b1378679df4485b4459f609a3304238b3e92d91e43744c47b70abbe690d883d5">
</branch>
</autotools>
<autotools id="gnome-icon-theme" autogen-sh="configure">
<branch version="3.12.0" repo="gnome.org"
module="gnome-icon-theme/3.12/gnome-icon-theme-3.12.0.tar.xz"
hash="sha256:359e720b9202d3aba8d477752c4cd11eced368182281d51ffd64c8572b4e503a">
</branch>
<dependencies>
<dep package="icon-naming-utils"/>
<dep package="hicolor-icon-theme"/>
</dependencies>
</autotools>
<autotools id="json-glib" autogen-sh="configure">
<branch version="1.2.2" repo="gnome.org"
module="json-glib/1.2/json-glib-1.2.2.tar.xz"
hash="sha256:ea128ab52a824fcd06e5448fbb2bd8d9a13740d51c66d445828edba71321a621">
</branch>
<dependencies>
<dep package="glib2"/>
</dependencies>
</autotools>
<autotools id="json-c" autogen-sh="configure">
<branch version="0.12.1" repo="json-c"
module="json-c-0.12.1-nodoc.tar.gz"
checkoutdir="json-c-0.12.1-nodoc"
hash="sha256:5a617da9aade997938197ef0f8aabd7f97b670c216dc173977e1d56eef9e1291">
<!-- Local patch: -->
<patch file="json-c-disable-werror.patch" strip="1"/>
</branch>
</autotools>
<autotools id="libmypaint" autogen-sh="autogen.sh &amp;&amp; ./configure">
<branch repo="github" module="mypaint/libmypaint.git"/>
<dependencies>
<dep package="json-c"/>
<dep package="gettext"/>
</dependencies>
</autotools>
</moduleset>

View File

@ -0,0 +1,95 @@
#!/bin/bash
dll_loc_32=${DLL_LOC_i686:-/usr/i686-w64-mingw32/bin}
dll_loc_64=${DLL_LOC_x86_64:-/usr/x86_64-w64-mingw32/bin}
add_dll (){
cp --reflink=auto $1/$2 ./bin/
}
dostuff (){
f=$1-$4-`date +%Y-%m-%d`
mkdir -p combined/$f
cp -R -d -L --reflink=auto ./pika-common$3-$4/* combined/$f
cp -R -d -L --reflink=auto ./$1-$4/* combined/$f
pushd combined
pushd $f
mv lib/libicu*.dll bin/
rm -rf _jhbuild
rm -rf man
rm -rf share/doc
rm -rf share/gtk-doc
rm -rf share/gtk-2.0/demo
rm -rf share/applications
rm -rf share/info
rm -rf share/man
rm -rf share/gdb
rm -rf share/gettext
rm -f etc/gconf/2/path.jhbuild
rm -f `find -name *.exe | sed -e /pika/d -e /gspawn/d -e /gdb.exe/d`
if [ "$4" == "i686" ]; then
add_dll $dll_loc_32 libstdc++-6.dll
add_dll $dll_loc_32 libgcc_s_sjlj-1.dll
add_dll $dll_loc_32 libwinpthread-1.dll
elif [ "$4" == "x86_64" ]; then
add_dll $dll_loc_64 libstdc++-6.dll
add_dll $dll_loc_64 libgcc_s_seh-1.dll
add_dll $dll_loc_64 libwinpthread-1.dll
fi
pushd bin
rm -f `ls | sed -e /.exe/d -e /.dll/d`
popd
rm -f `find -name *.html`
rm -f `find -name *.htm`
rm -f `find -name *.a`
rm -f `find -name *.def`
rm -f `find -name *.sh`
rm -f `find -name *.h`
rm -f `find -name *.c`
rm -f `find -name *.hxx`
rm -f `find -name *.pc`
rm -f `find -name *.m4`
rm -f `find -name *.manifest`
find -depth -type d -empty -exec rmdir {} \;
echo "@echo off
start %~dp0bin\\$2" | unix2dos > run_pika.bat
echo "gtk-fallback-icon-theme='gnome'" >> etc/gtk-2.0/gtkrc
popd
if [ -e $f/bin/pika-2.*.exe ]; then
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on /tmp/$f.7z $f
cat ~/bin/7z.sfx /tmp/$f.7z > $f.exe
rm -f /tmp/$f.7z
else
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "!! PIKA EXECUTABLE NOT FOUND !!"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi
rm -rf $f
popd
}
cd targets
dostuff pika-stable pika-2.8.exe "" i686
dostuff pika-dev pika-2.9.exe "" i686
dostuff pika-stable-dbg pika-2.8.exe "-dbg" i686
dostuff pika-dev-dbg pika-2.9.exe "-dbg" i686
dostuff pika-stable pika-2.8.exe "" x86_64
dostuff pika-dev pika-2.9.exe "" x86_64
dostuff pika-stable-dbg pika-2.8.exe "-dbg" x86_64
dostuff pika-dev-dbg pika-2.9.exe "-dbg" x86_64

View File

@ -0,0 +1,11 @@
--- bzip2-1.0.5.orig/bzip2.c 2007-12-09 12:22:06.000000000 +0000
+++ bzip2-1.0.5/bzip2.c 2008-09-25 12:31:02.000000000 +0100
@@ -128,7 +128,7 @@
#if BZ_LCCWIN32
# include <io.h>
# include <fcntl.h>
-# include <sys\stat.h>
+# include <sys/stat.h>
# define NORETURN /**/
# define PATH_SEP '\\'

View File

@ -0,0 +1,287 @@
diff -urN files/autogen.sh ./autogen.sh
--- bzip2-1.0.5.orig/autogen.sh 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/autogen.sh 2009-11-06 12:10:43.574602171 +0100
@@ -0,0 +1,9 @@
+mv LICENSE COPYING
+mv CHANGES NEWS
+touch AUTHORS
+touch ChangeLog
+libtoolize --force
+aclocal
+automake --add-missing --gnu
+autoconf
+./configure "$@"
diff -urN bzip2-1.0.5.orig/README.autotools bzip2-1.0.5.autoconfiscated/README.autotools
--- bzip2-1.0.5.orig/README.autotools 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/README.autotools 2010-11-02 17:04:06.000000000 +0100
@@ -0,0 +1,39 @@
+bzip2 autoconfiscated
+=====================
+
+Temporarily at http://ftp.suse.com/pub/people/sbrabec/bzip2/ expecting
+that it will become a new upstream version to prevent per-distribution
+shared library patching done by nearly each Linux vendor separately.
+
+Autoconfiscation brings standard ./configure ; make ; make install
+installation, seamless support of DESTDIR, automatic check for supported
+CFLAGS, standard shared library support, automatic large files CFLAGS
+check and all things that are supported by automake.
+
+It makes obsolete Makefile-libbz2_so and README.COMPILATION.PROBLEMS.
+Now configure should automatically detect correct build flags.
+
+In case of any problem or question with autotools support feel free to
+contact me: Stanislav Brabec <sbrabec@suse.cz>
+
+Autoconfiscated version binaries are exactly equal to
+bzip2-1.0.5.tar.gz. There are only few changes. See below.
+
+
+New features:
+
+Trivial link man pages for bzcat and bunzip2 added.
+
+bzip2.pc file for pkg-config. Packages can use it for checks.
+
+
+Incompatible changes:
+
+soname change. Libtool has no support for two parts soname suffix (e. g.
+libbz2.so.1.0). It must be a single number (e. g. libbz2.so.1). That is
+why soname must change. But I see not a big problem with it. Several
+distributions already use the new number instead of the non-standard
+number from Makefile-libbz2_so.
+
+To be super-safe, I incremented minor number of the library file, so
+both instances of the shared library can live together.
diff -urN bzip2-1.0.5.orig/configure.ac bzip2-1.0.5.autoconfiscated/configure.ac
--- bzip2-1.0.5.orig/configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/configure.ac 2010-11-02 17:53:47.000000000 +0100
@@ -0,0 +1,70 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.57])
+AC_INIT([bzip2], [1.0.5], [Julian Seward <jseward@bzip.org>])
+BZIP2_LT_CURRENT=1
+BZIP2_LT_REVISION=6
+BZIP2_LT_AGE=0
+AC_CONFIG_SRCDIR([bzlib.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE
+AM_MAINTAINER_MODE
+
+# Checks for programs.
+AC_PROG_AWK
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_LIBTOOL
+PKG_PROG_PKG_CONFIG
+
+# Checks for libraries.
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Check for system features.
+AC_SYS_LARGEFILE
+
+AC_MSG_CHECKING([whether compiler understands -Wall])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wall"
+AC_TRY_COMPILE([], [], [
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+])
+
+AC_MSG_CHECKING([whether compiler understands -Winline])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Winline"
+AC_TRY_COMPILE([], [], [
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+])
+
+AC_MSG_CHECKING([whether compiler understands -fno-strength-reduce])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fno-strength-reduce"
+AC_TRY_COMPILE([], [], [
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+])
+
+# Checks for library functions.
+
+# Write the output.
+AC_SUBST([BZIP2_LT_CURRENT])
+AC_SUBST([BZIP2_LT_REVISION])
+AC_SUBST([BZIP2_LT_AGE])
+AC_CONFIG_FILES([Makefile bzip2.pc])
+AC_OUTPUT
diff -urN bzip2-1.0.5.orig/Makefile.am bzip2-1.0.5.autoconfiscated/Makefile.am
--- bzip2-1.0.5.orig/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/Makefile.am 2009-11-05 16:45:11.000000000 +0100
@@ -0,0 +1,138 @@
+lib_LTLIBRARIES = libbz2.la
+
+libbz2_la_SOURCES = \
+ blocksort.c \
+ huffman.c \
+ crctable.c \
+ randtable.c \
+ compress.c \
+ decompress.c \
+ bzlib.c
+
+libbz2_la_LDFLAGS = \
+ -version-info $(BZIP2_LT_CURRENT):$(BZIP2_LT_REVISION):$(BZIP2_LT_AGE) \
+ -no-undefined
+
+include_HEADERS = bzlib.h
+
+noinst_HEADERS = bzlib_private.h
+
+bin_PROGRAMS = bzip2 bzip2recover
+
+bzip2_SOURCES = bzip2.c
+bzip2_LDADD = libbz2.la
+
+bzip2recover_SOURCES = bzip2recover.c
+bzip2recover_LDADD = libbz2.la
+
+bin_SCRIPTS = bzgrep bzmore bzdiff
+
+man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = bzip2.pc
+
+$(pkgconfig_DATA): $(srcdir)/bzip2.pc.in config.status
+
+install-exec-hook:
+ rm -f $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzmore" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzdiff" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+
+install-data-hook:
+ echo ".so man1/`echo "bzip2" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bunzip2" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzip2" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzcat" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzgrep" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzgrep" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzmore" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzless" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzdiff" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`.1
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bunzip2" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzcat" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzless" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`.1
+
+test: bzip2
+ @cat $(srcdir)/words1
+ ./bzip2 -1 <$(srcdir)/sample1.ref >sample1.rb2
+ ./bzip2 -2 <$(srcdir)/sample2.ref >sample2.rb2
+ ./bzip2 -3 <$(srcdir)/sample3.ref >sample3.rb2
+ ./bzip2 -d <$(srcdir)/sample1.bz2 >sample1.tst
+ ./bzip2 -d <$(srcdir)/sample2.bz2 >sample2.tst
+ ./bzip2 -ds <$(srcdir)/sample3.bz2 >sample3.tst
+ cmp $(srcdir)/sample1.bz2 sample1.rb2
+ cmp $(srcdir)/sample2.bz2 sample2.rb2
+ cmp $(srcdir)/sample3.bz2 sample3.rb2
+ cmp sample1.tst $(srcdir)/sample1.ref
+ cmp sample2.tst $(srcdir)/sample2.ref
+ cmp sample3.tst $(srcdir)/sample3.ref
+ @cat $(srcdir)/words3
+
+manual: $(srcdir)/manual.html $(srcdir)/manual.ps $(srcdir)/manual.pdf
+
+manual.ps: $(MANUAL_SRCS)
+ cd $(srcdir); ./xmlproc.sh -ps manual.xml
+
+manual.pdf: $(MANUAL_SRCS)
+ cd $(srcdir); ./xmlproc.sh -pdf manual.xml
+
+manual.html: $(MANUAL_SRCS)
+ cd $(srcdir); ./xmlproc.sh -html manual.xml
+
+EXTRA_DIST = \
+ $(bin_SCRIPTS) \
+ $(man_MANS) \
+ README.autotools \
+ README.XML.STUFF \
+ bz-common.xsl \
+ bz-fo.xsl \
+ bz-html.xsl \
+ bzip.css \
+ bzip2.1.preformatted \
+ bzip2.pc.in \
+ bzip2.txt \
+ dlltest.c \
+ dlltest.dsp \
+ entities.xml \
+ format.pl \
+ libbz2.def \
+ libbz2.dsp \
+ makefile.msc \
+ manual.html \
+ manual.pdf \
+ manual.ps \
+ manual.xml \
+ mk251.c \
+ sample1.bz2 \
+ sample1.ref \
+ sample2.bz2 \
+ sample2.ref \
+ sample3.bz2 \
+ sample3.ref \
+ spewG.c \
+ unzcrash.c \
+ words0 \
+ words1 \
+ words2 \
+ words3 \
+ xmlproc.sh
+
+ACLOCAL_AMFLAGS = -I m4
diff -urN bzip2-1.0.5.orig/bzip2.pc.in bzip2-1.0.5.autoconfiscated/bzip2.pc.in
--- bzip2-1.0.5.orig/bzip2.pc.in 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/bzip2.pc.in 2009-11-03 18:48:28.000000000 +0100
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: bzip2
+Description: Lossless, block-sorting data compression
+Version: @VERSION@
+Libs: -L${libdir} -lbz2
+Cflags: -I${includedir}

View File

@ -0,0 +1,11 @@
--- a/src/CMakeLists.txt 2016-05-29 00:04:56.925764000 -0400
+++ b/src/CMakeLists.txt 2016-05-29 00:05:16.485877571 -0400
@@ -288,7 +288,7 @@
ENDIF( ICONV_FOUND )
IF (CYGWIN OR MINGW)
- TARGET_LINK_LIBRARIES( exiv2lib psapi )
+ TARGET_LINK_LIBRARIES( exiv2lib psapi wsock32 )
ENDIF(CYGWIN OR MINGW)

View File

@ -0,0 +1,11 @@
--- Makefile.in.orig 2010-05-09 20:59:19.000000000 +0200
+++ Makefile.in 2010-10-02 00:59:46.000000000 +0200
@@ -211,7 +211,7 @@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = gnulib-local gettext-runtime gettext-tools
+SUBDIRS = gnulib-local gettext-runtime
# DJGPP port.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
--- a/base/unix-dll.mak 2013-01-26 13:47:45.112366000 -0500
+++ b/base/unix-dll.mak 2013-01-26 14:03:08.292073462 -0500
@@ -127,13 +127,14 @@
-mkdir -p $(DESTDIR)$(bindir)
-mkdir -p $(DESTDIR)$(libdir)
-mkdir -p $(DESTDIR)$(gsincludedir)
- $(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
- $(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
- $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
- $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
- ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)
- $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
- ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
+ #$(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
+ #$(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
+ $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(bindir)/$(GS_SONAME_MAJOR_MINOR)
+ $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_BASE).dll.a $(DESTDIR)$(libdir)/$(GS_SONAME_BASE).dll.a
+ #$(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
+ #ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)
+ #$(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
+ #ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
$(INSTALL_DATA) $(PSSRC)iapi.h $(DESTDIR)$(gsincludedir)iapi.h
$(INSTALL_DATA) $(PSSRC)ierrors.h $(DESTDIR)$(gsincludedir)ierrors.h
$(INSTALL_DATA) $(GLSRC)gdevdsp.h $(DESTDIR)$(gsincludedir)gdevdsp.h

View File

@ -0,0 +1,12 @@
--- a/lib/iconv.c 2015-06-06 12:37:05.267944000 -0400
+++ b/lib/iconv.c 2015-06-06 12:37:27.311277142 -0400
@@ -176,9 +176,6 @@
#include "aliases2.h"
#undef S
};
-#ifdef __GNUC__
-__inline
-#endif
const struct alias *
aliases2_lookup (register const char *str)
{

View File

@ -0,0 +1,42 @@
--- a/source/config/mh-mingw 2012-12-28 16:52:21.141964000 -0500
+++ b/source/config/mh-mingw 2012-12-28 18:24:11.955818449 -0500
@@ -66,16 +66,8 @@
LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
A = a
-## An import library is needed for z/OS and MSVC
-IMPORT_LIB_EXT = .lib
-
-LIBPREFIX=
-
-# Change the stubnames so that poorly working FAT disks and installation programs can work.
-# This is also for backwards compatibility.
-DATA_STUBNAME = dt
-I18N_STUBNAME = in
-LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
+## import libraries are nice to have under mingw
+IMPORT_LIB_EXT = .dll.a
# The #M# is used to delete lines for icu-config
# Current full path directory.
--- a/source/config/mh-mingw64 2012-12-28 16:52:21.141964000 -0500
+++ b/source/config/mh-mingw64 2012-12-28 18:24:11.955818449 -0500
@@ -66,16 +66,8 @@
LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
A = a
-## An import library is needed for z/OS and MSVC
-IMPORT_LIB_EXT = .lib
-
-LIBPREFIX=
-
-# Change the stubnames so that poorly working FAT disks and installation programs can work.
-# This is also for backwards compatibility.
-DATA_STUBNAME = dt
-I18N_STUBNAME = in
-LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
+## import libraries are nice to have under mingw
+IMPORT_LIB_EXT = .dll.a
# The #M# is used to delete lines for icu-config
# Current full path directory.

View File

@ -0,0 +1,11 @@
--- a/source/Makefile.in 2012-12-17 13:17:16.000000000 -0500
+++ b/source/Makefile.in 2012-12-28 14:16:07.628294189 -0500
@@ -21,6 +21,8 @@
docsrchdir = $(docfilesdir)/search
docsrchfiles = $(docsrchdir)/*
+unexport TARGET
+
##
## Build directory information

View File

@ -0,0 +1,22 @@
diff -rup jasper-1.900.1.orig/src/libjasper/Makefile.am jasper-1.900.1.new/src/libjasper/Makefile.am
--- jasper-1.900.1.orig/src/libjasper/Makefile.am 2007-01-19 16:43:07.000000000 -0500
+++ jasper-1.900.1.new/src/libjasper/Makefile.am 2008-09-09 10:08:53.000000000 -0400
@@ -85,5 +85,5 @@ libjasper_la_LIBADD = \
# -release $(LT_RELEASE)
libjasper_la_LDFLAGS = \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+ -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
diff -rup jasper-1.900.1.orig/src/libjasper/Makefile.in jasper-1.900.1.new/src/libjasper/Makefile.in
--- jasper-1.900.1.orig/src/libjasper/Makefile.in 2007-01-19 16:54:45.000000000 -0500
+++ jasper-1.900.1.new/src/libjasper/Makefile.in 2008-09-09 10:08:43.000000000 -0400
@@ -290,7 +290,7 @@ libjasper_la_LIBADD = \
# -release $(LT_RELEASE)
libjasper_la_LDFLAGS = \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+ -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
all: all-recursive

View File

@ -0,0 +1,18 @@
diff -rup jasper-1.900.1/src/appl/tmrdemo.c jasper-1.900.1.new/src/appl/tmrdemo.c
--- jasper-1.900.1/src/appl/tmrdemo.c 2007-01-19 16:43:08.000000000 -0500
+++ jasper-1.900.1.new/src/appl/tmrdemo.c 2008-09-09 09:14:21.000000000 -0400
@@ -1,4 +1,5 @@
#include <jasper/jasper.h>
+#include <windows.h>
int main(int argc, char **argv)
{
@@ -43,7 +44,7 @@ int main(int argc, char **argv)
printf("zero time %.3f us\n", t * 1e6);
jas_tmr_start(&tmr);
- sleep(1);
+ Sleep(1);
jas_tmr_stop(&tmr);
t = jas_tmr_get(&tmr);
printf("time delay %.8f s\n", t);

View File

@ -0,0 +1,11 @@
--- a/Makefile.in 2015-03-30 20:34:35.930327000 -0400
+++ b/Makefile.in 2015-03-30 20:34:49.070330097 -0400
@@ -378,7 +378,7 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CFLAGS = -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
+AM_CFLAGS = -Wall -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
EXTRA_DIST = README.html README-WIN32.html config.h.win32 doc json-c.vcproj
SUBDIRS = . tests
lib_LTLIBRARIES = libjson-c.la

View File

@ -0,0 +1,11 @@
--- a/jmorecfg.h 2013-07-23 22:01:08.303919000 -0400
+++ b/jmorecfg.h 2013-07-23 22:48:46.230315172 -0400
@@ -235,7 +235,7 @@
*/
#ifndef HAVE_BOOLEAN
-typedef int boolean;
+typedef unsigned char boolean;
#endif
#ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */

View File

@ -0,0 +1,17 @@
--- a/jmorecfg.h 2013-01-06 12:59:42.000000000 -0500
+++ b/jmorecfg.h 2013-07-23 21:55:22.913095787 -0400
@@ -160,8 +160,14 @@
/* INT32 must hold at least signed 32-bit values. */
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
+#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
+#ifndef _BASETSD_H /* MinGW is slightly different */
+#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
typedef long INT32;
#endif
+#endif
+#endif
+#endif
/* Datatype used for image dimensions. The JPEG standard only supports
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore

View File

@ -0,0 +1,11 @@
--- a/Makefile.in 2015-04-03 13:27:40.555911000 -0400
+++ b/Makefile.in 2015-04-03 13:27:56.295616631 -0400
@@ -369,7 +369,7 @@
# libmng release @VERSION@
libmng_la_LDFLAGS = \
- -version-number @MNG_MAJOR_NR@:@MNG_MINOR_NR@:@MNG_RELEASE_NR@
+ -version-number @MNG_MAJOR_NR@:@MNG_MINOR_NR@:@MNG_RELEASE_NR@ -no-undefined
lib_LTLIBRARIES = libmng.la
include_HEADERS = libmng.h libmng_conf.h libmng_types.h

View File

@ -0,0 +1,11 @@
--- a/Makefile.am 2013-03-05 06:59:27.000000000 -0500
+++ b/Makefile.am 2013-11-06 19:11:28.139007712 -0500
@@ -9,7 +9,7 @@
# libmng release @VERSION@
libmng_la_LDFLAGS = \
- -version-number @MNG_MAJOR_NR@:@MNG_MINOR_NR@:@MNG_RELEASE_NR@
+ -version-number @MNG_MAJOR_NR@:@MNG_MINOR_NR@:@MNG_RELEASE_NR@ -no-undefined
lib_LTLIBRARIES = libmng.la

View File

@ -0,0 +1,29 @@
diff -ru libwmf-0.2.8.3.orig/Makefile.am libwmf-0.2.8.3/Makefile.am
--- libwmf-0.2.8.3.orig/Makefile.am 2002-12-05 17:09:53.000000000 +0000
+++ libwmf-0.2.8.3/Makefile.am 2004-06-11 13:28:56.149819830 +0100
@@ -1,10 +1,10 @@
if LIBWMF_BUILD_ALL
-DIRHEAVY = . src include fonts doc
+DIRHEAVY = . src include fonts
else
DIRHEAVY = . src include
endif
-DIST_SUBDIRS = . src include fonts doc
+DIST_SUBDIRS = . src include fonts
SUBDIRS = $(DIRHEAVY)
--- libwmf-0.2.8.4.orig/Makefile.in 2005-07-28 09:46:20.000000000 +0100
+++ libwmf-0.2.8.4/Makefile.in 2005-07-28 09:46:29.000000000 +0100
@@ -231,8 +231,8 @@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
@LIBWMF_BUILD_ALL_FALSE@DIRHEAVY = . src include
-@LIBWMF_BUILD_ALL_TRUE@DIRHEAVY = . src include fonts doc
-DIST_SUBDIRS = . src include fonts doc
+@LIBWMF_BUILD_ALL_TRUE@DIRHEAVY = . src include fonts
+DIST_SUBDIRS = . src include fonts
SUBDIRS = $(DIRHEAVY)
bin_SCRIPTS = libwmf-config
WMFEXAMPLES = \

View File

@ -0,0 +1,36 @@
diff -r -u libwmf-0.2.8.3.old/configure.in libwmf-0.2.8.3/configure.in
--- libwmf-0.2.8.3.old/configure.in 2004-02-10 12:47:44.000000000 +0000
+++ libwmf-0.2.8.3/configure.in 2004-05-20 14:16:15.804198513 +0100
@@ -764,14 +764,15 @@
fi
])
-AC_ARG_WITH(fontdir,[ --with-fontdir=DIR install Type1 fonts in DIR],[
- WMF_FONTDIR=$withval
-],[ if test "x$prefix" = "xNONE"; then
- WMF_FONTDIR=$ac_default_prefix/share/$PACKAGE/fonts
- else
- WMF_FONTDIR=$prefix/share/$PACKAGE/fonts
- fi
-])
+#AC_ARG_WITH(fontdir,[ --with-fontdir=DIR install Type1 fonts in DIR],[
+# WMF_FONTDIR=$withval
+#],[ if test "x$prefix" = "xNONE"; then
+# WMF_FONTDIR=$ac_default_prefix/share/$PACKAGE/fonts
+# else
+# WMF_FONTDIR=$prefix/share/$PACKAGE/fonts
+# fi
+#])
+WMF_FONTDIR=$datadir/$PACKAGE/fonts
AC_ARG_WITH(sysfontmap,[ --with-sysfontmap=FILE [default is /usr/share/fonts/fontmap]],[
WMF_SYS_FONTMAP=$withval
diff -r -u libwmf-0.2.8.3.old/fonts/Makefile.am libwmf-0.2.8.3/fonts/Makefile.am
--- libwmf-0.2.8.3.old/fonts/Makefile.am 2001-08-11 15:49:27.000000000 +0100
+++ libwmf-0.2.8.3/fonts/Makefile.am 2004-05-20 14:17:22.970701362 +0100
@@ -1,4 +1,4 @@
-fontdir = @WMF_FONTDIR@
+fontdir = $(datadir)/libwmf/fonts/
bin_SCRIPTS = libwmf-fontmap

View File

@ -0,0 +1,27 @@
--- libwmf-0.2.8.3/libwmf-config.in.noextras-2 2004-02-10 06:41:26.000000000 -0600
+++ libwmf-0.2.8.3/libwmf-config.in 2005-07-06 15:18:26.000000000 -0500
@@ -105,7 +105,7 @@
libwmf_buildstyle=@LIBWMF_BUILDSTYLE@
if test $libwmf_buildstyle = heavy; then
- wmf_libs="-lwmf -lwmflite $wmf_liblflags"
+ wmf_libs="-lwmf -lwmflite"
else
wmf_libs="-lwmflite"
fi
@@ -116,7 +116,7 @@
includes="$includes -I@includedir@/libwmf/gd"
fi
if test "$lib_wmf" = "yes"; then
- includes="$includes -I@includedir@"
+ includes="$includes"
fi
echo $includes
fi
@@ -134,5 +134,5 @@
fi
done
- echo $libdirs $my_wmf_libs
+ echo $my_wmf_libs
fi

View File

@ -0,0 +1,18 @@
diff -ru libwmf-0.2.8.4.orig/src/font.c libwmf-0.2.8.4/src/font.c
--- libwmf-0.2.8.4.orig/src/font.c 2005-07-27 21:35:06.000000000 +0100
+++ libwmf-0.2.8.4/src/font.c 2006-01-03 12:53:38.000000000 +0000
@@ -1429,11 +1429,9 @@
if (GS->len == 0) return (0);
name = font->lfFaceName;
- if (name == 0)
- { WMF_DEBUG (API,"No font name?");
- API->err = wmf_E_Glitch;
- return (0);
- }
+
+ if (name == 0 || name[0] == 0)
+ name = "Times";
/* Find first white-space character or eol
*/

View File

@ -0,0 +1,27 @@
--- libwmf-0.2.8.4.orig/src/player.c 2002-12-10 19:30:26.000000000 +0000
+++ libwmf-0.2.8.4/src/player.c 2006-07-12 15:12:52.000000000 +0100
@@ -42,6 +42,7 @@
#include "player/defaults.h" /* Provides: default settings */
#include "player/record.h" /* Provides: parameter mechanism */
#include "player/meta.h" /* Provides: record interpreters */
+#include <stdint.h>
/**
* @internal
@@ -132,8 +134,14 @@
}
}
-/* P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)-3) * 2 * sizeof (unsigned char));
- */ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
+ if (MAX_REC_SIZE(API) > UINT32_MAX / 2)
+ {
+ API->err = wmf_E_InsMem;
+ WMF_DEBUG (API,"bailing...");
+ return (API->err);
+ }
+
+ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
if (ERR (API))
{ WMF_DEBUG (API,"bailing...");

View File

@ -0,0 +1,12 @@
diff -urN libwmf-0.2.8.4.old/src/ipa/ipa/bmp.h libwmf-0.2.8.4/src/ipa/ipa/bmp.h
--- libwmf-0.2.8.4.old/src/ipa/ipa/bmp.h 2011-05-23 19:14:23.000000000 +0200
+++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2011-05-23 19:15:11.000000000 +0200
@@ -66,7 +66,7 @@
return;
}
- if (setjmp (png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{ WMF_DEBUG (API,"Failed to write bitmap as PNG! (setjmp failed)");
png_destroy_write_struct (&png_ptr,&info_ptr);
wmf_free (API,buffer);

View File

@ -0,0 +1,130 @@
--- libwmf-0.2.8.4.orig/configure.in 2006-05-02 09:08:35.000000000 +0100
+++ libwmf-0.2.8.4/configure.in 2006-05-02 09:21:10.000000000 +0100
@@ -884,7 +884,7 @@
src/extra/gd/Makefile
src/ipa/Makefile
src/convert/Makefile
-libwmf-config
+libwmf.pc
libwmf.spec
])
--- /dev/null 2006-04-29 13:38:37.035974750 +0100
+++ libwmf-0.2.8.4/libwmf-config 2006-05-02 09:20:49.000000000 +0100
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+exec_prefix_set=no
+
+prefix=`pkg-config --variable=prefix libwmf`
+exec_prefix=`pkg-config --variable=exec_prefix libwmf`
+
+usage()
+{
+ cat <<EOF
+Usage: libwmf-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+Libraries/Headers:
+ gd
+ wmf
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+lib_gd=no
+lib_wmf=yes
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --version)
+ pkg-config --modversion libwmf
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ gd)
+ lib_gd=yes
+ ;;
+ wmf)
+ lib_wmf=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+if test "$echo_cflags" = "yes"; then
+ pkg-config --cflags libwmf
+fi
+
+if test "$echo_libs" = "yes"; then
+ pkg-config --libs libwmf
+fi
--- /dev/null 2006-04-29 13:38:37.035974750 +0100
+++ libwmf-0.2.8.4/libwmf.pc.in 2006-05-02 09:21:24.000000000 +0100
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libwmf
+Description: A library for reading and converting Windows MetaFile vector graphics (WMF)
+Version: @LIBWMF_VERSION@
+Libs: -lwmf -lwmflite @WMF_LIBFLAGS@
+Cflags: @WMF_CONFIG_CFLAGS@
--- libwmf-0.2.8.4.orig/Makefile.am 2006-05-02 09:08:35.000000000 +0100
+++ libwmf-0.2.8.4/Makefile.am 2006-05-02 09:28:34.000000000 +0100
@@ -10,6 +10,9 @@
bin_SCRIPTS = libwmf-config
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libwmf.pc
+
WMFEXAMPLES = \
examples/2doorvan.wmf \
examples/Eg.wmf \

View File

@ -0,0 +1,520 @@
diff -ru libwmf-0.2.8.4/src/extra/gd/gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd.c
--- libwmf-0.2.8.4/src/extra/gd/gd.c 2005-07-27 21:35:05.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.c 2006-11-16 12:27:05.000000000 +0000
@@ -249,6 +249,7 @@
}
HWBType;
+#if 0
static HWBType *
RGB_to_HWB (RGBType RGB, HWBType * HWB)
{
@@ -308,7 +309,6 @@
return diff;
}
-#if 0
/*
* This is not actually used, but is here for completeness, in case someone wants to
* use the HWB stuff for anything else...
@@ -355,6 +355,7 @@
}
#endif
+#if 0
int
gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
{
@@ -384,6 +385,7 @@
}
return ct;
}
+#endif
int
gdImageColorExact (gdImagePtr im, int r, int g, int b)
@@ -677,7 +679,7 @@
}
}
-int
+static int
gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
{
int p = gdImageGetPixel (im, x, y);
@@ -1286,11 +1288,11 @@
return len;
}
-#ifndef HAVE_LSQRT
+#if 0
/* If you don't have a nice square root function for longs, you can use
** this hack
*/
-long
+static long
lsqrt (long n)
{
long result = (long) sqrt ((double) n);
@@ -2250,7 +2252,7 @@
}
}
-int gdCompareInt (const void *a, const void *b);
+static int gdCompareInt (const void *a, const void *b);
/* THANKS to Kirsten Schulz for the polygon fixes! */
diff -ru libwmf-0.2.8.4/src/extra/gd/gdcache.h libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h
--- libwmf-0.2.8.4/src/extra/gd/gdcache.h 2001-08-21 15:40:33.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h 2006-11-16 12:13:40.000000000 +0000
@@ -41,6 +41,9 @@
/*********************************************************/
/* #include <malloc.h> */
+
+#pragma GCC visibility push(hidden)
+
#ifndef NULL
#define NULL (void *)0
#endif
@@ -81,3 +84,5 @@
void *
gdCacheGet( gdCache_head_t *head, void *keydata );
+
+#pragma GCC visibility pop
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_clip.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h
--- libwmf-0.2.8.4/src/extra/gd/gd_clip.h 2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h 2006-11-16 12:11:49.000000000 +0000
@@ -1,6 +1,8 @@
#ifndef GD_CLIP_H
#define GD_CLIP_H 1
+#pragma GCC visibility push(hidden)
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -23,4 +25,6 @@
}
#endif
+#pragma GCC visibility pop
+
#endif /* GD_CLIP_H */
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontg.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h
--- libwmf-0.2.8.4/src/extra/gd/gdfontg.h 2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h 2006-11-16 12:12:03.000000000 +0000
@@ -2,6 +2,8 @@
#ifndef _GDFONTG_H_
#define _GDFONTG_H_ 1
+#pragma GCC visibility push(hidden)
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -25,5 +27,7 @@
}
#endif
+#pragma GCC visibility pop
+
#endif
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontl.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h
--- libwmf-0.2.8.4/src/extra/gd/gdfontl.h 2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h 2006-11-16 12:12:11.000000000 +0000
@@ -2,6 +2,8 @@
#ifndef _GDFONTL_H_
#define _GDFONTL_H_ 1
+#pragma GCC visibility push(hidden)
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -26,5 +28,7 @@
}
#endif
+#pragma GCC visibility pop
+
#endif
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontmb.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h
--- libwmf-0.2.8.4/src/extra/gd/gdfontmb.h 2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h 2006-11-16 12:12:19.000000000 +0000
@@ -2,6 +2,8 @@
#ifndef _GDFONTMB_H_
#define _GDFONTMB_H_ 1
+#pragma GCC visibility push(hidden)
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -24,5 +26,7 @@
}
#endif
+#pragma GCC visibility pop
+
#endif
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfonts.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h
--- libwmf-0.2.8.4/src/extra/gd/gdfonts.h 2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h 2006-11-16 12:12:28.000000000 +0000
@@ -2,6 +2,8 @@
#ifndef _GDFONTS_H_
#define _GDFONTS_H_ 1
+#pragma GCC visibility push(hidden)
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -24,5 +26,7 @@
}
#endif
+#pragma GCC visibility pop
+
#endif
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontt.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h
--- libwmf-0.2.8.4/src/extra/gd/gdfontt.h 2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h 2006-11-16 12:12:36.000000000 +0000
@@ -2,6 +2,8 @@
#ifndef _GDFONTT_H_
#define _GDFONTT_H_ 1
+#pragma GCC visibility push(hidden)
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -25,5 +27,7 @@
}
#endif
+#pragma GCC visibility pop
+
#endif
diff -ru libwmf-0.2.8.4/src/extra/gd/gdft.c libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c
--- libwmf-0.2.8.4/src/extra/gd/gdft.c 2005-07-27 21:35:05.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c 2006-11-16 12:24:50.000000000 +0000
@@ -533,7 +533,7 @@
}
/* draw_bitmap - transfers glyph bitmap to GD image */
-/* static */ char *
+static char *
gdft_draw_bitmap (gdImage * im, int fg, FT_Bitmap bitmap, int pen_x, int pen_y)
{
unsigned char *pixel = 0;
@@ -643,7 +643,7 @@
return (char *) NULL;
}
-int
+static int
gdroundupdown (FT_F26Dot6 v1, int updown)
{
return (!updown)
@@ -651,7 +651,9 @@
: (v1 > 0 ? ((v1 + 63) >> 6) : v1 >> 6);
}
+#pragma GCC visibility push(hidden)
extern int any2eucjp (char *, char *, unsigned int);
+#pragma GCC visibility pop
/********************************************************************/
/* gdImageStringFT - render a utf8 string onto a gd image */
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd2.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c
--- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c 2005-07-27 21:35:05.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c 2006-11-16 12:21:28.000000000 +0000
@@ -34,8 +34,10 @@
}
t_chunk_info;
+#pragma GCC visibility push(hidden)
extern int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag);
extern void _gdPutColors (gdImagePtr im, gdIOCtx * out);
+#pragma GCC visibility pop
/* */
/* Read the extra info in the gd2 header. */
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c
--- libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2005-07-27 21:35:05.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c 2006-11-16 12:21:43.000000000 +0000
@@ -11,6 +11,11 @@
/* Exported functions: */
extern void gdImageGd (gdImagePtr im, FILE * out);
+#pragma GCC visibility push(hidden)
+int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag);
+void _gdPutColors (gdImagePtr im, gdIOCtx * out);
+#pragma GCC visibility pop
+
/* Use this for commenting out debug-print statements. */
/* Just use the first '#define' to allow all the prints... */
diff -ru libwmf-0.2.8.4/src/extra/gd/gd.h libwmf-0.2.8.4.symbols/src/extra/gd/gd.h
--- libwmf-0.2.8.4/src/extra/gd/gd.h 2002-12-05 20:09:11.000000000 +0000
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.h 2006-11-16 12:14:11.000000000 +0000
@@ -25,6 +25,8 @@
#include <gd_io.h>
#include <gd_clip.h>
+#pragma GCC visibility push(hidden)
+
/* The maximum number of palette entries in palette-based images.
In the wonderful new world of gd 2.0, you can of course have
many more colors when using truecolor mode. */
@@ -497,6 +499,8 @@
/* resolution affects ttf font rendering, particularly hinting */
#define GD_RESOLUTION 96 /* pixels per inch */
+#pragma GCC visibility pop
+
#ifdef __cplusplus
}
#endif
diff -ru libwmf-0.2.8.4/src/extra/gd/gdhelpers.h libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h
--- libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2001-03-28 10:37:31.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h 2006-11-16 12:12:55.000000000 +0000
@@ -1,6 +1,8 @@
#ifndef GDHELPERS_H
#define GDHELPERS_H 1
+#pragma GCC visibility push(hidden)
+
/* TBB: strtok_r is not universal; provide an implementation of it. */
extern char *gd_strtok_r(char *s, char *sep, char **state);
@@ -13,5 +15,7 @@
void *gdMalloc(size_t size);
void *gdRealloc(void *ptr, size_t size);
+#pragma GCC visibility pop
+
#endif /* GDHELPERS_H */
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_io.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h
--- libwmf-0.2.8.4/src/extra/gd/gd_io.h 2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h 2006-11-16 12:13:08.000000000 +0000
@@ -2,6 +2,8 @@
#define GD_IO_H 1
#include <stdio.h>
+
+#pragma GCC visibility push(hidden)
typedef struct gdIOCtx {
int (*getC)(struct gdIOCtx*);
@@ -36,4 +38,6 @@
int gdSeek(gdIOCtx *ctx, const int);
long gdTell(gdIOCtx *ctx);
+#pragma GCC visibility pop
+
#endif
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c
--- libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c 2005-07-27 21:35:06.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c 2006-11-16 12:28:13.000000000 +0000
@@ -99,7 +99,7 @@
return rv;
}
-void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile);
+static void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile);
void
gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
@@ -266,7 +266,7 @@
return im;
}
-void
+static void
jpeg_gdIOCtx_src (j_decompress_ptr cinfo,
gdIOCtx * infile);
@@ -511,7 +511,7 @@
* before any data is actually read.
*/
-void
+static void
init_source (j_decompress_ptr cinfo)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
@@ -559,7 +559,7 @@
#define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
-safeboolean
+static safeboolean
fill_input_buffer (j_decompress_ptr cinfo)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
@@ -627,7 +627,7 @@
* buffer is the application writer's problem.
*/
-void
+static void
skip_input_data (j_decompress_ptr cinfo, long num_bytes)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
@@ -669,7 +669,7 @@
* for error exit.
*/
-void
+static void
term_source (j_decompress_ptr cinfo)
{
@@ -742,7 +742,7 @@
* before any data is actually written.
*/
-void
+static void
init_destination (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
@@ -780,7 +780,7 @@
* write it out when emptying the buffer externally.
*/
-safeboolean
+static safeboolean
empty_output_buffer (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
@@ -805,7 +805,7 @@
* for error exit.
*/
-void
+static void
term_destination (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
diff -ru libwmf-0.2.8.4/src/extra/gd/gdkanji.c libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c
--- libwmf-0.2.8.4/src/extra/gd/gdkanji.c 2001-05-19 14:09:34.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c 2006-11-16 12:29:42.000000000 +0000
@@ -555,6 +555,11 @@
return kanji;
}
+#pragma GCC visibility push(hidden)
+int
+any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max);
+#pragma GCC visibility pop
+
int
any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max)
{
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_topal.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c
--- libwmf-0.2.8.4/src/extra/gd/gd_topal.c 2005-07-27 21:35:06.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c 2006-11-16 12:25:45.000000000 +0000
@@ -1129,7 +1129,7 @@
* Map some rows of pixels to the output colormapped representation.
*/
-void
+static void
pass2_no_dither (gdImagePtr im, my_cquantize_ptr cquantize)
/* This version performs no dithering */
{
@@ -1217,7 +1217,7 @@
#endif
-void
+static void
pass2_fs_dither (gdImagePtr im, my_cquantize_ptr cquantize)
/* This version performs Floyd-Steinberg dithering */
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c
--- libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c 2001-05-19 14:09:34.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c 2006-11-16 12:28:33.000000000 +0000
@@ -67,7 +67,7 @@
** Wrapper around gdPutC for use with writewbmp
**
*/
-void
+static void
gd_putout (int i, void *out)
{
gdPutC (i, (gdIOCtx *) out);
@@ -79,7 +79,7 @@
** Wrapper around gdGetC for use with readwbmp
**
*/
-int
+static int
gd_getin (void *in)
{
return (gdGetC ((gdIOCtx *) in));
diff -ru libwmf-0.2.8.4/src/extra/gd/gdxpm.c libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c
--- libwmf-0.2.8.4/src/extra/gd/gdxpm.c 2001-05-19 14:09:34.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c 2006-11-16 12:18:29.000000000 +0000
@@ -10,6 +10,7 @@
#include "gd.h"
#include "gdhelpers.h"
+#if 0
#ifndef HAVE_XPM
gdImagePtr
gdImageCreateFromXpm (char *filename)
@@ -146,3 +147,4 @@
return (im);
}
#endif
+#endif
diff -ru libwmf-0.2.8.4/src/extra/gd/jisx0208.h libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h
--- libwmf-0.2.8.4/src/extra/gd/jisx0208.h 2001-03-28 10:37:35.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h 2006-11-16 12:13:19.000000000 +0000
@@ -1,5 +1,8 @@
#ifndef JISX0208_H
#define JISX0208_H
+
+#pragma GCC visibility push(hidden)
+
/* This file was derived from "src/VF_Ftype.c" in VFlib2-2.24.2
by Dr. Kakugawa */
@@ -1202,4 +1205,6 @@
0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
0x2178, 0x2179, 0xFFE2, 0xFFE4, 0xFF07, 0xFF02}};
+#pragma GCC visibility pop
+
#endif /* JISX0208_H */
diff -ru libwmf-0.2.8.4/src/extra/gd/wbmp.h libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h
--- libwmf-0.2.8.4/src/extra/gd/wbmp.h 2001-03-28 10:37:37.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h 2006-11-16 12:14:19.000000000 +0000
@@ -12,6 +12,8 @@
#ifndef __WBMP_H
#define __WBMP_H 1
+#pragma GCC visibility push(hidden)
+
/* WBMP struct
** -----------
@@ -44,4 +46,6 @@
void freewbmp( Wbmp *wbmp );
void printwbmp( Wbmp *wbmp );
+#pragma GCC visibility pop
+
#endif

View File

@ -0,0 +1,10 @@
--- libwmf-0.2.8.4/src/extra/gd/gd_clip.c.CVE-2009-1364-im-clip-list 2009-04-24 04:06:44.000000000 -0400
+++ libwmf-0.2.8.4/src/extra/gd/gd_clip.c 2009-04-24 04:08:30.000000000 -0400
@@ -70,6 +70,7 @@ void gdClipSetAdd(gdImagePtr im,gdClipRe
{ more = gdRealloc (im->clip->list,(im->clip->max + 8) * sizeof (gdClipRectangle));
if (more == 0) return;
im->clip->max += 8;
+ im->clip->list = more;
}
im->clip->list[im->clip->count] = (*rect);
im->clip->count++;

View File

@ -0,0 +1,24 @@
diff -ur libxslt-1.1.26/configure.in libxslt-1.1.26/configure.in
--- libxslt-1.1.26/configure.in 2009-09-24 16:27:30.000000000 +0200
+++ libxslt-1.1.26/configure.in 2009-11-11 17:51:06.000000000 +0100
@@ -627,7 +627,7 @@
WIN32_EXTRA_LDFLAGS="-no-undefined"
;;
*-*-mingw*)
- WIN32_EXTRA_LIBADD="-lwsock32"
+ WIN32_EXTRA_LIBADD="-lws2_32 -lmswsock"
WIN32_EXTRA_LDFLAGS="-no-undefined"
AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation])
AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around])
Only in libxslt-1.1.26: configure.in.orig
diff -ur libxslt-1.1.26/libxslt/security.c libxslt-1.1.26/libxslt/security.c
--- libxslt-1.1.26/libxslt/security.c 2009-08-13 15:04:24.000000000 +0200
+++ libxslt-1.1.26/libxslt/security.c 2009-11-11 17:51:06.000000000 +0100
@@ -39,6 +39,7 @@
#ifndef INVALID_FILE_ATTRIBUTES
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#endif
+#define mkdir(d,m) _mkdir(d)
#endif
#ifndef HAVE_STAT

View File

@ -0,0 +1,10 @@
--- a/poppler/GlobalParams.cc 2015-07-18 10:25:03.773578000 -0400
+++ b/poppler/GlobalParams.cc 2015-07-18 10:41:42.326920754 -0400
@@ -56,6 +56,7 @@
# endif
#endif
#ifdef _WIN32
+# include <windows.h>
# include <shlobj.h>
# include <mbstring.h>
#endif

View File

@ -0,0 +1,8 @@
--- a/install.mk 2012-12-30 01:59:23.989187337 -0500
+++ b/install.mk 2012-12-30 15:13:26.126841253 -0500
@@ -0,0 +1,5 @@
+install:
+ mkdir -p $(DESTDIR)/$(PREFIX)/bin
+ mkdir -p $(DESTDIR)/$(PREFIX)/lib
+ $(INSTALL) pthreadGC2.dll $(DESTDIR)/$(PREFIX)/bin/pthreadGC2.dll
+ $(INSTALL) libpthreadGC2.a $(DESTDIR)/$(PREFIX)/lib/libpthread.a

View File

@ -0,0 +1,15 @@
--- a/Tools/GNUmakefile.am 2013-06-28 11:37:12.433956926 -0400
+++ b/Tools/GNUmakefile.am 2013-06-28 11:40:42.681835206 -0400
@@ -1,12 +1,6 @@
noinst_PROGRAMS += \
Programs/ImageDiff
-if ENABLE_WEBKIT1
-noinst_PROGRAMS += \
- Programs/DumpRenderTree \
- Programs/GtkLauncher
-endif
-
# GtkLauncher
Programs_GtkLauncher_CPPFLAGS = \
-I$(srcdir)/Source/WebKit/gtk \

View File

@ -0,0 +1,31 @@
--- a/autogen.sh 2012-12-28 01:35:14.039456371 -0500
+++ b/autogen.sh 2012-12-28 20:52:50.687399680 -0500
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+# Allow invocation from a separate build directory; in that case, we change
+# to the source directory to run the auto*, then change back before running configure
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+rm -f $top_srcdir/autom4te.cache
+
+touch README INSTALL
+
+Tools/gtk/override-feature-defines $ORIGDIR
+
+if test -z `which autoreconf`; then
+ echo "Error: autoreconf not found, please install it."
+ exit 1
+fi
+autoreconf --verbose --install -I Source/autotools $ACLOCAL_FLAGS|| exit $?
+
+cd $ORIGDIR || exit 1
+
+if test -z "$NOCONFIGURE"; then
+ $srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
+fi
+

View File

@ -0,0 +1,14 @@
Index: /trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
===================================================================
--- /trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp (revision 159938)
+++ /trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp (revision 159939)
@@ -40,6 +40,7 @@
#include <cairo-ft.h>
#include <cairo.h>
-#include <freetype/freetype.h>
-#include <freetype/tttables.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TRUETYPE_TABLES_H
#include <hb.h>
#include <wtf/text/CString.h>

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<moduleset>
<repository type="git" name="gitlab.gnome.org" default="yes"
href="https://gitlab.gnome.org/GNOME/"/>
<include href="gtk+.moduleset"/>
<include href="webkitgtk.moduleset"/>
<include href="misclibs.moduleset"/>
<include href="gdb.moduleset"/>
<autotools id="babl">
<branch/>
</autotools>
<autotools id="gegl-0.2">
<branch module="gegl" revision="gegl-0-2"/>
<dependencies>
<dep package="glib2"/>
<dep package="babl"/>
</dependencies>
</autotools>
<autotools id="gegl">
<branch/>
<dependencies>
<dep package="glib2"/>
<dep package="babl"/>
<dep package="json-glib"/>
<dep package="libpng"/>
<dep package="libjpeg-turbo"/>
<dep package="libwebp"/>
</dependencies>
</autotools>
<metamodule id="pika-common">
<dependencies>
<dep package="babl"/>
<dep package="gtk2"/>
<dep package="xz"/>
<dep package="librsvg"/>
<dep package="libexif"/>
<dep package="iso-codes"/>
<!-- <dep package="libwmf"/> -->
<dep package="ghostscript"/>
</dependencies>
<suggests>
<!--<dep package="webkitgtk"/>-->
<dep package="libmng"/>
<dep package="gdb"/>
<dep package="poppler"/>
</suggests>
</metamodule>
<autotools id="pika-stable">
<branch module="pika" revision="pika-2-8"/>
<dependencies>
<dep package="pika-common"/>
<dep package="lcms"/>
<dep package="gegl-0.2"/>
</dependencies>
</autotools>
<autotools id="pika-dev">
<branch module="pika" revision="master"/>
<dependencies>
<dep package="pika-common"/>
<dep package="lcms2"/>
<dep package="libgexiv2"/>
<dep package="libmypaint"/>
<dep package="gegl"/>
<dep package="gnome-icon-theme"/>
</dependencies>
</autotools>
<autotools id="pika-gtk3">
<branch module="pika" revision="origin/gtk3-port"/>
<dependencies>
<dep package="pika-common"/>
<dep package="lcms2"/>
<dep package="gegl"/>
<dep package="gtk3"/>
</dependencies>
</autotools>
</moduleset>

View File

@ -0,0 +1,33 @@
#!/bin/sh
set -e
BUILD_ARCH=${BUILD_ARCH:-i686}
if [ "x$BUILD_FLAVOUR" = "xdbg" ]; then
EXT="-dbg-$BUILD_ARCH"
else
EXT="-$BUILD_ARCH"
fi
init_target (){
echo "Cleaning Target $1"
rm -rf targets/$1 || true
mkdir -p targets/$1/_jhbuild/manifests
cp -a targets/pika-common$EXT/_jhbuild/manifests/* targets/$1/_jhbuild/manifests
cp -a targets/pika-common$EXT/_jhbuild/packagedb.xml targets/$1/_jhbuild/
}
chmod a-w win32.cache
export MODULE=pika-common
jhbuild --file=build.jhbuildrc $* build pika-common || true
./targetisunchanged pika-common$EXT pika-stable$EXT || init_target pika-stable$EXT
export MODULE=pika-stable
jhbuild --file=build.jhbuildrc $* build --start-at=pika-common || true
./targetisunchanged pika-common$EXT pika-dev$EXT || init_target pika-dev$EXT
export MODULE=pika-dev
jhbuild --file=build.jhbuildrc $* build --start-at=pika-common || true
chmod u+w win32.cache

View File

@ -0,0 +1,10 @@
#!/bin/bash
sort targets/$1/_jhbuild/packagedb.xml > /tmp/packagedb.xml.a
sort targets/$2/_jhbuild/packagedb.xml > /tmp/packagedb.xml.b
COUNT=`diff -u /tmp/packagedb.xml.a /tmp/packagedb.xml.b | grep "^-" --count --max-count 2`
rm /tmp/packagedb.xml.{a,b}
exit $((COUNT - 1))

View File

@ -0,0 +1,5 @@
set (CMAKE_SYSTEM_NAME Windows)
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<moduleset>
<repository type="tarball" name="gnome.org"
href="http://ftp.gnome.org/pub/gnome/sources/" />
<repository type="tarball" name="webkitgtk.org"
href="http://webkitgtk.org/releases/" />
<repository type="tarball" name="sqlite.org"
href="http://www.sqlite.org/" />
<repository type="tarball" name="sourceware.org"
href="ftp://sourceware.org/pub/" />
<include href="gtk+.moduleset"/>
<autotools id="mingw32-pthreads" autogen-sh=" || true" makeargs="clean GC -j1" makeinstallargs=" -f install.mk">
<branch version="2.9.1" repo="sourceware.org"
module="pthreads-win32/pthreads-w32-2-9-1-release.tar.gz"
hash="md5:36ba827d6aa0fa9f9ae740a35626e2e3">
<patch file="pthreads-add-install-mk.patch" strip="1"/>
</branch>
</autotools>
<autotools id="libsoup" autogen-sh="configure">
<branch version="2.44.2" repo="gnome.org"
module="libsoup/2.44/libsoup-2.44.2.tar.xz"
hash="sha256:e7e4b5ab74a6c00fc267c9f5963852d28759ad3154dab6388e2d6e1962d598f3">
</branch>
<dependencies>
<dep package="glib2"/>
<dep package="libxml2"/>
<dep package="sqlite"/>
</dependencies>
</autotools>
<autotools id="sqlite" autogen-sh="configure">
<branch version="3.8.1" repo="sqlite.org"
module="2013/sqlite-autoconf-3080100.tar.gz"
hash="sha1:42464b07df2d6f8aa28f73ce4cc6d48b47be810e">
</branch>
</autotools>
<autotools id="webkitgtk">
<branch version="2.0.4" repo="webkitgtk.org"
module="webkitgtk-2.0.4.tar.xz"
hash="sha1:3b9ddbdc61e38b5c8fdd108e891b7db5fb12d55a">
<patch file="webkit-add-autogen.patch" strip="1"/>
<patch file="webkit-2.0-disable-tests.patch" strip="1"/>
<!-- Part of: http://trac.webkit.org/changeset/159939 -->
<patch file="webkit-fix-freetype.diff" strip="2"/>
</branch>
<dependencies>
<dep package="mingw32-pthreads"/>
<dep package="libsoup"/>
<dep package="sqlite"/>
<dep package="gtk2"/>
<dep package="libwebp"/>
<dep package="libxslt"/>
</dependencies>
</autotools>
</moduleset>

View File

@ -0,0 +1,6 @@
ac_cv_alignof_guint32=${ac_cv_alignof_guint32=4}
ac_cv_alignof_guint64=${ac_cv_alignof_guint64=8}
ac_cv_alignof_unsigned_long=${ac_cv_alignof_unsigned_long=4}
glib_cv_long_long_format=I64
glib_cv_stack_grows=no

35
build/windows/meson.build Normal file
View File

@ -0,0 +1,35 @@
# Windows specific
configure_file(
input : 'pika-plug-ins.rc.in',
output: 'pika-plug-ins.rc',
configuration: versionconfig,
)
configure_file(
input : 'pika.rc.in',
output: 'pika.rc',
configuration: versionconfig,
)
# Basically, the build rules below do nothing (a mere `python -c 'exit()'` call).
# But because they depends on `git-version.h`, meson ensure that it gets built first,
# Then the result of this targets is used in 35+ resource compiler build rules.
#
# Nasty trick indeed, but it fixes race condition issue described in GNOME/PIKA#6257.
pika_plugins_rc = custom_target('pika_plugins_rc',
build_by_default: true,
build_always_stale: true,
command: [python, '-c', 'exit()'],
depends: generate_version_h ? [gitversion_h] : [],
output: ['pika-plug-ins.rc']
)
pika_app_rc = custom_target('pika_app_rc',
build_by_default: true,
build_always_stale: true,
command: [python, '-c', 'exit()'],
depends: generate_version_h ? [gitversion_h] : [],
output: ['pika.rc']
)

Some files were not shown because too many files have changed in this diff Show More