create_snapshot.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/bin/bash
  2. # Set Double Commander version
  3. DC_VER=1.1.0
  4. # The new package will be saved here
  5. PACK_DIR=$PWD/doublecmd-release
  6. # Temp dir for creating *.dmg package
  7. BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
  8. # Save revision number
  9. DC_REVISION=$(install/linux/update-revision.sh ./ ./)
  10. # Set widgetset
  11. export lcl=cocoa
  12. # Update application bundle version
  13. defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleVersion $DC_REVISION
  14. defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleShortVersionString $DC_VER
  15. plutil -convert xml1 $(pwd)/doublecmd.app/Contents/Info.plist
  16. chmod 644 $(pwd)/doublecmd.app/Contents/Info.plist
  17. build_doublecmd()
  18. {
  19. # Build all components of Double Commander
  20. ./build.sh release
  21. # Create *.dmg package
  22. mkdir -p $BUILD_PACK_DIR
  23. install/darwin/install.sh $BUILD_PACK_DIR
  24. pushd $BUILD_PACK_DIR
  25. mv doublecmd.app 'Double Commander.app'
  26. codesign --deep --force --verify --verbose --sign '-' 'Double Commander.app'
  27. popd
  28. install/darwin/create-dmg/create-dmg \
  29. --volname "Double Commander" \
  30. --volicon "$BUILD_PACK_DIR/.VolumeIcon.icns" \
  31. --background "$BUILD_PACK_DIR/.background/bg.jpg" \
  32. --window-pos 200 200 \
  33. --window-size 680 366 \
  34. --text-size 16 \
  35. --icon-size 128 \
  36. --icon "Double Commander.app" 110 120 \
  37. --app-drop-link 360 120 \
  38. --icon "install.txt" 566 123 \
  39. --icon ".background" 100 500 \
  40. "$PACK_DIR/doublecmd-$DC_VER-$DC_REVISION.$lcl.$CPU_TARGET.dmg" \
  41. "$BUILD_PACK_DIR/"
  42. # Clean DC build dir
  43. ./clean.sh
  44. rm -rf $BUILD_PACK_DIR
  45. }
  46. mkdir -p $PACK_DIR
  47. echo $DC_REVISION > $PACK_DIR/revision.php
  48. # Set processor architecture
  49. export CPU_TARGET=aarch64
  50. # Set minimal Mac OS X target version
  51. export MACOSX_DEPLOYMENT_TARGET=11.0
  52. build_doublecmd
  53. # Set processor architecture
  54. export CPU_TARGET=x86_64
  55. # Set minimal Mac OS X target version
  56. export MACOSX_DEPLOYMENT_TARGET=10.11
  57. build_doublecmd