Skip to content

Commit

Permalink
This repo should now automagically tell travis to compile an all-in-o…
Browse files Browse the repository at this point in the history
…ne-package for maxima.
  • Loading branch information
gunterkoenigsmann committed Mar 29, 2020
1 parent e21ad93 commit 66a716f
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ git:
depth: 15
script:
- "./build.sh"
- chmod +x wxmaxima-x86_64.AppImage
- chmod +x maxima-x86_64.AppImage
deploy:
provider: releases
prerelease: false
Expand Down
2 changes: 1 addition & 1 deletion AppRun
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export LD_LIBRARY_PATH
GNUPLOT_DRIVER_DIR=$APPDIR/gnuplot-inst/libexec/gnuplot/5.2
export GNUPLOT_DRIVER_DIR

$APPDIR/usr/bin/wxmaxima $@ -m $APPDIR/usr/bin/maxima
$APPDIR/usr/bin/maxima $@
48 changes: 2 additions & 46 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,6 @@ RUN cd gnuplot-main && \
make -s && \
make install

RUN wget --quiet 'https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2' && \
bzcat wxWidgets-3.1.3.tar.bz2 | tar xf -
RUN cd wxWidgets-3.1.3 && \
mkdir buildgtk && \
cd buildgtk && \
../configure --with-gtk=3 && \
make -s && \
make install && \
ldconfig

RUN wget --quiet -O libpng-1.2.59.tar 'https://sourceforge.net/projects/libpng/files/libpng12/1.2.59/libpng-1.2.59.tar.gz/download' && \
zcat libpng-1.2.59.tar | tar xf -
RUN cd libpng-1.2.59 && \
./configure && \
make -s && \
make install

ENV maxima_build tags/5.43.0

RUN git clone https://git.code.sf.net/p/maxima/code maxima-code && \
Expand All @@ -59,27 +42,6 @@ RUN cd maxima-code && \
make -s && \
make install

# Debian-oldstable provides too old an cmake3 version for building wxMaxima.
# At least the debian-oldstable that was active in Jan 2019 did.
RUN wget --quiet 'https://github.com/Kitware/CMake/releases/download/v3.13.3/cmake-3.13.3.tar.gz' && \
zcat cmake-3.13.3.tar.gz | tar xf - && \
cd cmake-3.13.3 && \
./bootstrap && \
make -s && \
make install

ENV wxmaxima_build Version-20.03.1

RUN git clone https://github.com/wxMaxima-developers/wxmaxima.git && \
cd wxmaxima && \
git checkout ${wxmaxima_build}

RUN cd wxmaxima && \
mkdir -p build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX:PATH=/wxmaxima-inst -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" -DCMAKE_LD_FLAGS="-static-libgcc -static-libstdc++" .. && \
cmake -- build . && \
cmake --build . -- install

COPY appimagetool-$ARCH.AppImage /
RUN chmod +x appimagetool-$ARCH.AppImage
Expand All @@ -96,23 +58,17 @@ RUN ln -s ../../gnuplot-inst/bin/gnuplot usr/bin/gnuplot
RUN (cd .. && tar cf - sbcl) | tar xf -
RUN ln -s ../../sbcl/run-sbcl.sh usr/bin/sbcl

RUN mkdir -p usr/lib
RUN cp -a /usr/local/lib/libwx* /usr/local/lib/libpng* usr/lib

RUN mkdir maxima-inst && \
(cd ../maxima-code/dist && tar cf - *) | (cd maxima-inst && tar xf -)
RUN ln -s share/info maxima-inst/info
RUN ln -s ../../maxima-inst/bin/maxima usr/bin/maxima

RUN (cd .. && tar cf - wxmaxima-inst) | tar xf -
RUN ln -s ../../wxmaxima-inst/bin/wxmaxima usr/bin/wxmaxima

RUN mkdir -p usr/share/metainfo
COPY wxmaxima.appdata.xml usr/share/metainfo/
COPY maxima.appdata.xml usr/share/metainfo/

COPY AppRun .
RUN chmod +x AppRun
COPY wxmaxima.desktop .
COPY maxima.desktop .
COPY maxima.png .

WORKDIR /
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
Appimage build for wxMaxima
===========================
Appimage build for Maxima
=========================

Building Appimage
-----------------

To build the Appimage, run the following command:

```
$ docker build -t wxmaxima .
$ docker build -t maxima .
```

This will build all dependenecies and the wxMaxima application itself.
This will build all dependenecies and the Maxima application itself.
After the build has completed, run the following command to copy the
Appimage from the container:

```
$ docker run wxmaxima cat wxmaxima-x86_64.AppImage > wxmaxima-x86_64.AppImage
$ docker run maxima cat maxima-x86_64.AppImage > maxima-x86_64.AppImage
```

Finally, set the executable flag so that the executable can be run:

```
$ chmod +x wxmaxima-x86_64.AppImage
$ chmod +x maxima-x86_64.AppImage
```

All of these commands have been combined to a shell script,
Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
docker build -t wxmaxima .
docker run wxmaxima cat wxmaxima-x86_64.AppImage > wxmaxima-x86_64.AppImage
chmod +x wxmaxima-x86_64.AppImage
docker build -t maxima .
docker run maxima cat maxima-x86_64.AppImage > maxima-x86_64.AppImage
chmod +x maxima-x86_64.AppImage
14 changes: 7 additions & 7 deletions wxmaxima.appdata.xml → maxima.appdata.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.dhsdevelopments.wxmaxima-devel</id>
<id>com.dhsdevelopments.maxima-devel</id>
<metadata_license>MIT</metadata_license>
<project_license>MIT</project_license>
<name>wxmaxima</name>
<summary>wxmaxima</summary>
<name>maxima</name>
<summary>maxima</summary>
<description>
<p>Maxima is a system for the manipulation of symbolic and numerical expressions, including differentiation, integration, Taylor series, Laplace transforms, ordinary differential equations, systems of linear equations, polynomials, sets, lists, vectors, matrices and tensors. Maxima yields high precision numerical results by using exact fractions, arbitrary-precision integers and variable-precision floating-point numbers. Maxima can plot functions and data in two and three dimensions.</p>
</description>
<launchable type="desktop-id">wxmaxima.desktop</launchable>
<url type="homepage">https://wxmaxima-developers.github.io/wxmaxima/</url>
<launchable type="desktop-id">maxima.desktop</launchable>
<url type="homepage">https://maxima-developers.github.io/maxima/</url>
<screenshots>
<screenshot type="default">
<image>https://wxmaxima-developers.github.io/wxmaxima/images/linux_1.jpg</image>
<image>https://maxima-developers.github.io/maxima/images/linux_1.jpg</image>
</screenshot>
</screenshots>
<provides>
<id>wxmaxima.desktop</id>
<id>maxima.desktop</id>
</provides>
</component>
File renamed without changes.
Binary file removed test.wxmx
Binary file not shown.
2 changes: 0 additions & 2 deletions update_versions.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/sh

maxima_build='tags\/5.43.0'
wxmaxima_build='Version-20.03.1'

sed -i -e "s/ENV maxima_build .*/ENV maxima_build $maxima_build/" Dockerfile
sed -i -e "s/ENV wxmaxima_build .*/ENV wxmaxima_build $wxmaxima_build/" Dockerfile

0 comments on commit 66a716f

Please sign in to comment.