Difference between revisions of "Slicer4 Build instructions Python"
From Slicer Wiki
Ilknur.kabul (talk | contribs) |
Ilknur.kabul (talk | contribs) |
||
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | |||
For visual studio 2010, there is a different version of python. | For visual studio 2010, there is a different version of python. | ||
You can download this file (Python-2.6.6-vs2010) from the archive. | You can download this file (Python-2.6.6-vs2010) from the archive. | ||
Line 5: | Line 6: | ||
# Open the solution file (python.sln) using vs2010 | # Open the solution file (python.sln) using vs2010 | ||
# It will show you Conversion Wizard. Using that Wizard convert the file. | # It will show you Conversion Wizard. Using that Wizard convert the file. | ||
− | # Open the pyproject.props file. In that file, put a semicolon between the lib files: | + | # Open the pyproject.props file. In that file, put a semicolon between the lib files for tcltkLib, tcltkLibDebug, tcltk64Lib, tcltk64LibDebug. |
+ | |||
+ | <tcltkLib>$(tcltkDir)\lib\tcl84.lib <span style="font-size:15px; color:#FF0000">;</span> $(tcltkDir)\lib\tk84.lib</tcltkLib> | ||
+ | <tcltkLibDebug>$(tcltkDir)\lib\tcl84g.lib <span style="font-size:15px; color:#FF0000">;</span> $(tcltkDir)\lib\tk84g.lib</tcltkLibDebug> | ||
+ | <tcltk64Lib>$(tcltk64Dir)\lib\tcl84.lib <span style="font-size:15px; color:#FF0000">;</span> $(tcltk64Dir)\lib\tk84.lib</tcltk64Lib> | ||
+ | <tcltk64LibDebug>$(tcltk64Dir)\lib\tcl84g.lib <span style="font-size:15px; color:#FF0000">;</span> $(tcltk64Dir)\lib\tk84g.lib</tcltk64LibDebug> | ||
+ | |||
+ | |||
+ | External_python_win.cmake is updated for building python in vs2010. MSBuild commands for VS2010 are used for building python. For example, for the options | ||
+ | set(python_build_type "Release") | ||
+ | set(python_platform "Win32") | ||
+ | set(python_configuration "${python_build_type}|${python_platform}") | ||
+ | in VS2008, the build command was | ||
+ | set(ep_command_args /build ${python_configuration} /project python) | ||
+ | For VS2010, this is changed to | ||
+ | set(ep_command_args /p:configuration=${python_build_type} /p:platform=${python_platform} /t:python) | ||
+ | |||
− | + | The lines | |
− | + | ${CMAKE_COMMAND} -Din=${in} -Dout=${out} -Dfind=tcltk64\\" -Dreplace=tcl-build\\" -P | |
− | + | in External_python_win.cmake is changed to | |
− | + | ${CMAKE_COMMAND} -Din=${in} -Dout=${out} -Dfind= <span style="font-size:12px; color:#FF0000">\\tcltk64</span> -Dreplace= <span style="font-size:12px; color:#FF0000">\\tcl-build</span> -P ${script}) |
Latest revision as of 14:14, 15 June 2011
Home < Slicer4 Build instructions PythonFor visual studio 2010, there is a different version of python. You can download this file (Python-2.6.6-vs2010) from the archive.
If you want to download a new version of python from the svn and use it for 2010 later. You can do the following steps:
- Open the solution file (python.sln) using vs2010
- It will show you Conversion Wizard. Using that Wizard convert the file.
- Open the pyproject.props file. In that file, put a semicolon between the lib files for tcltkLib, tcltkLibDebug, tcltk64Lib, tcltk64LibDebug.
<tcltkLib>$(tcltkDir)\lib\tcl84.lib ; $(tcltkDir)\lib\tk84.lib</tcltkLib> <tcltkLibDebug>$(tcltkDir)\lib\tcl84g.lib ; $(tcltkDir)\lib\tk84g.lib</tcltkLibDebug> <tcltk64Lib>$(tcltk64Dir)\lib\tcl84.lib ; $(tcltk64Dir)\lib\tk84.lib</tcltk64Lib> <tcltk64LibDebug>$(tcltk64Dir)\lib\tcl84g.lib ; $(tcltk64Dir)\lib\tk84g.lib</tcltk64LibDebug>
External_python_win.cmake is updated for building python in vs2010. MSBuild commands for VS2010 are used for building python. For example, for the options
set(python_build_type "Release") set(python_platform "Win32") set(python_configuration "${python_build_type}|${python_platform}")
in VS2008, the build command was
set(ep_command_args /build ${python_configuration} /project python)
For VS2010, this is changed to
set(ep_command_args /p:configuration=${python_build_type} /p:platform=${python_platform} /t:python)
The lines
${CMAKE_COMMAND} -Din=${in} -Dout=${out} -Dfind=tcltk64\\" -Dreplace=tcl-build\\" -P
in External_python_win.cmake is changed to
${CMAKE_COMMAND} -Din=${in} -Dout=${out} -Dfind= \\tcltk64 -Dreplace= \\tcl-build -P ${script})