Jump to navigation Jump to search

Windows Installer

183 bytes added, 6 March
→‎Steps to create Windows Installer: Run bootstrap script, make all target before any other target
# <code>hg clone</code>
# <code>cd mxe-octave</code>
# <code>autoconf./bootstrap</code>
# <code>./configure</code>
# <code>make all nsis-installer</code>
* Use <code>make all 7z-dist</code>, <code>make all tar-dist</code> or <code>make all zip-dist</code> instead of <code>make all nsis-installer</code> if you want to build just an archive of the files to install on Windows instead of an installer wizard.
* By default, packages will be built one at a time, but you may use <code>make JOBS=4</code> (choose a number other than 4 that is appropriate for your system) to build each package in parallel. You may also combine this with the <code>-j</code> option for Make to build more than one package at a time, but be careful as using <code>make -j4 JOBS=4</code> can result in as many as 16 jobs running at once.
* Use <code>./configure --disable-strip-dist-files</code> if you want to keep debug symbols in the installed binaries for debugging on Windows. Beware as the total Octave distribution will be > 2 GB, the max. size for an NSIS installer.Your only options are to make 7z-dist, zip-dist or tar-dist installers.
* Include gdb in the installer by running <code>make gdb</code> before making the <code>nsis-installer</code> target.
====Step 1: Prepare mxe-octave====
Clone the mxe-octave reop repo to some directory of your choice: <name of mxe-octave build dir>
where <name of mxe-octave build dir> is some other name than just the default "mxe-octave".
Once downloaded, go into the <name of mxe-octave build dir> subdir and do:
./configure <options you want>
make all nsis-installer JOBS=<some number>Your author usually has "--enable-devel-tools --enable-octave=default --enable-binary-packages--enable-ccache" as configure options and use JOBS=7 on my core i5 system.For stable branch it is "--enable-devel-tools --enable-octave=stable --enable-binary-packages --enable-64 --enable-fortran-int64--enable-ccache" or "--enable-devel-tools --enable-octave=stable --enable-binary-packages --enable-windows64--enable-ccache"* the The first configure option also includes gdb and an MSYS shell in the binary.* the The second avoids the ~700 MB max. array size limit for 32-bit executables but Octave will only run on 64-bit Windows (most Windows systems are 64 bit anyway these days). Note: this option does NOT imply 64-bit indexing.* the The third option is just for a placeholder; it'll invoke src/ (one of the three octave .mk files in mxe: src/ and src/, corresponding to the "--enable-octave=" configure option), I found that lags a bit behind* the fourth option cross-compiles the binary modules in Octave-Forge packages, which wil will save time when installing them once in Windows.
If you seriously want to work with gdb, also have --disable-strip-dist-files as configure option. However, in that case chances are that you cannot build an .exe installer anymore as it becomes too big for NSIS (that has a 2 GB installer file size limit) so instead of "make nsis-installer" you'll need to invoke
make zip-dist <options>
====Step 2: To build your first Octave-for Windows development version:====
* build Octave on Linux (in separate source and build trees) including your favorite mods and patches.
* once Octave runs fine in Linux (using make check and trying your mods using ./run-octave --gui & from the build dir, all of this still on the Linux side), do: <code>make all dist-lzip DIST_IGNORE_HG_STATE=1</code>* This will produce a dist archive called "octave-<version>.tar.gzlz" in the top build directory. Move or copy this dist archive to the <mxe-octave build>/pkg folder (or symlink to it from there)
Note that this step requires the Octave be configured with Java (i.e., you need javac and jar on your system).
==== Step 3: Building the Octave installer====
* be sure to adapt <mxe-octave build>/src/ to read "## No Checksum" at the $(PKG)_CHECKSUM line and check octave version and archive type (tar.gz lz rather than tar.bz2). The checksum is only needed when you download a dist archive from the Internet, not so much when you copy it within your own home network, let alone your own computer.
* check if in the top of the main Makefile "default-octave" is mentioned for OCTAVE_TARGET rather than "stable-octave" of just "octave" (that name refers to the .mk filename in the src folder).
* ... and then run (in the <mxe-octave build> folder)
make all nsis-installer <options>
make zipall 7z-dist <options>
====Step 3A (second and later builds)====
For next builds, mxe-octave is already configured and all dependencies have been built so the only thing to do is having a new Octave version + installer built:
(to be sure mxe-octave picks up the new Octave archive). If you've renamed the dist archive, be sure it matches with the package name in src/
Then do:
make all nsis-installer
make zipall 7z-dist
====Step 4: Install on Windows====
* move the installer in <mxe-octave build>/dist/ to the Windows side (USB thumb drive, LAN copy, whatever).
* install it there.
If you've made a zip7z-dist you'll have to manually create the desktop and Start Menu shortcuts (for octave and the MSYS-shell).


Navigation menu