| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# Set processor architecture |
| 4 |
if [ -z $CPU_TARGET ]; then |
| 5 |
export CPU_TARGET=$(fpc -iTP) |
| 6 |
fi |
| 7 |
|
| 8 |
export DC_APP_DIR=$1/doublecmd.app |
| 9 |
export DC_INSTALL_DIR=$DC_APP_DIR/Contents/MacOS |
| 10 |
|
| 11 |
mkdir -p $DC_INSTALL_DIR |
| 12 |
|
| 13 |
mkdir -p $DC_INSTALL_DIR/plugins |
| 14 |
|
| 15 |
# WCX plugins directories |
| 16 |
mkdir -p $DC_INSTALL_DIR/plugins/wcx |
| 17 |
mkdir -p $DC_INSTALL_DIR/plugins/wcx/base64 |
| 18 |
mkdir -p $DC_INSTALL_DIR/plugins/wcx/cpio |
| 19 |
mkdir -p $DC_INSTALL_DIR/plugins/wcx/deb |
| 20 |
mkdir -p $DC_INSTALL_DIR/plugins/wcx/rpm |
| 21 |
mkdir -p $DC_INSTALL_DIR/plugins/wcx/unrar |
| 22 |
mkdir -p $DC_INSTALL_DIR/plugins/wcx/zip |
| 23 |
# WDX plugins directories |
| 24 |
mkdir -p $DC_INSTALL_DIR/plugins/wdx |
| 25 |
mkdir -p $DC_INSTALL_DIR/plugins/wdx/scripts |
| 26 |
mkdir -p $DC_INSTALL_DIR/plugins/wdx/rpm_wdx |
| 27 |
mkdir -p $DC_INSTALL_DIR/plugins/wdx/deb_wdx |
| 28 |
mkdir -p $DC_INSTALL_DIR/plugins/wdx/audioinfo |
| 29 |
# WFX plugins directories |
| 30 |
mkdir -p $DC_INSTALL_DIR/plugins/wfx |
| 31 |
mkdir -p $DC_INSTALL_DIR/plugins/wfx/ftp |
| 32 |
# WLX plugins directories |
| 33 |
mkdir -p $DC_INSTALL_DIR/plugins/wlx |
| 34 |
mkdir -p $DC_INSTALL_DIR/plugins/wlx/MacPreview |
| 35 |
|
| 36 |
# Copy files |
| 37 |
cp -r doublecmd.app/* $DC_APP_DIR/ |
| 38 |
cp -a doublecmd $DC_INSTALL_DIR/ |
| 39 |
cp -a doublecmd.help $DC_INSTALL_DIR/ |
| 40 |
cp -a doublecmd.zdli $DC_INSTALL_DIR/ |
| 41 |
cp -a pinyin.tbl $DC_INSTALL_DIR/ |
| 42 |
|
| 43 |
# Copy plugins |
| 44 |
|
| 45 |
# WCX |
| 46 |
install -m 644 plugins/wcx/base64/base64.wcx $DC_INSTALL_DIR/plugins/wcx/base64/ |
| 47 |
install -m 644 plugins/wcx/cpio/cpio.wcx $DC_INSTALL_DIR/plugins/wcx/cpio/ |
| 48 |
install -m 644 plugins/wcx/deb/deb.wcx $DC_INSTALL_DIR/plugins/wcx/deb/ |
| 49 |
install -m 644 plugins/wcx/rpm/rpm.wcx $DC_INSTALL_DIR/plugins/wcx/rpm/ |
| 50 |
cp -r plugins/wcx/unrar/language $DC_INSTALL_DIR/plugins/wcx/unrar |
| 51 |
install -m 644 plugins/wcx/unrar/unrar.wcx $DC_INSTALL_DIR/plugins/wcx/unrar/ |
| 52 |
cp -r plugins/wcx/zip/language $DC_INSTALL_DIR/plugins/wcx/zip |
| 53 |
install -m 644 plugins/wcx/zip/zip.wcx $DC_INSTALL_DIR/plugins/wcx/zip/ |
| 54 |
# WDX |
| 55 |
install -m 644 plugins/wdx/rpm_wdx/rpm_wdx.wdx $DC_INSTALL_DIR/plugins/wdx/rpm_wdx/ |
| 56 |
install -m 644 plugins/wdx/deb_wdx/deb_wdx.wdx $DC_INSTALL_DIR/plugins/wdx/deb_wdx/ |
| 57 |
install -m 644 plugins/wdx/scripts/* $DC_INSTALL_DIR/plugins/wdx/scripts/ |
| 58 |
install -m 644 plugins/wdx/audioinfo/audioinfo.wdx $DC_INSTALL_DIR/plugins/wdx/audioinfo/ |
| 59 |
install -m 644 plugins/wdx/audioinfo/audioinfo.lng $DC_INSTALL_DIR/plugins/wdx/audioinfo/ |
| 60 |
# WFX |
| 61 |
cp -r plugins/wfx/ftp/language $DC_INSTALL_DIR/plugins/wfx/ftp |
| 62 |
install -m 644 plugins/wfx/ftp/ftp.wfx $DC_INSTALL_DIR/plugins/wfx/ftp/ |
| 63 |
install -m 644 plugins/wfx/ftp/src/ftp.ico $DC_INSTALL_DIR/plugins/wfx/ftp/ |
| 64 |
# WLX |
| 65 |
install -m 644 plugins/wlx/MacPreview/MacPreview.wlx $DC_INSTALL_DIR/plugins/wlx/MacPreview/ |
| 66 |
|
| 67 |
# Copy documentation |
| 68 |
mkdir -p $DC_INSTALL_DIR/doc |
| 69 |
cp -a doc/*.txt $DC_INSTALL_DIR/doc/ |
| 70 |
|
| 71 |
# Copy scripts |
| 72 |
mkdir -p $DC_INSTALL_DIR/scripts |
| 73 |
cp -a scripts/terminal.sh $DC_INSTALL_DIR/scripts/ |
| 74 |
|
| 75 |
# Copy directories |
| 76 |
cp -r default $DC_INSTALL_DIR/ |
| 77 |
cp -r language $DC_INSTALL_DIR/ |
| 78 |
cp -r pixmaps $DC_INSTALL_DIR/ |
| 79 |
cp -r highlighters $DC_INSTALL_DIR/ |
| 80 |
|
| 81 |
# Copy libraries |
| 82 |
cp -a *.dylib $DC_INSTALL_DIR/ |
| 83 |
|
| 84 |
# Install instruction |
| 85 |
cp -r install/darwin/dmg/. $1 |
| 86 |
|