2013年4月9日火曜日

Windows7 64bitでgimp2.8.4、gimp2.9~、gimp-painterをビルド(その3)


openSUSEの場合と同様にeclipseと連携していきます。

(1)OSの環境変数設定
PATHに下記を追加。

C:\MinGW\mingw64\bin
C:\MinGW\msys\1.0\bin

(2)eclipseのインストール

eclipse-cpp-juno-SR2-win32-x86_64.zip
をダウンロードしてきて、
展開して、下記となるように配置しました。

C:\eclipse_cdt\eclipse.exe

eclipse.exeを起動

ワークスペースは下記にした。
C:\eclipse_cdt\workspace

使いそうなパースペクティブは
Window/Open Perspective
から開いておく。

とりあえず、下記3つ。

Debug
Git Repository Exploring
Team Synchronizing

(3)eclipseプロジェクト作成(git-gimp-2.8用)

C/C++パースペクティブを選択。
ProjectExplorerで右クリックして、import。
C/C++/Exisiting Code as Makefile Projectを選択して、Next。

Project Name : git-gimp-2.8
Existing Code Location : C:\work\git\gimp-2.8
Toolchain for Indexer Settings : MinGW GCC

としてFinish。

Project/Propertiesを選択。
C/C++ General/Paths and Symbols

のIncludeタブでGNU CとGNU C++に下記をAdd。

C:\MinGW\local64\include
C:\MinGW\local64\include\freetype2
C:\MinGW\local64\include\cairo
C:\MinGW\local64\include\pango-1.0
C:\MinGW\local64\include\glib-2.0
C:\MinGW\local64\include\gdk-pixbuf-2.0
C:\MinGW\local64\include\gtk-2.0
C:\MinGW\local64\include\babl-0.1
C:\MinGW\local64\include\gegl-0.2

SymbolタブでGNU CとGNU C++に下記をAdd。
G_OS_WIN32 : 1

(4)debug configuration

まず下記ファイルを作成。
(ドット始まりのファイルはexplorerから作れないので、コマンド等でやってください。)
C:\MinGW\mingw64\bin\.gdbinit
中身は空のまま。

Run/Debug Configurationsを選択。
C/C++ Applicationを追加。

Mainタブ
Name : git-gimp-2.8 Debug
C/C++ Application : C:\work\gimpbin\git-gimp-2.8\bin\gimp-2.8.exe
Project : git-gimp-2.8
Build before launching : Disable auto build

Environmentタブ
下記3つの変数を追加
rem gtk+-2.24.16では、LANG設定する必要なしでした
rem LANG=de
HOME=C:\work\gimphome\git-gimp-2.8
PATH=C:\work\gimpbin\git-gimp-2.8;C:\work\gimpbin\git-gimp-2.8\bin;C:\MinGW\local64;C:\MinGW\local64\bin;C:\MinGW\mingw64\bin

Debuggerタブ
GDB debugger : C:\MinGW\mingw64\bin\gdb.exe
GDB command file : C:\MinGW\mingw64\bin\.gdbinit

debug実行すると、debugできます。

(5)eclipseプロジェクト作成(git-gimp-painter-2.7_postprocess用)

C/C++パースペクティブを選択。
ProjectExplorerで右クリックして、import。
C/C++/Exisiting Code as Makefile Projectを選択して、Next。

Project Name : git-gimp-painter-2.7_postprocess
Existing Code Location : C:\work\git\git-gimp-painter-2.7_postprocess
Toolchain for Indexer Settings : MinGW GCC

としてFinish。

Project/Propertiesを選択。
C/C++ General/Paths and Symbols

のIncludeタブでGNU CとGNU C++に下記をAdd。

C:\MinGW\local64\include
C:\MinGW\local64\include\freetype2
C:\MinGW\local64\include\cairo
C:\MinGW\local64\include\pango-1.0
C:\MinGW\local64\include\glib-2.0
C:\MinGW\local64\include\gdk-pixbuf-2.0
C:\MinGW\local64\include\gtk-2.0
C:\MinGW\local64\include\babl-0.1
C:\MinGW\local64\include\gegl-0.2

SymbolタブでGNU CとGNU C++に下記をAdd。
G_OS_WIN32 : 1

(6)debug configuration

Run/Debug Configurationsを選択。
C/C++ Applicationを追加。

Mainタブ
Name : git-gimp-painter-2.7_postprocess Debug
C/C++ Application : C:\work\gimpbin\git-gimp-painter-2.7_postprocess\bin\gimp-2.8.exe
Project : git-gimp-painter-2.7_postprocess
Build before launching : Disable auto build

Environmentタブ
下記3つの変数を追加
rem gtk+-2.24.16では、LANG設定する必要なし
rem LANG=de
HOME=C:\work\gimphome\git-gimp-painter-2.7_postprocess
PATH=C:\work\gimpbin\git-gimp-painter-2.7_postprocess;C:\work\gimpbin\git-gimp-painter-2.7_postprocess\bin;C:\MinGW\local64;C:\MinGW\local64\bin;C:\MinGW\mingw64\bin

Debuggerタブ
GDB debugger : C:\MinGW\mingw64\bin\gdb.exe
GDB command file : C:\MinGW\mingw64\bin\.gdbinit

debug実行すると、debugできます。

0 件のコメント:

コメントを投稿