[置顶][Delphi] DUnitID 0.17.4725
posted @ 2008-05-03 10:56 Icebird 阅读(1397) 评论(3) 编辑
Delphi/C# - My favorite programming language
置顶随笔 #
posted @ 2008-05-03 10:56 Icebird 阅读(1397) 评论(3) 编辑
2012年3月20日 #
function test()
{
return /yy/g.test("yyyy-MM-DD");
}
for (var i = 0; i < 100; i++)
{
if (!test())
console.log(i);
}
在一个函数里调用test,当使用了g选项则在执行了42次后就开始返回不正确了。不使用g选项好像就没问题。在FireFox 10和11下都是这样。
换成IE8或Chrome运行同样的代码则没有问题。
posted @ 2012-03-20 12:22 Icebird 阅读(62) 评论(0) 编辑
2011年4月11日 #
PhysicsFS is a library to provide abstract access to various archives. It is intended for use in video games, and the design was somewhat inspired by Quake 3's file subsystem. The programmer defines a "write directory" on the physical filesystem. No file writing done through the PhysicsFS API can leave that write directory, for security. For example, an embedded scripting language cannot write outside of this path if it uses PhysFS for all of its I/O, which means that untrusted scripts can run more safely. Symbolic links can be disabled as well, for added safety. For file reading, the programmer lists directories and archives that form a "search path". Once the search path is defined, it becomes a single, transparent hierarchical filesystem. This makes for easy access to ZIP files in the same way as you access a file directly on the disk, and it makes it easy to ship a new archive that will override a previous archive on a per-file basis. Finally, PhysicsFS gives you platform-abstracted means to determine if CD-ROMs are available, the user's home directory, where in the real filesystem your program is running, etc.
我是从改版的DOSBox里看到有这样一个技术可以实现挂载zip/7z压缩包,就想在.NET中是否能够使用呢。
让我找到一个封装好的库 - BooGame,另外还有一个TAO (文件太大,有30多M)。
首先下载BooGame: http://sourceforge.net/projects/boogame/files/BooGame/
从下载的包里找到physfs.dll与Tao.PhysFs.dll,新建项目,引用Tao.PhysFs.dll,将physfs.dll放入bin与执行文件在一起。
然后using Tao.PhysFs,BooGame里有一个FileSystem.cs,可以做参考,不过其封装得不够完善。
首先 Fs.PHYSFS_init("init"); //这里的"init"没啥特别意义,总之传入一个字符串就可以
然后是添加搜索路径,Fs.PHYSFS_addToSearchPath("D:\\Temp", 1); //如果有写入要求的话,写入的临时目录要先添加,否则修改过的数据无法被找到,后面的参数1是一个定值
下面来mount一个压缩包,Fs.PHYSFS_addToSearchPath("D:\\Test.zip", 1);
接着设置写入的临时目录:Fs.PHYSFS_setWriteDir("D:\\"); //对压缩包的文件所作的任何修改都会被存入此处指定的临时目录。
如果临时目录与压缩包里的同一路径下都有相同的文件,则搜索路径在前的那个文件会优先被使用。
接下来就是文件目录的通常操作了,除了是使用 Fs.PHYSFS_XXX 这样的语句外,与通常的文件操作没有太大区别。更详细的使用帮助,请参考http://192.121.234.229/manualer/programering/Tao-doc/Tao.PhysFs/Tao.PhysFs.FsMembers.html
有心的话,可以考虑继承Steam重写一个类来简化使用。
提示,里面的openWrite, openAppend实在不好用(需要Marshal.AllocHGlobal来分配内存),不如直接在临时目录下直接读写之。
最后,要关闭资源:Fs.PHYSFS_deinit();
PS: 这个版本有点老了,好像是1.0.1,现在最新的是2.0.2,从1.1开始就支持了7z格式。
都快写完了,突思奇想,把DOSBox里带的libphysfs.dll复制过来,改名成physfs.dll,然后一试,哈哈,果然可以使用,并且支持了7z格式。
相关文件下载:http://files.cnblogs.com/Icebird/PhysFS.net.rar
posted @ 2011-04-11 13:45 Icebird 阅读(282) 评论(0) 编辑
2010年7月14日 #
2008年6月5日 #
posted @ 2008-06-05 11:47 Icebird 阅读(895) 评论(3) 编辑
2008年5月3日 #
想知道别人用Delphi开发的程序用了哪些第三方控件吗,用这个工具就对了。
工具支持文件拖放,很方便的。
对于破解者来说,可以很容易看到该软件作者是否使用了常见的加密相关算法:比如md5, rsa, des, blowfish, sha
下载:DUnitID
FlashFXP:
FTPRush:
History:
2011-05-16 DUnitID 0.17.4725 released to public.
2010-07-25 DUnitID 0.17.4690 released to public.
2009-08-19 DUnitID 0.17.4619 released to public.
2008-11-24 DUnitID 0.17.3298 released to public.
2008-07-12 DUnitID 0.17.2654 released to public.
2008-05-03 DUnitID 0.17.2388 released to public.
posted @ 2008-05-03 10:56 Icebird 阅读(1397) 评论(3) 编辑
2008年4月28日 #
posted @ 2008-04-28 15:00 Icebird 阅读(511) 评论(1) 编辑
2008年4月16日 #
posted @ 2008-04-16 17:19 Icebird 阅读(2252) 评论(0) 编辑
2008年3月25日 #
posted @ 2008-03-25 12:20 Icebird 阅读(2225) 评论(2) 编辑
2008年3月23日 #
posted @ 2008-03-23 22:17 Icebird 阅读(4080) 评论(13) 编辑
2008年3月22日 #
posted @ 2008-03-22 11:24 Icebird 阅读(1040) 评论(3) 编辑