mac下在ntfs下建立软链接的问题

iman123 发布于 2014/04/01 21:45
阅读 963
收藏 0

我在Mac系统上把一个很大的游戏(本地硬盘不够用了)解压到移动硬盘上,结果双击那个app文件(夹)运行程序,提示"不能运行程序....已损坏...",显示包内容查看是因为Info.plist的软链接有问题。
正确的连接(在dmg文件里)是

Info.plist -> ./MacOS/Info.plist
但复制出来是

Info.plist -> .:MacOS:Info.plist
我又重新建立软链接,使用了一下方式
1. ln ./MacOS/Info.plist Info.plist        生成 Info.plist -> .:MacOS:Info.plist
1. ln "./MacOS/Info.plist" Info.plist      生成 Info.plist -> .:MacOS:Info.plist
1. ln MacOS/Info.plist Info.plist
          生成 Info.plist -> MacOS:Info.plist
最终我实在忍无可忍了,写了一个简单的c程序,调用symlink.c

#include <stdio.h>
#include <unistd.h>

int main(int argc, char * argv[]) {
    printf("argv[1]: %s, argv[2]: %s\n", argv[1], argv[2]);
    int result = symlink(argv[1], argv[2]);
    if (result) {
        printf("create symbol link failed\n");
    } else {
        printf("create symbol link successfully\n");
    }
    return 0;
}



./symlink  MacOS/Info.plist Info.plist, 但还是生成   Info.plist -> MacOS:Info.plist

实在无语,最后使用了硬链接的方式,直接运行app里面的(Info.plist里
CFBundleExecutable指定的 )可执行程序又报


$ ./csgo.sh 
No matching processes belonging to you were found
No matching processes belonging to you were found
dyld: Library not loaded: @loader_path/crashhandler.dylib
  Referenced from: /Volumes/Liu.D.H/game/Counter-Strike Global Offensive.app/Contents/MacOS/osx32/steam
  Reason: no suitable image found.  Did find:
	/Volumes/Liu.D.H/game/Counter-Strike Global Offensive.app/Contents/MacOS/osx32/crashhandler.dylib: unknown file type, first eight bytes: 0x30 0x30 0x34 0x32 0x3B 0x35 0x33 0x33
	/Volumes/Liu.D.H/game/Counter-Strike Global Offensive.app/Contents/MacOS/osx32/crashhandler.dylib: unknown file type, first eight bytes: 0x30 0x30 0x34 0x32 0x3B 0x35 0x33 0x33
	/Volumes/Liu.D.H/game/Counter-Strike Global Offensive.app/Contents/MacOS/osx32/crashhandler.dylib: unknown file type, first eight bytes: 0x30 0x30 0x34 0x32 0x3B 0x35 0x33 0x33
Failed to load the launcher (dlopen(bin/launcher.dylib, 2): no suitable image found.  Did find:
	/Volumes/Liu.D.H/game/Counter-Strike Global Offensive.app/Contents/MacOS/SteamApps/common/Counter-Strike Global Offensive/bin/launcher.dylib: unknown file type, first eight bytes: 0x30 0x30 0x34 0x32 0x3B 0x35 0x33 0x33
	./bin/launcher.dylib: unknown file type, first eight bytes: 0x30 0x30 0x34 0x32 0x3B 0x35 0x33 0x33
	bin/launcher.dylib: unknown file type, first eight bytes: 0x30 0x30 0x34 0x32 0x3B 0x35 0x33 0x33)
No matching processes belonging to you were found
./csgo.sh: line 66: 25859 Trace/BPT trap: 5       ${DEBUGGER} "${STEAMROOT}"/${PLATFORM}/${STEAMEXE}



这类错误找不到相关信息啊~~~
dylib: unknown file type, first eight bytes




加载中
返回顶部
顶部