Browse files

RegexKit 0.3.0 landing...

  • Loading branch information...
1 parent 58a2f2e commit e8a6625adbfacc22ef18f6f8015e016ecb3708c6 jengelhart committed Oct 30, 2007
Showing with 4,608 additions and 1,397 deletions.
  1. +204 −0 ChangeLog
  2. +14 −10 GNUstep/GNUmakefile
  3. +5 −5 LICENSE
  4. +1 −2 README
  5. +224 −30 RegexKit.xcodeproj/project.pbxproj
  6. +74 −0 ReleaseNotes
  7. +10 −0 Source/Build/Distribution/Adding RegexKit to your Project.html
  8. +1 −1 Source/Build/Distribution/Documentation.html
  9. +1 −1 Source/Build/Distribution/distribution_pcre.h
  10. +141 −0 Source/Build/Makefiles/Makefile.dist
  11. +53 −54 Source/Build/Makefiles/Makefile.pcre
  12. +4 −0 Source/Build/Packagemaker/Resources/English.lproj/Conclusion.rtf
  13. +38 −0 Source/Build/Packagemaker/Resources/English.lproj/License.rtf
  14. +104 −0 Source/Build/Packagemaker/Resources/English.lproj/ReadMe.rtf
  15. +4 −0 Source/Build/Packagemaker/Resources/English.lproj/Welcome.rtf
  16. +10 −0 Source/Build/Packagemaker/plists/DocSet_desc.plist
  17. +44 −0 Source/Build/Packagemaker/plists/DocSet_info.plist
  18. +10 −0 Source/Build/Packagemaker/plists/Documentation_desc.plist
  19. +44 −0 Source/Build/Packagemaker/plists/Documentation_info.plist
  20. +10 −0 Source/Build/Packagemaker/plists/Framework_desc.plist
  21. +44 −0 Source/Build/Packagemaker/plists/Framework_info.plist
  22. +18 −0 Source/Build/Packagemaker/plists/RegexKit_mpkg_info.plist
  23. +10 −0 Source/Build/Packagemaker/plists/Sourcecode_desc.plist
  24. +44 −0 Source/Build/Packagemaker/plists/Sourcecode_info.plist
  25. +10 −0 Source/Build/Packagemaker/plists/pcre_desc.plist
  26. +44 −0 Source/Build/Packagemaker/plists/pcre_info.plist
  27. +29 −0 Source/Build/SQL/files.sql
  28. +283 −144 Source/Build/Scripts/
  29. +17 −10 Source/Build/Scripts/
  30. +6 −2 Source/Build/Scripts/
  31. +190 −0 Source/Build/Scripts/
  32. +21 −0 Source/Build/Scripts/
  33. +7 −8 Source/Build/Scripts/
  34. +92 −42 Source/Build/Xcode/RegexKit Build Settings.xcconfig
  35. +132 −2 Source/Documentation/Misc/spelling_words
  36. +1 −1 Source/Documentation/Resources/CSS/content.css
  37. +2 −2 Source/Documentation/Resources/CSS/doc.css
  38. +1 −0 Source/Documentation/Resources/CSS/print.css
  39. +8 −0 Source/Documentation/SQL/config.sql
  40. +58 −0 Source/Documentation/SQL/docset.sql
  41. +71 −8 Source/Documentation/SQL/init.sql
  42. +111 −0 Source/Documentation/Scripts/
  43. +17 −20 Source/Documentation/Scripts/
  44. +29 −29 Source/Documentation/Scripts/
  45. +8 −8 Source/Documentation/Scripts/
  46. +690 −0 Source/Documentation/Scripts/
  47. +17 −3 Source/Documentation/Scripts/
  48. +1 −1 Source/Documentation/Scripts/
  49. +2 −0 Source/Documentation/Scripts/
  50. +1 −1 Source/Documentation/Static/RegexKitImplementationTopics.html
  51. +50 −7 Source/Documentation/Static/RegexKitProgrammingGuide.html
  52. +1 −1 Source/Documentation/Static/index.html
  53. +1 −1 Source/Documentation/Templates/Constants.tmpl
  54. +1 −1 Source/Documentation/Templates/DataTypes.tmpl
  55. +1 −1 Source/Documentation/Templates/Functions.tmpl
  56. +3 −3 Source/Documentation/Templates/NSArray.tmpl
  57. +3 −3 Source/Documentation/Templates/NSDictionary.tmpl
  58. +3 −3 Source/Documentation/Templates/NSMutableArray.tmpl
  59. +4 −3 Source/Documentation/Templates/NSMutableDictionary.tmpl
  60. +3 −3 Source/Documentation/Templates/NSMutableSet.tmpl
  61. +3 −3 Source/Documentation/Templates/NSMutableString.tmpl
  62. +3 −3 Source/Documentation/Templates/NSObject.tmpl
  63. +3 −3 Source/Documentation/Templates/NSSet.tmpl
  64. +3 −3 Source/Documentation/Templates/NSString.tmpl
  65. +2 −2 Source/Documentation/Templates/RKCache.tmpl
  66. +2 −2 Source/Documentation/Templates/RKEnumerator.tmpl
  67. +2 −2 Source/Documentation/Templates/RKRegex.tmpl
  68. +2 −1 Source/Documentation/Templates/content.tmpl
  69. +5 −5 Source/Documentation/Templates/toc.tmpl
  70. +5 −5 Source/Headers/RegexKit/NSArray.h
  71. +1 −1 Source/Headers/RegexKit/NSSet.h
  72. +26 −26 Source/Headers/RegexKit/NSString.h
  73. +3 −3 Source/Headers/RegexKit/RKAutoreleasedMemory.h
  74. +20 −16 Source/Headers/RegexKit/RKCache.h
  75. +3 −3 Source/Headers/RegexKit/RKCoder.h
  76. +8 −9 Source/Headers/RegexKit/RKEnumerator.h
  77. +14 −14 Source/Headers/RegexKit/RKLock.h
  78. +26 −26 Source/Headers/RegexKit/RKRegex.h
  79. +106 −9 Source/Headers/RegexKit/RegexKitDefines.h
  80. +98 −59 Source/Headers/RegexKit/RegexKitPrivate.h
  81. +2 −2 Source/Info.plist
  82. +51 −38 Source/NSArray.m
  83. +32 −19 Source/NSDictionary.m
  84. +29 −26 Source/NSSet.m
  85. +343 −286 Source/NSString.m
  86. +7 −4 Source/RKAutoreleasedMemory.m
  87. +163 −58 Source/RKCache.m
  88. +12 −12 Source/RKCoder.m
  89. +29 −25 Source/RKEnumerator.m
  90. +50 −28 Source/RKLock.m
  91. +4 −3 Source/RKPlaceholder.m
  92. +7 −7 Source/RKPrivate.m
  93. +228 −157 Source/RKRegex.m
  94. +10 −10 Source/RKUtility.m
  95. +1 −1 Source/unitTests/collectionAdditions.h
  96. +11 −4 Source/unitTests/collectionAdditions.m
  97. +34 −6 Source/unitTests/core.m
  98. +39 −20 Source/unitTests/
  99. +7 −0 Source/unitTests/enumeration.m
  100. +1 −1 Source/unitTests/functionality.h
  101. +7 −3 Source/unitTests/functionality.m
  102. +1 −1 Source/unitTests/multithreading.h
  103. +59 −15 Source/unitTests/multithreading.m
  104. +21 −14 Source/unitTests/stringConversion.m
  105. +1 −1 Source/unitTests/timing.h
  106. +94 −51 Source/unitTests/timing.m
204 ChangeLog
@@ -1,3 +1,207 @@
+Changes from 0.2.0 Beta to 0.3.0 Beta
+o Xcode 3.0 DocSet Documentation
+ ------------------------------
+The DocSet documentation is essentially the HTML documentation with a few
+minor tweaks. It is created by the scripts:
+ is pretty horrific, and was kludged together very quickly.
+It creates the required 'Nodes.xml' and 'Tokens.xml' by extracting the
+information from the documentation database and rewrites the anchors in
+the html files to use the '//apple_ref/' style format. This is not used
+in the normal HTML documentation because it isn't valid HTML (tidy throws
+a fit and there's hundreds of warnings generated.) However, the docset
+tool chain appears to be much happier with apple_ref style anchors, so the
+legal html name anchors are rewritten.
+Once all these pieces are in placed, and a Info.plist is created, the
+'docsetutil' command is run to build the DocSet index and that's pretty
+much it.
+o Garbage Collection
+ ------------------
+Mac OS X 10.5 Garbage Collection is controlled by the C Preprocessor flag
+ENABLE_MACOSX_GARBAGE_COLLECTION. A number of macros were created to ease
+various portability issues. Of special note is the framework global
+variable 'RKRegexGarbageCollect'. If ENABLE_MACOSX_GARBAGE_COLLECTION is
+defined, then RKRegexGarbageCollect is a int32_t defined in RKRegex.m.
+If ENABLE_MACOSX_GARBAGE_COLLECTION is not defined, then RKRegexGarbageCollect
+is #defined in RegexKitPrivate.h as '0'. Also in RegexKitPrivate.h are a
+number of macros for managing various Retain/Release/Autorelease.
+If ENABLE_MACOSX_GARBAGE_COLLECTION is defined, then RKRegex.m, RKCache.m, and
+NSString.m will all check and see if the class 'NSGarbageCollector' exists,
+and if so, check to see if garbage collection is enabled in their +load
+If ENABLE_MACOSX_GARBAGE_COLLECTION is not defined, then most of the macros
+become a compile time static conditional which the compiler will optimize away,
+so compiling on pre-10.5 or GNUstep is branchless. It was the best I could
+come up with for maximum portability while still maintaining readability.
+enabled at load time, then the class switches to using the new NSMapTable
+class for managing the cache. It places cached RKRegex objects in a NSMapTable
+with a weak reference to the object. This should allow for auto trimming
+of the cache to the working set. Not sure how it will work out in real life.
+o 64 bit support
+ --------------
+A set of macros was adopted to ease multi-platform 64 bit issues. They are
+essentially parallel to the Leopard NSInteger / NSUInteger types, except that
+they are cpp macros. They have the names RKInteger and RKUInteger / etc.
+They are re-written to either NSInteger or int depending on the detected
+run time environment. This allows for type checking / compatibility to be
+maintained for each environment. GNUstep still has things such as 'hash'
+defined as 'unsigned int', and for some of our objects we return the pointer
+to the instantiated object as the hash (there can be only one) and this
+causes truncation on GNUstep, but it should be OK.
+o GNUstep
+ -------
+Cleaned up various GNUstep pieces here and there while putting the 64 bit
+stuff in. Should build much cleaner now, with only a handful of warnings
+when compiling on a 64 bit platform for various hash functions, but this
+shouldn't be a problem in the real world.
+o RegexKit.framework Info.plist version bug fix
+ ---------------------------------------------
+The Info.plist in RegexKit 0.2.0 had a bug in the Info.plist file.
+The settings for the keys CFBundleShortVersionString and CFBundleVersion
+where set to the variable ${REGEXKIT_CURRENT_VERSION} when they should
+have been set to ${PROJECT_CURRENT_VERSION}. Since the variable
+${REGEXKIT_CURRENT_VERSION} was undefined, this ended up expanding to
+nothing, so the correct version number is missing. This should be a
+fairly trivial bug in the grand scheme of things.
+o Mac OS X Installer .dmg distribution
+ ------------------------------------
+RegexKit 0.3.0 marks the introduction of a Mac OS X Installer based
+distribution. It bundles together the Mac OS X Binary executable
+RegexKit.framework, the Documentation, and the source code in to one
+convenient package. Each is grouped in to their own package, and by
+default RegexKit.framework and Documentation are selected to install while
+the source code package is not. There's some javascript code to disable
+a package if the version that is already installed is newer than the version
+that is attempting to install. Also, there's some logic so that the source
+code package will automatically default to selected if it detects that
+a previous install of the source code has been performed, thus auto upgrading
+without having to think about it.
+The Installer has a volume check script that requires 10.4 or later in order
+to install on a volume, and an installation check that checks to see if the
+file '/Developer/Applications/' exists. If it does not, it presents
+a warning that the Xcode Development Tools should be installed, but does not
+stop the installation.
+There's three main tuneables in the build configs:
+Since the overall distribution package gets placed on to a .dmg disk image,
+which is then BZip2 compressed (-format UDBZ), compressing the packages with
+gzip actually causes the final .dmg size to grow by about ~60-70K, or roughly
+10% in size. So, by default, we leave the packages uncompressed and let
+the disk image bzip2 deal with all the compression.
+The other option, DISTRIBUTION_INCLUDE_PCRE_PACKAGE, toggles whether or not
+the PCRE tarball used to build the framework is included in the Installer
+distribution. By default the choice is NO since this causes the final .dmg
+disk image to nearly double in size. There's some extra javascript logic so
+that the PCRE distribution is if and only if the source code package is
+selected to be installed. If the user selects the source code package,
+the PCRE package then auto selects itself to be installed as well. The
+PCRE package version is the PCRE Major.Minor, not the RegexKit version.
+Unlike the others it will allow an earlier version to be installed 'on
+top off' a newer version since this is largely harmless- Each PCRE
+tarball distribution is separate from the others.
+The file that creates the top level distribution package 'distribution.dist'
+file is in 'Source/Build/Scripts/'. It handles the logic
+of selectively inserting the PCRE choice depending on whether or not
+DISTRIBUTION_INCLUDE_PCRE_PACKAGE is set to YES. It also gathers some
+necessary information, such as a packages installed size, by using perls
+objective-c / foundation bridge to read the individual packages Info.plist
+files and extracting the appropriate keys.
+For each package (of which there are four, RegexKit.framework binary package,
+Documentation package, Source code package, and optionally the PCRE
+distribution package) there exists two .plist files, one info.plist and one
+desc.plist. The important one is the info.plist, and it contains the
+bundle identification and version information. The version information is
+replaced dynamically at build time by the
+'Source/Build/Scripts/' script. That script makes a
+copy of the plists to a private build staging area. Then, it calls the
+script 'Source/Build/Scripts/' which is a very simply perl script
+that again used the objective-c / foundation bridge to take three arguments:
+the plist file to operate on, the key to update, and the value to set the
+key to. uses this to update all the plists to the
+current RegexKit version as required by the package plist format. An
+additional .plist file, RegexKit_mpkg.plist, is largely for cosmetic purposes.
+It gets the version updated as well, but its sole purpose is to provide a
+version string to the finder when a 'Get Info' is performed and that's it.
+The text that's displayed during the installation process comes from four
+files, though only two are currently used. These are located in
+'Source/Build/Packagemaker/Resources/...', which is a localized .lproj style
+directory for localization purposes. Currently only English.lproj is present.
+The files are currently simple .rtf files, but .rtfd and .html are supported
+as well. Any changes to the file types would have to be updated in the file (it should be obvious where). Only 'ReadMe.rtf' and
+'License.rtf' are currently used, but both 'Welcome.rtf' and 'Conclusion.rtf'
+can be activated trivially by editing They get copied in
+to the distribution package right now, but the necessary lines in
+'distribution.dist' that is created by are missing.
+The tuneable DISTRIBUTION_DEFAULT_INSTALL_DIR is self-explanatory.
+o Minor bug fixes
+ ---------------
+There were a handful of very minor, single line changes to fix some trivial
+bugs. These mostly had to do with inter-version differences between tools
+(ie, sqlite 3.1.3 -> later versions tweaks, minor accommodations to make
+building from the installer distribution run clean)
+o Build system tweaks
+ -------------------
+Replaced the 'debug: ' portion of various script status lines with 'note: '
+instead. This is mostly cosmetic. In the Makefile.pcre, added the makefile
+file name and line number of the message so clicking on it will take you
+right to that line. Updated most status messages to always output the
+filename and line number with the status indicator.
+The PCRE build target is largely driven by Makefiles. The scripts that invoke
+`make` were modified to set the -j argument, or the number of jobs to run
+in parallel, and the -l argument, or the load average where no new jobs can
+be started. The values for these parameters are derived from the sysctl
+variable 'hw.activecpu'. The -j parameter is set to the number of active
+CPU's, and the max load is set to the number of active CPU's + 2. This should
+allow those of you with multiple CPU's to build the PCRE target faster.
+However, sometimes building in parallel causes certain make dependency issues
+to crop up that don't happen when running sequentially.
+This can be disabled with the tuneable PCRE_PARALLEL_BUILD = NO.
+The Distribution target was also partially parallel build enabled as well.
Changes from Alpha test distribution
@@ -3,14 +3,22 @@
include $(GNUSTEP_MAKEFILES)/common.make
# Assumes that the CWD is GNUstep
-REGEXKIT_ROOT_DIR = $(abspath ..)
+REGEXKIT_ROOT_DIR = $(abspath ..)
-PCRE_LIBS=$(shell pcre-config --libs)
-PCRE_CFLAGS=$(shell pcre-config --cflags)
+PCRE_LIBS = $(shell pcre-config --libs)
+PCRE_CFLAGS = $(shell pcre-config --cflags)
+PCRE_HEADER = $(shell perl -e '$$x = "${PCRE_CFLAGS}"; $$x =~ /\-I(.*?\/include\b)/; print("$$1/pcre.h");')
+ORIGINAL_RK_PCRE_HEADER = $(shell diff -q '${REGEXKIT_HEADERS_DIR}/RegexKit/pcre.h' '${REGEXKIT_SOURCE_DIR}/Build/Distribution/distribution_pcre.h')
+$(info Copying the installed PCRE's '${PCRE_HEADER}' to RegexKit's Headers directory at '${REGEXKIT_HEADERS_DIR}/RegexKit/pcre.h')
+$(shell cp '${PCRE_HEADER}' '${REGEXKIT_HEADERS_DIR}/RegexKit/pcre.h')
vpath %.h ${REGEXKIT_HEADERS_DIR}/RegexKit
@@ -29,10 +37,6 @@ libRegexKit_HEADER_FILES_INSTALL_DIR = /RegexKit
# Include the PCRE library
-# cp -p /usr/local/include/pcre.h '${REGEXKIT_HEADERS_DIR}/${PACKAGE_NAME}/pcre.h'
include $(GNUSTEP_MAKEFILES)/library.make
include $(GNUSTEP_MAKEFILES)/aggregate.make
@@ -1,11 +1,11 @@
Important Information
-RegexKit uses the PCRE library, copyright and written by Philip Hazel, as
-its regular expression pattern matching engine. Therefore, RegexKit
-requires and incorporates the PCRE library in to the framework executable.
-Because of this, you should be aware of the PCRE library licensing
+RegexKit uses the PCRE library, written by Philip Hazel and
+Copyright © 1997-2007 University of Cambridge, as its regular expression
+pattern matching engine. Therefore, RegexKit requires and incorporates the
+PCRE library in to the framework executable. Because of this, you should be
+aware of the PCRE library licensing requirements.
@@ -1,2 +1 @@
-GNUstep support was not tested for this release so there may be some
-lingering issues.
+See the ChangeLog and ReleaseNotes files.
Oops, something went wrong.

0 comments on commit e8a6625

Please sign in to comment.