cdrkit is another CD/DVD burning tool that was spun off from the cdrtools project. Some say cdrkit is inferior to cdrtools, but I haven't found a problem with cdrkit yet. Although I prefer cdrtools to cdrkit, I'd like to give cdrkit a try. To build cdrkit with MinGW, I had to compile some libraries first.
- zlib
First, I compiled zlib:
tar xzvf zlib-1.2.7.tar.gz
cd zlib-1.2.7
make -f win32/Makefile.gcc
cp -iv zlib1.dll /mingw/bin
cp -iv zconf.h zlib.h /mingw/include
cp -iv libz.a /mingw/lib
cp -iv libz.dll.a /mingw/lib - POSIX threads for Win32
New genisoimage seems to use pthread for making checksums. I compiled pthread like this:
make clean GC
cp -iv pthreadGC2.dll /mingw/bin
cp -iv pthread.h semaphore.h sched.h /mingw/include/
cp -iv libpthreadGC2.a /mingw/lib
cp -iv libpthreadGC2.a /mingw/lib/libpthread.a - PCRE
Then, I compile PCRE:
./configure --prefix=/mingw --enable-pcre16 --enable-unicode-properties
make
make install
cp /mingw/include/pcreposix.h /mingw/include/regex.h
cp /mingw/lib/libpcreposix.a /mingw/lib/libregex.a
cp /mingw/lib/libpcreposix.dll.a /mingw/lib/libregex.dll.a - libmagic
I built the open-source file command. I configured it like this:
./configure --prefix=/mingw
Then, I added the following lines to
config.h
:#define WIN32 1
#define MAGIC "magic"Compile libmagic:
make && make install
I got an error trying to build file.exe, so I modified src/Makefile:
file_LDADD = libmagic.la /mingw/lib/libpcreposix.dll.a
- libiconv
I built libiconv like this:
./configure --prefix=/mingw
make
make install - CMake
Then, I built CMake.
./bootstrap --prefix=/mingw
make
make install - cdrkit
I unpacked the cdrkit source and applied the patch that I found at the mailing list. Here are the modified patches of mine.
I used the command below to applied the patch.
patch -p1 -l < ../cdrkit-1.1.9-mingw.patch
Then, I compiled cdrkit:
cmake -G "MSYS Makefiles"
makeAfter successful build, I copied the executable files (*.exe) to my folder.
Issues and Fixes
I got an error linking genisoimage. I edited genisoimage/CMakeLists.txt to resolve the issue:
IF(USE_MAGIC)
ADD_DEFINITIONS(-DUSE_MAGIC)
LIST(APPEND EXTRA_LIBS "shlwapi")
SET(MAGICLIBS magic)
ENDIF(USE_MAGIC)I got errors compiling sha256.* and sha512.*. I made the following changes.
- I removed all lines that read #include <endian.h>.
- Assume the target machine is little endian.
- change all occurrences of
__THROW
to__attribute__ ((__nothrow__))
.
- I removed all lines that read #include <endian.h>.
The code in genisoimage/checksum.c gave me errors linking with pthread-w32. To fix it, I replaced
a->thread
with(a->thread).p
.I found that genisoimage and readom still used
/dev/null
. I changed it toNUL
in genisoimage.c and readom.c.
Download my cdrkit Build
Here's my cdrkit build for Windows.
No comments:
Post a Comment