mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-30 15:33:35 +00:00
Fix some MHTML generation stuff.
Reviewed by me.
This commit is contained in:
@@ -584,11 +584,9 @@ function decompileStaticFile(/*Bundle*/ aBundle, /*String*/ aString, /*String*/
|
||||
mappedURL,
|
||||
mappedURLString = stream.getString();
|
||||
|
||||
if (mappedURLString.toLowerCase().indexOf("mhtml:") === 0)
|
||||
if (mappedURLString.indexOf("mhtml:") === 0)
|
||||
{
|
||||
mappedURLString = "mhtml:" + new CFURL(URLString.substr("mhtml:".length), bundleURL);
|
||||
/*
|
||||
URLString = "mhtml:" + URL;
|
||||
mappedURLString = "mhtml:" + new CFURL(mappedURLString.substr("mhtml:".length), bundleURL);
|
||||
|
||||
if (CFBundleSupportedSpriteType === CFBundleMHTMLUncachedSpriteType)
|
||||
{
|
||||
@@ -596,15 +594,13 @@ function decompileStaticFile(/*Bundle*/ aBundle, /*String*/ aString, /*String*/
|
||||
firstPart = URLString.substring(0, exclamationIndex),
|
||||
lastPart = URLString.substring(exclamationIndex);
|
||||
|
||||
URLString = firstPart + "?" + CFCacheBuster + lastPart;
|
||||
mappedURLString = firstPart + "?" + CFCacheBuster + lastPart;
|
||||
}
|
||||
|
||||
mappedURL = new CFURL(URLString);*/
|
||||
}
|
||||
else
|
||||
mappedURL = new CFURL(mappedURLString);
|
||||
}
|
||||
|
||||
CFURL.setMappedURLForURL(URL, mappedURL);
|
||||
CFURL.setMappedURLForURL(URL, new CFURL(mappedURLString));
|
||||
|
||||
// The unresolved directories must not be bundles.
|
||||
var parent = StaticResource.resourceAtURL(new CFURL(".", URL), YES);
|
||||
|
||||
@@ -647,9 +647,11 @@ BundleTask.prototype.defineSpritedImagesTask = function()
|
||||
if (!isDataResource(aFilename))
|
||||
return;
|
||||
|
||||
var resourcePath = "Resources/" + FILE.relative(resourcesPath, aFilename);
|
||||
var resourcePath = "Resources/" + FILE.relative(resourcesPath, aFilename),
|
||||
MHTMLResourcePath = "mhtml:" + FILE.join(folder, "MHTMLData.txt!") + resourcePath;
|
||||
|
||||
MHTMLStream.write("u;" + resourcePath.length + ";" + resourcePath);
|
||||
MHTMLStream.write(MHTMLResourcePath.length + ";" + MHTMLResourcePath);
|
||||
});
|
||||
|
||||
MHTMLStream.close();
|
||||
|
||||
Reference in New Issue
Block a user