Hi all, I am happy to announce that my latest VM refactoring experiment is almost complete. I am only missing adding traditional style Makefiles to make Eliot happy ;), and making this work with MSVC. The minheadless is a VM variant that unifies a lot of the code for Windows, Linux and OS X. To the point that I am using the same CMake scripts for building on the three platforms. The minheadless VM is a completely headless by default VM, unless the configure script finds SDL2. If the configure script finds SDL2, and the legacy display interface is enabled(which is by default), then this VM will be built using SDL2 to implement the normal diplay primitives. The SDL2 backend work with normal Pharo and Squeak image. If SDL2 is not found by the configure script, or the legacy display primitives are disabled in the configure script, or the VM is started in headless mode, then the traditional display primitives are just going to be a /dev/null. Currently I am commiting this VM variant to the MinimalisticHeadless branch at: https://github.com/ronsaldo/opensmalltalk-vm/tree/MinimalisticHeadless For building using CMake it can be done in two ways: ------------------------------------ Calling CMake directly mkdir build cmake .. -DCMAKE_BUILD_TYPE=<The build type> (or cmake-gui ..) make The supported build types are: - Debug - Assert - RelWithDebInfo - Release If you are on an x86_64 system and you want to build 32 bits version, you have to pass the -DBUILD_I386_VERSION=True option to cmake. mkdir build cmake .. (or cmake-gui ..) make------------------------------------ Using mvm style scripts Easy mode: cd build.minheadless.cmake/<x86 or x64>/vm_variant ./mvm A bit more complicated/flexible mode: This mvm will configure and build the vm for the four build types. This behavior was present on the mvm for Windows, so I am replicating it. In these same folders that are two other scripts: mvm_configure (calls cmake to only configure the build types), and mvm_configure_variant mvm_configure_variant is used to actually call cmake and configure the VM for building. The syntax of mvm_configure_variant is the following: mvm_configure_variant <BuildDirectory> <BuildType> Currently my workflow for using these scripts is the following with MSys/Cygwin/Linux: ./mvm_configure make -j8 The makefile at build.minheadless.cmake/<x86 or x64>/vm_variant is only used for delegating to the makefiles created by CMake. ------------------------------------ I am leaving some prebuilt Pharo VMs with the SDL2 backend for Windows for experimenting at: http://ronie.cl/files/vm/ Using OSWindow with this VM requires loading the latest version of OSWindow by reloading the ConfigurationOfOSWindow manually in Monticello, and then doing ConfigurationOfOSWindow load. With this VM, there are finally no more duplicated events. My TODO list for this includes adding plain Makefile. BTW: during the following week I will continue working with Lowcode. I really need it working again.Happy longest/shortest day of the year |
Thanks Ronie!
Alexandre > On Dec 24, 2016, at 10:25 PM, Ronie Salgado <[hidden email]> wrote: > > Hi all, > > I am happy to announce that my latest VM refactoring experiment is almost complete. I am only missing adding traditional style Makefiles to make Eliot happy ;), and making this work with MSVC. > > The minheadless is a VM variant that unifies a lot of the code for Windows, Linux and OS X. To the point that I am using the same CMake scripts for building on the three platforms. > > The minheadless VM is a completely headless by default VM, unless the configure script finds SDL2. > > If the configure script finds SDL2, and the legacy display interface is enabled(which is by default), then this VM will be built using SDL2 to implement the normal diplay primitives. The SDL2 backend work with normal Pharo and Squeak image. > > If SDL2 is not found by the configure script, or the legacy display primitives are disabled in the configure script, or the VM is started in headless mode, then the traditional display primitives are just going to be a /dev/null. > > Currently I am commiting this VM variant to the MinimalisticHeadless branch at: https://github.com/ronsaldo/opensmalltalk-vm/tree/MinimalisticHeadless > > For building using CMake it can be done in two ways: > > ------------------------------------ > Calling CMake directly > > mkdir build > cmake .. -DCMAKE_BUILD_TYPE=<The build type> (or cmake-gui ..) > make > > The supported build types are: > - Debug > - Assert > - RelWithDebInfo > - Release > > If you are on an x86_64 system and you want to build 32 bits version, you have to pass the -DBUILD_I386_VERSION=True option to cmake. > > mkdir build > cmake .. (or cmake-gui ..) > make > > ------------------------------------ > Using mvm style scripts > > Easy mode: > > cd build.minheadless.cmake/<x86 or x64>/vm_variant > ./mvm > > A bit more complicated/flexible mode: > > This mvm will configure and build the vm for the four build types. This behavior was present on the mvm for Windows, so I am replicating it. > > In these same folders that are two other scripts: mvm_configure (calls cmake to only configure the build types), and mvm_configure_variant > > mvm_configure_variant is used to actually call cmake and configure the VM for building. The syntax of mvm_configure_variant is the following: > > mvm_configure_variant <BuildDirectory> <BuildType> > > Currently my workflow for using these scripts is the following with MSys/Cygwin/Linux: > > ./mvm_configure > make -j8 > > The makefile at build.minheadless.cmake/<x86 or x64>/vm_variant is only used for delegating to the makefiles created by CMake. > > ------------------------------------ > I am leaving some prebuilt Pharo VMs with the SDL2 backend for Windows for experimenting at: http://ronie.cl/files/vm/ > > Using OSWindow with this VM requires loading the latest version of OSWindow by reloading the ConfigurationOfOSWindow manually in Monticello, and then doing ConfigurationOfOSWindow load. With this VM, there are finally no more duplicated events. > > My TODO list for this includes adding plain Makefile. BTW: during the following week I will continue working with Lowcode. I really need it working again. > > Happy longest/shortest day of the year > Ronie -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
In reply to this post by Ronie Salgado
Hi Ronie,
this is cool :) btw… I do not think the VM should open any windowing system in any way. This should be a task performed at image level, IMO. Esteban
|
Hello, I just compared size of VM: 1.3 mb vs 4 mb (current PharoVM). It is really nice result. This probably because I am building with a less number of internal plugins. 2016-12-26 15:36 GMT-03:00 Esteban Lorenzano <[hidden email]>: I agree. I am doing the SDL2 backend as a stepping stone until we can get rid completely of it. With this VM, to disable the legacy backend completely is just a matter of building with the -DSUPPORT_TRADITIONAL_DISPLAY=Off.
BTW, I forgot to mention that I did basic embedding interface available at: https://github.com/ronsaldo/opensmalltalk-vm/blob/MinimalisticHeadless/include/SqueakVirtualMachine.h . For usage ordering, take a look at the squeak_main function at: https://github.com/ronsaldo/opensmalltalk-vm/blob/MinimalisticHeadless/platforms/minheadless/common/sqVirtualMachineInterface.c . My main(and WinMain) functions are used to only call squeak_main. Best regards, Ronie |
In reply to this post by Ronie Salgado
this is supercool. Ronie do you think that we will be able to open in headless get a window on demand close it and continue headless and repeat the process? Because I have a super cool scenario for such feature :) Stef
-- Using Opera's mail client: http://www.opera.com/mail/ |
\o/ Thanks a lot Ronie. On Mon, Dec 26, 2016 at 10:20 PM, stepharong <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |