navicat-patcher.sh 838 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. cd `dirname "$0"`
  3. navicat_root=`pwd`
  4. # Wine environment variables
  5. WINEDIR="wine"
  6. export LANG="en_US.UTF-8"
  7. export PATH="$navicat_root/$WINEDIR/bin":"$navicat_root":"$navicat_root/$WINEDIR/drive_c/windows":"$PATH"
  8. export LD_LIBRARY_PATH="$navicat_root/$WINEDIR/lib":"$navicat_root/lib":"$LD_LIBRARY_PATH"
  9. export WINEDLLPATH="$navicat_root/$WINEDIR/lib/wine"
  10. export WINELOADER="$navicat_root/$WINEDIR/bin/wine64"
  11. export WINESERVER="$navicat_root/$WINEDIR/bin/wineserver"
  12. export WINEPREFIX="$HOME/.navicat64"
  13. # 将斜线替换为反斜线
  14. navicat_root_back_slash=${navicat_root//\//\\}
  15. # 前缀
  16. prefix='Z:\'
  17. # 后缀
  18. suffix='\Navicat'
  19. # wine环境中的navicat路径
  20. navicat_path="$prefix$navicat_root_back_slash$suffix"
  21. # wine执行navicat-patcher.exe
  22. exec "${WINELOADER:-wine}" "navicat-patcher.exe" "$navicat_path"