Guest User

How to install the libs

a guest
Nov 6th, 2025
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.84 KB | None | 0 0
  1. @'
  2. http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.62/glibmm-2.62.0.tar.xz
  3. http://ftp.gnome.org/pub/GNOME/sources/pangomm/2.42/pangomm-2.42.2.tar.xz
  4. http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.2.tar.xz
  5. http://cairographics.org/releases/cairomm-1.14.5.tar.gz
  6. '@ -split "`n" | % { $f = "C:\dev\other\{0}" -f (Split-Path -Leaf $_); iwr $_ -OutFile $f; tar -xf $f -C C:\dev\other; rm $f }
  7.  
  8. & "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64
  9. # 1. Build libsigc++
  10. cd C:\dev\other\libsigc++-2.10.2\MSVC_NMake
  11. nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows
  12. nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows install
  13. # 2. Build glibmm
  14. cd C:\dev\other\glibmm-2.62.0\MSVC_NMake
  15. @"
  16. #pragma once
  17. #pragma warning(disable: 4251)
  18. #pragma warning(disable: 4275)
  19. #pragma warning(disable: 4786)
  20. "@ | Out-File -Encoding ASCII gendef/msvc_recommended_pragmas.h
  21. glibmm','giomm'|%{(gc "release\x64\$_\$_.def")-notmatch'Weak'|Set-Content "release\x64\$_\$_.def"}
  22. cp C:\dev\vcpkg\installed\x64-windows\tools\glib\glib-compile-schemas.exe C:\dev\vcpkg\installed\x64-windows\bin\
  23. nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows
  24. nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows install
  25. # 3. Build cairomm
  26. cd C:\dev\other\cairomm-1.14.5\MSVC_NMake
  27. notepad config-msvc.mak
  28. Line 45 add /I$(PREFIX)\include\cairo, and a \ at the end of line 44.
  29. nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows
  30. nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows install
  31. # 4. Build Pangomm
  32. download perl from https://strawberryperl.com/ (I got the MSI)
  33. Close and reopen powershell
  34. & "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64
  35. cd C:\dev\other\pangomm-2.42.2\MSVC_NMake
  36. notepad config-msvc.mak
  37. Under /I$(PREFIX)\lib\cairomm-$(CAIROMM_MAJOR_VERSION).$(CAIROMM_MINOR_VERSION)\include
  38. Add /I$(PREFIX)\include\cairo \
  39. Make an !else block the following:
  40. !else
  41. LIBSIGC_LIBNAME = sigc-vc140-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION)
  42. GLIBMM_LIBNAME = glibmm-vc140-$(GLIBMM_MAJOR_VERSION)_$(GLIBMM_MINOR_VERSION)
  43. CAIROMM_LIBNAME = cairomm-vc143-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION)
  44. PANGOMM_LIBNAME = pangomm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION)
  45. nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows
  46. nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows install
  47.  
  48. #5. Moving libs and bins (If not already in position)
  49. cd C:\dev\other
  50. $prefix = 'C:\dev\vcpkg\installed\x64-windows'
  51. @('sigc++-2.0','cairomm-1.14.5','glibmm-2.4','pangomm-2.42.2') | ForEach-Object{
  52. $d = "$_\MSVC_NMake\vs16\release\x64"
  53. if (Test-Path $d) {
  54. robocopy $d $prefix\bin *.dll *.pdb /R:0 /NP
  55. robocopy $d $prefix\lib *.lib *.exp /R:0 /NP
  56. }
  57. }
  58.  
  59. #6 .pc files
  60. @'
  61. prefix=${pcfiledir}/../..
  62. includedir=${prefix}/include
  63. libdir=${prefix}/lib
  64.  
  65. Name: sigc++
  66. Description: Typesafe callback system for C++
  67. Version: 2.10.2
  68. Libs: -L${libdir} -lsigc-2.0
  69. Cflags: -I${includedir} -I${includedir}/sigc++-2.0
  70. '@ -replace "`n","`r`n" |
  71. Set-Content -NoNewline -Encoding UTF8 `
  72. 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\sigc++-2.0.pc'
  73.  
  74. @'
  75. prefix=${pcfiledir}/../..
  76. includedir=${prefix}/include
  77. libdir=${prefix}/lib
  78.  
  79. Name: glibmm
  80. Description: C++ wrapper for GLib
  81. Version: 2.62.0
  82. Requires: glib-2.0 >= 2.62.0
  83. Libs: -L${libdir} -lglibmm-2.4
  84. Cflags: -I${includedir} -I${includedir}/glibmm-2.4
  85. '@ -replace "`n","`r`n" |
  86. Set-Content -NoNewline -Encoding UTF8 `
  87. 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\glibmm-2.4.pc'
  88.  
  89. @'
  90. prefix=${pcfiledir}/../..
  91. includedir=${prefix}/include
  92. libdir=${prefix}/lib
  93.  
  94. Name: giomm
  95. Description: C++ wrapper for GIO
  96. Version: 2.62.0
  97. Requires: glibmm-2.4 >= 2.62.0, gio-2.0 >= 2.62.0
  98. Libs: -L${libdir} -lgiomm-2.4
  99. Cflags: -I${includedir} -I${includedir}/giomm-2.4
  100. '@ -replace "`n","`r`n" |
  101. Set-Content -NoNewline -Encoding UTF8 `
  102. 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\giomm-2.4.pc'
  103.  
  104. @'
  105. prefix=${pcfiledir}/../..
  106. includedir=${prefix}/include
  107. libdir=${prefix}/lib
  108.  
  109. Name: cairomm
  110. Description: C++ wrapper for cairo
  111. Version: 1.14.5
  112. Requires: cairo >= 1.18.0, sigc++-2.0 >= 2.10.0
  113. Libs: -L${libdir} -lcairomm-1.0
  114. Cflags: -I${includedir} -I${includedir}/cairomm-1.0
  115. '@ -replace "`n","`r`n" |
  116. Set-Content -NoNewline -Encoding UTF8 `
  117. 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\cairomm-1.0.pc'
  118.  
  119. @'
  120. prefix=${pcfiledir}/../..
  121. includedir=${prefix}/include
  122. libdir=${prefix}/lib
  123.  
  124. Name: pangomm
  125. Description: C++ wrapper for Pango
  126. Version: 2.42.2
  127. Requires: pango >= 1.56.0, glibmm-2.4 >= 2.62.0, cairomm-1.0 >= 1.14.0
  128. Libs: -L${libdir} -lpangomm-1.4
  129. Cflags: -I${includedir} -I${includedir}/pangomm-1.4
  130. '@ -replace "`n","`r`n" |
  131. Set-Content -NoNewline -Encoding UTF8 `
  132. 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\pangomm-1.4.pc'
  133.  
  134. #7 More things
  135. cd C:\dev\other
  136. cp glibmm-2.62.0\MSVC_NMake\glibmm\glibmmconfig.h ..\vcpkg\installed\x64-windows\include\glibmm-2.4\
  137. cp glibmm-2.62.0\MSVC_NMake\giomm\giommconfig.h ..\vcpkg\installed\x64-windows\include\glibmm-2.4\
  138. cp libsigc++-2.10.2\MSVC_NMake\sigc++config.h ..\vcpkg\installed\x64-windows\include\sigc++-2.0\
  139. cp cairomm-1.14.5\MSVC_NMake\cairomm\cairommconfig.h ..\vcpkg\installed\x64-windows\include\cairomm-1.0\
  140. cp pangomm-2.42.2\MSVC_NMake\pangomm\pangommconfig.h ..\vcpkg\installed\x64-windows\include\pangomm-1.4\
  141. cd C:\dev\vcpkg\installed\x64-windows\lib
  142. cp glibmm-vc140-2_4.lib glibmm-2.4.lib
  143. cp giomm-vc140-2_4.lib giomm-2.4.lib
  144. cp sigc-vc140-2_0.lib sigc-2.0.lib
  145. cp pangomm-vc142-1_4.lib pangomm-1.4.lib
  146. cp cairomm-vc143-1_0.lib cairomm-1.0.lib
  147.  
Advertisement
Add Comment
Please, Sign In to add comment