findsofficepath.c (599cc5b4) findsofficepath.c (3889e2e9)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 73 unchanged lines hidden (view full) ---

82 * Gets the installation path from the Windows Registry.
83 *
84 * @return the installation path or NULL, if no installation was found or
85 * if an error occured
86 */
87static char* platformSpecific()
88{
89 const char* SUBKEYNAME = "Software\\OpenOffice\\UNO\\InstallPath";
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 73 unchanged lines hidden (view full) ---

82 * Gets the installation path from the Windows Registry.
83 *
84 * @return the installation path or NULL, if no installation was found or
85 * if an error occured
86 */
87static char* platformSpecific()
88{
89 const char* SUBKEYNAME = "Software\\OpenOffice\\UNO\\InstallPath";
90 const char* SUBKEYNAME64 = "Software\\Wow6432Node\\OpenOffice\\UNO\\InstallPath";
90
91 char* path = NULL;
92
93 /* read the key's default value from HKEY_CURRENT_USER */
94 path = getPathFromRegistryKey( HKEY_CURRENT_USER, SUBKEYNAME );
95
96 if ( path == NULL )
97 {
91
92 char* path = NULL;
93
94 /* read the key's default value from HKEY_CURRENT_USER */
95 path = getPathFromRegistryKey( HKEY_CURRENT_USER, SUBKEYNAME );
96
97 if ( path == NULL )
98 {
99 /* read the key's default value from HKEY_LOCAL_USER 64 */
100 path = getPathFromRegistryKey( HKEY_LOCAL_MACHINE, SUBKEYNAME64 );
101 }
102 else if ( path == NULL )
103 {
98 /* read the key's default value from HKEY_LOCAL_MACHINE */
99 path = getPathFromRegistryKey( HKEY_LOCAL_MACHINE, SUBKEYNAME );
100 }
104 /* read the key's default value from HKEY_LOCAL_MACHINE */
105 path = getPathFromRegistryKey( HKEY_LOCAL_MACHINE, SUBKEYNAME );
106 }
107 else if ( path == NULL )
108 {
109 /* read the key's default value from HKEY_LOCAL_MACHINE 64*/
110 path = getPathFromRegistryKey( HKEY_LOCAL_MACHINE, SUBKEYNAME64 );
111 }
101
102 return path;
103}
104
105#else
106
107#include <unistd.h>
108#include <limits.h>

--- 93 unchanged lines hidden ---
112
113 return path;
114}
115
116#else
117
118#include <unistd.h>
119#include <limits.h>

--- 93 unchanged lines hidden ---