Explorar o código

add a build script for static library and example for OSX

Todd Fisher %!s(int64=14) %!d(string=hai) anos
pai
achega
9ed163f5fe
Modificáronse 1 ficheiros con 25 adicións e 0 borrados
  1. 25 0
      scripts/build-osx-x86

+ 25 - 0
scripts/build-osx-x86

@@ -0,0 +1,25 @@
+#!/bin/bash
+
+qmake wkhtmltopdf.pro -spec macx-g++
+
+make src/image/Makefile
+make src/pdf/Makefile
+make src/lib/Makefile
+
+for makefile in `find . -name Makefile`
+do
+  echo "update: $makefile"
+  tmp=make.$$
+  cat $makefile | sed -e 's/i386/x86_64/g' > $tmp
+  mv $tmp $makefile
+done
+
+cd src/lib && make staticlib
+cd -
+
+echo "build examples"
+tmp=make.$$
+cat examples/Makefile | sed -e 's/-L ..\/bin -lwkhtmltox/..\/bin\/libwkhtmltox.a -lstdc++ -framework QtWebkit -framework QtSvg -framework QtXmlPatterns -framework QtGui -framework QtCore -framework QtNetwork/g' > $tmp
+mv $tmp examples/Makefile
+cd examples && make
+cd -