Windows Installer: Difference between revisions

39 bytes removed ,  14 October 2019
(→‎Troubleshooting: Overhaul section.)
Line 112: Line 112:
* Sometimes mxe-octave builds fail at "libmng".  This may be due to a race condition related to disk I/O when using a fast SSD harddisk. A way to get past this is by specifying "make nsis-installer JOBS=1", if required repeatedly (sometimes 5 or 6 times), interrupting the build in the next step/dependency once "libmng" has been built fine, and restarting with "make nsis-installer JOBS=<higher number>". As of December 2015 it is only libmng that has this issue.
* Sometimes mxe-octave builds fail at "libmng".  This may be due to a race condition related to disk I/O when using a fast SSD harddisk. A way to get past this is by specifying "make nsis-installer JOBS=1", if required repeatedly (sometimes 5 or 6 times), interrupting the build in the next step/dependency once "libmng" has been built fine, and restarting with "make nsis-installer JOBS=<higher number>". As of December 2015 it is only libmng that has this issue.


==Trying out cross-built Octave on Linux through VirtualBox==
==Testing using virtual machines==


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.
Microsoft provides several virtual machine (e.g. VirtualBox) disk images of MS Windows for 90 days of testing https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/. While primarily meant for testing the MS-Edge browser, the license (given on that page) for these images does not limit the use of these images to just MS-Edge. So it is perfectly possible to also test GNU 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:
The key idea is to create a shared folder inside the virtual machine to the mxe-octave build directory. It is advised to make it read-only.  Either install (or unpack) Octave into Windows 10, or create a shortcut to octave.vbs in the dist/octave subdirectory on the Linux side.
* 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:
Some advantages:
* Either install (or unpack) Octave into Windows 10, or
* No dedicated MS Windows machine or rebooting from Linux is needed;
* Create a shortcut to octave.vbs in the dist/octave subdir on Linux.
* The <strike>latest</strike> Windows 10 version is always available;
* Building the installer archives (zip, 7z, ...) isn't needed. One can interrupt the build process after the local 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. This saves about 10-15 minutes. Of course one can also use the common distribution formats for the virtual MS Windows machine.


Hints:
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.
* When adapting {{Path|mxe-octave/binary-dist-rules.mk}} to have a consistent name for the dist/octave subdirectory (i.e., without time/date/bitwidth suffixes) so that in MS Windows the shortcut doesn't need adaptation after each cross-build action. Maybe it is better if {{Path|mxe-octave/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.
* 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.