deepin系统使用wine安装navicat,navicat不能复制,粘贴到deepin系统的解决方法 (同样使用于其他wine安装的软件)
1. 切换目录到/opt/deepinwine/apps,这里存放了deepin预置的wine程序,新建一个文件夹(注意sudo)
mkdir Deepin-Navicat
cp Deepin-WeChat/run.sh Deepin-navicat
deepin.jpg
2. 切换到/opt/deepinwine/apps/Deepin-Navicat-TIM中的run.sh到此处,将其中的BOTTLENAME改为:"Deepin-Navicat"(就是刚才重命名的名字),然后保存
3. 拷贝/usr/share/applications/中的deepin.com.qq.office.desktop到此处,重命名为:deepin.com.navicat.desktop,将其中的TIM都改为Navicat,然后保存,并复制到//usr/share/applications/以增加开始菜单宏的图标和任务栏图标,同时修改其中的icon路径为你自定义的图片即可。
4. 切换到安装了wine程序的主目录下的.wine目录:/home/用户名/.wine,将drive_c目录直接打包为files.7z并移动到:/opt/deepinwine/apps/Deepin-Navicat (注意:根据自己安装软件的文件)
apt-get install p7zip
cd /home/×××/ide/navicat121_premium_cs_x64/wine
7za a -r files.7z drive_c
cp files.7z /opt/deepinwine/apps/Deepin-Navicat/
5. 切换到/opt/deepinwine/tools,修改run.sh,需要修改两处:
- 复制并修改CallTIM,增加函数CallNavicat,主要是文件名和程序路径两处要改
CallNavicat()
{
if [ ! -f "$WINEPREFIX/../.Navicat_run" ]; then
debug_log "first run time"
/opt/deepinwine/tools/add_hotkeys
/opt/deepinwine/tools/fontconfig
# If the bottle not exists, run reg may cost lots of times
# So create the bottle befor run reg
env WINEPREFIX="$WINEPREFIX" $WINE_CMD uninstaller --list
touch $WINEPREFIX/../.Navicat_run
fi
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
#Auto kill block process
/opt/deepinwine/tools/kill.sh 程序名(带扩展名) block
#Support use native file dialog
export ATTACH_FILE_DIALOG=1
debug_log "start running..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "wine程序的完整路径" &
#disable Tencent MiniBrowser
_DeleteRegistry "HKCU\\Software\\Tencent\\MiniBrowser"
fi
}
- 在CallApp()中增加一段:
"Deepin-Navicat")
CallTM "$1" "$2"
;;
6. 最后重启系统运行navicat,复制粘贴一切正常!!
init 6
navicat&
网友评论