summaryrefslogtreecommitdiff
path: root/scripting/workben/installer/Welcome.java
diff options
context:
space:
mode:
authorneilm <neilm@openoffice.org>2002-11-22 15:07:12 +0000
committerneilm <neilm@openoffice.org>2002-11-22 15:07:12 +0000
commit99e44cb1e6a24d1229149f8052ee4101353fd5c6 (patch)
tree89b8076884a9fdb82aaf284bf0906b4c55ff7130 /scripting/workben/installer/Welcome.java
parentbc5c0d012281f3d95706e8f669b24ed2a163c93a (diff)
Windows Office detection problems corrected
Diffstat (limited to 'scripting/workben/installer/Welcome.java')
-rw-r--r--scripting/workben/installer/Welcome.java33
1 files changed, 31 insertions, 2 deletions
diff --git a/scripting/workben/installer/Welcome.java b/scripting/workben/installer/Welcome.java
index 7ed877332623..97c571503eb9 100644
--- a/scripting/workben/installer/Welcome.java
+++ b/scripting/workben/installer/Welcome.java
@@ -124,11 +124,40 @@ public class Welcome extends javax.swing.JPanel implements ActionListener {
String key = versions[i];
String progPath = ( String )props.getProperty( key );
if ( progPath != null ){
- progPath = progPath + "program";
- if( userDir.equals( progPath ) ){
+ String os = System.getProperty("os.name");
+
+ if (os.indexOf("Windows") != -1) {
+ progPath = progPath + System.getProperty("file.separator") + "program";
+ }
+ else
+ {
+ progPath = progPath + "program";
+ }
+
+ File tmpFile = new File(progPath+ "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;
}
+ }
+ 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() ) );
+ */
}
}
return versionMatch;