[Cuis-dev] Real Joy on Linux was ( Updates to VectorGraphics and precompiled MacVM)

David T. Lewis lewis at mail.msen.com
Fri May 21 13:59:26 PDT 2021


Hi Juan,

Yes. I think that the only necessary update for VMMaker will be something
like the attached, which moves the sqConfig.h include in the generated
code for all plugins. I tried this change on classic VMMaker for interpreter
VM, and everything worked as before. The generated code for VectorEnginePlugin
will work on opensmalltalk-vm (after the fix_include_order branch is
merged). This is probably the same thing that Gerald Klix did, and I
think it is the right solution.

Dave


On Fri, May 21, 2021 at 04:32:14PM -0300, Juan Vuletich via Cuis-dev wrote:
> Dave, do you agree on this change to Cuis VMMaker package? Anybody 
> thinks this could break builds on other platforms? I mean, is it ok to 
> do #include "config.h" on every platform? What happens if no config.h is 
> available?
> 
> Thanks,
> 
> On 5/21/2021 5:09 AM, Gerald Klix via Cuis-dev wrote:
> >Change to VMMaker turned out to be trivial.
> >
> >Will test the generated VM(s) now.
> >
> >
> >HTH and Best Regards,
> >
> >Gerald
> >
> >
> >
> >On 2021-05-21 09:42, Gerald Klix via Cuis-dev wrote:
> >>It compiles when I add "#include "config.h" as
> >>the very first include directive.
> >>
> >>Since it's so simple, I will try to fix Cuis' VMMaker code.
> >>
> >>
> >>HTH and Best Regards,
> >>
> >>Gerald
> >>
> >>
> >>
> >>On 2021-05-21 08:23, Gerald Klix via Cuis-dev wrote:
> >>>Hi Juan, Hoi Folks,
> >>>
> >>>As expected it does not compile on Linux.
> >>>It still has the include order problem.
> >>>I added the compilation log.
> >>>
> >>>In the meanwhile I will try to tweak the
> >>>the include order in the generated code.
> >>>I presume someone more familiar with VMMaker
> >>>tahn me, then knows what parts of VMMaker need
> >>>to be tweaked to archive the desired result.
> >>>
> >>>
> >>>Best Regards,
> >>>
> >>>Gerald
> >>>
> >>>
> >>>
> >>>On 2021-05-20 21:18, Gerald Klix via Cuis-dev wrote:
> >>>>Will give it a shot tomorrow morning (about
> >>>>08 UTC). Will start with Linux AMD64 and
> >>>>clang version 12.
> >>>>
> >>>>
> >>>>Best Regards,
> >>>>
> >>>>Gerald
> >>>>
> >>>>
> >>>>
> >>>>On 2021-05-20 15:56, Juan Vuletich via Cuis-dev wrote:
> >>>>>Hi Folks,
> >>>>>
> >>>>>Recently, I've been working on improving the VectorGraphics 
> >>>>>plugin. I added a new primitive that will help quick display of 
> >>>>>SVG icons. Please pull all repos.
> >>>>>
> >>>>>An updated Mac VM is available at 
> >>>>>https://www.dropbox.com/sh/6xzdebt158ha1cc/AAAW2LxSYHOSZ8PTfhC9XIs0a?dl=0 
> >>>>>.
> >>>>>
> >>>>>If you are able to build VMs, please try generating 
> >>>>>VectorEnginePlugin from the updated VMMaker and Cuis-Smalltalk-Dev 
> >>>>>repos, build for your platform, test, and share the precompiled 
> >>>>>VMs with us.
> >>>>>
> >>>>>To see a possible use of the new primitive, play with M3Exp01Morph.
> >>>>>
> >>>>>Another change I made is the possibility of not doing subpixel 
> >>>>>anti aliasing, that is not really needed for high dpi displays. 
> >>>>>This improves drawing performance and saves memory, sacrificing 
> >>>>>little quality. The choice is done in VectorGraphicsEngine class 
> >>>>>>> #onForm: . After modifying this method, simply resize a bit the 
> >>>>>main Cuis window, so new Canvas and Engine are created.
> >>>>>
> >>>>>Cheers,
> >>>>>
> >>>>
> >>>
> 
> 
> -- 
> Juan Vuletich
> www.cuis-smalltalk.org
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
> https://github.com/jvuletich
> https://www.linkedin.com/in/juan-vuletich-75611b3
> @JuanVuletich
> 
> -- 
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
-------------- next part --------------
'From Squeak4.6 of 11 December 2017 [latest update: #15117] on 21 May 2021 at 4:43:57 pm'!

!VMPluginCodeGenerator methodsFor: 'C code generator' stamp: 'dtl 5/18/2021 10:24'!
emitCHeaderOn: aStream
	"Write a C file header onto the given stream."

	aStream nextPutAll: '/* '.
	aStream nextPutAll: VMMaker headerNotice.
	aStream nextPutAll: ' */';cr.
	aStream nextPutAll: (self fileHeaderVersionStampForSourceClass: vmClass).
	aStream cr; cr.

	aStream nextPutAll:'
/* Configuration options */
#include "sqConfig.h"

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

/* Default EXPORT macro that does nothing (see comment in sq.h): */
#define EXPORT(returnType) returnType

/* Do not include the entire sq.h file but just those parts needed. */
/*  The virtual machine proxy definition */
#include "sqVirtualMachine.h"
/* Platform specific definitions */
#include "sqPlatformSpecific.h"

#define true 1
#define false 0
#define null 0  /* using ''null'' because nil is predefined in Think C */
#ifdef SQUEAK_BUILTIN_PLUGIN
#undef EXPORT
// was #undef EXPORT(returnType) but screws NorCroft cc
#define EXPORT(returnType) static returnType
#endif
'.

	"Additional header files"
	self emitHeaderFilesOn: aStream.

	aStream nextPutAll: '
#include "sqMemoryAccess.h"

'.
	aStream cr.! !


More information about the Cuis-dev mailing list