summaryrefslogtreecommitdiff
path: root/scripting/workben/installer/Welcome.java
diff options
context:
space:
mode:
authorneilm <neilm@openoffice.org>2002-11-25 14:40:12 +0000
committerneilm <neilm@openoffice.org>2002-11-25 14:40:12 +0000
commit8a7ac7dc33cf407a1aa4f0d55337a8b20e8f73ea (patch)
tree0ecab55e38788e089e4d50b1b621fed4d8bf8bf6 /scripting/workben/installer/Welcome.java
parente7dd246d8a559b8d050ac21dad3fcb97e3db955e (diff)
File separator issues on Windows fixed and problem locating JEdit install
Diffstat (limited to 'scripting/workben/installer/Welcome.java')
-rw-r--r--scripting/workben/installer/Welcome.java39
1 files changed, 13 insertions, 26 deletions
diff --git a/scripting/workben/installer/Welcome.java b/scripting/workben/installer/Welcome.java
index 97c571503eb9..daf2e1adf5d1 100644
--- a/scripting/workben/installer/Welcome.java
+++ b/scripting/workben/installer/Welcome.java
@@ -58,6 +58,9 @@ public class Welcome extends javax.swing.JPanel implements ActionListener {
offInstallPth = userDir.substring( 0, programPosition );
try {
+ System.out.println("All diagnostic output is being redirected to SFrameworkInstall.log");
+ System.out.println("Location: "+ offInstallPth + "program" + File.separator + "SFrameworkInstall.log");
+
LogStream log = new LogStream( "SFrameworkInstall.log" );
System.setErr(log);
@@ -120,44 +123,28 @@ public class Welcome extends javax.swing.JPanel implements ActionListener {
boolean versionMatch = false;
+
for( int i = 0; i < versions.length; i++ ) {
String key = versions[i];
String progPath = ( String )props.getProperty( key );
- if ( progPath != null ){
- String os = System.getProperty("os.name");
-
- if (os.indexOf("Windows") != -1) {
- progPath = progPath + System.getProperty("file.separator") + "program";
- }
- else
- {
- progPath = progPath + "program";
- }
+ if ( progPath != null ){
+ progPath = progPath + File.separator + "program";
- File tmpFile = new File(progPath+ "oostubversion.txt");
+ File tmpFile = new File(progPath + File.separator + "oostubversion.txt");
try{
tmpFile.createNewFile();
- //System.out.println(new File(userDir).toURL().toString());
- //System.out.println("versionMatch: progPath " + progPath + " userDir " + userDir + " iMatch " + iMatch);
- if( new File(userDir+ "oostubversion.txt").exists())
- {
- versionMatch = true;
- break;
- }
+ if( new File(userDir + File.separator + "oostubversion.txt").exists())
+ {
+ versionMatch = true;
+ break;
+ }
}
catch( IOException e)
{
// Fail silently
}
- tmpFile.delete();
-
- /*
- URL url = new URL("file://" + parts[1].trim());
- String opSys =System.getProperty("os.name");
- if (opSys.indexOf("Windows")!=-1){
- System.out.println( "InstUtil URLDecoder path: " + URLDecoder.decode( url.getPath() ) );
- */
+ tmpFile.delete();
}
}
return versionMatch;