Changeset 20764
- Timestamp:
- 09/06/07 07:12:21 (1 year ago)
- Files:
-
- juggler/trunk/modules/gadgeteer/gadget/gadgetmain.cpp (modified) (2 diffs)
- juggler/trunk/modules/jackal/common/jccl/jcclmain.cpp (modified) (2 diffs)
- juggler/trunk/modules/sonix/snx/snxmain.cpp (modified) (2 diffs)
- juggler/trunk/modules/tweek/tweek/tweekmain.cpp (modified) (2 diffs)
- juggler/trunk/modules/vapor/vpr/vprmain.cpp (modified) (2 diffs)
- juggler/trunk/modules/vrjuggler/vrj/vrjmain.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/gadgeteer/gadget/gadgetmain.cpp
r20761 r20764 189 189 190 190 bool found(false); 191 while ( ! found )191 while ( ! found && ! base_dir.empty() ) 192 192 { 193 193 try … … 208 208 } 209 209 210 std::cout << base_dir.native_directory_string() << std::endl; 211 const fs::path data_dir = base_dir / GADGET_SHARE_DIR; 212 213 // We use the overwrite value of 0 as a way around testing whether 214 // the environment variables are already set. 215 setenv("GADGET_BASE_DIR", base_dir.native_directory_string().c_str(), 216 0); 217 setenv("GADGET_DATA_DIR", data_dir.native_directory_string().c_str(), 218 0); 210 if ( found ) 211 { 212 const fs::path data_dir = base_dir / GADGET_SHARE_DIR; 213 214 // We use the overwrite value of 0 as a way around testing whether 215 // the environment variables are already set. 216 setenv("GADGET_BASE_DIR", 217 base_dir.native_directory_string().c_str(), 0); 218 setenv("GADGET_DATA_DIR", 219 data_dir.native_directory_string().c_str(), 0); 220 } 219 221 } 220 222 catch (fs::filesystem_error& ex) juggler/trunk/modules/jackal/common/jccl/jcclmain.cpp
r20760 r20764 189 189 190 190 bool found(false); 191 while ( ! found )191 while ( ! found && ! base_dir.empty() ) 192 192 { 193 193 try … … 208 208 } 209 209 210 std::cout << base_dir.native_directory_string() << std::endl; 211 const fs::path data_dir = base_dir / JCCL_SHARE_DIR; 212 213 // We use the overwrite value of 0 as a way around testing whether 214 // the environment variables are already set. 215 setenv("JCCL_BASE_DIR", base_dir.native_directory_string().c_str(), 216 0); 217 setenv("JCCL_DATA_DIR", data_dir.native_directory_string().c_str(), 218 0); 210 if ( found ) 211 { 212 const fs::path data_dir = base_dir / JCCL_SHARE_DIR; 213 214 // We use the overwrite value of 0 as a way around testing whether 215 // the environment variables are already set. 216 setenv("JCCL_BASE_DIR", 217 base_dir.native_directory_string().c_str(), 0); 218 setenv("JCCL_DATA_DIR", 219 data_dir.native_directory_string().c_str(), 0); 220 } 219 221 } 220 222 catch (fs::filesystem_error& ex) juggler/trunk/modules/sonix/snx/snxmain.cpp
r20762 r20764 198 198 199 199 bool found(false); 200 while ( ! found )200 while ( ! found && ! base_dir.empty() ) 201 201 { 202 202 try … … 217 217 } 218 218 219 std::cout << base_dir.native_directory_string() << std::endl; 220 const fs::path data_dir = base_dir / SNX_SHARE_DIR; 221 222 // We use the overwrite value of 0 as a way around testing whether 223 // the environment variables are already set. 224 setenv("SNX_BASE_DIR", base_dir.native_directory_string().c_str(), 0); 225 setenv("SNX_DATA_DIR", data_dir.native_directory_string().c_str(), 0); 219 if ( found ) 220 { 221 const fs::path data_dir = base_dir / SNX_SHARE_DIR; 222 223 // We use the overwrite value of 0 as a way around testing whether 224 // the environment variables are already set. 225 setenv("SNX_BASE_DIR", base_dir.native_directory_string().c_str(), 226 0); 227 setenv("SNX_DATA_DIR", data_dir.native_directory_string().c_str(), 228 0); 229 } 226 230 } 227 231 catch (fs::filesystem_error& ex) juggler/trunk/modules/tweek/tweek/tweekmain.cpp
r20763 r20764 189 189 190 190 bool found(false); 191 while ( ! found )191 while ( ! found && ! base_dir.empty() ) 192 192 { 193 193 try … … 208 208 } 209 209 210 std::cout << base_dir.native_directory_string() << std::endl; 211 const fs::path data_dir = base_dir / TWEEK_SHARE_DIR; 212 213 // We use the overwrite value of 0 as a way around testing whether 214 // the environment variables are already set. 215 setenv("TWEEK_BASE_DIR", base_dir.native_directory_string().c_str(), 216 0); 217 setenv("TWEEK_DATA_DIR", data_dir.native_directory_string().c_str(), 218 0); 210 if ( found ) 211 { 212 const fs::path data_dir = base_dir / TWEEK_SHARE_DIR; 213 214 // We use the overwrite value of 0 as a way around testing whether 215 // the environment variables are already set. 216 setenv("TWEEK_BASE_DIR", 217 base_dir.native_directory_string().c_str(), 0); 218 setenv("TWEEK_DATA_DIR", 219 data_dir.native_directory_string().c_str(), 0); 220 } 219 221 } 220 222 catch (fs::filesystem_error& ex) juggler/trunk/modules/vapor/vpr/vprmain.cpp
r20758 r20764 167 167 168 168 bool found(false); 169 while ( ! found )169 while ( ! found && ! base_dir.empty() ) 170 170 { 171 171 try … … 186 186 } 187 187 188 // We use the overwrite value of 0 as a way around testing whether 189 // the environment variable is already set. 190 setenv("VPR_BASE_DIR", base_dir.native_directory_string().c_str(), 0); 188 if ( found ) 189 { 190 // We use the overwrite value of 0 as a way around testing whether 191 // the environment variable is already set. 192 setenv("VPR_BASE_DIR", base_dir.native_directory_string().c_str(), 193 0); 194 } 191 195 } 192 196 catch (fs::filesystem_error& ex) juggler/trunk/modules/vrjuggler/vrj/vrjmain.cpp
r20759 r20764 189 189 190 190 bool found(false); 191 while ( ! found )191 while ( ! found && ! base_dir.empty() ) 192 192 { 193 193 try … … 208 208 } 209 209 210 std::cout << base_dir.native_directory_string() << std::endl; 211 const fs::path data_dir = base_dir / VJ_SHARE_DIR; 212 213 // We use the overwrite value of 0 as a way around testing whether 214 // the environment variables are already set. 215 setenv("VJ_BASE_DIR", base_dir.native_directory_string().c_str(), 0); 216 setenv("VJ_DATA_DIR", data_dir.native_directory_string().c_str(), 0); 210 if ( found ) 211 { 212 const fs::path data_dir = base_dir / VJ_SHARE_DIR; 213 214 // We use the overwrite value of 0 as a way around testing whether 215 // the environment variables are already set. 216 setenv("VJ_BASE_DIR", base_dir.native_directory_string().c_str(), 217 0); 218 setenv("VJ_DATA_DIR", data_dir.native_directory_string().c_str(), 219 0); 220 } 217 221 } 218 222 catch (fs::filesystem_error& ex)
