1 Crosscompiling Maxima for Windows
2 =================================
4 On a Ubuntu/Debian System just install some tools for crosscompiling:
6 apt-get install g++-mingw-w64-x86-64 cmake nsis wine automake texinfo texlive texlive-plain-generic texlive-xetex rsync p7zip-full g++ gettext python3 tcl pandoc po4a
8 The Mingw compiler comes in two flavors for threading (win32 and posix threads).
9 wxMaxima requires posix threads, so you must reconfigure mingw and select the posix
10 version, on Debian/Ubuntu Linux using:
11 update-alternatives --config x86_64-w64-mingw32-g++
12 update-alternatives --config x86_64-w64-mingw32-gcc
14 You will need CMake >= 3.10, if that is not included in your distribution,
15 download a recent CMake from https://cmake.org/files/
17 Then you can extract the Maxima sourcecode or clone the git repository
18 and start the crosscompiling-process:
20 mkdir crosscompile-windows/build
21 cd crosscompile-windows/build # change to the build directory
22 cmake .. # use the right CMake executable (CMake >= 3.10)
26 The build directory should be called "build", because the Maxima code
27 is copied during the build and this directory will be excluded.
29 This will download the required Software (CLISP, SBCL, Gnuplot, wxMaxima,
30 wxWidgets, Tcl, Tk, VTK) from the Internet into the directory
31 "crosscompile-windows/download".
33 The packages will be compiled (if necessary) and a Windows
34 installer for Maxima is generated.
36 This should work (at least) on Ubuntu and Debian (I hope on other
37 Linux-Distributions too...).
38 (if you want you may even omit the first "make")
40 Instead of "make clean" just remove everything in the build directory.
42 If you want to use the current wxMaxima development version, you can use
43 cmake -DUSE_WXMAXIMA_GIT=YES ..
45 If you want to exclude VTK, use
47 (The size of the installer with VTK will approximately be 50% larger
50 One can also include ABCL - a Java based Lisp compiler - with the option
52 Of course you will need a Java installation.
54 If you want to change the default Lisp, which will be used, you can
55 use the option "-DWITH_DEFAULT_LISP=clisp" (or abcl) in the cmake call
56 (otherwise SBCL would be the default).
59 In case a new release of a software is released (and no new patches are needed),
60 it should be sufficient to just increase the version number and MD5-checksum
61 for the new release in CMakeLists.txt.
64 Building a 32 bit installer
65 ===========================
67 By default a 64 bit installer will be generated.
68 If you want to crosscompile a 32 bit installer, install the 32 bit
69 crosscompiler package (g++-mingw-w64-i686-g++) - and reconfigure it
71 It might be necessary to add the i386 architecture:
72 https://wiki.debian.org/Multiarch/HOWTO
74 Then use the following commands to build a 32 bit installer:
75 cmake -DBUILD_64BIT=NO ..
80 Installing the package
81 ======================
83 Of course just by double-clicking/executing the generated EXE on
84 Windows. This Maxima installer installs into C:\maxima-VERSION,
85 changing this directory is not recommended (because special characters
86 or foreign language characters might cause problems).
88 If you want to do an *unattended* installation (e.g. if you plan to
89 install Maxima on many computers in a school, university or company),
90 this installer (and uninstaller) understands the command line switch
91 "/S" (for 'silent install').
93 To select an installation directory for a unattended installation, use
94 "/D=directory", e.g. to install to C:\maxima the command would be:
95 maxima-VERSION-win64.exe /S /D=C:\maxima
96 This parameter must be the last one.
98 The installer supports components, you can deselect (by default a full
99 installation is done) some parts either during the installation process
100 or using the command line switches:
101 - VTK using the command line option /no_vtk
102 - Gnuplot using /no_gnuplot (installation is strongly recommended!)
103 - wxMaxima using /no_wxmaxima (installation is strongly recommended!)
105 These switches are mainly useful for an unattended installation.
108 Testing the installed package:
109 ==============================
111 After building it, you can (and should) test the new Maxima installation
112 package. Install it on Windows and check that the installation (and later
113 the deinstallation) works properly. To test Maxima, try the following:
115 o Run the maxima testsuite: run_testsuite();
116 o Try compiling a function. This has been a problem in the past
120 o Test the graphics systems in both xmaxima and wxmaxima
121 plot2d(sin(x),[x,0,10]);
122 plot2d(sin(x),[x,0,10],[plot_format,xmaxima]);
123 plot3d(x*y,[x,-1,1],[y,-1,1]);
124 plotdf([-y,x],[trajectory_at,5,0]);
126 draw3d(xu_grid = 30, yv_grid = 60, surface_hide = true,
127 parametric_surface(cos(phi) * sin(theta),
128 sin(phi) * sin(theta),
130 theta, 0, %pi, phi, 0, 2 * %pi))$
131 o Check that plotting to Postscript works
132 plot2d(sin(x),[x,0,10],[ps_file,"ps_test.ps"]);
133 o Try out the on-line help: describe(sin);
134 o Try out, if external packages (e.g. lapack) work:
137 M : matrix ([9.5, 1.75], [3.25, 10.45]);
140 should return the eigenvalues of M (and false, false since we did
141 not compute eigenvectors: [[7.54331, 12.4067], false, false]
143 o Try if double-clicking on a .wxmx file opens it
144 o The wxMaxima source comes with a file (test/testbench_simple.wxmx)
145 that tries to trigger everything that has gone wrong in previous
146 wxMaxima builds. They include the commands that will test the
147 graphics system in the next step.
148 Open that file and then select "Cells/Evaluate all cells" in this
149 file and check if the file is processed correctly.
152 Further development / TODO:
153 ===========================
155 More packages could be included in the Windows installer.
157 - Userinterface: Emacs maxima/imaxima mode:
158 Should be rather easy, there are Windows zip files which could be included.
159 But the size of the Maxima installer would be *much* larger.
160 (Discussion on the Maxima mailing list (2020-02-28), that that does not
162 Users should install Emacs / Miktex(or Texlive) by themselves, if they want
163 to use that interface).
164 - Userinterface Climaxima (https://github.com/lokedhs/maxima-client):
165 Might be possible, but many dependencies, which must be crosscompiled.
166 - rlwrap (https://github.com/hanslub42/rlwrap):
167 would provide readline features (advanced command line editing) for
168 command line Maxima, when using SBCL or ABCL (CLISP already supports this).
169 Dependencies: readline and that requires either termcap or ncurses
170 (and neither termcap nor ncurses can be crosscompiled here...)
171 - Other Lisp versions:
172 Must have a Windows port or be crosscompileable and be usable in Wine.
173 I tried other Lisps, but currently only CLISP, SBCL and ABCL work.
174 And including many more Lisp versions might confuse ordinary users.