[Vm-dev] [commit][2957] Fix compilation of the FFI plugin on win32 ( exclude ARMFFIPlugin.c)

commits at squeakvm.org commits at squeakvm.org
Sun Jun 8 16:36:53 UTC 2014


Revision: 2957
Author:   eliot
Date:     2014-06-08 09:36:51 -0700 (Sun, 08 Jun 2014)
Log Message:
-----------
Fix compilation of the FFI plugin on win32 (exclude ARMFFIPlugin.c)
Fix ioFindExternalFunctionInAccessorDepthInto when there's no accessorDepthPtr.
Add the new flat build structure for win32.

Modified Paths:
--------------
    branches/Cog/platforms/win32/vm/sqWin32ExternalPrims.c
    branches/Cog/platforms/win32/vm/sqWin32Heartbeat.c

Added Paths:
-----------
    branches/Cog/build.win32x86/
    branches/Cog/build.win32x86/newspeak.cog.spur/
    branches/Cog/build.win32x86/newspeak.cog.spur/Makefile
    branches/Cog/build.win32x86/newspeak.cog.spur/Makefile.plugin
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Component-with-sources.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Component.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Directory-with-sources.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Directory.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Feature.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/FeatureComponents-with-sources.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/FeatureComponents.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/File-with-sources.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/File.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Icon.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/InstallerBackground.bmp
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Makefile
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Media.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/NewspeakLicence.txt
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Property.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Registry.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Shortcut.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/Upgrade.idt.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/branding-sed-rules.gmk
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/branding.gmk
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/documentation.gmk
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/files-with-sources.ddf.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/files.ddf.in
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/index.html
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/installer-Windows.gmk
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/links
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/nopMain.c
    branches/Cog/build.win32x86/newspeak.cog.spur/installer/nsvm.rc
    branches/Cog/build.win32x86/newspeak.cog.spur/mvm
    branches/Cog/build.win32x86/newspeak.cog.spur/nsvm.exe.manifest
    branches/Cog/build.win32x86/newspeak.cog.spur/nsvm.rc
    branches/Cog/build.win32x86/newspeak.cog.spur/plugins.ext
    branches/Cog/build.win32x86/newspeak.cog.spur/plugins.int
    branches/Cog/build.win32x86/newspeak.cog.v3/
    branches/Cog/build.win32x86/newspeak.cog.v3/HowToBuild
    branches/Cog/build.win32x86/newspeak.cog.v3/Makefile
    branches/Cog/build.win32x86/newspeak.cog.v3/Makefile.plugin
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Component-with-sources.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Component.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Directory-with-sources.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Directory.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Feature.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/FeatureComponents-with-sources.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/FeatureComponents.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/File-with-sources.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/File.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Icon.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/InstallerBackground.bmp
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Makefile
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Media.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/NewspeakLicence.txt
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Property.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Registry.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Shortcut.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/Upgrade.idt.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/branding-sed-rules.gmk
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/branding.gmk
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/documentation.gmk
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/files-with-sources.ddf.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/files.ddf.in
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/index.html
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/installer-Windows.gmk
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/links
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/nopMain.c
    branches/Cog/build.win32x86/newspeak.cog.v3/installer/nsvm.rc
    branches/Cog/build.win32x86/newspeak.cog.v3/mvm
    branches/Cog/build.win32x86/newspeak.cog.v3/nsvm.def.in
    branches/Cog/build.win32x86/newspeak.cog.v3/nsvm.exe.manifest
    branches/Cog/build.win32x86/newspeak.cog.v3/nsvm.ico
    branches/Cog/build.win32x86/newspeak.cog.v3/nsvm.rc
    branches/Cog/build.win32x86/newspeak.cog.v3/plugins.ext
    branches/Cog/build.win32x86/newspeak.cog.v3/plugins.int
    branches/Cog/build.win32x86/newspeak.sista.spur/
    branches/Cog/build.win32x86/newspeak.sista.spur/NotYetImplemented
    branches/Cog/build.win32x86/newspeak.sista.v3/
    branches/Cog/build.win32x86/newspeak.sista.v3/NotYetImplemented
    branches/Cog/build.win32x86/newspeak.stack.spur/
    branches/Cog/build.win32x86/newspeak.stack.spur/Makefile
    branches/Cog/build.win32x86/newspeak.stack.spur/Makefile.plugin
    branches/Cog/build.win32x86/newspeak.stack.spur/mvm
    branches/Cog/build.win32x86/newspeak.stack.spur/nsvm.exe.manifest
    branches/Cog/build.win32x86/newspeak.stack.spur/nsvm.rc
    branches/Cog/build.win32x86/newspeak.stack.spur/plugins.ext
    branches/Cog/build.win32x86/newspeak.stack.spur/plugins.int
    branches/Cog/build.win32x86/newspeak.stack.v3/
    branches/Cog/build.win32x86/newspeak.stack.v3/HowToBuild
    branches/Cog/build.win32x86/newspeak.stack.v3/Makefile
    branches/Cog/build.win32x86/newspeak.stack.v3/Makefile.plugin
    branches/Cog/build.win32x86/newspeak.stack.v3/mvm
    branches/Cog/build.win32x86/newspeak.stack.v3/nsvm.def.in
    branches/Cog/build.win32x86/newspeak.stack.v3/nsvm.exe.manifest
    branches/Cog/build.win32x86/newspeak.stack.v3/nsvm.ico
    branches/Cog/build.win32x86/newspeak.stack.v3/nsvm.rc
    branches/Cog/build.win32x86/newspeak.stack.v3/plugins.ext
    branches/Cog/build.win32x86/newspeak.stack.v3/plugins.int
    branches/Cog/build.win32x86/squeak.cog.spur/
    branches/Cog/build.win32x86/squeak.cog.spur/Croquet.def.in
    branches/Cog/build.win32x86/squeak.cog.spur/Croquet.exe.manifest
    branches/Cog/build.win32x86/squeak.cog.spur/Croquet.ico
    branches/Cog/build.win32x86/squeak.cog.spur/Croquet.rc
    branches/Cog/build.win32x86/squeak.cog.spur/GreenCogSqueak.ico
    branches/Cog/build.win32x86/squeak.cog.spur/HowToBuild
    branches/Cog/build.win32x86/squeak.cog.spur/Makefile
    branches/Cog/build.win32x86/squeak.cog.spur/Makefile.plugin
    branches/Cog/build.win32x86/squeak.cog.spur/Squeak.def.in
    branches/Cog/build.win32x86/squeak.cog.spur/Squeak.exe.manifest
    branches/Cog/build.win32x86/squeak.cog.spur/Squeak.rc
    branches/Cog/build.win32x86/squeak.cog.spur/mvm
    branches/Cog/build.win32x86/squeak.cog.spur/plugins.ext
    branches/Cog/build.win32x86/squeak.cog.spur/plugins.int
    branches/Cog/build.win32x86/squeak.cog.spur/squeak.ico
    branches/Cog/build.win32x86/squeak.cog.v3/
    branches/Cog/build.win32x86/squeak.cog.v3/Croquet.def.in
    branches/Cog/build.win32x86/squeak.cog.v3/Croquet.exe.manifest
    branches/Cog/build.win32x86/squeak.cog.v3/Croquet.ico
    branches/Cog/build.win32x86/squeak.cog.v3/Croquet.rc
    branches/Cog/build.win32x86/squeak.cog.v3/GreenCogSqueak.ico
    branches/Cog/build.win32x86/squeak.cog.v3/HowToBuild
    branches/Cog/build.win32x86/squeak.cog.v3/Makefile
    branches/Cog/build.win32x86/squeak.cog.v3/Makefile.plugin
    branches/Cog/build.win32x86/squeak.cog.v3/Squeak.def.in
    branches/Cog/build.win32x86/squeak.cog.v3/Squeak.exe.manifest
    branches/Cog/build.win32x86/squeak.cog.v3/Squeak.rc
    branches/Cog/build.win32x86/squeak.cog.v3/mvm
    branches/Cog/build.win32x86/squeak.cog.v3/plugins.ext
    branches/Cog/build.win32x86/squeak.cog.v3/plugins.int
    branches/Cog/build.win32x86/squeak.cog.v3/squeak.ico
    branches/Cog/build.win32x86/squeak.sista.spur/
    branches/Cog/build.win32x86/squeak.sista.spur/NotYetImplemented
    branches/Cog/build.win32x86/squeak.sista.v3/
    branches/Cog/build.win32x86/squeak.sista.v3/NotYetImplemented
    branches/Cog/build.win32x86/squeak.stack.spur/
    branches/Cog/build.win32x86/squeak.stack.spur/Croquet.def.in
    branches/Cog/build.win32x86/squeak.stack.spur/Croquet.exe.manifest
    branches/Cog/build.win32x86/squeak.stack.spur/Croquet.ico
    branches/Cog/build.win32x86/squeak.stack.spur/Croquet.rc
    branches/Cog/build.win32x86/squeak.stack.spur/GreenCogSqueak.ico
    branches/Cog/build.win32x86/squeak.stack.spur/HowToBuild
    branches/Cog/build.win32x86/squeak.stack.spur/Makefile
    branches/Cog/build.win32x86/squeak.stack.spur/Makefile.plugin
    branches/Cog/build.win32x86/squeak.stack.spur/Squeak.def.in
    branches/Cog/build.win32x86/squeak.stack.spur/Squeak.exe.manifest
    branches/Cog/build.win32x86/squeak.stack.spur/Squeak.rc
    branches/Cog/build.win32x86/squeak.stack.spur/mvm
    branches/Cog/build.win32x86/squeak.stack.spur/plugins.ext
    branches/Cog/build.win32x86/squeak.stack.spur/plugins.int
    branches/Cog/build.win32x86/squeak.stack.spur/squeak.ico
    branches/Cog/build.win32x86/squeak.stack.v3/
    branches/Cog/build.win32x86/squeak.stack.v3/Croquet.def.in
    branches/Cog/build.win32x86/squeak.stack.v3/Croquet.exe.manifest
    branches/Cog/build.win32x86/squeak.stack.v3/Croquet.ico
    branches/Cog/build.win32x86/squeak.stack.v3/Croquet.rc
    branches/Cog/build.win32x86/squeak.stack.v3/GreenCogSqueak.ico
    branches/Cog/build.win32x86/squeak.stack.v3/HowToBuild
    branches/Cog/build.win32x86/squeak.stack.v3/Makefile
    branches/Cog/build.win32x86/squeak.stack.v3/Makefile.plugin
    branches/Cog/build.win32x86/squeak.stack.v3/Squeak.def.in
    branches/Cog/build.win32x86/squeak.stack.v3/Squeak.exe.manifest
    branches/Cog/build.win32x86/squeak.stack.v3/Squeak.rc
    branches/Cog/build.win32x86/squeak.stack.v3/mvm
    branches/Cog/build.win32x86/squeak.stack.v3/plugins.ext
    branches/Cog/build.win32x86/squeak.stack.v3/plugins.int
    branches/Cog/build.win32x86/squeak.stack.v3/squeak.ico

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Added: branches/Cog/build.win32x86/newspeak.cog.spur/Makefile
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/Makefile	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/Makefile	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,327 @@
+#############################################################################
+# Makefile for Win32 Cog Spur Newspeak VM using gcc-3.4.x and cygwin
+# Do make init to allow make -n to function.
+#############################################################################
+
+#############################################################################
+# Base definitions:
+# default configuration from product, assert & debug
+#
+CONFIGURATION=product
+
+# The name of the VM to build
+VM:=nsvm
+VM_NAME?=Newspeak Virtual Machine
+
+#############################################################################
+# Default locations
+#
+ifndef BASEDIR
+BASEDIR:=.
+endif
+
+ifeq ("$(CONFIGURATION)","product")
+BUILD:=build
+else ifeq ("$(CONFIGURATION)","assert")
+BUILD:=buildast
+else
+BUILD:=builddbg
+endif
+PLUGINSRCDIR:= ../../nscogsrc
+VMSRCDIR:= ../../nsspursrc
+BLDDIR:= $(BASEDIR)/$(BUILD)
+OBJDIR:= $(BLDDIR)/vm
+
+# N.B. PLATDIR *must* be a relative path, see -f../../$(shell ./eitheror ... below
+PLATDIR:=../../platforms
+CROSSDIR:=$(PLATDIR)/Cross/vm
+WIN32DIR:=$(PLATDIR)/win32/vm
+MAKERDIR:=$(VMSRCDIR)/vm
+WIN32MISCDIR:=$(PLATDIR)/win32/misc
+WIN32UTILDIR:=$(PLATDIR)/win32/util
+
+CROSSSRC:= $(wildcard $(CROSSDIR)/*.c) $(wildcard $(CROSSDIR)/*.cpp)
+WIN32SRC:= $(wildcard $(WIN32DIR)/*.c) $(wildcard $(WIN32DIR)/*.cpp)
+MAKERSRC:= $(MAKERDIR)/gcc3x-cointerp.c $(MAKERDIR)/cogit.c
+VMSRC:= $(notdir $(MAKERSRC) $(WIN32SRC) $(CROSSSRC))
+
+VPATH:= $(MAKERDIR) $(WIN32DIR) $(CROSSDIR)
+
+#############################################################################
+# The internal (.lib) and external (.dll) plugins
+#
+include plugins.ext
+include plugins.int
+
+LIBS:= $(addprefix $(OBJDIR)/, $(addsuffix .lib, $(INTERNAL_PLUGINS)))
+DLLS:= $(addprefix $(OBJDIR)/, $(addsuffix .dll, $(EXTERNAL_PLUGINS)))
+
+#############################################################################
+# Generic VM source file definitions
+#
+VMDIR:= $(VMSRCDIR)/vm
+VMOBJ:=	$(VMSRC:.c=.o)
+VMOBJ:= $(addprefix $(OBJDIR)/,$(VMOBJ))
+
+#LIBSRC:= $(wildcard *.c)
+#LIBOBJ:= $(LIBSRC:.c=.o)
+
+#############################################################################
+# SqueakVM definitions
+#
+ifeq ("$(CONFIGURATION)","product")
+VMEXE:=  $(OBJDIR)/$(VM)Unstripped.exe
+CONSOLEVMEXE:=  $(OBJDIR)/$(VM)ConsoleUnstripped.exe
+STRIPEXE:=  $(OBJDIR)/$(VM).exe
+STRIPCONSOLEEXE:=  $(OBJDIR)/$(VM)Console.exe
+else
+VMEXE:=  $(OBJDIR)/$(VM).exe
+CONSOLEVMEXE:=  $(OBJDIR)/$(VM)Console.exe
+STRIPEXE:=
+STRIPCONSOLEEXE:=
+endif
+VMDEF:=	$(VM).def
+VMEXP:=	$(OBJDIR)/$(VM).exp
+VMMAP:=	$(OBJDIR)/$(VM).map
+CONSOLEVMMAP:=	$(OBJDIR)/$(VM)Console.map
+VMLIB:=	$(VM).lib
+VMRES:=	$(VM).res
+VMDEFIN:=$(BASEDIR)/$(VM).def.in
+BTOBJ:= $(OBJDIR)/btext.o
+ETOBJ:= $(OBJDIR)/etext.o
+
+
+.PRECIOUS: eitheror.exe mkNamedPrims.exe
+
+#############################################################################
+# DirectX definitions
+#
+DXDIR:=     $(PLATDIR)/win32/third-party/dx9sdk/Include
+
+#############################################################################
+# C compiler settings (gcc-3.4.4 cygwin 19.24)
+#
+CC:=gcc
+
+# VM config flags.
+ifeq ("$(CONFIGURATION)","product")
+OFLAGS:= -D_MT -O2 -march=pentium4 -momit-leaf-frame-pointer -funroll-loops
+NDEBUG:=-DNDEBUG -D'VM_LABEL(foo) 0' # Define NDEBUG for production to exclude asserts
+DEBUGVM=0
+else ifeq ("$(CONFIGURATION)","assert")
+OFLAGS:= -D_MT -O1 -march=pentium4 -fno-omit-frame-pointer
+NDEBUG:=-D'VM_LABEL(foo) 0'
+DEBUGVM=0
+else
+OFLAGS:= -D_MT -march=pentium4
+NDEBUG:=-DNODBGPRINT=1 -D'VM_LABEL(foo)=0' -D'bzero(p,s)=__builtin_bzero((p),(s))'
+DEBUGVM=1
+endif
+
+# Set minimum version to WindowsXP (see /cygwin/usr/include//w32api/w32api.h)
+WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501
+WINDEFS:=$(WINVER) -DWIN32 -DWIN32_FILE_SUPPORT -DNO_STD_FILE_SUPPORT
+
+INCLUDEPATH:= -isystem/usr/include/mingw -I/usr/include/w32api
+# define _MT to eliminate the inline versions of printf et al in mingw/stdio.h
+NOBUILTIN:= -D_MT -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf
+CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mthreads -mno-cygwin -mwin32 \
+	-mno-rtd -mms-bitfields -mno-accumulate-outgoing-args $(OFLAGS) $(NOBUILTIN)
+DEFS:=	-DMULTIPLEBYTECODESETS=1 -D'VM_NAME="$(VM_NAME)"' -DDEBUGVM=$(DEBUGVM) \
+		$(WINDEFS) -DNO_ISNAN -DNO_SERVICE $(NDEBUG) -DLSB_FIRST -DX86 $(XDEFS)
+XDEFS:=	-DSQUEAK_BUILTIN_PLUGIN
+INCLUDES:= -I. -I$(VMDIR) -I$(WIN32DIR) -I$(CROSSDIR) -I$(DXDIR) $(XINC)
+
+#############################################################################
+# Linker settings
+#
+# Note: I had to use 'gcc' instead of 'ld' to prevent unresolved symbols
+#       The switch '-mwindows' gives us a GUI app instead of a console app.
+#		Newer cygwins want --export-all-symbols in place of --export-dynamic.
+#
+LD:=	 gcc
+LDFLAGS:= -mno-cygwin -mwindows -Wl,--export-dynamic -L/usr/lib/mingw
+CONSOLELDFLAGS:= -mno-cygwin -mconsole -Wl,--export-dynamic -L/usr/lib/mingw
+#LDFLAGS:= -mno-cygwin -mwindows -Wl,--export-all-symbols -L/usr/lib/mingw
+#CONSOLELDFLAGS:= -mno-cygwin -mconsole -Wl,--export-all-symbols -L/usr/lib/mingw
+STDLIBS:= -lddraw -ldinput -lopengl32 -lwsock32 -lcomdlg32 -lole32 -lwinmm \
+	 -lversion -lwininet -luser32 -lgdi32 -lpsapi -lkernel32 -lcrtdll \
+	-ldsound -lsecur32
+
+#############################################################################
+# Tools to use
+#
+AR:= ar rc
+CP:= cp
+RM:= rm
+DLLTOOL:=	dlltool
+DLLWRAP:=	dllwrap
+STRIP:=	strip
+OBJCOPY:=	objcopy
+
+#############################################################################
+# RC settings
+#
+# Note: RC compiles the .rc files into linkable .o files
+#
+RC:=	 windres
+SVNREV:= $(shell sed -e "s/^static.*SvnRawRevisionString.*Rev: \([0-9][0-9]*\).*/\\1/p" -e d $(PLATDIR)/Cross/vm/sqSCCSVersion.h)
+RCFLAGS:= --include-dir $(PLATDIR)/win32/misc -D_WIN32 -DFILEVERSIONVALUES=4,0,$(SVNREV),0 '-DFILEVERSIONSTRING=\"4.0.$(SVNREV)\\0\"'
+
+.SUFFIXES:
+.SUFFIXES:	.ccg .cc .c .o .s .i .rc .res .cg .hg .ccg .cpp
+
+
+
+#############################################################################
+# Common build rules
+#
+default: print-settings init $(VMEXE) $(CONSOLEVMEXE) $(DLLS) $(STRIPEXE) $(STRIPCONSOLEEXE)
+
+product:;
+	$(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=product $(@,product=) default
+
+assert:
+	$(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=assert $(@,assert=) default
+
+debug:
+	$(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=debug $(@,debug=) default
+
+# Do make init to allow make -n to function.
+init:	$(OBJDIR) eitheror.exe mkNamedPrims.exe
+
+cleanall:	clean cleanast cleandbg
+
+clean:
+	rm -rf sqNamedPrims.h eitheror.exe mkNamedPrims.exe build
+
+cleanast:
+	rm -rf sqNamedPrims.h eitheror.exe mkNamedPrims.exe buildast
+
+cleandbg:
+	rm -rf sqNamedPrims.h eitheror.exe mkNamedPrims.exe builddbg
+
+print-settings:
+	@echo ---------------- Makefile settings ------------------
+	@echo CONFIGURATION=$(CONFIGURATION)
+	@echo VPATH=$(VPATH)
+	@echo INCLUDES=$(INCLUDES)
+	@echo CFLAGS=$(CFLAGS)
+	@echo INTERNAL_PLUGINS=$(INTERNAL_PLUGINS)
+	@echo EXTERNAL_PLUGINS=$(EXTERNAL_PLUGINS)
+	@echo LIBS=$(LIBS)
+	@echo DLLS=$(DLLS)
+	@echo -----------------------------------------------------
+
+print-objects:
+	@echo ---------------- Makefile objects ------------------
+	@echo VMOBJ=$(VMOBJ)
+	@echo -----------------------------------------------------
+
+eitheror.exe: $(WIN32UTILDIR)/eitheror.c
+	$(CC) -o $@ -O1 -mconsole -mno-cygwin $<
+
+mkNamedPrims.exe: $(WIN32UTILDIR)/mkNamedPrims.c
+	$(CC) -o $@ -mconsole -mno-cygwin $<
+
+$(BTOBJ):	$(WIN32MISCDIR)/btext.c
+	$(CC) -c -o $@ -fomit-frame-pointer -O2 $<
+
+$(ETOBJ):	$(WIN32MISCDIR)/etext.c
+	$(CC) -c -o $@ -fomit-frame-pointer -O2 $<
+
+vm:	$(VMEXE)
+
+$(VMEXE): $(VMOBJ) $(LIBS) $(VMEXP) resource.o $(BTOBJ) $(ETOBJ)
+	$(CC) -o $(OBJDIR)/version.o $(CFLAGS) $(INCLUDES) $(DEFS) -c $(WIN32DIR)/version.c
+	$(LD) $(LDFLAGS) -o $(VMEXE) \
+			$(BTOBJ) $(VMOBJ) $(VMEXP) $(OBJDIR)/resource.o $(LIBS) $(STDLIBS) $(ETOBJ)
+	nm --numeric-sort --defined-only -f bsd $(VMEXE) >$(VMMAP)
+
+$(CONSOLEVMEXE): $(VMOBJ) $(LIBS) $(VMEXP) resource.o $(BTOBJ) $(ETOBJ)
+	$(CC) -o $(OBJDIR)/version.o $(CFLAGS) $(INCLUDES) $(DEFS) -c $(WIN32DIR)/version.c
+	$(LD) $(CONSOLELDFLAGS) -o $(CONSOLEVMEXE) \
+			$(BTOBJ) $(VMOBJ) $(VMEXP) $(OBJDIR)/resource.o $(LIBS) $(STDLIBS) $(ETOBJ)
+	nm --numeric-sort --defined-only -f bsd $(CONSOLEVMEXE) >$(CONSOLEVMMAP)
+
+ifneq ($STRIPEXE,)
+$(STRIPEXE): $(VMEXE)
+	$(STRIP) --strip-unneeded -o $(STRIPEXE) $(VMEXE)
+	$(OBJCOPY) --add-gnu-debuglink=$(VMEXE) $(STRIPEXE)
+
+$(STRIPCONSOLEEXE): $(CONSOLEVMEXE)
+	$(STRIP) --strip-unneeded -o $(STRIPCONSOLEEXE) $(CONSOLEVMEXE)
+	$(OBJCOPY) --add-gnu-debuglink=$(CONSOLEVMEXE) $(STRIPCONSOLEEXE)
+endif
+
+$(OBJDIR):
+	@-mkdir $(BLDDIR)
+	mkdir $(OBJDIR)
+ifneq ($(INTERNAL_PLUGINS),)
+	mkdir $(addprefix $(BLDDIR)/, $(INTERNAL_PLUGINS))
+endif
+ifneq ($(EXTERNAL_PLUGINS),)
+	mkdir $(addprefix $(BLDDIR)/, $(EXTERNAL_PLUGINS))
+endif
+
+#############################################################################
+# The exports for named primitives from Squeak (required by VM)
+#
+$(VMDEF) $(VMEXP) $(VMLIB): $(VMOBJ)
+	$(DLLTOOL) --input-def $(VMDEFIN) --output-def $(OBJDIR)/$(VMDEF) --output-exp $(VMEXP) --output-lib $(OBJDIR)/$(VMLIB) $(VMOBJ)
+
+#############################################################################
+# Building plugins
+#
+.PHONY: FORCE
+
+# Internal plugin.  Build as lib then link in lib
+# Check for Makefile in win32 plugins directory otherwise use default Makefile
+# N.B.  PLATDIR *must* be a relative path for this to work
+$(OBJDIR)/%.lib:	FORCE
+	@-mkdir $(BLDDIR)/$(*F)
+	$(MAKE) $(MFLAGS) -C $(BLDDIR)/$(*F) BUILD=$(BUILD) \
+		-f../../$(shell ./eitheror.exe $(PLATDIR)/win32/plugins/$(*F)/Makefile Makefile.plugin) \
+		PLATDIR=../../$(PLATDIR) BASEDIR=../../$(BASEDIR) \
+		PLUGINSRCDIR=../../$(PLUGINSRCDIR) VMSRCDIR=../../$(VMSRCDIR) \
+		LIBNAME=$(*F) XDEFS=-DSQUEAK_BUILTIN_PLUGIN \
+		../../$(OBJDIR)/$(*F).lib
+
+# External plugin.  Build as dll and copy to vm dir ($(OBJDIR)).
+# Check for Makefile in win32 plugins directory otherwise use default Makefile
+$(OBJDIR)/%.dll:	FORCE
+	@-mkdir $(BLDDIR)/$(*F)
+	$(MAKE) $(MFLAGS) -C $(BLDDIR)/$(*F) BUILD=$(BUILD) \
+		-f../../$(shell ./eitheror.exe $(PLATDIR)/win32/plugins/$(*F)/Makefile Makefile.plugin) \
+		PLATDIR=../../$(PLATDIR) BASEDIR=../../$(BASEDIR) \
+		PLUGINSRCDIR=../../$(PLUGINSRCDIR) VMSRCDIR=../../$(VMSRCDIR) \
+		LIBNAME=$(*F) ../../$(OBJDIR)/$(*F).dll
+
+FORCE:
+
+#############################################################################
+# Basic rules
+#
+$(OBJDIR)/%.o: %.c $(wildcard $(CROSSDIR)/*.h) $(wildcard $(WIN32DIR)/*.h) $(wildcard $(MAKERDIR)/*.h)
+	$(CC) -o $@ $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
+
+.c.s:
+	$(CC) -S -o $@ -fverbose-asm -Wa,ah $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
+
+.rc.res:
+	$(RC) $(RCFLAGS) -i $< -o $(OBJDIR)/$@
+
+$(VMRES): $(BASEDIR)/$(VM).rc
+	$(RC) $(RCFLAGS) -i $(BASEDIR)/$(VM).rc -o $(OBJDIR)/$@
+	$(CP) $(VM).exe.manifest $(OBJDIR)
+
+resource.o:	$(VMRES)
+	$(RC) $(RCFLAGS) -i $(OBJDIR)/$< -o $(OBJDIR)/$@
+
+#############################################################################
+# Extra specific dependencies
+#
+sqNamedPrims.h: plugins.int mkNamedPrims.exe
+	./mkNamedPrims.exe $(INTERNAL_PLUGINS) > sqNamedPrims.h
+
+$(OBJDIR)/sqNamedPrims.o:	sqNamedPrims.c sqNamedPrims.h

Added: branches/Cog/build.win32x86/newspeak.cog.spur/Makefile.plugin
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/Makefile.plugin	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/Makefile.plugin	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,182 @@
+#############################################################################
+# Generic Makefile for plugins
+#############################################################################
+AR:= ar rc
+CP:= cp
+RM:= rm
+
+# The following are the four key locations (set via invocation):
+# PLUGINSRCDIR: Where is the root of the src plugins source tree?
+# VMSRCDIR: Where is the root of the src vm source tree?
+# PLATDIR: Where is the root of the platforms tree?
+# BUILDDIR: Where is the root of the build tree?
+
+#############################################################################
+# Standard directory locations:
+#   CROSSDIR: The location of the cross platform sources
+#   WIN32DIR: The location of the win32 sources
+#   MAKERDIR: The location of the VMMaker generated sources
+#   BUILDDIR: The location where the plugin is built
+#
+PLUGINSRCDIR:=	../../../../src
+VMSRCDIR:=	../../../../src
+CROSSDIR:=	$(PLATDIR)/Cross/plugins/$(LIBNAME)
+WIN32DIR:=	$(PLATDIR)/win32/plugins/$(LIBNAME)
+MAKERDIR:=	$(PLUGINSRCDIR)/plugins/$(LIBNAME)
+BUILDDIR:=	$(BASEDIR)/$(BUILD)/$(LIBNAME)
+
+# Support directory locations
+CROSSVMDIR:=$(PLATDIR)/Cross/vm
+WIN32VMDIR:=$(PLATDIR)/win32/vm
+MAKERVMDIR:=$(VMSRCDIR)/vm
+
+DXDIR:=     $(PLATDIR)/win32/third-party/dx9sdk/Include
+
+INCLUDES:= -I. -I$(DXDIR) \
+	  -I$(MAKERVMDIR) -I$(WIN32VMDIR) -I$(CROSSVMDIR) \
+	  -I$(MAKERDIR) -I$(WIN32DIR) -I$(CROSSDIR)
+
+#############################################################################
+# If no source files were given, use standard set
+#
+
+CROSSSRC:= $(wildcard $(CROSSDIR)/*.c) $(wildcard $(CROSSDIR)/*.cpp)
+WIN32SRC:= $(wildcard $(WIN32DIR)/*.c) $(wildcard $(WIN32DIR)/*.cpp)
+MAKERSRC:= $(wildcard $(MAKERDIR)/*.c)
+LIBSRC:= $(notdir $(MAKERSRC) $(WIN32SRC) $(CROSSSRC))
+
+#############################################################################
+# C compiler settings (gcc-3.4.4 cygwin 19.24)
+#
+NDEBUG:=-DNDEBUG
+# Set minimum version to WindowsXP (see /cygwin/usr/include//w32api/w32api.h)
+WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501
+CC:=	gcc
+# define _MT to eliminate the inline versions of printf et al in mingw/stdio.h
+OFLAGS:= -D_MT -O1 -march=pentium4 -momit-leaf-frame-pointer -funroll-loops \
+		-fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf
+INCLUDEPATH:= -isystem/usr/include/mingw -I/usr/include/w32api
+CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mdll -mno-cygwin -mwin32 \
+	-mno-rtd -mms-bitfields -mno-accumulate-outgoing-args $(OFLAGS)
+DEFS:=	$(WINVER) -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN \
+		-DNO_SERVICE -DNO_STD_FILE_SUPPORT \
+		$(NDEBUG) -DLSB_FIRST -DVM_NAME=\"$(VM)\" -DX86 $(XDEFS)
+
+#############################################################################
+# DLL settings
+#
+# Note: By default DLLTOOL/DLLWRAP do the work for everything related to plugins
+# but if LINK_WITH_GCC we use gcc and if LINK_WITH_GPP we use g++.
+#
+DLLTOOL:=	dlltool
+DLLWRAP:=	dllwrap -mno-cygwin
+#OPTSTRIP:=	strip # for production
+OPTSTRIP:=	echo not doing strip
+
+.SUFFIXES:	.c .cpp .o .s .rc .res .dep
+	
+#############################################################################
+# Plugin settings
+#
+OBJDIR:=    $(BASEDIR)/$(BUILD)/$(LIBNAME)
+VMDIR:=     $(BASEDIR)/$(BUILD)/vm
+PLUGINLIB:= $(VMDIR)/$(LIBNAME).lib
+PLUGINDLL:= $(VMDIR)/$(LIBNAME).dll
+LIBOBJ ?= 	$(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LIBSRC)))		 
+		
+		 
+VPATH:= $(MAKERDIR) $(WIN32DIR) $(CROSSDIR) $(OBJDIR)
+
+all:	$(PLUGINLIB) $(PLUGINDLL)
+
+print-settings:
+	@echo ---------------- Makefile settings ------------------
+	@echo VPATH=$(VPATH)
+	@echo INCLUDES=$(INCLUDES)
+	@echo CFLAGS=$(CFLAGS)
+	@echo PLUGINSRCDIR=$(PLUGINSRCDIR)
+	@echo VMSRCDIR=$(VMSRCDIR)
+	@echo CROSSDIR=$(CROSSDIR)
+	@echo WIN32DIR=$(WIN32DIR)
+	@echo MAKERDIR=$(MAKERDIR)
+	@echo CROSSSRC=$(CROSSSRC)
+	@echo WIN32SRC=$(WIN32SRC)
+	@echo MAKERSRC=$(MAKERSRC)
+	@echo LIBSRC=$(LIBSRC)
+	@echo LIBOBJ=$(LIBOBJ)
+	@echo OBJDIR=$(OBJDIR)
+	@echo VMDIR=$(VMDIR)
+	@echo PLUGINLIB=$(PLUGINLIB)
+	@echo PLUGINDLL=$(PLUGINDLL)
+	@echo LIBOBJ=$(LIBOBJ)
+	@echo -----------------------------------------------------
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+$(VMDIR):
+	mkdir $(VMDIR)
+
+$(PLUGINLIB): $(VMDIR) $(OBJDIR) $(LIBOBJ)
+	-$(RM) $(PLUGINLIB)
+	$(AR) $(PLUGINLIB) $(LIBOBJ)
+
+$(PLUGINDLL): $(VMDIR) $(OBJDIR) $(LIBOBJ)
+	$(DLLTOOL) \
+		--output-def $(LIBNAME).def \
+		--output-exp $(LIBNAME).exp \
+		--output-lib $(LIBNAME).lib \
+		$(DLLTOOLEXTRAS) \
+		$(LIBOBJ)
+ifneq ($(LINK_WITH_GCC),)
+	gcc -shared \
+		-mno-cygwin \
+		-def $(LIBNAME).def \
+		-o   $(VMDIR)/$(LIBNAME).dll \
+		--entry _DllMain at 12 \
+		$(GCCLINKEXTRAS) \
+		$(LIBOBJ) $(EXTRALIBS)
+else ifneq ($(LINK_WITH_GPP),)
+	g++ -shared \
+		-mno-cygwin \
+		-def $(LIBNAME).def \
+		-o   $(VMDIR)/$(LIBNAME).dll \
+		--entry _DllMain at 12 \
+		$(GPPLINKEXTRAS) \
+		$(LIBOBJ) $(EXTRALIBS)
+else
+	$(DLLWRAP) -mwindows \
+		-def $(LIBNAME).def \
+		-o   $(VMDIR)/$(LIBNAME).dll \
+		--entry _DllMain at 12 \
+		$(DLLWRAPEXTRAS) \
+		$(LIBNAME).exp \
+		$(LIBOBJ) $(EXTRALIBS)
+endif
+	$(OPTSTRIP) --strip-all $(VMDIR)/$(LIBNAME).dll
+	-$(RM) $(LIBNAME).lib
+
+#############################################################################
+# Rules for automated builds
+#
+
+.c.o:
+	$(CC) $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
+
+.c.s:
+	$(CC) -S -o $@ -fverbose-asm -Wa,ah $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
+
+.rc.res:
+	$(RC) $(RCFLAGS) -i $< -o $@
+
+.c.dep:
+	$(CC) -M -o $(notdir $@) $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
+		
+.cpp.o:
+	$(CC) $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
+
+.cpp.s:
+	$(CC) -S -o $@ -fverbose-asm -Wa,ah $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
+		
+.cpp.dep:
+	$(CC) -M -o $(notdir $@) $(CFLAGS) $(INCLUDES) $(DEFS) -c $<

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Component-with-sources.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Component-with-sources.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Component-with-sources.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,6 @@
+Component	ComponentId	Directory_	Attributes	Condition	KeyPath
+s72	S38	s72	i2	S255	S72
+Component	Component
+AdvertisedShortcut	{@@FRESH_GUID1@@}	BASEAPPDIR	0		@@VM_EXECUTABLE@@
+Support	{@@FRESH_GUID2@@}	BASEAPPDIR	0		@@VM_EXECUTABLE_MANIFEST@@
+Sources	{@@FRESH_GUID3@@}	BASEAPPDIR	0		@@SOURCEFILENAME1@@

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Component.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Component.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Component.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,6 @@
+Component	ComponentId	Directory_	Attributes	Condition	KeyPath
+s72	S38	s72	i2	S255	S72
+Component	Component
+AdvertisedShortcut	{@@FRESH_GUID1@@}	BASEAPPDIR	0		@@VM_EXECUTABLE@@
+Support	{@@FRESH_GUID2@@}	BASEAPPDIR	0		@@VM_EXECUTABLE_MANIFEST@@
+Documentation	{@@FRESH_GUID3@@}	DOCDIR	0		index.html

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Directory-with-sources.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Directory-with-sources.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Directory-with-sources.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,8 @@
+Directory	Directory_Parent	DefaultDir
+s72	S72	l255
+Directory	Directory
+TARGETDIR		SourceDir
+ProgramFilesFolder	TARGETDIR	.
+BASEAPPDIR	ProgramFilesFolder	@@BRAND_DIR@@:.
+ProgramMenuFolder	BASEAPPDIR	.
+DOCDIR	BASEAPPDIR	doc:.

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Directory.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Directory.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Directory.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,8 @@
+Directory	Directory_Parent	DefaultDir
+s72	S72	l255
+Directory	Directory
+TARGETDIR		SourceDir
+ProgramFilesFolder	TARGETDIR	.
+BASEAPPDIR	ProgramFilesFolder	@@BRAND_DIR@@:.
+ProgramMenuFolder	BASEAPPDIR	.
+DOCDIR	BASEAPPDIR	doc:.

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Feature.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Feature.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Feature.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,4 @@
+Feature	Feature_Parent	Title	Description	Display	Level	Directory_	Attributes
+s38	S38	L64	L255	I2	i2	S72	i2
+Feature	Feature
+Typical		Typical	Install Typical	1	3	BASEAPPDIR	0

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/FeatureComponents-with-sources.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/FeatureComponents-with-sources.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/FeatureComponents-with-sources.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,6 @@
+Feature_	Component_
+s38	s72
+FeatureComponents	Feature_	Component_
+Typical	AdvertisedShortcut
+Typical	Support
+Typical	Sources

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/FeatureComponents.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/FeatureComponents.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/FeatureComponents.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,6 @@
+Feature_	Component_
+s38	s72
+FeatureComponents	Feature_	Component_
+Typical	AdvertisedShortcut
+Typical	Support
+Typical	Documentation

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/File-with-sources.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/File-with-sources.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/File-with-sources.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,7 @@
+File	Component_	FileName	FileSize	Version	Language	Attributes	Sequence
+s72	s72	l255	i4	S72	S20	I2	i2
+File	File
+@@VM_EXECUTABLE@@	AdvertisedShortcut	@@VM_EXECUTABLE@@	0			16896	1
+@@VM_EXECUTABLE_MANIFEST@@	Support	@@VM_MANIFEST_8DOT3@@|@@VM_EXECUTABLE_MANIFEST@@	0			16896	1
+@@SOURCEFILENAME1@@	Sources	source1.src|@@SOURCEFILENAME1@@	0			16896	1
+@@VM_EXECUTABLE_MAP@@	Support	@@VM_EXECUTABLE_MAP@@	0			16896	1

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/File.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/File.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/File.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,7 @@
+File	Component_	FileName	FileSize	Version	Language	Attributes	Sequence
+s72	s72	l255	i4	S72	S20	I2	i2
+File	File
+@@VM_EXECUTABLE@@	AdvertisedShortcut	@@VM_EXECUTABLE@@	0			16896	1
+@@VM_EXECUTABLE_MANIFEST@@	Support	@@VM_MANIFEST_8DOT3@@|@@VM_EXECUTABLE_MANIFEST@@	0			16896	1
+index.html	Documentation	index.htm|index.html	0			16896	1
+@@VM_EXECUTABLE_MAP@@	Support	@@VM_EXECUTABLE_MAP@@	0			16896	1

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Icon.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Icon.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Icon.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,4 @@
+Name	Data
+s72	v0
+Icon	Name
+@@VM_ICON@@.exe	@@VM_ICON@@.exe.ibd

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/InstallerBackground.bmp
===================================================================
(Binary files differ)


Property changes on: branches/Cog/build.win32x86/newspeak.cog.spur/installer/InstallerBackground.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Makefile
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Makefile	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Makefile	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,53 @@
+# Makefile for the Windows installer on cygwin.  Produces a Microsoft .MSI file
+# given an executable, and possibly an image file.
+#
+# How to build:
+# On unix edit and run ./links to get .exe, .map and sources, then on cygwin
+# run make
+
+SOURCES := yes
+DOCUMENTATION_DIR := doc
+GUID_UPGRADE_CODE := FB4E770A-413B-4745-913B-D7EE7041AA48
+
+include branding.gmk
+
+# Cab contents:
+VM_EXECUTABLE := $(VM_BASE_NAME).exe
+VM_EXECUTABLE_MAP := $(VM_BASE_NAME).map
+VM_EXECUTABLE_MANIFEST := $(VM_EXECUTABLE).manifest
+VM_MANIFEST_8DOT3 := $(VM_BASE_NAME).man
+VM_ICON := $(VM_BASE_NAME).ico
+SOURCEFILENAME1 := SqueakV41.sources
+
+CAB_FILES := $(VM_EXECUTABLE) $(VM_EXECUTABLE_MAP) $(VM_EXECUTABLE_MANIFEST)
+ifeq ($(strip $(SOURCES)),yes)
+CAB_FILES := $(CAB_FILES) $(SOURCEFILENAME1)
+endif
+
+CC := /usr/bin/gcc
+CP := /usr/bin/cp
+SED := /usr/bin/sed
+WINDRES := /usr/bin/windres
+
+icon.o:	$(VM_BASE_NAME).rc
+	$(WINDRES) --include-dir=.. --define _WIN32 -l 0 -i $< -o $@
+
+$(VM_EXECUTABLE): ../build/vm/$(VM_EXECUTABLE)
+	rm -f $@
+	cp $< $@
+
+$(VM_EXECUTABLE_MAP):	../build/vm/$(VM_EXECUTABLE_MAP)
+	rm -f $@
+	grep " [tT] " $< | grep -v ' t \.text' >$@
+
+$(VM_EXECUTABLE_MANIFEST):	../build/vm/$(VM_EXECUTABLE_MANIFEST)
+	rm -f $@
+	cp $< $@
+
+echovars:
+	@echo '$$(VERSION)='$(VERSION)
+	@echo '$$(VM_ICON)='$(VM_ICON)
+	@echo '$$(DOCUMENTATION_DIR)='$(DOCUMENTATION_DIR)
+	@echo 'cygpath $$(DOCUMENTATION_DIR)='"$(shell cygpath -wa $(DOCUMENTATION_DIR))\\"
+
+include installer-Windows.gmk

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Media.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Media.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Media.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,4 @@
+DiskId	LastSequence	DiskPrompt	Cabinet	VolumeLabel	Source
+i2	i2	L64	S255	S32	S72
+Media	DiskId
+1	1		#files.cab		

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/NewspeakLicence.txt
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/NewspeakLicence.txt	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/NewspeakLicence.txt	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,5 @@
+Copyright 2008, Cadence Design Systems
+
+Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License.

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Property.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Property.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Property.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,51 @@
+Property	Value
+s72	l0
+Property	Property
+AppsShutdownOption	All
+BannerBitmap	bannrbmp
+ButtonText_Back	< &Back
+ButtonText_Browse	Br&owse
+ButtonText_Cancel	Cancel
+ButtonText_Exit	&Exit
+ButtonText_Finish	&Finish
+ButtonText_Ignore	&Ignore
+ButtonText_Install	&Install
+ButtonText_Next	&Next >
+ButtonText_No	&No
+ButtonText_OK	OK
+ButtonText_Remove	&Remove
+ButtonText_Repair	&Repair
+ButtonText_Reset	&Reset
+ButtonText_Resume	&Resume
+ButtonText_Retry	&Retry
+ButtonText_Return	&Return
+ButtonText_Yes	&Yes
+CompleteSetupIcon	completi
+CustomSetupIcon	custicon
+DefaultUIFont	DlgFont8
+DialogBitmap	dlgbmp
+DlgTitleFont	{&DlgFontBold8}
+ErrorDialog	ErrorDlg
+ExclamationIcon	exclamic
+IAgree	No
+INSTALLLEVEL	3
+InfoIcon	info
+InstallMode	Typical
+InstallerIcon	insticon
+Manufacturer	@@MANUFACTURER@@
+PIDTemplate	12345<###-%%%%%%%>@@@@@
+PROMPTROLLBACKCOST	P
+ProductCode	{@@FRESH_GUID1@@}
+ProductID	none
+ProductLanguage	1033
+ProductName	@@PRODUCT_NAME@@
+ProductVersion	@@PRODUCT_VERSION@@
+Progress1	Installing
+Progress2	installs
+RemoveIcon	removico
+RepairIcon	repairic
+SecureCustomProperties	{@@GUID_UPGRADE_CODE@@}
+Setup	Setup
+ShowUserRegistrationDlg	0
+UpgradeCode	{@@GUID_UPGRADE_CODE@@}
+Wizard	Setup Wizard

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Registry.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Registry.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Registry.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,7 @@
+Registry	Root	Key	Name	Value	Component_
+s72	i2	l255	L255	L0	s72
+Registry	Registry
+FileType	0	.image		Newspeak.VirtualMachine.1	AdvertisedShortcut
+ProgId	0	Newspeak.VirtualMachine.1		Newspeak Image	AdvertisedShortcut
+CurVer	0	Newspeak.VirtualMachine.1\CurVer		Newspeak.VirtualMachine.1	AdvertisedShortcut
+OpenCommand	0	Newspeak.VirtualMachine.1\shell\open\command		#%"[#@@VM_EXECUTABLE@@]" "%1"	AdvertisedShortcut

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Shortcut.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Shortcut.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Shortcut.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,4 @@
+Shortcut	Directory_	Name	Component_	Target	Arguments	Description	Hotkey	Icon_	IconIndex	ShowCmd	WkDir	DisplayResourceDLL	DisplayResourceId	DescriptionResourceDLL	DescriptionResourceId
+s72	s72	l128	s72	s72	S255	L255	I2	S72	I2	I2	S72	S100	I4	S100	I4
+Shortcut	Shortcut
+scAdvertisedShortcut	ProgramMenuFolder	@@VM_EXECUTABLE@@|@@VM_LOCALIZED_NAME@@	AdvertisedShortcut	Typical				@@VM_ICON@@.exe							

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/Upgrade.idt.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/Upgrade.idt.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/Upgrade.idt.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,4 @@
+UpgradeCode	VersionMin	VersionMax	Language	Attributes	Remove	ActionProperty
+s38	S20	S20	S255	i4	S255	s72
+Upgrade	UpgradeCode	VersionMin	VersionMax	Language	Attributes
+{@@GUID_UPGRADE_CODE@@}		255.255.0		0		{@@GUID_UPGRADE_CODE@@}

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/branding-sed-rules.gmk
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/branding-sed-rules.gmk	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/branding-sed-rules.gmk	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,18 @@
+SED_RULES := -e 's%@@BRAND_DIR@@%$(SHORT_BRAND_DIR)|$(BRAND_DIR)%g;'
+SED_RULES += -e 's%@@VM_EXECUTABLE@@%$(VM_EXECUTABLE)%g;'
+SED_RULES += -e 's%@@VM_EXECUTABLE_MAP@@%$(VM_EXECUTABLE_MAP)%g;'
+SED_RULES += -e 's%@@VM_EXECUTABLE_MANIFEST@@%$(VM_EXECUTABLE_MANIFEST)%g;'
+SED_RULES += -e 's%@@VM_MANIFEST_8DOT3@@%$(VM_MANIFEST_8DOT3)%g;'
+SED_RULES += -e 's%@@VM_BASE_NAME@@%$(VM_BASE_NAME)%g;'
+SED_RULES += -e 's%@@PROJECT_REVERSE_DOMAIN@@%$(PROJECT_REVERSE_DOMAIN)%g;'
+SED_RULES += -e 's%@@VM_ICON@@%$(notdir $(VM_ICON))%g;'
+SED_RULES += -e 's%@@VM_LOCALIZED_NAME@@%$(VM_LOCALIZED_NAME)%g;'
+SED_RULES += -e 's%@@GUID_UPGRADE_CODE@@%$(GUID_UPGRADE_CODE)%g;'
+SED_RULES += -e 's%@@MANUFACTURER@@%$(MANUFACTURER)%g;'
+SED_RULES += -e 's%@@PRODUCT_NAME@@%$(PRODUCT_NAME)%g;'
+SED_RULES += -e 's%@@PRODUCT_VERSION@@%$(PRODUCT_VERSION)%g;'
+SED_RULES += -e 's%@@IMAGE@@%$(IMAGE)%g;'
+SED_RULES += -e 's%@@SOURCEFILENAME1@@%$(SOURCEFILENAME1)%g;'
+SED_RULES += -e 's%@@SOURCEFILENAME2@@%$(SOURCEFILENAME2)%g;'
+SED_RULES += -e 's%@@INSTALLER_BACKGROUND@@%$(INSTALLER_BACKGROUND)%g;'
+SED_RULES += -e 's/^\#.*//;'

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/branding.gmk
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/branding.gmk	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/branding.gmk	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,62 @@
+# Version should follow the Windows convention (0-255.0-255.0-65535)
+# For the prototype, use YY.MM.DDNN (NN should come from the image
+# name, e.g., nsboot-20YY-MM-DD.NN.image)
+# For Cog would like to use YY.MMDD.SVN where SVN is the Subversion checkin
+# id taken from platforms/Cross/vm/sqSCCSVersion.h.  But that doesn't fit
+# the 0-255 field.  So use YY.WW.SVN where WW is the week number.
+#VERSION:= 07.11.0101
+SVNREV  := $(shell grep '\$Rev: ' ../../../platforms/Cross/vm/sqSCCSVersion.h | sed 's/.*$Rev: \([0-9][0-9]*\).*/\1/' )
+#VERSION:= $(shell date +%g.%m%d.$(SVNREV))
+VERSION := $(shell date +%g.%U.$(SVNREV))
+
+# Base name of the executable (.exe is appended on Windows)
+ifndef VM_BASE_NAME
+VM_BASE_NAME := nsvm
+endif
+
+# Product name as compiled into the executable and installers
+ifndef PRODUCT_NAME
+PRODUCT_NAME := Newspeak Virtual Machine
+endif
+
+# Base name of the installer (.msi is appended on Windows)
+ifndef INSTALLER_BASE_NAME
+INSTALLER_BASE_NAME := $(VM_BASE_NAME)
+endif
+
+# Where to install the product (relative to C:/Program Files on
+# Windows, /Applications on Mac, and not used on Linux)
+ifndef BRAND_DIR
+BRAND_DIR := $(PRODUCT_NAME)
+endif
+
+# Used for Desktop/menubar shortcuts
+ifndef VM_LOCALIZED_NAME
+VM_LOCALIZED_NAME := $(PRODUCT_NAME)
+endif
+
+ifndef MANUFACTURER
+MANUFACTURER := Cadence Design Systems, Inc.
+endif
+
+ifndef PROJECT_REVERSE_DOMAIN
+PROJECT_REVERSE_DOMAIN := org.newspeakplatform
+endif
+
+ifndef INSTALLER_BACKGROUND
+INSTALLER_BACKGROUND := InstallerBackground
+endif
+
+ifndef INSTALLER_ICON
+INSTALLER_ICON := VolumeIcon
+endif
+
+# DO NOT use the same GUID for other projects.  If you base a
+# different project on this file, generate a new GUID using uuidgen
+# from Microsoft Windows SDK (no-cost download).  For reasons beyond
+# comprehension, most tools generate GUIDs in lowercase.  However,
+# Windows Installer insists that GUIDs must be UPPER CASE, so be sure
+# to supply the /c option to uuidgen.
+ifndef GUID_UPGRADE_CODE
+$(warning GUID_UPGRADE_CODE not provided)
+endif

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/documentation.gmk
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/documentation.gmk	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/documentation.gmk	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,7 @@
+ifdef DOCUMENTATION_DIR
+-include $(DOCUMENTATION_DIR)documentation.gmk
+endif
+
+.PHONY: testdocs
+testdocs:
+	@echo $(DOCUMENTATION_INDEX) $(DOCUMENTATION_FILES) | xargs -n 1

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/files-with-sources.ddf.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/files-with-sources.ddf.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/files-with-sources.ddf.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,15 @@
+.Set Cabinet=ON
+.Set CabinetNameTemplate=files.cab
+.Set Compress=ON
+.Set CompressionType=LZX
+.Set DiskDirectoryTemplate=
+.Set MaxDiskSize=0
+.Set RptFileName=nul
+.Set InfFileName=nul
+.Set UniqueFiles=ON
+; Sequence of files in cabinet must be same as sequence in File table
+; see http://msdn.microsoft.com/en-us/library/windows/desktop/aa368596(v=vs.85).aspx
+@@VM_EXECUTABLE@@
+@@VM_EXECUTABLE_MANIFEST@@
+%SourcesDir%\@@SOURCEFILENAME1@@ @@SOURCEFILENAME1@@
+@@VM_EXECUTABLE_MAP@@

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/files.ddf.in
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/files.ddf.in	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/files.ddf.in	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,15 @@
+.Set Cabinet=ON
+.Set CabinetNameTemplate=files.cab
+.Set Compress=ON
+.Set CompressionType=LZX
+.Set DiskDirectoryTemplate=
+.Set MaxDiskSize=0
+.Set RptFileName=nul
+.Set InfFileName=nul
+.Set UniqueFiles=ON
+; Sequence of files in cabinet must be same as sequence in File table
+; see http://msdn.microsoft.com/en-us/library/windows/desktop/aa368596(v=vs.85).aspx
+@@VM_EXECUTABLE@@
+@@VM_EXECUTABLE_MANIFEST@@
+index.html index.html
+@@VM_EXECUTABLE_MAP@@

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/index.html
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/index.html	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/index.html	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+  <head>
+    <title>Newspeak Documentation</title>
+  </head>
+  <body>
+    <H3>Newspeak Documentation</H3>
+    <div class="documentationIndex">
+      <div class="documentationItem"><a href="http://www.newspeaklanguage.org">Website</a></div>
+      <div class="documentationItem"><a href="http://bracha.org/newspeak-101.pdf">Tutorial</a></div>
+      <div class="documentationItem"><a href="http://bracha.org/newspeak-spec.pdf">Specification</a></div>
+  </div>
+  </body>
+</html>

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/installer-Windows.gmk
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/installer-Windows.gmk	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/installer-Windows.gmk	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,147 @@
+#  Copyright 2008 Cadence Design Systems, Inc.
+#  
+#  Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0
+#
+# This is the result of stakhanovite effort from Peter von der Ahe.  Thanks!
+
+# components such as MsiFiler.exe et al available from
+# Windows SDK Components for Windows Installer Developers
+# http://msdn.microsoft.com/en-us/library/aa370834(v=vs.85).aspx
+
+WIN_SDK_VER := v7.0
+
+WIN_SDK := /cygdrive/c/Program\ Files/Microsoft\ SDKs/Windows/$(WIN_SDK_VER)/
+MSIVAL2_DIR := /cygdrive/c/Program\ Files/MsiVal2/
+
+MSI_NAME := $(INSTALLER_BASE_NAME)-$(VERSION).msi
+.DEFAULT_GOAL := $(MSI_NAME)
+all: $(MSI_NAME)
+
+# See http://msdn.microsoft.com/en-us/library/aa372834(v=VS.85).aspx
+MSIDB := $(WIN_SDK)Bin/MsiDb.Exe
+UUIDGEN := $(WIN_SDK)Bin/Uuidgen.Exe
+MSIFILER := $(WIN_SDK)Bin/MsiFiler.Exe
+MSIINFO := $(WIN_SDK)Bin/MsiInfo.Exe
+MSIVAL2 := $(MSIVAL2_DIR)msival2.exe
+CUB := $(MSIVAL2_DIR)/XPlogo.cub
+UISAMPLE_MSI := $(WIN_SDK)Bin/msitools/Templates/MSI/UISample.Msi
+PRODUCT_VERSION := $(VERSION)
+
+dosname = $(shell touch "$(TMP)/$(1)"; basename "$$(cygpath -s -m "$(TMP)/$(1)")")
+
+SHORT_BRAND_DIR := $(call dosname,$(BRAND_DIR))
+
+include branding-sed-rules.gmk
+include documentation.gmk
+FRESH_GUID = $(shell $(UUIDGEN) /c)
+FRESH_GUID_RULE1 = -e 's/@@FRESH_GUID1@@/$(FRESH_GUID)/g;'
+FRESH_GUID_RULE2 = -e 's/@@FRESH_GUID2@@/$(FRESH_GUID)/g;'
+FRESH_GUID_RULE3 = -e 's/@@FRESH_GUID3@@/$(FRESH_GUID)/g;'
+FRESH_GUID_RULE = $(FRESH_GUID_RULE1) $(FRESH_GUID_RULE2) $(FRESH_GUID_RULE3)
+
+REGULAR_IDTS := Feature.idt
+REGULAR_IDTS += Icon.idt
+REGULAR_IDTS += Media.idt
+REGULAR_IDTS += Property.idt
+REGULAR_IDTS += Registry.idt
+REGULAR_IDTS += Shortcut.idt
+REGULAR_IDTS += Upgrade.idt
+
+ifeq ($(strip $(SOURCES)),yes)
+SOURCES_IDTS += Directory.idt
+SOURCES_IDTS += Component.idt
+SOURCES_IDTS += FeatureComponents.idt
+File.idt : File-with-sources.idt.in
+files.ddf : files-with-sources.ddf.in
+files.cab: files.ddf $(VM_EXECUTABLE) $(VM_EXECUTABLE_MAP) $(VM_EXECUTABLE_MANIFEST) $(SOURCEFILENAME1)
+else
+REGULAR_IDTS += Directory.idt
+REGULAR_IDTS += Component.idt
+REGULAR_IDTS += FeatureComponents.idt
+File.idt : File.idt.in
+files.ddf : files.ddf.in $(DOCUMENTATION_FILES) $(DOCUMENTATION_INDEX)
+files.cab : files.ddf $(VM_EXECUTABLE) $(VM_EXECUTABLE_MAP) $(VM_EXECUTABLE_MANIFEST)
+endif
+
+IDTS := File.idt $(REGULAR_IDTS) $(SOURCES_IDTS)
+
+$(REGULAR_IDTS) : %.idt : %.idt.in Makefile
+	$(SED) $(SED_RULES) $(FRESH_GUID_RULE) < $< > $@
+
+$(SOURCES_IDTS) : %.idt : %-with-sources.idt.in Makefile
+	$(SED) $(SED_RULES) $(FRESH_GUID_RULE) < $< > $@
+
+SED_FILTER_CONTROL := -e 's/1\(\t\t[[]DialogBitmap]\)/1048577\1/g;'
+# 0x00800003 = 8388611.
+# 0x00800000 is the User Account Control (UAC) elevation icon (shield
+# icon) (a Windows Vista only feature).  We are verifying against
+# XPlogo, not Vista so we get a warning unless we clear that bit:
+SED_FILTER_CONTROL += -e 's/\(PushButton\t[0-9]*\t[0-9]*\t[0-9]*\t[0-9]*\t\)8388611\t/\13\t/g;'
+GREP_FILTER_CONTROL := -E $$'^LicenseAgreementDlg\tAgreementText\tScrollableText.*'
+
+%.msi: TMP_MSI = $(@:.msi=.tmp.msi)
+
+%.ibd: %
+	$(CP) -p $< $@
+
+MSPWD := $(shell cygpath -wa .)
+
+$(MSI_NAME): $(UISAMPLE_MSI) $(IDTS) Icon/$(notdir $(VM_ICON)).exe.ibd files.cab $(INSTALLER_BACKGROUND).bmp copyright.rtf $(MSIVAL2)
+	@touch $@
+	rm -f $@
+	$(CP) "$<" $(TMP_MSI)
+	$(MSIDB) -e -d "$(shell cygpath -wa $(TMP_MSI))" -f "$(MSPWD)" Binary Control
+	$(CP) -p $(filter %$(INSTALLER_BACKGROUND).bmp,$^) Binary/dlgbmp.ibd
+	mv Control.idt Control.idt.orig
+	$(SED) $(SED_FILTER_CONTROL) Control.idt.orig | grep -v $(GREP_FILTER_CONTROL) > Control.idt
+	printf 'LicenseAgreementDlg\tAgreementText\t' >> Control.idt
+	printf 'ScrollableText\t20\t60\t330\t120\t7\t\t' >> Control.idt
+	cat copyright.rtf >> Control.idt
+	printf '\tButtons\t\n' >> Control.idt
+	$(MSIDB) -i -d "$(shell cygpath -wa $(TMP_MSI))" $(patsubst %,-a %,$(filter %.cab,$^)) -f "$(shell cygpath -wa .)" $(filter %.idt,$^) Binary.idt Control.idt
+	$(MSIFILER) -nologo -d $(TMP_MSI) -h
+	$(MSIFILER) -nologo -d $(TMP_MSI) -h -s "$(MSPWD)\\"
+ifdef DOCUMENTATION_DIR
+	$(MSIFILER) -nologo -d $(TMP_MSI) -h -s "$(shell cygpath -wa $(DOCUMENTATION_DIR))\\"
+endif
+	$(MSIINFO) "$(shell cygpath -wa $(TMP_MSI))" -T "Installation Database" -J "$(PRODUCT_NAME) $(PRODUCT_VERSION)" -A "$(MANUFACTURER)" -K "Installer, MSI, Database" -O "This installer database contains the logic and data required to install $(PRODUCT_NAME)." -P ";1033" -V "{$(FRESH_GUID)}" -G 200 -W 0 -N "GNU Make" -U 0 -nologo
+	$(MSIVAL2) "$(shell cygpath -wa $(TMP_MSI))" "$(shell cygpath -wa $(CUB))" -f
+	chmod a+rx $(TMP_MSI)
+	mv $(TMP_MSI) $@
+
+Icon/$(notdir $(VM_ICON)).exe: icon.o nopMain.o
+	mkdir -p $(dir $@)
+	gcc -mwindows $^ -o $@
+	strip $@
+
+files.ddf:
+	$(SED) $(SED_RULES) $(FRESH_GUID_RULE) < $< > $@.tmp
+	@echo $(DOCUMENTATION_INDEX) $(DOCUMENTATION_FILES) | xargs -n 1 >> $@.tmp
+	mv $@.tmp $@
+
+File.idt: Makefile
+File.idt:
+	$(SED) $(SED_RULES) $(FRESH_GUID_RULE) < $< > $@.tmp
+	echo $(foreach docfile,$(strip $(DOCUMENTATION_FILES)), '$(notdir $(docfile))' '$(call dosname,$(notdir $(docfile)))' '$(notdir $(docfile))') | xargs -r -n 3 printf '%s\tDocumentation\t%s|%s\t0\t\t\t16896\t1\n' >> $@.tmp
+	mv $@.tmp $@
+
+files.cab:
+	makecab /D SourcesDir='$(shell cygpath -wa .)' /f $<
+	@echo
+
+SED_RTF_RULES := -e 's/$$/\\par /g;'
+SED_RTF_RULES += -e "s/([cC])/\\\\'a9/g;"
+
+copyright.rtf: NewspeakLicence.txt
+	printf '%s' '{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}' > $@
+	printf '%s' '\viewkind4\uc1\pard\lang1033\f0\fs20 ' >> $@
+	$(SED) $(SED_RTF_RULES) $< | tr -d \\r\\n >> $@
+	printf '}' >>$@
+
+$(MSIVAL2): $(WIN_SDK)Bin/MsiVal2.Msi
+	msiexec /passive /i "$(shell cygpath -wa '$<')"
+
+installer: $(MSI_NAME)
+
+clean::
+	-rm -rf $(IDTS) Icon Binary Binary.idt *.msi "$(BRAND_DIR)" files.ddf files.cab setup.inf nopMain.o Control.idt.orig Control.idt copyright.rtf icon.o

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/links
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/links	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/links	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,10 @@
+#!/bin/sh
+if [ "$1" = rm -o "$1" = mk ]; then
+	rm SqueakV41.sources
+fi
+if [ "$1" = mk ]; then
+	ln ../../../sources/SqueakV41.sources .
+fi
+if [ \( "$1" != rm \) -a \( "$1" != mk \) ]; then
+	echo usage: $0 'mk|rm'
+fi


Property changes on: branches/Cog/build.win32x86/newspeak.cog.spur/installer/links
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/nopMain.c
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/nopMain.c	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/nopMain.c	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,9 @@
+#include <windows.h>
+
+int WINAPI WinMain (HINSTANCE hInstance, 
+                     HINSTANCE hPrevInstance, 
+                     PSTR szCmdLine, 
+                     int iCmdShow) 
+{
+   return 0;
+}

Added: branches/Cog/build.win32x86/newspeak.cog.spur/installer/nsvm.rc
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/installer/nsvm.rc	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/installer/nsvm.rc	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,5 @@
+#ifdef _WIN32
+1                       ICON    DISCARDABLE     "nsvm.ico"
+2                       ICON    DISCARDABLE     "nsvm.ico"
+3                       ICON    DISCARDABLE     "nsvm.ico"
+#endif

Added: branches/Cog/build.win32x86/newspeak.cog.spur/mvm
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/mvm	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/mvm	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,11 @@
+#!/bin/sh
+rm -rf build*/vm/nsvm*.exe
+make debug;make assert;make
+ls -rlt build*/vm/nsvm*.exe
+if test -f ../../sources/SqueakV41.sources; then
+	for d in build buildast builddbg; do
+		if [ -d $d/vm -a !  -f $d/vm/SqueakV41.sources ]; then
+			ln ../../sources/SqueakV41.sources $d/vm
+		fi
+	done
+fi


Property changes on: branches/Cog/build.win32x86/newspeak.cog.spur/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.win32x86/newspeak.cog.spur/nsvm.exe.manifest
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/nsvm.exe.manifest	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/nsvm.exe.manifest	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+	version="1.0.0.0"
+	processorArchitecture="*"
+	name="www.mirandabanda.org.Cog.Newspeak"
+	type="win32"
+/>
+<description>Newspeak Virtual Machine</description>
+<dependency>
+	<dependentAssembly>
+		<assemblyIdentity
+			type="win32"
+			name="Microsoft.Windows.Common-Controls"
+			version="6.0.0.0"
+			processorArchitecture="*"
+			publicKeyToken="6595b64144ccf1df"
+			language="*"
+		/>
+	</dependentAssembly>
+</dependency>
+</assembly>

Added: branches/Cog/build.win32x86/newspeak.cog.spur/nsvm.rc
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/nsvm.rc	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/nsvm.rc	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,40 @@
+#ifdef _WIN32
+1                       ICON    DISCARDABLE     "nsvm.ico"
+2                       ICON    DISCARDABLE     "nsvm.ico"
+3                       ICON    DISCARDABLE     "nsvm.ico"
+#ifndef RT_MANIFEST
+#	define RT_MANIFEST 24
+#endif
+
+#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID
+#	define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
+#endif
+
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "nsvm.exe.manifest"
+
+1 VERSIONINFO
+ FILEVERSION FILEVERSIONVALUES
+ PRODUCTVERSION 4,0,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS 0xaL
+ FILEOS 0x10001L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904E4"    // Lang=US English, CharSet=Windows Multilin
+        BEGIN
+            VALUE "CompanyName", "newspeaklanguage.org\0"
+            VALUE "FileDescription", "Newsqueak Cog Spur Virtual Machine\0"
+            VALUE "FileVersion", FILEVERSIONSTRING
+            VALUE "ProductName", "Newsqueak Cog Spur\0"
+            VALUE "ProductVersion", "4.0\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1252
+    END
+END
+#endif

Added: branches/Cog/build.win32x86/newspeak.cog.spur/plugins.ext
===================================================================
--- branches/Cog/build.win32x86/newspeak.cog.spur/plugins.ext	                        (rev 0)
+++ branches/Cog/build.win32x86/newspeak.cog.spur/plugins.ext	2014-06-08 16:36:51 UTC (rev 2957)
@@ -0,0 +1,4 @@
+# Copied, perhaps edited, from ../../nscogsrc/examplePlugins.ext
+# N.B. SqueakSSL is not ready for prime time.  Compiles but does not link fully.
+# See platforms/win32/plugins/SqueakSSL/Makefile
+EXTERNAL_PLUGINS =


@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list