Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @'
- http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.62/glibmm-2.62.0.tar.xz
- http://ftp.gnome.org/pub/GNOME/sources/pangomm/2.42/pangomm-2.42.2.tar.xz
- http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.2.tar.xz
- http://cairographics.org/releases/cairomm-1.14.5.tar.gz
- '@ -split "`n" | % { $f = "C:\dev\other\{0}" -f (Split-Path -Leaf $_); iwr $_ -OutFile $f; tar -xf $f -C C:\dev\other; rm $f }
- & "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64
- # 1. Build libsigc++
- cd C:\dev\other\libsigc++-2.10.2\MSVC_NMake
- nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows
- nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows install
- # 2. Build glibmm
- cd C:\dev\other\glibmm-2.62.0\MSVC_NMake
- @"
- #pragma once
- #pragma warning(disable: 4251)
- #pragma warning(disable: 4275)
- #pragma warning(disable: 4786)
- "@ | Out-File -Encoding ASCII gendef/msvc_recommended_pragmas.h
- glibmm','giomm'|%{(gc "release\x64\$_\$_.def")-notmatch'Weak'|Set-Content "release\x64\$_\$_.def"}
- cp C:\dev\vcpkg\installed\x64-windows\tools\glib\glib-compile-schemas.exe C:\dev\vcpkg\installed\x64-windows\bin\
- nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows
- nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows install
- # 3. Build cairomm
- cd C:\dev\other\cairomm-1.14.5\MSVC_NMake
- notepad config-msvc.mak
- Line 45 add /I$(PREFIX)\include\cairo, and a \ at the end of line 44.
- nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows
- nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows install
- # 4. Build Pangomm
- download perl from https://strawberryperl.com/ (I got the MSI)
- Close and reopen powershell
- & "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64
- cd C:\dev\other\pangomm-2.42.2\MSVC_NMake
- notepad config-msvc.mak
- Under /I$(PREFIX)\lib\cairomm-$(CAIROMM_MAJOR_VERSION).$(CAIROMM_MINOR_VERSION)\include
- Add /I$(PREFIX)\include\cairo \
- Make an !else block the following:
- !else
- LIBSIGC_LIBNAME = sigc-vc140-$(LIBSIGC_MAJOR_VERSION)_$(LIBSIGC_MINOR_VERSION)
- GLIBMM_LIBNAME = glibmm-vc140-$(GLIBMM_MAJOR_VERSION)_$(GLIBMM_MINOR_VERSION)
- CAIROMM_LIBNAME = cairomm-vc143-$(CAIROMM_MAJOR_VERSION)_$(CAIROMM_MINOR_VERSION)
- PANGOMM_LIBNAME = pangomm-vc$(VSVER_LIB)$(DEBUG_SUFFIX)-$(PANGOMM_MAJOR_VERSION)_$(PANGOMM_MINOR_VERSION)
- nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows
- nmake /f Makefile.vc CFG=release PREFIX=C:\dev\vcpkg\installed\x64-windows install
- #5. Moving libs and bins (If not already in position)
- cd C:\dev\other
- $prefix = 'C:\dev\vcpkg\installed\x64-windows'
- @('sigc++-2.0','cairomm-1.14.5','glibmm-2.4','pangomm-2.42.2') | ForEach-Object{
- $d = "$_\MSVC_NMake\vs16\release\x64"
- if (Test-Path $d) {
- robocopy $d $prefix\bin *.dll *.pdb /R:0 /NP
- robocopy $d $prefix\lib *.lib *.exp /R:0 /NP
- }
- }
- #6 .pc files
- @'
- prefix=${pcfiledir}/../..
- includedir=${prefix}/include
- libdir=${prefix}/lib
- Name: sigc++
- Description: Typesafe callback system for C++
- Version: 2.10.2
- Libs: -L${libdir} -lsigc-2.0
- Cflags: -I${includedir} -I${includedir}/sigc++-2.0
- '@ -replace "`n","`r`n" |
- Set-Content -NoNewline -Encoding UTF8 `
- 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\sigc++-2.0.pc'
- @'
- prefix=${pcfiledir}/../..
- includedir=${prefix}/include
- libdir=${prefix}/lib
- Name: glibmm
- Description: C++ wrapper for GLib
- Version: 2.62.0
- Requires: glib-2.0 >= 2.62.0
- Libs: -L${libdir} -lglibmm-2.4
- Cflags: -I${includedir} -I${includedir}/glibmm-2.4
- '@ -replace "`n","`r`n" |
- Set-Content -NoNewline -Encoding UTF8 `
- 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\glibmm-2.4.pc'
- @'
- prefix=${pcfiledir}/../..
- includedir=${prefix}/include
- libdir=${prefix}/lib
- Name: giomm
- Description: C++ wrapper for GIO
- Version: 2.62.0
- Requires: glibmm-2.4 >= 2.62.0, gio-2.0 >= 2.62.0
- Libs: -L${libdir} -lgiomm-2.4
- Cflags: -I${includedir} -I${includedir}/giomm-2.4
- '@ -replace "`n","`r`n" |
- Set-Content -NoNewline -Encoding UTF8 `
- 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\giomm-2.4.pc'
- @'
- prefix=${pcfiledir}/../..
- includedir=${prefix}/include
- libdir=${prefix}/lib
- Name: cairomm
- Description: C++ wrapper for cairo
- Version: 1.14.5
- Requires: cairo >= 1.18.0, sigc++-2.0 >= 2.10.0
- Libs: -L${libdir} -lcairomm-1.0
- Cflags: -I${includedir} -I${includedir}/cairomm-1.0
- '@ -replace "`n","`r`n" |
- Set-Content -NoNewline -Encoding UTF8 `
- 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\cairomm-1.0.pc'
- @'
- prefix=${pcfiledir}/../..
- includedir=${prefix}/include
- libdir=${prefix}/lib
- Name: pangomm
- Description: C++ wrapper for Pango
- Version: 2.42.2
- Requires: pango >= 1.56.0, glibmm-2.4 >= 2.62.0, cairomm-1.0 >= 1.14.0
- Libs: -L${libdir} -lpangomm-1.4
- Cflags: -I${includedir} -I${includedir}/pangomm-1.4
- '@ -replace "`n","`r`n" |
- Set-Content -NoNewline -Encoding UTF8 `
- 'C:\dev\vcpkg\installed\x64-windows\lib\pkgconfig\pangomm-1.4.pc'
- #7 More things
- cd C:\dev\other
- cp glibmm-2.62.0\MSVC_NMake\glibmm\glibmmconfig.h ..\vcpkg\installed\x64-windows\include\glibmm-2.4\
- cp glibmm-2.62.0\MSVC_NMake\giomm\giommconfig.h ..\vcpkg\installed\x64-windows\include\glibmm-2.4\
- cp libsigc++-2.10.2\MSVC_NMake\sigc++config.h ..\vcpkg\installed\x64-windows\include\sigc++-2.0\
- cp cairomm-1.14.5\MSVC_NMake\cairomm\cairommconfig.h ..\vcpkg\installed\x64-windows\include\cairomm-1.0\
- cp pangomm-2.42.2\MSVC_NMake\pangomm\pangommconfig.h ..\vcpkg\installed\x64-windows\include\pangomm-1.4\
- cd C:\dev\vcpkg\installed\x64-windows\lib
- cp glibmm-vc140-2_4.lib glibmm-2.4.lib
- cp giomm-vc140-2_4.lib giomm-2.4.lib
- cp sigc-vc140-2_0.lib sigc-2.0.lib
- cp pangomm-vc142-1_4.lib pangomm-1.4.lib
- cp cairomm-vc143-1_0.lib cairomm-1.0.lib
Advertisement
Add Comment
Please, Sign In to add comment