Windows Installer: Difference between revisions

Jump to navigation Jump to search
303 bytes removed ,  14 October 2019
More reorganization.
(Some reorganization.)
(More reorganization.)
Line 76: Line 76:




===Build Octave-for Windows development versions===
===Build installers for Octave development versions===
* 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 dist-lzip DIST_IGNORE_HG_STATE=1</code>
* 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).
# Build the "stable" or "default" Octave development branch on Linux (in separate source and build trees) including your favorite modifications and patches.  Octave must be configured with Java support.  How to do this depends on your Linux distribution, see [[Octave for GNU/Linux]].
# Verify that Octave runs fine in Linux (for example using <code>make check</code> and by trying to run your build <code>./run-octave --gui</code>).
# Create a distribution archive called '''"octave-<version>.tar.lz"''' in the top build directory with
make dist-lzip DIST_IGNORE_HG_STATE=1
# Move or copy '''"octave-<version>.tar.lz"''' to the <mxe-octave build>/pkg folder (or create a symbolic link to it).
# Follow the [[#General steps|general steps]] and ensure the configuration with either of <code>--enable-octave=stable</code> or <code>--enable-octave=default</code>.
# Move the final installer in {{Path|<mxe-octave build>/dist/}} to some Microsoft Windows machine (USB thumb drive, LAN copy, whatever) and install it "as usual".  If you created an archive, using <code>make all 7z-dist</code> for example, you'll have to manually create the desktop and start menu shortcuts (for GNU Octave and the MSYS-shell).


{{Note|If you skip this step, mxe-octave will build using the source available from from the [http://hydra.nixos.org/job/gnu/octave-default/tarball/latest/download hydra site].
This archive is always slightly behind the latest development branch of the source repository and is missing the metadata that indicates which Mercurial revision it was built from.}}
====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:
* move/copy the dist archive from step 2 into mxe-octave's pkg subdir
* move/copy the dist archive from step 2 into mxe-octave's pkg subdir
Line 93: Line 91:
  touch src/default-octave.mk
  touch 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.
(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:
make all nsis-installer
-or-
make all 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 7z-dist you'll have to manually create the desktop and Start Menu shortcuts (for octave and the MSYS-shell).


====Remarks====
===Remarks===
 
* If you have several mxe-octave build dirs (for e.g., stable and several development versions) it is handy to have a separate pkg subdir symlinked to from all mxe-octave build dirs. That will save a lot of downloading bandwidth.
* If you have several mxe-octave build dirs (for e.g., stable and several development versions) it is handy to have a separate pkg subdir symlinked to from all mxe-octave build dirs. That will save a lot of downloading bandwidth.
* As of late Dec 2015, mxe-octave allows out-of-tree builds, which makes it a lot easier to build separate Octave versions with the same mxe-octave tree. (See http://hg.octave.org/mxe-octave/rev/0962acdde3be)
* As of late Dec 2015, mxe-octave allows out-of-tree builds, which makes it a lot easier to build separate Octave versions with the same mxe-octave tree. (See http://hg.octave.org/mxe-octave/rev/0962acdde3be)
Line 115: Line 106:
* Java include files for windows (win32, even for w64 builds). They should reside in "<mxe-octave build dir>/usr/x86_64-w64-mingw32/include/java/win32". If not present, mxe-octave downloads them but this can occasionally go wrong. On a multi-boot system a solution (note: dirty hack warning!) is symlinking to the Windows include files on the Windows partition from the mxe-octave location.
* Java include files for windows (win32, even for w64 builds). They should reside in "<mxe-octave build dir>/usr/x86_64-w64-mingw32/include/java/win32". If not present, mxe-octave downloads them but this can occasionally go wrong. On a multi-boot system a solution (note: dirty hack warning!) is symlinking to the Windows include files on the Windows partition from the mxe-octave location.


====If things go wrong====
===Troubleshooting===
It is possible that, for example, the build of Octave in step 2 works but that if fails in step 3.  Here are some troubleshooting tips.
 
* The error message displayed by make is simply the last 10 lines of the log file.  This may truncate the actual error message.
* The error message displayed by make is simply the last 10 lines of the log file.  This may truncate the actual error message.
* Sometimes running "make" a second time without changing anything will fix the problem.  In particular, autotools rebuilds some files in the first make which may cause the second make to succeed.
* Sometimes running "make" a second time without changing anything will fix the problem.  In particular, autotools rebuilds some files in the first make which may cause the second make to succeed.

Navigation menu