Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active May 31, 2018 08:09
Show Gist options
  • Save kjunichi/a0d7d39db5ca8a73cd8ae442fb35cf11 to your computer and use it in GitHub Desktop.
Save kjunichi/a0d7d39db5ca8a73cd8ae442fb35cf11 to your computer and use it in GitHub Desktop.
2015/5/22

GIMP

Gtk+フォント周りの設定ファイル

pango.alias gimpはデフォルトない gtkrc

gcc fonttest1.c -o test1 pkg-config --libs --cflags gtk+-2.0

gimp building is too hard

  • /usr/local/libを少なくともPythonのビルド時は見ており、この際、Hoembrewのopensslモジュールをシンボリックリンク していると、Apple純正のopensslとコンフリクトして、import md5が出来なくなる。

  • 動作したマシンでバンドル化したモノを動かしたらフォントが豆腐

  • 当然動作したマシンでは問題なくフォント表示

  • 動作したマシンのgtk/instをコピーしたらユーザーIDが異なるためライブラリロードに失敗

  • この対応でタイムアップ

tool

otool -L target

Ruby

コマンドライン引数

ARGV[n]

コマンド名は$0

./chdylib ~/gtk/inst/bin/gimp /Users/junichi/gtk/inst/lib/ /Users/kjw_junichi/gtk/inst/lib/

HPACK

HTTP/2では「HPACK」と呼ばれる新たなヘッダー圧縮方式

-D_REENTRANT 
-I/Users/junichi/gtk/inst/include/gtk-2.0 
-I/Users/junichi/gtk/inst/lib/gtk-2.0/include -I/Users/junichi/gtk/inst/include/pango-1.0 
-I/Users/junichi/gtk/inst/include/atk-1.0 -I/Users/junichi/gtk/inst/include/cairo 
-I/Users/junichi/gtk/inst/include/pixman-1 -I/Users/junichi/gtk/inst/include/freetype2 
-I/Users/junichi/gtk/inst/include/libpng16 -I/Users/junichi/gtk/inst/include/freetype2 
-I/Users/junichi/gtk/inst/include/libpng16 -I/Users/junichi/gtk/inst/include/gdk-pixbuf-2.0 
-I/Users/junichi/gtk/inst/include/libpng16 -I/Users/junichi/gtk/inst/include/glib-2.0 
-I/Users/junichi/gtk/inst/lib/glib-2.0/include -L/Users/junichi/gtk/inst/lib 
-lgtk-quartz-2.0 -lgdk-quartz-2.0 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo 
-lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl


/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -D_REENTRANT -dynamiclib  -o .libs/libgdkglext-quartz-1.0.0.dylib  .libs/gdkglversion.o .libs/gdkglinit.o .libs/gdkglquery.o .libs/gdkglconfig.o .libs/gdkglcontext.o .libs/gdkgldrawable.o .libs/gdkglpixmap.o .libs/gdkglwindow.o .libs/gdkglglext.o .libs/gdkglenumtypes.o   -Wl,-force_load,quartz/.libs/libgdkglext-quartz.a  -L/Users/junichi/gtk/inst/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib -lgdk-quartz-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -Wl,-headerpad_max_install_names   -framework OpenGL -install_name  /Users/junichi/gtk/inst/lib/libgdkglext-quartz-1.0.0.dylib -compatibility_version 201 -current_version 201.0 -Wl,-single_module -Wl,-exported_symbols_list,.libs/libgdkglext-quartz-1.0-symbols.expsym


Couldn't find include 'Gdk-3.0.gir'

関連

アクセス解析タグ

#!/usr/bin/env ruby
#
# chdylib target src_path dist_path
targetbin = ARGV[0]
src_path= ARGV[1]
dist_path= ARGV[2]
libinforaw = `otool -L #{targetbin}`.gsub!("\t","").split("\n")
libinfo = libinforaw[1..libinforaw.size]
#puts libinfo
libinfo.each{|dylib|
libfullname = dylib.split(" ")[0]
libpath = libfullname.split("/")
libpath = libpath[0..(libpath.size-2)].join("/")
libname = libfullname.split("/")[-1]
#p libpath,libname
if libpath==src_path then
cmd = "install_name_tool -change #{libfullname} #{dist_path}/#{libname} #{targetbin}"
p cmd
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment