win-x64-build-guide.txt 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. Last update: 05.03.2024
  2. In this step-by-step guide I show how to build Audiowmark
  3. to run it on Windows x64.
  4. I won't explain every single tool, just the creation process.
  5. That's enough work.
  6. Following these instructions exactly should lead to success.
  7. Prerequisites (programs / source codes / libraries):
  8. - Download source code from Audiowmark
  9. DL: https://github.com/swesterfeld/audiowmark/releases
  10. I chose this one : audiowmark-0.6.2.tar.zst
  11. - Download source code from zita-resampler
  12. DL: https://github.com/digital-stage/zita-resampler/
  13. - Download 7zip ( newest beta version to extract .zst files )
  14. DL: https://www.7-zip.org/
  15. - Download Notepad++
  16. DL: https://notepad-plus-plus.org/
  17. - Download Cygwin
  18. DL: https://cygwin.com/
  19. - Download CMAKE
  20. DL: https://cmake.org/download/
  21. - Download MinGW-w64
  22. DL: https://github.com/niXman/mingw-builds-binaries/releases
  23. I chose this one : x86_64-13.2.0-release-posix-seh-msvcrt-rt_v11-rev0.7z
  24. - Download FFmpeg
  25. DL: https://github.com/BtbN/FFmpeg-Builds/releases
  26. I chose this one : ffmpeg-master-latest-win64-gpl-shared.zip
  27. Prepare everything:
  28. - Install Cygwin ( do a clean install )
  29. We need to add the following libraries to Cygwin ( choose always the latest stable release )
  30. - gcc-core
  31. - gcc-debuginfo
  32. - gcc-g++
  33. - mingw64-x86_64-gcc-core
  34. - mingw64-x86_64-gcc-g++
  35. - make
  36. - make-debuginfo
  37. - libfftw3-devel
  38. - libsndfile-devel
  39. - libgcrypt-devel
  40. - libmpg123-devel
  41. - libzita-resampler ( Not included in Cygwin. We have to compile and copy it later manually )
  42. - FFmpeg ( It is available in Cygwin, but i had some problems with it. So we add it later manually )
  43. - Install CMAKE
  44. - Install Notepad++
  45. - Install 7zip ( newest beta version to extract .zst files )
  46. - Extract zita-resempler-main.zip to c:\zita-resempler-main
  47. - Extract audiowmark-0.6.2.tar.zst to c:\audiowmark-0.6.2
  48. Edit "c:\audiowmark-0.6.2\src\utils.cc" and insert the following line directly below the comment section ( needed for vasprintf )
  49. #define _GNU_SOURCE
  50. - Extract ffmpeg-master-latest-win64-gpl-shared.zip to c:\ffmpeg-master-latest-win64-gpl-shared
  51. - Extract x86_64-13.2.0-release-posix-seh-msvcrt-rt_v11-rev0.7z\mingw64 to c:\mingw64
  52. - Add "C:\mingw64\bin" to the system path variable and place it at the very first position
  53. - Important : Restart Windows !
  54. - After restart windows edit the file c:\zita-resempler-main\CMakeLists.txt with Notepad++.
  55. Find the line below # make ( should be line 22 ) and insert the parameter SHARED.
  56. # make
  57. before:
  58. add_library(zita-resampler ${SOURCES} ${HEADER_LIST})
  59. after:
  60. add_library(zita-resampler SHARED ${SOURCES} ${HEADER_LIST})
  61. - Start CMAKE
  62. Select the source dir c:\zita-resempler-main
  63. Select / create the build dir ( f.e.: c:\zita-resampler-main\build64 )
  64. Press "Configure"
  65. Choose "MinGW Makefiles as generator"
  66. Choose "Use default native compilers"
  67. Press "Finish" to complete the configuration
  68. We should see : Configuring done ( ignore the red values in the list above )
  69. After successfull configuration press "Generate"
  70. We should see : Gernerating done
  71. Close CMAKE
  72. - Open the command prompt ( cmd.exe ) and go to the directory "c:\zita-resampler-main\build64".
  73. Type in:
  74. mingw32-make
  75. We should see : [100%] Built target zita-resampler
  76. Now we should have the following two new files:
  77. "c:\zita-resampler-main\build64\libzita-resampler.dll"
  78. "c:\zita-resampler-main\build64\libzita-resampler.dll.a"
  79. Close CMD
  80. - Install zita-resampler
  81. - Copy the file "c:\zita-resampler-main\build64\libzita-resampler.dll" to "C:\cygwin64\usr\x86_64-pc-cygwin\bin"
  82. - Copy the file "c:\zita-resampler-main\build64\libzita-resampler.dll.a" to "C:\cygwin64\usr\x86_64-pc-cygwin\lib"
  83. - Copy the whole directory "C:\zita-resampler-main\source\zita-resampler" to "C:\audiowmark-0.6.2\src\zita-resampler"
  84. - Install FFmpeg
  85. - Copy ALL files from "C:\ffmpeg-master-latest-win64-gpl-shared\bin\*.*" to "C:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\bin"
  86. - Copy ALL files ( except dir "pkgconfig" ) from "C:\ffmpeg-master-latest-win64-gpl-shared\lib\*.*" to "C:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\lib"
  87. - Copy ALL files ( except dir "pkgconfig" ) from "C:\ffmpeg-master-latest-win64-gpl-shared\lib\*.*" to "C:\cygwin64\usr\x86_64-pc-cygwin\lib"
  88. - Copy ALL .pc-files from "C:\ffmpeg-master-latest-win64-gpl-shared\lib\pkgconfig\*.pc" to "C:\cygwin64\lib\pkgconfig"
  89. - Copy ALL sub directories from "C:\ffmpeg-master-latest-win64-gpl-shared\include\*" to "C:\audiowmark-0.6.2\src\*"
  90. Now we should be ready to build the audiowmark source code:
  91. - Start Cygwin64-Terminal with admin rights
  92. Change the current directory to: /cygdrive/c/audiowmark-0.6.2
  93. - Type in:
  94. ./configure --host=x86_64-pc-cygwin --with-ffmpeg
  95. - Type in:
  96. make
  97. All created EXE-files will be saved to "C:\audiowmark-0.6.2\src\.libs"
  98. Note : There is another, significantly smaller version of each EXE file in "C:\audiowmark-0.6.2\src\". Don't use these. They don't work.
  99. The last part to do is to build the videowmark.exe.
  100. The file "C:\audiowmark-0.6.2\src\videowmark" is a linux bash script and can not executed on windows.
  101. So I ported it to C++.
  102. To keep it simple, I made only this single CPP file without a header file.
  103. - Copy the file "C:\audiowmark-0.6.2\docs\videowmark-win.cc" to "C:\audiowmark-0.6.2\src\videowmark.cc"
  104. - Open Cygwin and and go to the directory "/cygdrive/c/audiowmark-0.6.2/src/"
  105. - Type in :
  106. g++ -o videowmark.exe videowmark.cc
  107. Okay, we are almost finished.
  108. In order to deliver audiowmark.exe and videowmark.exe all corresponding DLL- and EXE-files must also be delivered.
  109. And that's a lot.
  110. Every single DLL- and EXE-file we will find somewhere in "C:\cygwin64"
  111. Each file must be copied into the SAME directory where the EXE file is located.
  112. ---------------
  113. Location in Windows : C:\audiowmark-0.6.2\src\.libs\
  114. Location in Cygwin : /cygdrive/c/audiowmark-0.6.2/src/.libs
  115. ---------------
  116. audiowmark.exe
  117. ---------------
  118. Location in Windows : C:\audiowmark-0.6.2\src\
  119. Location in Cygwin : /cygdrive/c/audiowmark-0.6.2/src/
  120. ---------------
  121. videowmark.exe
  122. ---------------
  123. Location in Windows : C:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\bin
  124. Location in Cygwin : /usr/x86_64-w64-mingw32/sys-root/mingw/bin/
  125. ---------------
  126. ffmpeg.exe
  127. ffplay.exe
  128. ffprobe.exe
  129. avcodec-60.dll
  130. avdevice-60.dll
  131. avfilter-9.dll
  132. avformat-60.dll
  133. avutil-58.dll
  134. libatomic-1.dll
  135. libgcc_s_seh-1.dll
  136. libgomp-1.dll
  137. libquadmath-0.dll
  138. libssp-0.dll
  139. libstdc++-6.dll
  140. libwinpthread-1.dll
  141. postproc-57.dll
  142. swresample-4.dll
  143. swscale-7.dll
  144. ---------------
  145. Location in Windows : C:\cygwin64\bin
  146. Location in Cygwin : /usr/bin/
  147. ---------------
  148. cygiconv-2.dll
  149. cygintl-8.dll
  150. cyggpg-error-0.dll
  151. cygvorbis-0.dll
  152. cygvorbisenc-2.dll
  153. cygogg-0.dll
  154. cygFLAC-8.dll
  155. cygopus-0.dll
  156. cygmp3lame-0.dll
  157. cyggcrypt-20.dll
  158. cygsndfile-1.dll
  159. cygmpg123-0.dll
  160. cygstdc++-6.dll
  161. cygwin1.dll
  162. cyggcc_s-seh-1.dll
  163. cygfftw3f-3.dll
  164. ---------------
  165. Location in Windows : C:\cygwin64\usr\x86_64-pc-cygwin\bin
  166. Location in Cygwin : /usr/x86_64-pc-cygwin/bin/
  167. ---------------
  168. libzita-resampler.dll
  169. That's it. We're done.
  170. That was easy, wasn't it?
  171. BR
  172. Andreas