论坛风格切换切换到宽版
  • 173阅读
  • 0回复

nsis打包单文件出错,求教 [复制链接]

上一主题 下一主题
离线风爱朴
 

发帖
3
金钱
20
威望
2
只看楼主 倒序阅读 0 发表于: 01-28
本人新手,nsis打包,未提示有错误,可是却执行程序时候出现N个进程,直至死机,软件也未运行。
2个都是,代码如下,仿照网上教程打包的,求教了,谢谢:
第一个:
  1. !define PRODUCT_NAME "Dexpot"
  2. !define PRODUCT_VERSION "1.5"
  3. !define PRODUCT_PUBLISHER "whlime"  
  4. !include "MUI.nsh"
  5. SetCompressor /SOLID lzma
  6. SetCompressorDictSize 32
  7. VIProductVersion "2012.01.27.0"
  8. VIAddVersionKey /LANG=2052 "roductName" "Dexpot"
  9. VIAddVersionKey /LANG=2052  "LegalTrademarks" "everyone"
  10. VIAddVersionKey /LANG=2052 "FileDescription" "Dexpot 1.5"
  11. VIAddVersionKey /LANG=2052 "FileVersion" "${VER}"
  12. VIAddVersionKey /LANG=2052 "OriginalFilename" "Dexpot.exe"
  13. !insertmacro MUI_LANGUAGE "SimpChinese"
  14. Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
  15. OutFile "dexpot.exe"
  16. InstallDir "$TEMP\Dexpot"
  17. Icon "Dexpot.ico"
  18. SilentInstall silent
  19. Section "Dexpot" SEC01
  20. SetOutPath "$INSTDIR"
  21. SetOverwrite on
  22. file /r "*.*"
  23. Execwait "$TEMP\Dexpot\Dexpot.exe"
  24. RMDir /r "$TEMP\Dexpot"
  25. SectionEnd
第二个:
  1. Name "Dexpot"
  2. Outfile "Dexpot.exe"                    
  3. InstallDir "$PROGRAMFILES\dexpot"              
  4. Setcompressor /SOLID lzma              
  5. Setcompressordictsize 32              
  6. Setdatablockoptimize on                
  7. Showinstdetails nevershow
  8. Icon "Dexpot.ico"                      
  9. Section "复制文件"
  10. SetOverwrite try                      
  11. SetOutPath "$INSTDIR"                
  12. File /r "*.*"                  
  13. SectionEnd
  14. Section "执行文件"
  15. ExecWait '"$INSTDIR\Dexpot.exe"'        
  16. SectionEnd
  17. Section "重启后自我删除"
  18. RMDir /r /REBOOTOK "$INSTDIR"        
  19. SetAutoClose true                    
  20. SectionEnd
  21. Function .oninit
  22. Setsilent silent                      
  23. Functionend

打包的是Dexpot,都是同一个程序,仿照网上2个教程写的,结果都是这样的结果:
[attachment=undefined]
求教了,谢谢!