Skip to content
Browse files

chromeless now runs on windows. closes #25

  • Loading branch information...
1 parent c535e21 commit 5db0a8f0d40ac48f492e467f21fa4c59a40e32a5 @lloyd lloyd committed Nov 12, 2010
Showing with 18 additions and 8 deletions.
  1. +2 −1 chromeless
  2. +3 −3 chromeless.bat
  3. +8 −0 impl/mozfetcher/_config.py
  4. +5 −4 impl/mozfetcher/_fetcher.py
View
3 chromeless
@@ -74,6 +74,7 @@ if (f.needs_fetch()):
print "Using Browser HTML at '%s'" % browserToLaunch
import cuddlefish
+import simplejson as json
# now let's run the cfx thingy and specify the app-kit main module
# as our starting point
@@ -82,7 +83,7 @@ cuddlefish.run([
"-a", "xulrunner",
"-b", f.xulrunner_path(),
"-t", "./template",
- "--static-args", '{"browser":"'+ browserToLaunch+'"}',
+ "--static-args", json.encode({"browser": browserToLaunch}),
"-p", "packages/chromeless"
])
View
6 chromeless.bat
@@ -1,3 +1,3 @@
-@echo off
-
-python %VIRTUAL_ENV%\run %1 %2 %3 %4 %5 %6 %7 %8 %9
+@echo off
+
+python %~dp0chromeless %1 %2 %3 %4 %5 %6 %7 %8 %9
View
8 impl/mozfetcher/_config.py
@@ -15,6 +15,14 @@
"path": "xulrunner-sdk/bin/xulrunner-bin",
"sig": "be5a6300da9e5cfc7973255e68f940af"
}
+ },
+ ( "Windows_32bit", "Windows_64bit" ): {
+ "url": "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/latest-trunk/xulrunner-2.0b7pre.en-US.win32.zip",
+ "md5": "318653c4952f0e6f0e58db0c548730f6",
+ "bin": {
+ "path": "xulrunner/xulrunner.exe",
+ "sig": "d0bba60461148617cc73cdf86e438198"
+ }
}
}
View
9 impl/mozfetcher/_fetcher.py
@@ -106,11 +106,12 @@ def _unpack(self,descriptor,path):
raise RuntimeError("path doesn't exist, cannot unpack: " + path)
if (any(path.endswith(ext) for ext in (".tgz",".tar.gz",".tbz2",".tar.bz2"))):
self._print(descriptor, "extracting " + os.path.basename(path))
- tf = tarfile.open(path)
- tf.extractall(self._buildDir)
- tf.close
+ with tarfile.open(path) as f:
+ f.extractall(self._buildDir)
elif (path.endswith(".zip")):
- raise RuntimeError("zip extraction not yet implemented");
+ self._print(descriptor, "extracting " + os.path.basename(path))
+ with zipfile.ZipFile(path) as f:
+ f.extractall(self._buildDir)
else:
raise RuntimeError("I don't know how to extract '" + os.path.basename(path) + "'")
# if after all that we still think we need to fetch the thing,

0 comments on commit 5db0a8f

Please sign in to comment.
Something went wrong with that request. Please try again.