working on qtjava.zip problems

This commit is contained in:
benfry
2008-10-20 23:54:09 +00:00
parent 49575efccb
commit c815ed67a6
2 changed files with 34 additions and 28 deletions

View File

@@ -46,45 +46,26 @@ public class Platform extends processing.app.Platform {
public void init(Base base) {
super.init(base);
checkAssociations();
checkQuickTime();
}
/**
* Make sure that .pde files are associated with processing.exe.
*/
protected void checkAssociations() {
try {
String knownCommand =
Registry.getStringValue(REGISTRY_ROOT_KEY.CLASSES_ROOT,
DOC + "\\shell\\open\\command", "");
//System.out.println("known is " + knownCommand);
if (knownCommand == null) {
/*
String prompt =
"Processing is not set to handle .pde files.\n" +
"Would you like to make it the default?";
int result =
JOptionPane.showConfirmDialog(null, prompt, "Reassign .pde files",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (result == JOptionPane.YES_OPTION) {
setAssociations();
}
*/
if (Preferences.getBoolean("platform.auto_file_type_associations")) {
setAssociations();
}
} else if (!knownCommand.equals(openCommand)) {
// If the value is set differently, just change the registry setting.
/*String prompt =
"This version of Processing is not the default application\n" +
"to open .pde files. Would you like to make it the default?";
int result =
JOptionPane.showConfirmDialog(null, prompt, "Reassign .pde files",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (result == JOptionPane.YES_OPTION) {
setAssociations();
}
*/
if (Preferences.getBoolean("platform.auto_file_type_associations")) {
setAssociations();
}
@@ -126,6 +107,28 @@ public class Platform extends processing.app.Platform {
}
/**
* Find QuickTime for Java installation.
*/
protected void checkQuickTime() {
String qtsystemPath =
Registry.getStringValue(REGISTRY_ROOT_KEY.LOCAL_MACHINE,
"Software\\Apple Computer, Inc.\\QuickTime",
"QTSysDir");
if (qtsystemPath == null) {
System.err.println("QuickTime not installed");
} else {
File qtjavaZip = new File(qtsystemPath, "QTJava.zip");
if (qtjavaZip.exists()) {
String qtjavaZipPath = qtjavaZip.getAbsolutePath();
String cp = System.getProperty("java.class.path");
System.setProperty("java.class.path",
cp + File.pathSeparator + qtjavaZipPath);
}
}
}
// looking for Documents and Settings/blah/Application Data/Processing
public File getSettingsFolder() throws Exception {
// HKEY_CURRENT_USER\Software\Microsoft

View File

@@ -2,6 +2,9 @@
X delete files before adding, otherwise case changes are not preserved
X http://dev.processing.org/bugs/show_bug.cgi?id=969
_ ClassNotFoundException: quicktime.std.StdQTException with release 0152
_ http://dev.processing.org/bugs/show_bug.cgi?id=970
previous
o put the "had to rename sketch" message in the msg bar
o it's ugly/annoying/intrusive