无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 2779|回复: 5
打印 上一主题 下一主题

网上的mkisofs-2.01-cjk-md5有Bug,重新编译发布一份

[复制链接]
跳转到指定楼层
1#
发表于 2011-3-20 23:58:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
[Section_A] mkisofs-md5-2.01-Usages --->
/* --------------------------------------------------------------------
Announcement: Written by Wwashington @ newsmth forum. 2011/03/20 18:00.
Please keep all information if you want to keep it, or redistribute it.
-------------------------------------------------------------------- */
01) The mkisofs with multi charsets and MD5, it's popular for years ago:
mkisofs 2.01-bootcd.ru (i686-pc-mingw32)
02) How to build ISO with -jcharset options, discover supported charset:
mkisofs -jcharset help
03) Some Bug Report of "mkisofs 2.01-bootcd.ru" cjk mingw win32 version:
3a) There is NO Joliet Volume Name even you input "-V VolumeID" in shell.
3b) For most mkisofs MinGW version, DOS Mode CJK Code hasn't been enable.
----------------------------------------------------------------------------
04) New versions of mkisofs with multi charsets and MD5, for Cygwin & MinGW.
The Cygwin build is more compatible with Linux, the Mingw32 build is smaller.
GNU Released by Joerg Schilling, Modified by Wwashington. With Great
Thanks To: Japan NOBORU(NLS-CJK Patch), Alex Kopylov(MD5-Opt Patch).
mkisofs 2.01-bootcd.ru-cjk-md5 (i686-pc-cygwin)
GNU Released by Joerg Schilling, Modified by Wwashington. With Great
Thanks To: Japan NOBORU(NLS-CJK Patch), Alex Kopylov(MD5-Opt Patch).
mkisofs 2.01-bootcd.ru-cjk-md5 (i686-pc-mingw32)
05) Some Test Scripts to show the problem when you make ISO image in Chinese.
You can use this Sample Data to test your mkisofs 2.01 whether it is working.
Important Message: -duplicates-once is MD5 Optimize, don't use -O option now.
-cjk4dos-filenames and -cjk4unx-filenames are new options to support Chinese.
Notes: cjk4dos and cjk4unx are force-mode to support multibyte charsets like
CJK Langs. If you can't make multibyte ISO, cjk4dos and cjk4unx are optional.
REM /*  How to build ISO with Chinese Filenames:  */
mkisofs -V "mydoc-测试" -r -J -jcharset cp936 -o mydoc1.iso mydoc
REM /*  How to build ISO with MD5 Space Optimze:  */
mkisofs -V "mydoc-测试" -r -J -duplicates-once -jcharset cp936 -o mydoc2.iso mydoc
REM /*  How to build ISO Enabled DOS + Unix CJK:  */
mkisofs -V "mydoc-测试" -r -J -duplicates-once -iso-level 1 -jcharset cp936 -cjk4dos-filenames -o mydoc3.iso mydoc
mkisofs -V "mydoc-测试" -r -J -duplicates-once -iso-level 4 -jcharset cp936 -cjk4unx-filenames -o mydoc4.iso mydoc
mkisofs -V "mydoc-测试" -r -J -duplicates-once -iso-level 1 -jcharset cp936 -cjk4dos-filenames -cjk4unx-filenames -o mydoc5.iso mydoc
------------------------------------------------------------------------------
[Section_B] mkisofs-md5-2.01-Readme --->
/* --------------------------------------------------------------------
Announcement: Written by Wwashington @ newsmth forum. 2011/03/20 20:00.
Please keep all information if you want to keep it, or redistribute it.
-------------------------------------------------------------------- */
01) Setup Cygwin Developing Environment.
Please download Cygwin-Easy-2007.03.21.iso , mount the ISO with Alcohol
or Virtual CloneDrive. It's the best All-in-One Cygwin Package I found.
02) Setup MSYS 1.0.11, 1.016. Mount Dir.
Fetch MSYS-MinGW-Gcc-3.45-4.45.7z from http://code.google.com/p/mkisofs
Then setup at least one system. They can work together, 1.0.16 is better.
cd "I:\Unix\MSYS\1.0.16"
mkdir /extra
cd "I:\Unix\MSYS\1.0.11"
mkdir /extra
mount "I:\Unix\MSYS\1.0.16\extra" /usr/local
03) Run Cygwin, create symbol links to your working folder iside the MSYS.
The reason why we choose /etc is that Virtual DVD-ROM is unable to write.
ln -s "I:\Unix\MSYS\1.0.16\extra" /etc/extra
ln -s "I:\Unix\MSYS\1.0.11\extra" /etc/extrb
mount "I:\Unix\MSYS\1.0.16\extra" /usr/local
04) Compile Smake and P7zip Tools, they will help you Make and Decompress.
After compiling, you may copy Binaries and Cygwin1.dll to /usr/local/bin.
For your convienence, I already built them and put them in Cygwin Binary.
cd /etc/extra/src
tar -jxvf ../zlib/smake-1.2.1.tar.bz2
cd smake-1.2.1/
make
cd /etc/extra/src
tar -jxvf ../zlib/p7zip_9.20.1_src_all.tar.bz2
cd p7zip_9.20.1/
make
05) If you have original src, repack it. Otherwise the patch process will
fail. The "c" funtion vs "h" option in tar command can strip symbol link.
For your convienence, I already built it. You can try when you have time.
cd /etc/extra/src
rm -Rf cdrtools-2.01/
tar -zxvf ../zlib/cdrtools-2.01-origin.src.tar.gz
tar -zchf cdrtools-2.01-origin.src.tar.gz cdrtools-2.01
mv -f cdrtools-2.01-origin.src.tar.gz ../zlib
06) Now Start to Build the Binary in Cygwin. Good Luck & Have a Good Tea!
The nls patch and nls-2-md5 patch is working, but the program have small
bugs. The mkisofs program will generate "Rock Ridge" info without asking.
cd /etc/extra/src
rm -Rf cdrtools-2.01/
rm -Rf cdrtools-2.01.md5/
tar -zxvf ../zlib/cdrtools-2.01-origin.src.tar.gz
mv cdrtools-2.01 cdrtools-2.01.md5
cd cdrtools-2.01.md5/
zcat ../../zlib/noboru_nls_patch_20041227.txt.gz | patch -p1
cat  ../../zlib/cdrtools-2.01.nls-2-md5.src.diff | patch -p1
smake
07) Now Start to Build the Binary in MinGW. Good Luck & Have a Good Tea!
The nls patch and nls-2-md5 patch is working, but the program have small
bugs. The mkisofs program will generate "Rock Ridge" info without asking.
echo "/* Usage Tip: Please Run tar in Cygwin, it's much safer for you */"
cd /etc/extra/src
rm -Rf cdrtools-2.01/
rm -Rf cdrtools-2.01.w32/
tar -zxvf ../zlib/cdrtools-2.01-origin.src.tar.gz
mv cdrtools-2.01 cdrtools-2.01.w32
cd cdrtools-2.01.w32/
zcat ../../zlib/noboru_nls_patch_20041227.txt.gz | patch -p1
cat  ../../zlib/cdrtools-2.01.nls-2-md5.src.diff | patch -p1
echo "/* Change To: MSYS 1.0.16 + MinGW Gcc 3.4.5 Environment , Build */"
make
08) Find the Binaries you want, copy it to upper folder, that's well done.
Please run explorer in your Win32 Desktop, then copy & paste to anywhere.
find . | grep exe | grep -v fexec
ls -la `find . | grep mkisofs.exe`
`find . | grep mkisofs.exe` --version
cp -pf `find . | grep mkisofs.exe` ..
09) Original Patch process base on bootcd.ru Fix, without nls-2-md5 Patch.
I merge NLS-CJK & MD5-Opt Patch, then fix bugs, finally create new Patch.
cd /etc/extra/src
rm -Rf cdrtools-2.01/
rm -Rf cdrtools-2.01.nls/
tar -zxvf ../zlib/cdrtools-2.01-origin.src.tar.gz
mv cdrtools-2.01 cdrtools-2.01.nls
cd cdrtools-2.01.nls/
zcat ../../zlib/noboru_nls_patch_20041227.txt.gz | patch -p1
cd /etc/extra/src
rm -Rf cdrtools-2.01/
rm -Rf cdrtools-2.01.md5/
tar -zxvf ../zlib/cdrtools-2.01-origin.src.tar.gz
mv cdrtools-2.01 cdrtools-2.01.md5
cd cdrtools-2.01.md5/
zcat ../../zlib/noboru_nls_patch_20041227.txt.gz | patch -p1
cat  ../../zlib/cdrtools-2.01-bootcd.ru-src.diff | patch -p1
cp -pf -R ../update/cdrtools-2.0.1/* .
find . | grep rej  | xargs -i echo {}
find . | grep rej  | xargs -i  rm {}
find . | grep orig | xargs -i echo {}
find . | grep orig | xargs -i  rm {}
cd /etc/extra/src
diff -rupN cdrtools-2.01.nls cdrtools-2.01.md5 > cdrtools-2.01.nls-2-md5.src.diff
10) Reference websites of all contributors for mkisofs-cjk-md5 version.
A) Japan NOBORU (Thanks for providing NLS-CJK Patch) -->
   http://www.geocities.co.jp/SiliconValley/3657/mkisofs_patch/
B) Alex Kopylov (Thanks for providing MD5-Opt Patch) -->
   http://fy.chalmers.se/~appro/linux/DVD+RW/tools/win32/
C) Jacky Zhong (Wwashington, Author of mkisofs-cjk-md5) -->
   http://code.google.com/p/mkisofs-md5/
   http://sourceforge.net/projects/mkisofs-md5/
------------------------------------------------------------------------------
[Section_C] mkisofs-md5 Develop Kit --->
http://www.verycd.com/topics/2885338/
《Cygwin-Easy-2007光盘运行版和Cygwin-Release-2006光盘安装版》[光盘镜像]
http://www.verycd.com/topics/2885342/
《MinGW编译器2010版,包括MSYS、MinGW、Gcc的3.45和4.45版,绝对好用》[压缩包]
01) Cygwin-Easy-2007.03.21.iso
Cygwin-Easy-2007.03.21.iso (1.99 GB)
02) Cygwin-Release-20061108.iso
Cygwin-Release-20061108.iso (1.29 GB)
03) MSYS-MinGW-Gcc-3.45-4.45.7z
MSYS-MinGW-Gcc-3.45-4.45.7z (125.86 MB)
2#
 楼主| 发表于 2011-3-21 16:46:07 | 只看该作者
发信人: Wwashington (Jacky), 信区: NewSoftware
标  题: Re: [原创]网上的mkisofs-2.01-cjk-md5有Bug,重新编译发布一份
发信站: 水木社区 (Mon Mar 21 16:45:37 2011), 站内

【 在 Wwashington (Jacky) 的大作中提到: 】
: [Section_A] mkisofs-md5-2.01-Usages --->
: /* --------------------------------------------------------------------
: Announcement: Written by Wwashington @ newsmth forum. 2011/03/20 18:00.
: ...................

首先感谢大家的关注。其实日本人NOBORU(geocities.co.jp)的NLS-CJK Patch和俄国人Alex Kopylov(bootcd.ru)的MD5-Opt Patch已经比较完善了。最奇妙的是,这两个补丁居然可以兼容(混合在一起),太幸福了。如果没有发现使用故障,大家根本没必要重复劳动。有现成不用还要重做一遍,多累多傻呀。因为我很长时间都没有做光盘镜像了,没怎么留意这方面的发展。后来看到网上有好几个Win32版本,用过之后发现总是有一些小瑕疵。对于追求完美的人来说感觉不爽,所以干脆把源码弄来搞了两天。

主要工作是修复了Volume丢失的问题,还有DOS模式、Unix模式的中文名问题(原来的版本屏蔽了乱码转换,这样子不安全)。最重要的是,使用MinGW的Gcc 3.4.5和Gcc 4.4.5编译时碰到一些头文件的路径问题(重新include)和_sleep定义,还有用Gcc 4.x编译老软件经常碰到的duplicate 'unsigned'问题。我在狗狗上搜了很久都没找到解决方案。后来我突然想起Gcc 3.x没这个问题,Gcc 4.x出现问题,尝试用__GNUC__ >= 4判断再取消定义(undef)的办法,修成正果。发出来与大家分享,向高手们学习。同时,也是为了防止其他小白同志再犯类似错误,被Gcc 4.x搞个半死,呵呵。


GCC4-Unsigned.txt --->

--------------------------------------------------------------------------------
/* Issues: Compile cdrtools with Gcc 4.x version, error: duplicate 'unsigned' */
--------------------------------------------------------------------------------

cdrtools-2.01.md5/cdda2wav/cdda2wav.c
cdrtools-2.01.md5/cdrecord/cdrecord.c

--------------------------------------->

#ifdef    __MINGW32__
#   if __GNUC__ >= 4
#      undef     u_char;
#      undef     u_short;
#      undef     u_int;
#      undef     u_long;
#   endif
#endif    /* MINGW Headers */

#include <windows.h>
#undef format
#undef interface

--------------------------------------------------------------------------------

cdrtools-2.01.md5/cdda2wav/sndconfig.c

--------------------------------------->

#ifdef    ECHO_TO_SOUNDCARD
#   if defined(__CYGWIN32__) || defined(__MINGW32__)
#      if __GNUC__ >= 4
#         undef     u_char;
#         undef     u_short;
#         undef     u_int;
#         undef     u_long;
#      endif
#      include <windows.h>
#      include "mmsystem.h"
#   endif

--------------------------------------------------------------------------------

cdrtools-2.01.md5/libscg/scsihack.c

--------------------------------------->

#if defined(__CYGWIN32__) || defined(__MINGW32__)
#define    SCSI_IMPL        /* Yep, we support WNT and W9? */
#ifdef    __MINGW32__
#   if __GNUC__ >= 4
#      undef     u_char;
#      undef     u_short;
#      undef     u_int;
#      undef     u_long;
#   endif
#endif    /* MINGW Headers */
#include "scsi-wnt.c"
#endif

--------------------------------------------------------------------------------

[ 本帖最后由 wwashington 于 2011-3-21 16:47 编辑 ]
回复

使用道具 举报

3#
发表于 2011-3-21 17:12:47 | 只看该作者
MSYS-MinGW-Gcc-3.45-4.45.7z这个能编译grub4dos吗?
回复

使用道具 举报

4#
 楼主| 发表于 2011-3-22 00:05:58 | 只看该作者
原帖由 zhaohj 于 2011-3-21 17:12 发表
MSYS-MinGW-Gcc-3.45-4.45.7z这个能编译grub4dos吗?

这我倒没试过。以前的旧版MinGW很土的,我基本不用。一直到后来2008年的MSYS-1.0.11和
2010年的MSYS-1.0.16比较顺手了,我才逐渐从Cygwin上转移过来。你可以试着编译一下。

$ uname -a
MINGW32_NT-5.1 050-JACKY-ZHONG 1.0.11(0.46/3/2) 2008-07-11 00:14 i686 Msys

$ uname -a
MINGW32_NT-5.1 050-JACKY-ZHONG 1.0.16(0.48/3/2) 2010-09-29 00:07 i686 Msys
回复

使用道具 举报

5#
发表于 2011-4-1 13:01:19 | 只看该作者
下载地址在哪里啊?。。。
回复

使用道具 举报

6#
发表于 2011-4-2 11:03:48 | 只看该作者
已经收下了感谢提醒!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-12-22 07:44

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表