[SERVER-1250] Better Search for Program Files Directory in scons Created: 17/Jun/10  Updated: 06/Dec/22  Resolved: 05/May/22

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Justin Dearing Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows builds through scons


Assigned Teams:
Server Development Platform
Participants:

 Description   

The boost code is not searching for the windows program files folder properly.

This is set in an environmental variable, actually 3 on 64 bit windows:

ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files

It might not necessarily be "C:\program files".

def find_boost():
for x in ('', ' (x86)'):
boostDir = "C:/Program Files" + x + "/boost/latest"
if os.path.exists( boostDir ):
return boostDir
for bv in reversed( range(33,50) ):
for extra in ('', '_0', '_1'):
boostDir = "C:/Program Files" + x + "/Boost/boost_1_" + str(bv) + extra
if os.path.exists( boostDir ):
return boostDir
if os.path.exists( "C:/boost" ):
return "C:/boost"
if os.path.exists( "/boost" ):
return "/boost"
return None

boostDir = find_boost()
if boostDir is None:
print( "can't find boost" )
Exit(1)



 Comments   
Comment by Andrew Morrow (Inactive) [ 05/May/22 ]

We now honor the necessary CPPPATH and LIBPATH command line variables to SCons, so you can point the build to any boost installation you might want.

Comment by Eliot Horowitz (Inactive) [ 02/Nov/10 ]

pushing pending build system change

Comment by Johannes Wienke [ 19/Jun/10 ]

Also it would be nice to be able to specify a boost path on the scons command line. Another assumption that is not always met is where the compiled boost librares reside on windows. If you do not use a precompiled boost, they end up in a stage directory. Either let the user specify this directory as a command line option, too, or add it to the default search locations.

Generated at Thu Feb 08 02:56:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.