Skip to content

Commit

Permalink
Add source files for Windows AIO
Browse files Browse the repository at this point in the history
  • Loading branch information
jmichault authored and Nick-Hall committed Jul 31, 2023
1 parent ac8ea95 commit 0f73812
Show file tree
Hide file tree
Showing 12 changed files with 1,012 additions and 0 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ include RELEASE_NOTES
include TODO
include CONTRIBUTING
include TestPlan.txt
recursive-include aio *
recursive-include data *
recursive-include debian *
recursive-include docs *
Expand Down
25 changes: 25 additions & 0 deletions aio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
The files in this directory are used to build the Windows AIO (All In One) installer.

To build AIO for the master branch :

1. install msys2
* download msys2 from <https://www.msys2.org/> .
* install with default options.
* run "MSYS2 MINGW64"
* upgrade system : ` pacman -Syuu --noconfirm ` (twice if first run close msys2).

2. download sources from github :

```
pacman -S git --noconfirm
git clone https://github.com/gramps-project/gramps.git
```

3. build AIO :

```
cd gramps/aio
./build.sh
```

result is in gramps/aio/mingw64/src
44 changes: 44 additions & 0 deletions aio/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# install prerequisites :
## prerequisites in msys packages :
pacman -S --needed --noconfirm mingw-w64-x86_64-python-pip mingw-w64-x86_64-python3-bsddb3 mingw-w64-x86_64-gexiv2 mingw-w64-x86_64-ghostscript mingw-w64-x86_64-python3-cairo mingw-w64-x86_64-python3-gobject mingw-w64-x86_64-python3-icu mingw-w64-x86_64-iso-codes mingw-w64-x86_64-hunspell mingw-w64-x86_64-hunspell-en mingw-w64-x86_64-enchant perl-XML-Parser intltool mingw-w64-x86_64-python3-lxml mingw-w64-x86_64-python3-jsonschema mingw-w64-x86_64-gtkspell3 mingw-w64-x86_64-geocode-glib mingw-w64-x86_64-python3-pillow git mingw-w64-x86_64-graphviz mingw-w64-x86_64-goocanvas mingw-w64-x86_64-osm-gps-map base-devel mingw-w64-x86_64-toolchain subversion mingw-w64-x86_64-db mingw-w64-x86_64-python-bsddb3 mingw-w64-x86_64-graphviz mingw-w64-x86_64-python-graphviz mingw-w64-x86_64-osm-gps-map mingw-w64-x86_64-nsis mingw-w64-x86_64-python-cx-freeze mingw-w64-x86_64-python3-requests mingw-w64-x86_64-enchant mingw-w64-x86_64-adwaita-icon-theme mingw-w64-x86_64-python-networkx mingw-w64-x86_64-python-psycopg2 upx mingw-w64-x86_64-python-packaging unzip mingw-w64-x86_64-python3-nose mingw-w64-x86_64-python-wheel
python3 -m pip install --upgrade pip
## prerequisites in pip packages
pip3 install --upgrade pydot pydotplus requests asyncio
## berkeley db, from sources (6.0.30 wanted, msys2 provides actually 6.0.19)
mkdir ../build
cd ../build
if [ ! -f mingw-w64-x86_64-db-6.0.30-1-any.pkg.tar.xz ] ; then
wget https://github.com/bpisoj/MINGW-packages/releases/download/v5.0/mingw-w64-x86_64-db-6.0.30-1-any.pkg.tar.xz
fi
pacman -U --noconfirm mingw-w64-x86_64-db-6.0.30-1-any.pkg.tar.xz
pacman -S --noconfirm mingw-w64-x86_64-python3-bsddb3
## pygraphviz, from sources
if [ ! -f Pygraphviz-1.4rc1.zip ] ; then
wget https://gramps-project.org/wiki/images/2/2b/Pygraphviz-1.4rc1.zip
fi
mkdir pygraphviz-1.4rc1
cd pygraphviz-1.4rc1
unzip -u ../Pygraphviz-1.4rc1.zip
MINGW_INSTALLS=mingw64 makepkg-mingw -sLf
pacman -U --noconfirm mingw-w64-x86_64-python3-pygraphviz-1.4rc1-0.0-any.pkg.tar.zst
## add some icons and dictionaries not easy to install
cd ../../aio
tar --directory /mingw64/share/ -zxf share.tgz

# build gramps
cd ..
rm -rf dist aio/dist
python3 setup.py bdist_wheel
appbuild="r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)"
appversion=$(grep "^VERSION_TUPLE" gramps/version.py|sed 's/.*(//;s/, */\./g;s/).*//')
unzip -d aio/dist dist/*.whl
cd aio

# create nsis script
cat grampsaio64.nsi.template|sed "s/yourVersion/$appversion/;s/yourBuild/$appbuild/">grampsaio64.nsi
# build cx_freeze executables
python3 setup.py build_exe --no-compress
# build installer
makensis mingw64/src/grampsaio64.nsi
# result is in mingw64/src

Binary file added aio/gramps.ico
Binary file not shown.
Loading

0 comments on commit 0f73812

Please sign in to comment.