Parse off the version number correctly during package.json generation.
* Next Version
-** Upgrade node-webkit wrapper to 0.10.4.
+** DONE Upgrade node-webkit wrapper to 0.10.4.
This moves the Windows version of Chromium several steps forward,
and fixes the stall that prevented the 0.10.x series from working
properly on Windows before.
Actually, they still do in most browsers, but as position: sticky
support rolls out, they will work correctly.
** DONE Include DLLs necessary for broader Windows support
+** DONE Fix version number in OS X About dialog
+
* Pending
-** TODO Fix version number in OS X About dialog
** TODO Detect WebGL failure on Windows and offer DX redistributable
APPLICATION := pwl6
DISTDIR := build/dist
VERSION := $(call git-describe)
-DISTROOT := $(DISTDIR)/$(APPLICATION)-$(VERSION)
+DISTROOT := $(DISTDIR)/$(APPLICATION)_$(VERSION)
FIND_FILES := -type f ! -name '.*'
FIND_JS := -type f -name '*.js'
%.nw: %.bare.zip tools/generate-nw
$(RM) -r $@ $@.tmp
$(UNZIP) -d $@.tmp $<
- tools/generate-nw $@.tmp
+ tools/generate-nw $@.tmp `echo $(*F) | sed -E 's/.+_[^0-9]+//'`
cd $@.tmp && $(ZIP) -r ../$(@F) .
$(RM) -r $@.tmp
mkdir -p $(@:.tar.gz=)
mv $(@D)/$(notdir $(2:.tar.gz=)) $(@:.tar.gz=)/nw
cp -a $1 $(@:.tar.gz=)/nw/package.nw
- cp -a tools/nw-linux-wrapper $(@:.tar.gz=)/`echo $(notdir $1) | sed -E 's/-[^-]+$$//'`
+ cp -a tools/nw-linux-wrapper $(@:.tar.gz=)/`echo $(notdir $1) | sed -E 's/_.+//'`
$(RM) $(@:.tar.gz=)/nw/nwsnapshot
mv $(@:.tar.gz=)/nw/credits.html $(@:.tar.gz=)/nw/node-webkit\ credits.html
tar -czf $@ -C $(@D) $(@F:.tar.gz=)
mv $(@:.zip=)/credits.html $(@:.zip=)/node-webkit\ credits.html
cp -a $< $(@:.zip=)/package.nw
cp -a $(node-webkit-directx) $(@:.zip=)
- mv $(@:.zip=)/nw.exe $(@:.zip=)/`echo $(notdir $1) | sed -E 's/-[^-]+$$/.exe/'`
+ mv $(@:.zip=)/nw.exe $(@:.zip=)/`echo $(notdir $1) | sed -E 's/_.+/.exe/'`
cd $(@D) && $(ZIP) -r $(@F) $(@F:.zip=)
$(RM) -r $(@:.zip=)
endef
def attr(name):
return "data-" + name + """=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?"""
-def main(appdir):
+def main(appdir, version=None):
if not os.path.isdir(appdir):
raise StandardError("input (%r) is not a directory" % appdir)
indexes = []
package = {
"main": indexes[0],
"name": name,
- "version": "0.0.0",
+ "version": version or "0.0.0",
"window": {
"show": False,
"toolbar": False,
if __name__ == "__main__":
import sys
- try:
- appdir = sys.argv[1]
- except IndexError:
- raise SystemExit("Usage: %s appdir" %(
- sys.argv[0]))
- else:
- main(appdir)
-
+ main(*sys.argv[1:])