Skip to content

How to Compile UEFITool for Windows

Plato Mavropoulos edited this page Aug 21, 2019 · 1 revision

How to Compile UEFITool for Windows

  1. Create a working directory (i.e. C:\UEFITool)
  2. Download UEFITool Sources ZIP (i.e. UEFITool NE)
  3. Download Qt v5.6.3 Static x86
  4. Download MinGW v4.9.2 x86
  5. Extract UEFITool-new_engine.zip > UEFITool-new_engine to C:\UEFITool\UEFITool-new_engine
  6. Extract qt-5.6.3-static-win32.zip > mingw49_32_release_static to C:\UEFITool\mingw49_32_release_static
  7. Extract 4.9.2-1i686-4.9.2-release-posix-dwarf-rt_v3-rev1.7z > Tools > mingw492_32 to C:\UEFITool\mingw492_32

Automatic Script:

  1. Download UEFITool Compile Script for Windows batch script and place it at C:\UEFITool
  2. Run the batch script and wait until UEFITool.exe has been compiled

Manual Process:

  1. Add C:\UEFITool\mingw492_32\bin to PATH User Variable
  2. Add C:\UEFITool\mingw49_32_release_static\bin to PATH User Variable
  3. Open a command prompt at C:\UEFITool
  4. Execute qmake C:\UEFITool\UEFITool-new_engine\UEFITool\uefitool.pro QMAKE_CXXFLAGS="-static -flto -Os" QMAKE_LFLAGS="-static -flto -Os" CONFIG+=optimize_size CONFIG+=staticlib CONFIG+=static
  5. Execute mingw32-make -s -f Makefile.release
  6. Go to C:\UEFITool\release and copy UEFITool.exe somewhere
  7. Execute mingw32-make -s distclean
  8. Close the command prompt and delete these leftovers, if they exist: C:\UEFITool\release\ , C:\UEFITool\debug\ , C:\UEFITool\object_script.UEFITool.Release , C:\UEFITool\object_script.UEFITool.Debug