install.sh 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/bin/bash
  2. # Set processor architecture
  3. if [ -z $CPU_TARGET ]; then
  4. export CPU_TARGET=$(fpc -iTP)
  5. fi
  6. export DC_APP_DIR=$1/doublecmd.app
  7. export DC_INSTALL_DIR=$DC_APP_DIR/Contents/MacOS
  8. mkdir -p $DC_INSTALL_DIR
  9. mkdir -p $DC_INSTALL_DIR/plugins
  10. # WCX plugins directories
  11. mkdir -p $DC_INSTALL_DIR/plugins/wcx
  12. mkdir -p $DC_INSTALL_DIR/plugins/wcx/cpio
  13. mkdir -p $DC_INSTALL_DIR/plugins/wcx/deb
  14. mkdir -p $DC_INSTALL_DIR/plugins/wcx/rpm
  15. mkdir -p $DC_INSTALL_DIR/plugins/wcx/unrar
  16. mkdir -p $DC_INSTALL_DIR/plugins/wcx/zip
  17. # WDX plugins directories
  18. mkdir -p $DC_INSTALL_DIR/plugins/wdx
  19. mkdir -p $DC_INSTALL_DIR/plugins/wdx/scripts
  20. mkdir -p $DC_INSTALL_DIR/plugins/wdx/rpm_wdx
  21. mkdir -p $DC_INSTALL_DIR/plugins/wdx/deb_wdx
  22. mkdir -p $DC_INSTALL_DIR/plugins/wdx/audioinfo
  23. # WFX plugins directories
  24. mkdir -p $DC_INSTALL_DIR/plugins/wfx
  25. mkdir -p $DC_INSTALL_DIR/plugins/wfx/ftp
  26. # Copy files
  27. cp -r doublecmd.app/* $DC_APP_DIR/
  28. cp -a doublecmd $DC_INSTALL_DIR/
  29. cp -a doublecmd.help $DC_INSTALL_DIR/
  30. cp -a doublecmd.zdli $DC_INSTALL_DIR/
  31. cp -a doublecmd.ext.example $DC_INSTALL_DIR/
  32. cp -a pixmaps.txt $DC_INSTALL_DIR/
  33. cp -a multiarc.ini $DC_INSTALL_DIR/
  34. cp -a pinyin.tbl $DC_INSTALL_DIR/
  35. # Copy plugins
  36. # WCX
  37. install -m 644 plugins/wcx/cpio/cpio.wcx $DC_INSTALL_DIR/plugins/wcx/cpio/
  38. install -m 644 plugins/wcx/deb/deb.wcx $DC_INSTALL_DIR/plugins/wcx/deb/
  39. install -m 644 plugins/wcx/rpm/rpm.wcx $DC_INSTALL_DIR/plugins/wcx/rpm/
  40. cp -r plugins/wcx/unrar/language $DC_INSTALL_DIR/plugins/wcx/unrar
  41. install -m 644 plugins/wcx/unrar/unrar.wcx $DC_INSTALL_DIR/plugins/wcx/unrar/
  42. cp -r plugins/wcx/zip/language $DC_INSTALL_DIR/plugins/wcx/zip
  43. install -m 644 plugins/wcx/zip/zip.wcx $DC_INSTALL_DIR/plugins/wcx/zip/
  44. # WDX
  45. install -m 644 plugins/wdx/rpm_wdx/rpm_wdx.wdx $DC_INSTALL_DIR/plugins/wdx/rpm_wdx/
  46. install -m 644 plugins/wdx/deb_wdx/deb_wdx.wdx $DC_INSTALL_DIR/plugins/wdx/deb_wdx/
  47. install -m 644 plugins/wdx/scripts/* $DC_INSTALL_DIR/plugins/wdx/scripts/
  48. install -m 644 plugins/wdx/audioinfo/audioinfo.wdx $DC_INSTALL_DIR/plugins/wdx/audioinfo/
  49. install -m 644 plugins/wdx/audioinfo/audioinfo.lng $DC_INSTALL_DIR/plugins/wdx/audioinfo/
  50. # WFX
  51. cp -r plugins/wfx/ftp/language $DC_INSTALL_DIR/plugins/wfx/ftp
  52. install -m 644 plugins/wfx/ftp/ftp.wfx $DC_INSTALL_DIR/plugins/wfx/ftp/
  53. install -m 644 plugins/wfx/ftp/src/ftp.ico $DC_INSTALL_DIR/plugins/wfx/ftp/
  54. # Copy documentation
  55. mkdir -p $DC_INSTALL_DIR/doc
  56. cp -a doc/*.txt $DC_INSTALL_DIR/doc/
  57. # Copy scripts
  58. mkdir -p $DC_INSTALL_DIR/scripts
  59. cp -a scripts/terminal.sh $DC_INSTALL_DIR/scripts/
  60. # Copy directories
  61. cp -r language $DC_INSTALL_DIR/
  62. cp -r pixmaps $DC_INSTALL_DIR/
  63. cp -r highlighters $DC_INSTALL_DIR/
  64. # Copy libraries
  65. cp -a *.dylib $DC_INSTALL_DIR/