Windows Installer: Difference between revisions

Jump to navigation Jump to search
2,078 bytes added ,  11 September 2018
no edit summary
No edit summary
(3 intermediate revisions by 3 users not shown)
Line 30: Line 30:
====Step 1: Prepare mxe-octave====
====Step 1: Prepare mxe-octave====
Clone the mxe-octave reop to some directory of your choice:
Clone the mxe-octave reop 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:
Line 36: Line 36:
  ./configure <options you want>
  ./configure <options you want>
  make nsis-installer JOBS=<some number>
  make nsis-installer JOBS=<some number>
Your author usually has "--enable-devel-tools --enable-windows-64 --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" 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"
* the first configure option also includes gdb and an MSYS shell in the binary
* 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 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
Line 122: Line 123:
If you are using Ubuntu, then you can do <code>apt-get install foo</code> instead of <code>aptitude install -R foo</code>.
If you are using Ubuntu, then you can do <code>apt-get install foo</code> instead of <code>aptitude install -R foo</code>.


On a fesh Linux Mint 16 x86_64, in addition to the above also install:
On a fresh Linux Mint 16 x86_64, in addition to the above also install:


  sudo apt-get install libc6-dev-i386 gcc-multilib libgmp3-dev libmpfr4 libmpfr-dev
  sudo apt-get install libc6-dev-i386 gcc-multilib libgmp3-dev libmpfr4 libmpfr-dev
Line 207: Line 208:
==Creating an NSIS based installer==
==Creating an NSIS based installer==
The <code>make nsis-installer</code> command produces a NSIS installer that is ready to be distributed.  
The <code>make nsis-installer</code> command produces a NSIS installer that is ready to be distributed.  
==Trying out cross-built Octave on Linux through VirtualBox==
Micosoft makes pre-built Windows 10 virtual disk images available for testing. While primarily meant for testing the MS-Edge browser, the license for these images does not limit the use of these images to just MS-Edge. So it is perfectly possible to also test Octave.
There are several advantages:
* Rebooting from Linux to Windows isn't needed;
* The latest Windows 10 version is always available;
* Building the installer or zip/7z/<whatever> archives itself isn't needed. One can interrupt the build process after the entire installation of Octave has been made in the dist/octave subdirectory of mxe-octave, i.e., when the message "generating installer" (or "zip...") is shown, saving ~10-15 minutes.
Of course one an also install (or unpack) octave into the virtualized Windows 10.
Steps:
* Install Virtualbox
* Grab a copy of the Windows 10 image here:  https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
* Unpack and import the disk image into VirtualBox.
* In VirtualBox, select Settings | Shared folders and setup access from Windows 10 to the Linux subdir where you but mxe-octave. It is advised to make it read-only.
Then:
* Either install (or unpack) Octave into Windows 10, or
* Create a shortcut to octave.vbs in the dist/octave subdir on Linux.
Hints:
* I adapted mxe-octave/binary-dist-rules.mk to have a consistent name for the dist/octave subdir (i.e., without time/date/bitwidth suffixes) so that in Windows the shortcut doesn't need adaptation after each cross-build action. Maybe it is better if binary-dist-rules.mk has a rule to create a symlink "dist/octave/" pointing to the latest cross-build.
* The image expires after 90 days. But if you make a VirtualBox snapshot it will last longer, and you don't need to uninstall Octave each time before installing a new build.


[[Category:Packaging]]
[[Category:Packaging]]
99

edits

Navigation menu