]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/BuildNotes.txt
BaseTools: Treat BPDG.py as a python module
[mirror_edk2.git] / BaseTools / BuildNotes.txt
CommitLineData
30fdf114
LG
1Intel(R) Platform Innovation Framework for EFI\r
2BuildTools Project, BaseTools Sub-Project\r
3Root Package 1.00\r
42007-08-31\r
5\r
6Intel is a trademark or registered trademark of Intel Corporation or its\r
7subsidiaries in the United States and other countries.\r
8* Other names and brands may be claimed as the property of others.\r
f7496d71 9Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\r
30fdf114
LG
10\r
11-------------------------------------------------------------------------------\r
12Quick Start\r
13-----------\r
14\r
15Windows:\r
16 a) Set the PYTHON_FREEZER_PATH to the cx_Freeze installation directory\r
17 b) Go to the <buildtools_project>/BaseTools and run "toolsetup" script\r
18\r
19Unix-like:\r
20 a) make -C <buildtools_project>/BaseTools\r
44804146 21 b) Look over https://github.com/tianocore/tianocore.github.io/wiki/Getting%20Started%20with%20EDK%20II\r
30fdf114
LG
22 for a helpful step-by-step guide for building 'Hello World' on\r
23 various operating systems with edk2.\r
24\r
25Supported build targets (toolsetup)\r
26-----------------------------------\r
27\r
28build(or none) - Incremental Build of all C based tools. This is the default target\r
29rebuild - Clean all generated files and directories during build, and rebuild all tools\r
30\r
31-------------------------------------------------------------------------------\r
32Tools in Python\r
33---------------\r
34* Convert Python source to exe file\r
35\r
f7496d71 36 The tools written in Python can be converted into executable program which can\r
44804146 37 be executed without installing a Python interpreter. (Generally it is easier\r
30fdf114
LG
38 to run the scripts from their source on operating systems other than Windows.)\r
39\r
40 For Windows and Linux, the conversion tool package is called cx_Freeze, its\r
41 home page is:\r
42\r
f7496d71 43 http://sourceforge.net/projects/cx-freeze/\r
30fdf114 44\r
f7496d71 45 If you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use following command\r
30fdf114
LG
46 lines to convert MyBuild.py to MyBuild.exe (note this is an example, there is\r
47 no MyBuild Python project in the BaseTools\Python tree.\r
48\r
49 set PYTHONPATH=<BaseToolsDirPath>\Source\Python\r
f7496d71 50 c:\cx_Freeze-3.0.3\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_16_le,encodings.utf_8 --install-dir=.\mybuild MyBuild.py\r
30fdf114 51\r
f7496d71 52 The generated .exe (and .dll) files are put in "mybuild" subdirectory.\r
30fdf114 53\r
f7496d71 54 The following is a real example with the BuildTools/trunk/BaseTools project\r
30fdf114
LG
55 installed in: C:\Work\BaseTools\r
56\r
f7496d71 57\r
30fdf114
LG
58 C:\Work\BaseTools\Source\Python> set PYTHONPATH=C:\Work\BaseTools\Source\Python\r
59 C:\Work\BaseTools\Source\Python> c:\cx_Freeze-3.0.3\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_16_le,encodings.utf_8 --install-dir=C:\Work\BaseTools\Bin\Win32 build\build.py\r
60\r
61---------------\r
62* Execute tools written in Python without conversion\r
63\r
64Unix-like systems:\r
65\r
66The edk2/edksetup.sh script will setup everything which is needed to\r
67run the scripts from their source.\r
68\r
69Windows:\r
70\r
71 The tools written in Python can be executed directly from its source directory\r
72as long as the Python interpreter (Python 2.5) has been installed. Before the execution,\r
f7496d71 73please make sure the environment variable PYTHONPATH is set to\r
30fdf114
LG
74\r
75 <buildtools_project>/BaseTools/Source/Python\r
76\r
4234283c 77 There're five tools written in Python. The entrance file of each tool is listed\r
30fdf114
LG
78below.\r
79\r
80 build <buildtools_project>/BaseTools/Source/Python/build/build.py\r
81 GenFds <buildtools_project>/BaseTools/Source/Python/GenFds/GenFds.py\r
82 Trim <buildtools_project>/BaseTools/Source/Python/Trim/Trim.py\r
83 MigrationMsa2Inf <buildtools_project>/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py\r
4234283c 84 UPT <buildtools_project>/BaseTools/Source/Python/UPT/UPT.py\r