wow time flies, its been 18 months since Ronie announced his Minheadless VM branch... [1] http://forum.world.st/Minheadless-VM-flavour-status-update-td4928091.html
I've been meaning this whole time to try it out. Recently in my meandering thoughts on FreeRTOS port, I guessed Minheadless might make a good starting basis to experiment with.
So a quick test on Ubuntu16.04.3(Windows10-WSL)...
Long ago I'd already done... git clone git@github.com:OpenSmalltalk/opensmalltalk-vm.git so I now did... cd opensmalltalk-vm git remote add ronie git@github.com:ronsaldo/opensmalltalk-vm.git git fetch ronie git checkout MinimalisticHeadless ./scripts/updateSCCSVersions cd build.minheadless.cmake/x64/pharo.stack.spur/ ./mvm VM=`pwd`/release/dist/pharo ls $VM ==> confirmed it exists
cd ~/pharo wget http://files.pharo.org/image/70/latest-minimal-64.zip unzip latest-minimal-64.zip sudo $VM Pharo7.0-metacello-64bit-65cff7b.image eval "19 + 23" ==> 42 yay
Particularly interesting from [1] is "using the same CMake scripts for building on the three platforms: Windows, Linux and OS X." So I thought I'd also give it a try under Windows10-VisualStudio2017. I hardly used VS before, so I'll detail what I did as a reminder for myself (and also in case someone might be able to help if I get stuck).
Under a windows cmd.exe prompt (having installed git and cloned opensmalltalk-vm a long time ago) cd opensmalltalk-vm git remote add ronie git@github.com:ronsaldo/opensmalltalk-vm.git git fetch ronie git checkout -b MinimalisticHeadless ronie/MinimalisticHeadless
I watched video [2] about CMake integration with Visual Studio 10. and checked the VS workloads configuration specified [2@1:13] using [3].
There is a CMakeLists.txt file in the git root folder, so.. started VS > File > Open > Folder... C:\Repos\OpenSmalltalk\opensmalltalk-vm
The CMake command run ([2]@2:13) was... C:...\cmake.exe -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\Ben\CMakeBuilds...\x86-Debug" -DCMAKE_CXX_COMPILER="C:/.../MSVC/14.14.26428/bin/HostX86/x86/cl.exe" -DCMAKE_C_COMPILER="C:/.../MSVC/14.14.26428/bin/HostX86/x86/cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:...\CMAKE\Ninja\ninja.exe" "C:\Repos\OpenSmalltalk\opensmalltalk-vm"
I changed the cmake configuration [2@2:27] to "x64-Debug". For debug target [2@3:00] I chose "pharo.exe"
Hey, thats pretty cool [2@4:05] that switching between targets changes the highlighting of #ifdef code.
I had a moment when I was missing the "Debug and Launch Settings" menu item [2@4:40-4:55] and mentioned at [4], but maybe there was some clash with previously experimenting with git cloning opensmalltalk-vm from inside VS. After closing VS and reopening my cmd.exe git'd opensmalltalk-vm it showed up, but I didn't change any settings there.
Then (with x64-Debug & pharo.exe selected) I went Cmake > Build All ==> 10 Errors, 9 Warnings, which I'll discuss in a followup post.
cheers -ben
[2] https://blogs.msdn.microsoft.com/vcblog/2016/10/05/cmake-support-in-visual-s... [3] https://docs.microsoft.com/en-us/visualstudio/install/modify-visual-studio [4] https://blogs.msdn.microsoft.com/vcblog/2016/12/20/cmake-support-in-visual-s... [5] https://developercommunity.visualstudio.com/content/problem/234808/cmake-deb...