Build jsoncpp and chrome2favorites

Post date: Oct 10, 2010 3:17:11 PM

Prerequisites

Install MSYS + MinGW.

Install Git.

Install 7zip.

Install Python (I've only tested with 2.7).

Install scons to MSYS

jsoncpp uses the Python-based build system "scons" instead of "make".

Update your .profile to include Python27 and Python27/Scripts in your PATH.

Install scons-2.5.1.tar.gz:

    • Download scons-2.5.1.tar.gz from the scons homepage:

    • Extract scons-2.5.1 to C:\dev

    • Start the MinGW Shell

  • cd /c/dev/scons-2.5.1

  • python setup.py install

Download jsoncpp

    • Obtain jsoncpp from sourceforge: 1.7.7 Download

    • If this is your first time opening .gz, use $PROGRAMFILES/7-Zip/7zFM.exe

    • Extract jsoncpp-1.7.7.tar.gz directory to $HOME.

Build jsoncpp

Once you have scons and the jsoncpp source, you can build jsoncpp.

    • Start the MinGW Shell

  • cd jsoncpp-1.7.7/

  • scons platform=mingw

That was easy. Create a lib directory and copy the json static library:

  • mkdir $HOME/lib

  • cp libs/mingw/libjson_mingw_libmt.a $HOME/lib/

Create an include directory and copy the json headers:

  • mkdir $HOME/include

  • cp -pr $HOME/jsoncpp-1.7.7/include/json $HOME/include/json

When you build a program with jsoncpp, you will need linker options:

-L $HOME/lib -l json_mingw_libmt

and compiler options:

-I $HOME/include

Clone chrome2favorites from Git

    • Start the MinGW Shell

  • git clone http://github.com/axus/chrome2favorites.git

Build chrome2favorites

  • cd $HOME/chrome2favorites

  • make

If everything went well, you will have a new Chrome2Favorites.exe

Run chrome2favorites

You need to have C:\dev\MinGW\msys\1.0\bin\ in your PATH, so that libgcc_s_dw2-1.dll and libstdc++-6.dll are linked.

  • chrome2favorites

This will copy your Chrome "Bookmarks Bar" and "Other Bookmarks" to your IE Favorites folder.