Changeset 20553

Show
Ignore:
Timestamp:
07/15/07 10:26:05 (1 year ago)
Author:
patrick
Message:

We have to do some special handling for a 64-bit build on Windows. To enable
that handling, the user must pass in the —64 command line option or check
the "64-bit Build" option in the GUI.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/branches/2.2/README-WINDOWS.html

    r20360 r20553  
    2929  <li> 
    3030    Install <a href="http://www.python.org/">Python</a> 2.2 or newer. To build 
    31     a 64-bit version of VR Juggler on Windows, the 64-bit build of Python 2.5 is 
    32     required
     31    a 64-bit version of VR Juggler on Windows, the 64-bit build of Python 2.5 
     32    is <i>required</i>
    3333  </li> 
    3434  <li> 
     
    5555<a href="http://www.python.org/">Python</a> 2.2 or newer installed on your 
    5656system. (To build a 64-bit version of VR Juggler, the 64-bit version of 
    57 Python 2.5 must be installed.) Visit the Python website for 
     57Python 2.5 <i>must</i> be installed.) Visit the Python website for 
    5858<a href="http://www.python.org/download/">download and install 
    5959instructions</a>. 
     
    7272VR Juggler's C++ dependencies into a convenient, centralized location. 
    7373</p> 
     74 
     75<blockquote> 
     76<b>IMPORTANT:</b> To create a 64-bit build on Windows, the command line 
     77option <b><tt>--64</tt></b> must be used, or the <q>64-bit Build</q> option 
     78in the GUI must be selected. 
     79</blockquote> 
    7480 
    7581<blockquote> 
  • juggler/branches/2.2/build_windows.py

    r20549 r20553  
    4848gJugglerDir      = os.path.dirname(os.path.abspath(sys.argv[0])) 
    4949gOptionsFileName = "options.cache" 
     50gBuild64         = False 
    5051 
    5152gJdomJars = [ 
     
    358359 
    359360   if os.environ['OMNIORB_ROOT'] != '' and os.path.exists(os.environ['OMNIORB_ROOT']): 
     361      # A 64-bit build of omniORB has to have been compiled against a 64-bit 
     362      # build of Python. Unfortunately, when omniidl.exe acts as the Python 
     363      # interpreter, it doesn't take care of setting PYTHONHOME, and this 
     364      # prevents it from being able to find core modules (such as sys.py or 
     365      # os.py). We'll assume that a 64-bit Python interpreter is being used 
     366      # to run this script and use its installation prefix as PYTHONHOME to 
     367      # help out omniidl.exe. 
     368      if gBuild64 and not os.environ.has_key('PYTHONHOME'): 
     369         os.environ['PYTHONHOME'] = sys.prefix 
     370 
    360371      omni_bin = os.path.join(os.environ['OMNIORB_ROOT'], 'bin') 
    361372 
     
    403414   # Determine if al.h is in the base include directory or in include\AL. 
    404415   if os.environ['OPENAL_ROOT'] != '': 
    405       # TODO: Extend for Win64. 
     416      if gBuild64: 
     417         subdir = 'Win64' 
     418      else: 
     419         subdir = 'Win32' 
     420 
    406421      lib_dirs = [os.path.join(os.environ['OPENAL_ROOT'], 'libs'), 
    407                   os.path.join(os.environ['OPENAL_ROOT'], 'libs', 'Win32')] 
     422                  os.path.join(os.environ['OPENAL_ROOT'], 'libs', subdir)] 
    408423 
    409424      for l in lib_dirs: 
     
    17761791   installDoozer(prefix) 
    17771792 
    1778 def simpleInstall(name, root, prefix, includeDir = None, optional = False): 
     1793def simpleInstall(name, root, prefix, includeDir = None, libDir = 'lib', 
     1794                  optional = False): 
    17791795   if optional and root == '': 
    17801796      return 
     
    17931809 
    17941810   # Install all libraries. 
    1795    srcdir = os.path.join(root, 'lib'
     1811   srcdir = os.path.join(root, libDir
    17961812 
    17971813   if os.path.exists(srcdir): 
     
    18181834 
    18191835def installCppDOM(prefix): 
     1836   if gBuild64: 
     1837      libdir = 'lib64' 
     1838   else: 
     1839      libdir = 'lib' 
     1840 
    18201841   simpleInstall('CppDOM headers and libraries', os.environ['CPPDOM_ROOT'], 
    1821                  prefix, os.environ['CPPDOM_INCLUDES']
     1842                 prefix, os.environ['CPPDOM_INCLUDES'], libdir
    18221843 
    18231844def installDoozer(prefix): 
     
    18701891 
    18711892      # OpenAL 1.0 and 1.1 put the redistributable DLL in different places. 
    1872       dll_dirs = [os.path.join(srcdir, 'dll'), 
    1873                   os.path.join(r'C:\windows', 'SysWOW64'), 
    1874                   os.path.join(r'C:\windows', 'system32')] 
     1893      dll_dirs = [os.path.join(srcdir, 'dll')] 
     1894 
     1895      sysroot = os.environ['SystemRoot'] 
     1896 
     1897      # For a 64-bit build, we know that we only have to to look in one place 
     1898      # for the DLL. 
     1899      if gBuild64: 
     1900         dll_dirs.append(os.path.join(sysroot, 'system32')) 
     1901      else: 
     1902         dll_dirs += [os.path.join(sysroot, 'SysWOW64'), 
     1903                      os.path.join(sysroot, 'system32')] 
    18751904 
    18761905      for d in dll_dirs: 
     
    21382167      # CommandFrame Innards. 
    21392168      next_row = 0 
     2169      self.mRoot.CommandFrame.Build64Check = \ 
     2170         Tkinter.Checkbutton(self.mRoot.CommandFrame, 
     2171                             text="64-bit Build", 
     2172                             bg = self.JugglerYellow, 
     2173                             activebackground = self.JugglerYellow, 
     2174                             onvalue = "Yes", offvalue = "No") 
     2175      self.mRoot.CommandFrame.Build64Check.Variable = Tkinter.StringVar() 
     2176      build64 = "No" 
     2177      if gBuild64: 
     2178         build64 = "Yes" 
     2179      self.mRoot.CommandFrame.Build64Check.Variable.set(build64) 
     2180      self.mRoot.CommandFrame.Build64Check["variable"] = \ 
     2181         self.mRoot.CommandFrame.Build64Check.Variable 
     2182      self.mRoot.CommandFrame.Build64Check.grid(row = next_row, column = 0, 
     2183                                                sticky = Tkinter.EW, pady = 4) 
     2184      next_row = next_row + 1 
    21402185      self.mRoot.CommandFrame.OpenVSCheck = \ 
    21412186         Tkinter.Checkbutton(self.mRoot.CommandFrame, 
     
    22592304         os.environ[k] = self.mTkOptions[k].get() 
    22602305 
     2306      # This has to be done before calling postProcessOptions(). 
     2307      if self.mRoot.CommandFrame.Build64Check.Variable.get() == "Yes": 
     2308         global gBuild64 
     2309         gBuild64 = True 
     2310 
    22612311      if True:#self.validateOptions(): 
    22622312         postProcessOptions(self.mOptions) 
     
    24152465   try: 
    24162466      cmd_opts, cmd_args = getopt.getopt(sys.argv[1:], "cano:h", 
    2417                                          ["nogui", "nobuild", "auto", 
     2467                                         ["64", "nogui", "nobuild", "auto", 
    24182468                                          "options-file=", "help"]) 
    24192469   except getopt.GetoptError: 
     
    24242474 
    24252475   global gOptionsFileName 
     2476   global gBuild64 
    24262477   for o, a in cmd_opts: 
    24272478      if o in ("-c","--nogui"): 
    24282479         disable_tk = True 
     2480      elif o == "--64": 
     2481         gBuild64 = True 
    24292482      elif o in ("-o", "--options-file="): 
    24302483         gOptionsFileName = a 
     
    24832536   print "-c, --nogui              Disable the Tkinter GUI front end" 
    24842537   print "                         (i.e., Run in command line mode)." 
     2538   print "--64                     Indicate that a 64-bit build will" 
     2539   print "                         be made." 
    24852540   #print "-a, --auto               Does not interactively ask for values of any options.  Uses the Default values, 'options.cache' if it exists, or the file given by the -o option.  Only used in command line mode." 
    24862541   print "-o, --options-file=FILE  Uses FILE to Load/Save Options."