Building on Microsoft Windows: Difference between revisions

Jump to navigation Jump to search
Minor changes.
(Add Footnotes section.)
(Minor changes.)
Line 14: Line 14:
If you want to contribute changes to C++ files or are interested in testing the latest development or (unreleased) stable release, you can build Octave from source.
If you want to contribute changes to C++ files or are interested in testing the latest development or (unreleased) stable release, you can build Octave from source.


There is currently no maintained way to build Octave on Windows directly. But it still possible to build Octave on Windows machines using virtual machines or Microsoft's Windows Subsystem for Linux.
There is currently no maintained way to build Octave on Windows directly. But it is still possible to build Octave on Windows machines using virtual machines or Microsoft's Windows Subsystem for Linux.


==Virtual Machine==
==Virtual Machine==
Most of Octave's developers are running Debian or Ubuntu <ref>https://lists.gnu.org/archive/html/octave-maintainers/2020-02/msg00014.html</ref>. So this is probably the Linux distribution for which you are most likely to get help if you should run into issues.
Most of Octave's developers are running Debian or Ubuntu <ref>https://lists.gnu.org/archive/html/octave-maintainers/2020-02/msg00014.html</ref>. So these are probably the Linux distributions for which you are most likely to get help if you should run into issues. The following focuses mainly on Ubuntu.


The [https://www.vmware.com/products/workstation-player.html VMWare Player] is free (as in no costs) for non-commercial use.
[https://www.vmware.com/products/workstation-player.html VMWare Player] is free (as in no costs) for non-commercial use.


There are several sources for free complete Linux VM images on the web. One of them is [https://www.osboxes.org/ osboxes.org].
There are several sources for free complete Linux VM images on the web. One of them is [https://www.osboxes.org/ osboxes.org].
You can download an Ubuntu image for VMWare Player from there: [https://www.osboxes.org/ubuntu/#ubuntu-20-04-vmware Download]
You can download an Ubuntu image for VMWare Player from [https://www.osboxes.org/ubuntu/#ubuntu-20-04-vmware their side]. After the download has finished, unzip the image.


You also need a .vmx file to be able to start the Virtual Machine with VMWare Player.
You also need a .vmx file to be able to start the Virtual Machine with VMWare Player.
Open a text editor and save the following to a file called "Ubuntu.vmx" next to the VM image you downloaded:
To create a .vmx file with minimal settings, open a text editor and save the following to a file called "Ubuntu.vmx" next to the VM image you downloaded:
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
.encoding = "windows-1252"
.encoding = "windows-1252"
Line 48: Line 48:
Change the amount of memory or the number of processors you want to assign to the VM in the Virtual Machine settings in VMWare Player.
Change the amount of memory or the number of processors you want to assign to the VM in the Virtual Machine settings in VMWare Player.


The login data for VMs downloaded from osboxes is:
The login data for VMs downloaded from osboxes is:<br />
username: osboxes
username: osboxes<br />
password: osboxes.org
password: osboxes.org


Once you started the VM and logged in, continue as if you would run Ubuntu natively: [[Octave_for_Debian_systems#The_right_way Octave for Ubuntu]]
Once you started the VM and logged in, continue as if you would run [[Octave_for_Debian_systems#The_right_way|Ubuntu natively]].


==Windows Subsystem for Linux==
==Windows Subsystem for Linux==
The Windows Subsystem for Linux (WSL) was not very interesting for serious development in its first version. Many of the shortcomings have been fixed in WSL2 which was released together with Windows 10 Update 2004.
The Windows Subsystem for Linux (WSL) was not very interesting for serious development in its first version. Many of the shortcomings (like tediously slow "fork" and "stat") have been fixed in WSL2 which was released together with Windows 10 Update 2004.
To install WSL2 on Windows, follow the instructions by Microsoft:
 
[https://docs.microsoft.com/en-us/windows/wsl/install-win10]
To install WSL2 on Windows, follow the [https://docs.microsoft.com/en-us/windows/wsl/install-win10 instructions by Microsoft].


WSL2 is basically a virtual machine running the Linux kernel that is more closely integrated into Windows. But it also has some limitations (see below).
WSL2 is basically a virtual machine running the Linux kernel that is more closely integrated into Windows. But it also has some limitations (see below).


Again it is possible to choose from several different Linux distributions. But for reasons already mentioned, you should choose Ubuntu.
Again it is possible to choose from several different Linux distributions. But for reasons already mentioned, you should choose Ubuntu.
Once you logged in to Ubuntu on WSL, continue as if you would run [[Octave_for_Debian_systems#The_right_way|Ubuntu natively]].


WSL (or WSL2) does not contain an X server. The X server on Linux is necessary to present program windows to the users. So by default, WSL is only a command line interface.
WSL (or WSL2) does not contain an X server. The X server on Linux is necessary to present program windows to the users. So by default, WSL is only a command line interface.
Line 79: Line 81:




= Footnotes =
=Footnotes=


<references/>
<references />


[[Category:Microsoft Windows]]
[[Category:Microsoft Windows]]
[[Category:Building]]
[[Category:Building]]
216

edits

Navigation menu