diff options
| -rw-r--r-- | check.mak | 9 | ||||
| -rw-r--r-- | scripts/FileGenerator.py | 4 | ||||
| -rw-r--r-- | scripts/LexGen.py | 15 | ||||
| -rw-r--r-- | scripts/ScintillaData.py | 3 | 
4 files changed, 25 insertions, 6 deletions
| @@ -211,7 +211,14 @@ test: | /tmp/scintilla  	make -C $|/test/unit CXX=$(LINUX_CXX) clean test  	cd $|/test && lua5.1 test_lexlua.lua -releasedir = /tmp/scintilla$(shell grep -o '[0-9]\+' version.txt) +version = $(shell grep -o '[0-9]\+' version.txt) +date = $(shell date +'%Y%m%d') +gen: +	@echo "Using version $(version) with date $(date)" +	sed -i -e 's/content="[0-9]\+"/content="$(date)"/;' doc/index.html +	cd scripts && python LexGen.py + +releasedir = /tmp/scintilla$(version)  $(releasedir): ; hg archive $@  zip: $(releasedir)  	cd /tmp && tar czf $<.tgz $(notdir $<) diff --git a/scripts/FileGenerator.py b/scripts/FileGenerator.py index 3e9662632..f52f55948 100644 --- a/scripts/FileGenerator.py +++ b/scripts/FileGenerator.py @@ -214,8 +214,8 @@ def FindSectionInList(lines, markers):          raise Exception("Could not find end marker " + markers[2])      return slice(start, end) -def ReplaceREInFile(path, match, replace): +def ReplaceREInFile(path, match, replace, count=0):      with codecs.open(path, "r", "utf-8") as f:          contents = f.read() -    contents = re.sub(match, replace, contents) +    contents = re.sub(match, replace, contents, count)      UpdateFile(path, contents) diff --git a/scripts/LexGen.py b/scripts/LexGen.py index 0494286b3..794ffaa82 100644 --- a/scripts/LexGen.py +++ b/scripts/LexGen.py @@ -37,8 +37,8 @@ def UpdateVersionNumbers(sci, root):      UpdateLineInFile(root + "doc/ScintillaDownload.html", "       Release",          "       Release " + sci.versionDotted)      ReplaceREInFile(root + "doc/ScintillaDownload.html", -        r"/www.scintilla.org/([a-zA-Z]+)\d\d\d\d?", -        r"/www.scintilla.org/\g<1>" +  sci.version) +        r"(/sourceforge.net/projects/scintilla/files/scintilla/)[\d\.]+(/[a-zA-Z]+)\d+", +        r"\g<1>" +  sci.versionDotted + "\g<2>" + sci.version)      UpdateLineInFile(root + "doc/index.html",          '          <font color="#FFCC99" size="3"> Release version',          '          <font color="#FFCC99" size="3"> Release version ' +\ @@ -46,6 +46,12 @@ def UpdateVersionNumbers(sci, root):      UpdateLineInFile(root + "doc/index.html",          '           Site last modified',          '           Site last modified ' + sci.mdyModified + '</font>') +    ReplaceREInFile(root + "doc/ScintillaHistory.html", +        r"(/sourceforge.net/projects/scintilla/files/scintilla/)[\d\.]+(/[a-zA-Z]+)\d+", +        r"\g<1>" +  sci.versionDotted + "\g<2>" + sci.version, +        count=1) +    ReplaceREInFile(root + "doc/ScintillaHistory.html", +        r">Release [\d\.]+<", ">Release " + sci.versionDotted + "<", count=1)      UpdateLineInFile(root + "doc/ScintillaHistory.html",          '	Released ',          '	Released ' + sci.dmyModified + '.') @@ -53,6 +59,11 @@ def UpdateVersionNumbers(sci, root):          "CFBundleVersion", sci.versionDotted)      UpdateLineInPlistFile(root + "cocoa/ScintillaFramework/Info.plist",          "CFBundleShortVersionString", sci.versionDotted) +    UpdateLineInFile(root + "LongTermDownload.html", "       Release", +        "       Release " + sci.versionDotted) +    ReplaceREInFile(root + "LongTermDownload.html", +        r"(/sourceforge.net/projects/scintilla/files/scintilla/)[\d\.]+(/[a-zA-Z]+)\d+", +        r"\g<1>" +  sci.versionDotted + "\g<2>" + sci.version)  # Last 24 digits of UUID, used for item IDs in Xcode  def uid24(): diff --git a/scripts/ScintillaData.py b/scripts/ScintillaData.py index 385db59af..b0a68ed16 100644 --- a/scripts/ScintillaData.py +++ b/scripts/ScintillaData.py @@ -237,7 +237,8 @@ class ScintillaData:              for module in modules:                  self.sclexFromName[module[2]] = module[1]                  self.fileFromSclex[module[1]] = lexFile -                self.lexerModules.append(module[0]) +                if module[0] not in self.lexerModules: +                    self.lexerModules.append(module[0])              for k in FindProperties(lexFile).keys():                  lexerProperties.add(k)              documents = FindPropertyDocumentation(lexFile) | 
