本帖最后由 作者 于 2008-3-2 21:19:30 编辑
各位大师们,救救我吧! 使用秋枫的“二次开发安装程序”,其他一切正常,就是程序自动添加支持文件搜索路径时,出现错误,程序只自动添加根目录和最后一个目录,代码如下: ;;; 移除支持文件搜索路径 ;;; --------------------------------------------------------------------------------- (defun RemoveSupportPath (PathToRemove / supportlist) (setq supportlist (strparse (getenv "ACAD") ";")) (setq supportlist (vl-remove "" supportlist)) (setq supportlist (vl-remove-if '(lambda (x) (= (strcase x) (strcase PathToRemove))) supportlist ) ) (setenv "ACAD" (strUnParse supportlist ";")) ) ;;; 添加支持文件搜索路径 ;;; --------------------------------------------------------------------------------- ;;; note: 第二个参数如果为真, 插最前,否则插最后 ;;; (defun AddSupportPath (PathToAdd isFirst / supportlist) (RemoveSupportPath PathToAdd) (setq supportlist (strparse (getenv "ACAD") ";")) (setq supportlist (vl-remove "" supportlist)) (if isFirst (setq supportlist (cons PathToAdd supportlist)) (setq supportlist (append supportlist (list PathToAdd))) ) (setenv "ACAD" (strUnParse supportlist ";")) ) ;;; 初始化主函数 ;;; --------------------------------------------------- (defun Init_scei () ;; 添加支持路径 (AddSupportPath (GetsceiPath) nil) (AddSupportPath (strcat (GetsceiPath) "\\1") nil) (AddSupportPath (strcat (GetsceiPath) "\\2") nil) (AddSupportPath (strcat (GetsceiPath) "\\3") nil) (AddSupportPath (strcat (GetsceiPath) "\\4") nil) 以上,我要添加的是5个目录,分别是:根目录和1、2、3、4这些文件夹,但是安装后,只添加了2个目录,其中文件夹1、2、3没有添加进去(也就是程序只自动添加根目录和最后一个目录),反复操作了数百变了,还是失败。 问过秋枫本人,他说这不是这个安装制作程序的问题,是LISP的问题,但是以上这些代码都是从他给的样列中,提取出来的,他说有问题让我来这里求助!谢谢各位版主、高手们,帮忙想想办法!这次先谢谢了! |