mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-13 06:01:28 +00:00
Remove importClass for java.io.File
This commit is contained in:
@@ -6,7 +6,6 @@ with (objjc)
|
||||
|
||||
importPackage(java.lang);
|
||||
|
||||
importClass(java.io.File);
|
||||
importClass(java.io.BufferedReader);
|
||||
importClass(java.io.FileReader);
|
||||
importClass(java.io.BufferedWriter);
|
||||
@@ -123,7 +122,7 @@ function preprocess(aFilePath, outFilePath, gccArgs, flags)
|
||||
reader.close();
|
||||
|
||||
// Preprocess contents into fragments.
|
||||
var filePath = new String(new File(aFilePath).getName()),
|
||||
var filePath = new String(new java.io.File(aFilePath).getName()),
|
||||
fragments = objj_preprocess(fileContents, { path:"/x" }, {path:filePath}, flags),
|
||||
index = 0,
|
||||
count = fragments.length,
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#!/usr/bin/env narwhal
|
||||
|
||||
importPackage(java.lang);
|
||||
|
||||
importClass(java.io.File);
|
||||
importClass(java.io.BufferedReader);
|
||||
importClass(java.io.FileReader);
|
||||
importClass(java.io.BufferedWriter);
|
||||
@@ -62,7 +59,7 @@ function main()
|
||||
for (; index < count; ++index)
|
||||
{
|
||||
// Read the plist file
|
||||
var file = new File(filePaths[index]),
|
||||
var file = new java.io.File(filePaths[index]),
|
||||
reader = new BufferedReader(new FileReader(file)),
|
||||
fileContents = "";
|
||||
|
||||
@@ -87,7 +84,7 @@ function main()
|
||||
var outFile = file;
|
||||
|
||||
if (outPath)
|
||||
outFile = new File(outPath);
|
||||
outFile = new java.io.File(outPath);
|
||||
|
||||
// else if (outExtension)
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
@import "Nib2CibKeyedUnarchiver.j"
|
||||
|
||||
importPackage(java.io);
|
||||
importClass(java.io.File);
|
||||
|
||||
CPLogRegister(CPLogPrint);
|
||||
|
||||
@@ -84,7 +83,7 @@ function convert(inputFileName, outputFileName, resourcesPath)
|
||||
|
||||
if (resourcesPath)
|
||||
{
|
||||
resourcesFile = new File(resourcesPath).getCanonicalFile();
|
||||
resourcesFile = new java.io.File(resourcesPath).getCanonicalFile();
|
||||
|
||||
if (!resourcesFile.canRead())
|
||||
{
|
||||
@@ -101,7 +100,7 @@ function convert(inputFileName, outputFileName, resourcesPath)
|
||||
}
|
||||
|
||||
// Compile xib or nib to make sure we have a non-new format nib.
|
||||
var temporaryNibFile = Packages.java.io.File.createTempFile("temp", ".nib"),
|
||||
var temporaryNibFile = java.io.File.createTempFile("temp", ".nib"),
|
||||
temporaryNibFilePath = temporaryNibFile.getAbsolutePath();
|
||||
|
||||
temporaryNibFile.deleteOnExit();
|
||||
@@ -113,7 +112,7 @@ function convert(inputFileName, outputFileName, resourcesPath)
|
||||
}
|
||||
|
||||
// Convert from binary plist to XML plist
|
||||
var temporaryPlistFile = Packages.java.io.File.createTempFile("temp", ".plist"),
|
||||
var temporaryPlistFile = java.io.File.createTempFile("temp", ".plist"),
|
||||
temporaryPlistFilePath = temporaryPlistFile.getAbsolutePath();
|
||||
|
||||
temporaryPlistFile.deleteOnExit();
|
||||
@@ -171,7 +170,7 @@ function loadFrameworks(frameworkPaths, aCallback)
|
||||
|
||||
var frameworkPath = frameworkPaths.shift(),
|
||||
|
||||
infoPlist = new File(frameworkPath + "/Info.plist");
|
||||
infoPlist = new java.io.File(frameworkPath + "/Info.plist");
|
||||
|
||||
if (!infoPlist.exists())
|
||||
{
|
||||
@@ -179,7 +178,7 @@ function loadFrameworks(frameworkPaths, aCallback)
|
||||
java.lang.System.exit(1);
|
||||
}
|
||||
|
||||
var infoDictionary = readPlist(new File(frameworkPath + "/Info.plist"));
|
||||
var infoDictionary = readPlist(new java.io.File(frameworkPath + "/Info.plist"));
|
||||
|
||||
if ([infoDictionary objectForKey:@"CPBundlePackageType"] !== "FMWK")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user