247
edits
No edit summary |
(→Steps to create Windows Installer: Run bootstrap script, make all target before any other target) |
||
Line 9: | Line 9: | ||
# <code>hg clone http://hg.octave.org/mxe-octave/</code> | # <code>hg clone http://hg.octave.org/mxe-octave/</code> | ||
# <code>cd mxe-octave</code> | # <code>cd mxe-octave</code> | ||
# <code> | # <code>./bootstrap</code> | ||
# <code>./configure</code> | # <code>./configure</code> | ||
# <code>make nsis-installer</code> | # <code>make all nsis-installer</code> | ||
===Tweaks=== | ===Tweaks=== | ||
* Use <code>make tar-dist</code> or <code>make zip-dist</code> instead of <code>nsis-installer</code> if you want to build just an archive of the files to install on Windows instead of an installer wizard. | * 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. | * 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 zip-dist or tar-dist installers. | * 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. | * Include gdb in the installer by running <code>make gdb</code> before making the <code>nsis-installer</code> target. | ||
Line 29: | Line 29: | ||
====Step 1: Prepare mxe-octave==== | ====Step 1: Prepare mxe-octave==== | ||
Clone the mxe-octave | Clone the mxe-octave repo to some directory of your choice: | ||
http://hg.octave.org/mxe-octave <name of mxe-octave build dir> | http://hg.octave.org/mxe-octave <name of mxe-octave build dir> | ||
where <name of mxe-octave build dir> is some other name than just the default "mxe-octave". | 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: | Once downloaded, go into the <name of mxe-octave build dir> subdir and do: | ||
. | ./bootstrap | ||
./configure <options you want> | ./configure <options you want> | ||
make nsis-installer JOBS=<some number> | make all nsis-installer JOBS=<some number> | ||
Your author usually has "--enable-devel-tools --enable-octave=default --enable-binary-packages" as configure options and use JOBS=7 on my core i5 system. | 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" or "--enable-devel-tools --enable-octave=stable --enable-binary-packages --enable-windows64" | 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 first configure option also includes gdb and an MSYS shell in the binary. | ||
* | * 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 third option is just for a placeholder; it'll invoke src/default-octave.mk (one of the three octave .mk files in mxe: src/stable-octave.mk and src/octave.mk, corresponding to the "--enable-octave=" configure option), I found that octave.mk lags a bit behind | ||
* the fourth option cross-compiles the binary modules in Octave-Forge packages, which | * the fourth option cross-compiles the binary modules in Octave-Forge packages, which 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 | 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> | make zip-dist <options> | ||
Line 52: | Line 52: | ||
====Step 2: To build your first Octave-for Windows development version:==== | ====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. | * 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 & from the build dir, all of this still on the Linux side), do: | * 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: | ||
make | <code>make dist-lzip DIST_IGNORE_HG_STATE=1</code> | ||
* This will produce a dist archive called "octave-<version>.tar. | * This will produce a dist archive called "octave-<version>.tar.lz" 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). | Note that this step requires the Octave be configured with Java (i.e., you need javac and jar on your system). | ||
Line 62: | Line 62: | ||
==== Step 3: Building the Octave installer==== | ==== Step 3: Building the Octave installer==== | ||
* be sure to adapt <mxe-octave build>/src/default-octave.mk to read "## No Checksum" at the $(PKG)_CHECKSUM line and | * be sure to adapt <mxe-octave build>/src/default-octave.mk to read "## No Checksum" at the $(PKG)_CHECKSUM line and check octave version and archive type (tar.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). | * 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) | * ... and then run (in the <mxe-octave build> folder) | ||
make nsis-installer <options> | make all nsis-installer <options> | ||
-or- | -or- | ||
make | make all 7z-dist <options> | ||
====Step 3A (second and later builds)==== | ====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: | 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: | ||
Line 75: | Line 75: | ||
(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/default-octave.mk. | (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/default-octave.mk. | ||
Then do: | Then do: | ||
make nsis-installer | make all nsis-installer | ||
-or- | -or- | ||
make | make all 7z-dist | ||
====Step 4: Install on Windows==== | ====Step 4: Install on Windows==== | ||
* move the installer in <mxe-octave build>/dist/ to the Windows side (USB thumb drive, LAN copy, whatever). | * move the installer in <mxe-octave build>/dist/ to the Windows side (USB thumb drive, LAN copy, whatever). | ||
* install it there. | * install it there. | ||
If you've made a | If you've made a 7z-dist you'll have to manually create the desktop and Start Menu shortcuts (for octave and the MSYS-shell). | ||
====Remarks==== | ====Remarks==== |
edits