Author: eliot Date: 2011-07-15 15:18:34 -0700 (Fri, 15 Jul 2011) New Revision: 2461 Added: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h branches/Cog/scripts/svnci Modified: branches/Cog/macbuild/CoreVM.plist branches/Cog/macbuild/CoreVM.xcodeproj/project.pbxproj branches/Cog/nsbuild/macbuild/CoreVM.plist branches/Cog/nscogbuild/macbuild/CoreVM.plist branches/Cog/nscogbuild/macbuild/CoreVM.xcodeproj/project.pbxproj branches/Cog/platforms/Mac OS/vm/sqMacMain.c branches/Cog/platforms/unix/vm/sqUnixMain.c branches/Cog/platforms/win32/vm/sqWin32Window.c branches/Cog/scripts/mkvmarchives Log: Fix Newspeak main window opening on Win32. Add getSystemAttribute 1009 to answer the revision and repository URL of the current source tree. See platforms/Cross/vm/sqSCCSVersion.h. Provide a script svnci that causes sqSCCSVersion.h to be updated on check-in so its REV is up-to-date. Modify mkvmarchives script to add rev to end of version numbers in the Mac Info.plist files. Modified: branches/Cog/macbuild/CoreVM.plist =================================================================== --- branches/Cog/macbuild/CoreVM.plist 2011-07-15 15:17:51 UTC (rev 2460) +++ branches/Cog/macbuild/CoreVM.plist 2011-07-15 22:18:34 UTC (rev 2461) @@ -368,7 +368,11 @@ <key>CFBundleExecutable</key> <string>Croquet</string> <key>CFBundleGetInfoString</key> - <string>Croquet Cog 4.0.0 http://www.squeak.com</string> + <string>Croquet Cog 4.0.0 http://www.mirandabanda.org</string> + <key>CFBundleShortVersionString</key> + <string>Croquet Cog 4.0.0</string> + <key>CFBundleVersion</key> + <string>4.0.0</string> <key>CFBundleIconFile</key> <string>Croquet.icns</string> <key>CFBundleIdentifier</key> @@ -379,12 +383,8 @@ <string>Croquet</string> <key>CFBundlePackageType</key> <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>Croquet Cog 3.0.0</string> <key>CFBundleSignature</key> <string>????</string> - <key>CFBundleVersion</key> - <string>4.0.0</string> <key>CGDisableCoalescedUpdates</key> <true/> <key>LSBackgroundOnly</key> Modified: branches/Cog/macbuild/CoreVM.xcodeproj/project.pbxproj =================================================================== --- branches/Cog/macbuild/CoreVM.xcodeproj/project.pbxproj 2011-07-15 15:17:51 UTC (rev 2460) +++ branches/Cog/macbuild/CoreVM.xcodeproj/project.pbxproj 2011-07-15 22:18:34 UTC (rev 2461) @@ -11,6 +11,8 @@ 733B2C37106AB74B004652BE /* sqExternalSemaphores.c in Sources */ = {isa = PBXBuildFile; fileRef = 733B2C36106AB74B004652BE /* sqExternalSemaphores.c */; }; 7351A09B100963670035A878 /* sqUnixThreads.c in Sources */ = {isa = PBXBuildFile; fileRef = 7351A09A100963670035A878 /* sqUnixThreads.c */; }; 735B4CA30E8069B7008FA2CA /* VMProfileMacSupportPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 735B4CA20E8069B7008FA2CA /* VMProfileMacSupportPlugin.c */; }; + 737888E713D0DE6500C5E1AD /* sqMemoryFence.h in Headers */ = {isa = PBXBuildFile; fileRef = 737888E513D0DE6500C5E1AD /* sqMemoryFence.h */; }; + 737888E813D0DE6500C5E1AD /* sqSCCSVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 737888E613D0DE6500C5E1AD /* sqSCCSVersion.h */; }; 738FB1EA0EE4CF94004BEE42 /* ia32abicc.c in Sources */ = {isa = PBXBuildFile; fileRef = 738FB1E90EE4CF94004BEE42 /* ia32abicc.c */; }; 738FB1ED0EE4D092004BEE42 /* IA32ABI.c in Sources */ = {isa = PBXBuildFile; fileRef = 738FB1EC0EE4D092004BEE42 /* IA32ABI.c */; }; 739C6ED6112DCBB00049B7D3 /* sqTicker.c in Sources */ = {isa = PBXBuildFile; fileRef = 739C6ED5112DCBB00049B7D3 /* sqTicker.c */; }; @@ -284,6 +286,8 @@ 733B2C36106AB74B004652BE /* sqExternalSemaphores.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = sqExternalSemaphores.c; sourceTree = "<group>"; }; 7351A09A100963670035A878 /* sqUnixThreads.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqUnixThreads.c; path = vm/sqUnixThreads.c; sourceTree = "<group>"; }; 735B4CA20E8069B7008FA2CA /* VMProfileMacSupportPlugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = VMProfileMacSupportPlugin.c; sourceTree = "<group>"; }; + 737888E513D0DE6500C5E1AD /* sqMemoryFence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMemoryFence.h; sourceTree = "<group>"; }; + 737888E613D0DE6500C5E1AD /* sqSCCSVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSCCSVersion.h; sourceTree = "<group>"; }; 738FB1E90EE4CF94004BEE42 /* ia32abicc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ia32abicc.c; path = IA32ABI/ia32abicc.c; sourceTree = "<group>"; }; 738FB1EC0EE4D092004BEE42 /* IA32ABI.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = IA32ABI.c; path = IA32ABI/IA32ABI.c; sourceTree = "<group>"; }; 739C6ED5112DCBB00049B7D3 /* sqTicker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqTicker.c; sourceTree = "<group>"; }; @@ -294,7 +298,7 @@ 73BC1BB60F576864003412C5 /* cogit.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cogit.c; sourceTree = "<group>"; }; 73BC1BB70F576864003412C5 /* cogit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cogit.h; sourceTree = "<group>"; }; 73BC1BB80F576864003412C5 /* cogmethod.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cogmethod.h; sourceTree = "<group>"; }; - 73BC1BB90F576864003412C5 /* gcc3x-cointerp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = gcc3x-cointerp.c; sourceTree = "<group>"; }; + 73BC1BB90F576864003412C5 /* gcc3x-cointerp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "gcc3x-cointerp.c"; sourceTree = "<group>"; }; 73BC1BBA0F576864003412C5 /* cointerp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cointerp.h; sourceTree = "<group>"; }; 73BC1BC60F57699F003412C5 /* sqCogStackAlignment.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sqCogStackAlignment.h; sourceTree = "<group>"; }; 94002C4209EB18EF003C4BF2 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sqMemoryAccess.h; sourceTree = "<group>"; }; @@ -1611,6 +1615,8 @@ F5F8AFDC02EB4E0A0100013C /* sq.h */, 739C6ED8112DCBD10049B7D3 /* sqAssert.h */, 73BC1BC60F57699F003412C5 /* sqCogStackAlignment.h */, + 737888E513D0DE6500C5E1AD /* sqMemoryFence.h */, + 737888E613D0DE6500C5E1AD /* sqSCCSVersion.h */, 733B2C36106AB74B004652BE /* sqExternalSemaphores.c */, 739C6ED7112DCBD10049B7D3 /* sqAtomicOps.h */, A2835CFE0E07A13300308978 /* sqHeapMap.c */, @@ -1711,6 +1717,8 @@ A2F27E691087169800F905FB /* nsPoolManagement.h in Headers */, 739C6ED9112DCBD10049B7D3 /* sqAtomicOps.h in Headers */, 739C6EDA112DCBD10049B7D3 /* sqAssert.h in Headers */, + 737888E713D0DE6500C5E1AD /* sqMemoryFence.h in Headers */, + 737888E813D0DE6500C5E1AD /* sqSCCSVersion.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1750,7 +1758,14 @@ isa = PBXProject; buildConfigurationList = 94D95B1D0923E6810034C6F0 /* Build configuration list for PBXProject "CoreVM" */; compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 08773EB500C6A1C4C0A80109; productRefGroup = 08773F3000C6A1C4C0A80109 /* Products */; projectDirPath = ""; Modified: branches/Cog/nsbuild/macbuild/CoreVM.plist =================================================================== --- branches/Cog/nsbuild/macbuild/CoreVM.plist 2011-07-15 15:17:51 UTC (rev 2460) +++ branches/Cog/nsbuild/macbuild/CoreVM.plist 2011-07-15 22:18:34 UTC (rev 2461) @@ -76,7 +76,11 @@ <key>CFBundleExecutable</key> <string>Newspeak Virtual Machine</string> <key>CFBundleGetInfoString</key> - <string>Newspeak Virtual Machine 4.0.0 http://www. bracha.org</string> + <string>Newspeak Virtual Machine 4.0.0 http://newspeaklanguage.org</string> + <key>CFBundleShortVersionString</key> + <string>Newspeak Virtual Machine 4.0.0</string> + <key>CFBundleVersion</key> + <string>4.0.0</string> <key>CFBundleIconFile</key> <string>Newspeak Virtual Machine.icns</string> <key>CFBundleIdentifier</key> @@ -87,12 +91,8 @@ <string>Newspeak Virtual Machine</string> <key>CFBundlePackageType</key> <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>Newspeak Virtual Machine 4.0.0</string> <key>CFBundleSignature</key> <string>????</string> - <key>CFBundleVersion</key> - <string>4.0.0</string> <key>CGDisableCoalescedUpdates</key> <true/> <key>DTCompiler</key> Modified: branches/Cog/nscogbuild/macbuild/CoreVM.plist =================================================================== --- branches/Cog/nscogbuild/macbuild/CoreVM.plist 2011-07-15 15:17:51 UTC (rev 2460) +++ branches/Cog/nscogbuild/macbuild/CoreVM.plist 2011-07-15 22:18:34 UTC (rev 2461) @@ -76,7 +76,11 @@ <key>CFBundleExecutable</key> <string>Newspeak Virtual Machine</string> <key>CFBundleGetInfoString</key> - <string>Newspeak Virtual Machine 4.0.0 http://www. bracha.org</string> + <string>Newspeak Virtual Machine 4.0.0 http://newspeaklanguage.org</string> + <key>CFBundleShortVersionString</key> + <string>Newspeak Virtual Machine 4.0.0</string> + <key>CFBundleVersion</key> + <string>4.0.0</string> <key>CFBundleIconFile</key> <string>Newspeak Virtual Machine.icns</string> <key>CFBundleIdentifier</key> @@ -87,12 +91,8 @@ <string>Newspeak Virtual Machine</string> <key>CFBundlePackageType</key> <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>Newspeak Virtual Machine 4.0.0</string> <key>CFBundleSignature</key> <string>????</string> - <key>CFBundleVersion</key> - <string>4.0.0</string> <key>CGDisableCoalescedUpdates</key> <true/> <key>DTCompiler</key> Modified: branches/Cog/nscogbuild/macbuild/CoreVM.xcodeproj/project.pbxproj =================================================================== --- branches/Cog/nscogbuild/macbuild/CoreVM.xcodeproj/project.pbxproj 2011-07-15 15:17:51 UTC (rev 2460) +++ branches/Cog/nscogbuild/macbuild/CoreVM.xcodeproj/project.pbxproj 2011-07-15 22:18:34 UTC (rev 2461) @@ -57,6 +57,9 @@ 737D7E2A13BAB68900347756 /* cogit.h in Headers */ = {isa = PBXBuildFile; fileRef = 737D7E2313BAB68900347756 /* cogit.h */; }; 737D7E2B13BAB68900347756 /* vmCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 737D7E2413BAB68900347756 /* vmCallback.h */; }; 737D7E2C13BAB68900347756 /* cogmethod.h in Headers */ = {isa = PBXBuildFile; fileRef = 737D7E2513BAB68900347756 /* cogmethod.h */; }; + 737F48B913D0DB5D0071BDEB /* sqCogStackAlignment.h in Headers */ = {isa = PBXBuildFile; fileRef = 737F48B613D0DB5D0071BDEB /* sqCogStackAlignment.h */; }; + 737F48BA13D0DB5D0071BDEB /* sqMemoryFence.h in Headers */ = {isa = PBXBuildFile; fileRef = 737F48B713D0DB5D0071BDEB /* sqMemoryFence.h */; }; + 737F48BB13D0DB5D0071BDEB /* sqSCCSVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 737F48B813D0DB5D0071BDEB /* sqSCCSVersion.h */; }; 73804CA7137DEA0E00D96A60 /* osExports.c in Sources */ = {isa = PBXBuildFile; fileRef = 73804CA6137DEA0E00D96A60 /* osExports.c */; }; 738563101378A00200EF6ED1 /* SoundPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7385630F1378A00200EF6ED1 /* SoundPlugin.h */; }; 738FB1EA0EE4CF94004BEE42 /* ia32abicc.c in Sources */ = {isa = PBXBuildFile; fileRef = 738FB1E90EE4CF94004BEE42 /* ia32abicc.c */; }; @@ -320,6 +323,9 @@ 737D7E2313BAB68900347756 /* cogit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cogit.h; path = ../../nscogsrc/vm/cogit.h; sourceTree = "<group>"; }; 737D7E2413BAB68900347756 /* vmCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vmCallback.h; path = ../../nscogsrc/vm/vmCallback.h; sourceTree = "<group>"; }; 737D7E2513BAB68900347756 /* cogmethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cogmethod.h; path = ../../nscogsrc/vm/cogmethod.h; sourceTree = "<group>"; }; + 737F48B613D0DB5D0071BDEB /* sqCogStackAlignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqCogStackAlignment.h; sourceTree = "<group>"; }; + 737F48B713D0DB5D0071BDEB /* sqMemoryFence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMemoryFence.h; sourceTree = "<group>"; }; + 737F48B813D0DB5D0071BDEB /* sqSCCSVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSCCSVersion.h; sourceTree = "<group>"; }; 73804CA6137DEA0E00D96A60 /* osExports.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = osExports.c; sourceTree = "<group>"; }; 7385630F1378A00200EF6ED1 /* SoundPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundPlugin.h; sourceTree = "<group>"; }; 738FB1E90EE4CF94004BEE42 /* ia32abicc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ia32abicc.c; path = IA32ABI/ia32abicc.c; sourceTree = "<group>"; }; @@ -1357,6 +1363,9 @@ F5F8AFDB02EB4E0A0100013C /* vm */ = { isa = PBXGroup; children = ( + 737F48B613D0DB5D0071BDEB /* sqCogStackAlignment.h */, + 737F48B713D0DB5D0071BDEB /* sqMemoryFence.h */, + 737F48B813D0DB5D0071BDEB /* sqSCCSVersion.h */, A2C08F420EA3E0FD0036416C /* dispdbg.h */, F5F8AFDC02EB4E0A0100013C /* sq.h */, 739C6ED8112DCBD10049B7D3 /* sqAssert.h */, @@ -1444,6 +1453,9 @@ 737D7E2A13BAB68900347756 /* cogit.h in Headers */, 737D7E2B13BAB68900347756 /* vmCallback.h in Headers */, 737D7E2C13BAB68900347756 /* cogmethod.h in Headers */, + 737F48B913D0DB5D0071BDEB /* sqCogStackAlignment.h in Headers */, + 737F48BA13D0DB5D0071BDEB /* sqMemoryFence.h in Headers */, + 737F48BB13D0DB5D0071BDEB /* sqSCCSVersion.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; Added: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h =================================================================== --- branches/Cog/platforms/Cross/vm/sqSCCSVersion.h (rev 0) +++ branches/Cog/platforms/Cross/vm/sqSCCSVersion.h 2011-07-15 22:18:34 UTC (rev 2461) @@ -0,0 +1,75 @@ +/* + * A set of definitions for C source code control systems, to provide accurate + * and definitive version information to the VM. + * + * Currently instantiated only for Subversion. Please add definitions for + * other repositories as appropriate. + * + * I guess a good way to manage this is to edit the below define list to select + * appropriate the repository type, and then that's the extent of the fork. + * + * Eliot Miranda + * [hidden email] + * 15 July 2011 + */ + +#define SCCS 0 +#define RCS 0 +#define CVS 0 +#define SUBVERSION 1 +#define BAZAAR 0 +#define MERCURIAL 0 +#define GIT 0 + + +#if SUBVERSION +static char SvnRawRevisionString[] = "$Rev$"; +# define REV_START (SvnRawRevisionString + 6) + +static char SvnRawRepositoryURL[] = "$URL$"; +# define URL_START (SvnRawRepositoryURL + 6) + +static long +revisionAsLong() { return atol(REV_START); } + +static char * +revisionAsString() +{ + char *maybe_space = strchr(REV_START,' '); + if (maybe_space) + *maybe_space = 0; + return REV_START; +} + +static char * +repositoryURL() +{ + char *maybe_platforms = strstr(URL_START, "/platforms"); + if (maybe_platforms) + *maybe_platforms = 0; + return URL_START; +} +# undef REV_START +# undef URL_START +#else /* SUBVERSION */ +static long +revisionAsLong() { return -1; } + +static char * +revisionAsString() { return "?"; } + +static char * +repositoryURL() { return "unknown"; } +#endif /* SUBVERSION */ + +static char *sourceVersion = 0; + +static char *sourceVersionString() +{ + if (!sourceVersion) { + int len = strlen(revisionAsString()) + strlen(repositoryURL()) + 3; + sourceVersion = malloc(len); + sprintf(sourceVersion,"r%s %s",revisionAsString(),repositoryURL()); + } + return sourceVersion; +} Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h ___________________________________________________________________ Added: checkindate + Fri Jul 15 15:16:27 PDT 2011 Added: svn:keywords + URL Rev Modified: branches/Cog/platforms/Mac OS/vm/sqMacMain.c =================================================================== --- branches/Cog/platforms/Mac OS/vm/sqMacMain.c 2011-07-15 15:17:51 UTC (rev 2460) +++ branches/Cog/platforms/Mac OS/vm/sqMacMain.c 2011-07-15 22:18:34 UTC (rev 2461) @@ -94,6 +94,7 @@ #include "sqaio.h" #include "sqMacNSPluginUILogic2.h" #include "sqUnixCharConv.h" +#include "sqSCCSVersion.h" #include <unistd.h> #include <pthread.h> @@ -594,6 +595,9 @@ # endif #endif + if (id == 1009) /* source tree version info */ + return sourceVersionString(); + // return "Mac Carbon 3.8.18b4 29-May-08 >02DA4BFD-4050-4372-8DBB-9582DA7D0218<"; // return "Mac Carbon 3.8.18b3 10-Apr-08 >DC0EAF5D-C46C-479D-B2A3-DBD4A2DF95A8<"; // return "Mac Carbon 3.8.18b2 17-Aug-07 >F439DEFF-4327-403D-969B-78695EE835DB<"; Modified: branches/Cog/platforms/unix/vm/sqUnixMain.c =================================================================== --- branches/Cog/platforms/unix/vm/sqUnixMain.c 2011-07-15 15:17:51 UTC (rev 2460) +++ branches/Cog/platforms/unix/vm/sqUnixMain.c 2011-07-15 22:18:34 UTC (rev 2461) @@ -37,6 +37,7 @@ #include "sqMemoryAccess.h" #include "sqaio.h" #include "sqUnixCharConv.h" +#include "sqSCCSVersion.h" #include "debug.h" #ifdef ioMSecs @@ -423,7 +424,8 @@ # endif #endif -static char *getAttribute(sqInt id) +static char * +getAttribute(sqInt id) { if (id < 0) /* VM argument */ { @@ -467,6 +469,10 @@ } # endif #endif + + case 1009: /* source tree version info */ + return sourceVersionString(); + default: if ((id - 2) < squeakArgCnt) return squeakArgVec[id - 2]; Modified: branches/Cog/platforms/win32/vm/sqWin32Window.c =================================================================== --- branches/Cog/platforms/win32/vm/sqWin32Window.c 2011-07-15 15:17:51 UTC (rev 2460) +++ branches/Cog/platforms/win32/vm/sqWin32Window.c 2011-07-15 22:18:34 UTC (rev 2461) @@ -37,6 +37,7 @@ #include "sq.h" #include "sqWin32Prefs.h" +#include "sqSCCSVersion.h" #ifndef NO_RCSID static TCHAR RCSID[]= TEXT("$Id: sqWin32Window.c 1693 2007-06-03 02:09:21Z andreas $"); @@ -282,20 +283,29 @@ } #endif /* defined(_WIN32_WCE) */ if(cmd == SC_CLOSE) { - if(prefsEnableAltF4Quit() || GetKeyState(VK_SHIFT) < 0) { - TCHAR msg[1001], label[1001]; - GetPrivateProfileString(U_GLOBAL, TEXT("QuitDialogMessage"), - TEXT("Quit " VM_NAME " without saving?"), - msg, 1000, squeakIniName); - GetPrivateProfileString(U_GLOBAL, TEXT("QuitDialogLabel"), - TEXT(VM_NAME), - label, 1000, squeakIniName); - if(MessageBox(stWindow, msg, label, MB_YESNO) != IDYES) return 0; - DestroyWindow(stWindow); - ioExit(); - } else { - recordWindowEvent(WindowEventClose, NULL); - } +#if NewspeakVM + /* Newspeak doesn't easnt to quit if the main window is closed. Only + * when the last native window is closed. + */ + if(fEnableAltF4Quit) + ShowWindow(stWindow, SW_HIDE); +#else + if(prefsEnableAltF4Quit() || GetKeyState(VK_SHIFT) < 0) { + TCHAR msg[1001], label[1001]; + GetPrivateProfileString(U_GLOBAL, TEXT("QuitDialogMessage"), + TEXT("Quit " VM_NAME " without saving?"), + msg, 1000, squeakIniName); + GetPrivateProfileString(U_GLOBAL, TEXT("QuitDialogLabel"), + TEXT(VM_NAME), + label, 1000, squeakIniName); + if(MessageBox(stWindow, msg, label, MB_YESNO) != IDYES) + return 0; + DestroyWindow(stWindow); + ioExit(); + /*NOTREACHED*/ + } + recordWindowEvent(WindowEventClose, NULL); +#endif /* NewspeakVM */ break; } return DefWindowProcW(hwnd,message,wParam,lParam); @@ -2092,6 +2102,10 @@ /* force an update of the squeak window if using deferred updates */ int ioForceDisplayUpdate(void) { + /* With Newspeak and the native GUI we do not want the main window to appear + * unless explicitly asked for. + */ +#if !NewspeakVM /* Show the main window if it's been hidden so far */ if(IsWindow(stWindow) && !IsWindowVisible(stWindow)) { HideSplashScreen(); @@ -2100,15 +2114,14 @@ ioSetFullScreen(shouldBeFullScreen); UpdateWindow(stWindow); } +#endif /* Check if a) We should do deferred updates at all b) The window is valid c) The Interpreter does not defer updates by itself */ if(fDeferredUpdate && IsWindow(stWindow) && !deferDisplayUpdates) - { UpdateWindow(stWindow); - } return 1; } @@ -2779,6 +2792,9 @@ # endif #endif + case 1009: /* source tree version info */ + return sourceVersionString(); + /* Windows internals */ case 10001: /* addl. hardware info */ return hwInfoString; Modified: branches/Cog/scripts/mkvmarchives =================================================================== --- branches/Cog/scripts/mkvmarchives 2011-07-15 15:17:51 UTC (rev 2460) +++ branches/Cog/scripts/mkvmarchives 2011-07-15 22:18:34 UTC (rev 2461) @@ -39,10 +39,14 @@ COPYFILE_DISABLE=1 tar czf coglinux.tgz coglinux EXES=coglinux/lib/squeak/3.9-7/squeak fi +REV=`grep 'SvnRawRevisionString.*Rev:' platforms/Cross/vm/sqSCCSVersion.h \ + | sed 's/^.*Rev: \([0-9][0-9]*\) $";/\1/' if [ -n "$CM" ]; then test -d Cog.app || mkdir Cog.app rm -rf Cog.app/* Cog.app.tgz (cd macbuild/Fast.app>/dev/null;tar cf - *)|(cd Cog.app;tar xvf -) + ex "+g/[ >][0-9][0-9]*\.[0-9][0-9]*\.0/s/0\([< ]\)/$REV\1/" +w +q Cog.app/Contents/Info.plist +g/ [ tar czf Cog.app.tgz Cog.app EXES="$EXES Cog.app/Contents/MacOS/Croquet" fi @@ -63,6 +67,7 @@ test -d Newspeak\ Virtual\ Machine.app || mkdir Newspeak\ Virtual\ Machine.app rm -rf Newspeak\ Virtual\ Machine.app/* Newspeak\ Virtual\ Machine.app.tgz (cd $NSB/macbuild/Fast.app>/dev/null;tar cf - *)|(cd Newspeak\ Virtual\ Machine.app;tar xvf -) + ex "+g/[ >][0-9][0-9]*\.[0-9][0-9]*\.0/s/0\([< ]\)/$REV\1/" +w +q Newspeak\ Virtual\ Machine.app/Contents/Info.plist tar czf Newspeak\ Virtual\ Machine.app.tgz Newspeak\ Virtual\ Machine.app EXES="$EXES Newspeak Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine" fi Added: branches/Cog/scripts/svnci =================================================================== --- branches/Cog/scripts/svnci (rev 0) +++ branches/Cog/scripts/svnci 2011-07-15 22:18:34 UTC (rev 2461) @@ -0,0 +1,6 @@ +#!/bin/sh +# checkin script for subverison that serves to cause +# platforms/Cross/vm/sqSCCSVersion.h to be checked-in so that its version +# info reflects that of the current check-in. +svn propset checkindate "`date`" platforms/Cross/vm/sqSCCSVersion.h +svn ci Property changes on: branches/Cog/scripts/svnci ___________________________________________________________________ Added: svn:executable + * |
Free forum by Nabble | Edit this page |