!! Build Instructions !!.txt 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /******************************************************************************/
  2. 1. Apply Code Changes from "!! Code Changes !!.txt"
  3. 2. Run "1) Start.bat"
  4. 3. Build for platforms as described
  5. 4. At the end call "2) Finish.bat"
  6. /******************************************************************************/
  7. WINDOWS
  8. copy yasm*.exe (http://yasm.tortall.net/Download.html - "for general use on 64-bit Windows") into:
  9. C:\Esenthel\ThirdPartyLibs\VP\Windows32\yasm.exe
  10. C:\Esenthel\ThirdPartyLibs\VP\Windows64\yasm.exe
  11. In Cygwin Terminal:
  12. Windows 32/64/Arm Cygwin
  13. cd /cygdrive/c/Esenthel/ThirdPartyLibs/VP/Windows32
  14. ../libvpx/configure --target=x86-win32-vs15 --enable-static-msvcrt --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder
  15. make
  16. cd /cygdrive/c/Esenthel/ThirdPartyLibs/VP/Windows64
  17. ../libvpx/configure --target=x86_64-win64-vs15 --enable-static-msvcrt --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder
  18. make
  19. cd /cygdrive/c/Esenthel/ThirdPartyLibs/VP/WindowsARM
  20. ../libvpx/configure --target=armv7-win32-vs15 --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder
  21. make
  22. For all 32/64/ARM open the VS project
  23. -Don't do this:
  24. we could include "webmdec.cc" and "third_party/libwebm/mkvparser.cpp" files in the "vpx" project, however that would require making a separate WindowsUniversal libs for 32/64 because of MultiThreaded/MultiThreadedDLL conflict, instead, these files are included in the Engine Video.cpp file
  25. -edit project:
  26. C/C++
  27. General \ Debug Information Format = None
  28. Optimization \ Whole Program Optimization = NO
  29. ON ARM PROJECT ONLY:
  30. General
  31. Target Platform Version 10.0.15063.0
  32. Target Platform Min. Version 10.0.15063.0
  33. -build "vpx" in Release
  34. /******************************************************************************/
  35. ANDROID
  36. CygWin fails, so we have to use Mac Terminal:
  37. ANDROID ARM 32
  38. cd /Esenthel/ThirdPartyLibs/VP
  39. rm -r temp
  40. mkdir temp
  41. mkdir temp/jni
  42. cp -r libvpx temp/jni/libvpx
  43. cp Android.mk temp/jni/Android.mk
  44. cp Arm32-Application.mk temp/jni/Application.mk
  45. cd temp/jni
  46. rm libvpx/vpx_config.h
  47. libvpx/configure --target=armv7-android-gcc --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder --sdk-path=/Android/NDK
  48. /Android/NDK/ndk-build NDK_DEBUG=0 -j4
  49. cd ../..
  50. mv temp/obj/local/armeabi-v7a/libvpx.a Android/armeabi-v7a.a
  51. rm -r temp
  52. ANDROID ARM 64
  53. cd /Esenthel/ThirdPartyLibs/VP
  54. rm -r temp
  55. mkdir temp
  56. mkdir temp/jni
  57. cp -r libvpx temp/jni/libvpx
  58. cp Android.mk temp/jni/Android.mk
  59. cp Arm64-Application.mk temp/jni/Application.mk
  60. cd temp/jni
  61. rm libvpx/vpx_config.h
  62. libvpx/configure --target=arm64-android-gcc --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder --sdk-path=/Android/NDK
  63. /Android/NDK/ndk-build NDK_DEBUG=0 -j4
  64. cd ../..
  65. mv temp/obj/local/arm64-v8a/libvpx.a Android/arm64-v8a.a
  66. rm -r temp
  67. ANDROID x86
  68. Yasm
  69. On Mac need to install yasm (nasm didn't work, even after upgrading)
  70. -download yasm and extract
  71. -enter with terminal
  72. ./configure
  73. make
  74. sudo make install
  75. HAVE TO EDIT VP/libvpx/vpx_ports/x86_abi_support.asm because there's linking error for 'rand'
  76. replace:
  77. %ifdef __ANDROID__
  78. with
  79. %if 1
  80. cd /Esenthel/ThirdPartyLibs/VP
  81. rm -r temp
  82. mkdir temp
  83. mkdir temp/jni
  84. cp -r libvpx temp/jni/libvpx
  85. cp Android.mk temp/jni/Android.mk
  86. cp x86-Application.mk temp/jni/Application.mk
  87. cd temp/jni
  88. rm libvpx/vpx_config.h
  89. libvpx/configure --target=x86-android-gcc --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder --sdk-path=/Android/NDK --as=yasm --disable-sse3 --disable-ssse3 --disable-sse4_1 --disable-avx --disable-avx2
  90. /Android/NDK/ndk-build NDK_DEBUG=0 -j4
  91. cd ../..
  92. mv temp/obj/local/x86/libvpx.a Android/x86.a
  93. rm -r temp
  94. copy to Windows folder "VP/Android/"
  95. on windows run "extract.bat"
  96. /******************************************************************************/
  97. Mac 64
  98. First install Yasm as described above for Android
  99. cd /Esenthel/ThirdPartyLibs/VP/Mac
  100. ../libvpx/configure --target=x86_64-darwin13-gcc --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder
  101. make
  102. remove all other generated files as they may cause invalid compilation for other targets
  103. iOS
  104. cd /Esenthel/ThirdPartyLibs/VP/Mac
  105. ../libvpx/configure --target=armv7-darwin-gcc --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder
  106. make
  107. mv libvpx.a libvpx_armv7.a
  108. remove all other generated files as they may cause invalid compilation for other targets
  109. cd /Esenthel/ThirdPartyLibs/VP/Mac
  110. ../libvpx/configure --target=arm64-darwin-gcc --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder
  111. make
  112. mv libvpx.a libvpx_arm64.a
  113. remove all other generated files as they may cause invalid compilation for other targets
  114. Once Mac and iOS are ready on Windows, copy the entire VP folder to Mac.
  115. /******************************************************************************/
  116. Linux 64
  117. install yasm first using:
  118. sudo apt-get install yasm
  119. cd ~/Esenthel/ThirdPartyLibs/VP/Linux
  120. ../libvpx/configure --target=x86_64-linux-gcc --disable-examples --disable-tools --disable-docs --disable-unit-tests --disable-spatial-resampling --enable-runtime-cpu-detect --disable-vp8 --disable-vp9-encoder
  121. make
  122. copy entire folder to Windows without deleting any files (both *.a and *.o are needed)
  123. /******************************************************************************/
  124. 5. Don't forget to run "Finish.bat" !!
  125. /******************************************************************************/