• mac通过wine运行windows程序(将文件关联到windows程序notepad++)


    windows程序功能强大且已经习惯使用了,用mac总感觉不给力,例如记事本工具Notepad++就非常优秀。下面介绍如何在mac系统下通过wine来安装使用notepadd++程序。

    1.安装wine

    在Mac上安装Wine (用于运行exe程序)

    2.安装notepad++

    https://notepad-plus-plus.org/

    找到dowload,找到Notepad++ zip package 32-bit x86 版本下载

    解压到某个文件夹,例如:/Users/hdwang/App

    复制运行文件的全路径:/Users/hdwang/App/npp.7.4.2.bin/notepad++.exe

    3.运行notepad++

    wine /Users/hdwang/App/npp.7.4.2.bin/notepad++.exe
     
    4.中文无法输入解决

    彻底消除wine中文乱码,QQ,kugoo等等

    5.创建快捷方式到mac桌面

    (1) 建立shell脚本:例如,notepad.sh 内容为 wine /Users/hdwang/App/npp.7.4.2.bin/notepad++.exe
    (2) 创建快捷方式 ln -s /Users/hdwang/.wine/programs/notepad.sh ~/Desktop/notepad.sh
    (3) 设置sh默认打开方式为终端(右击文件->显示简介->打开方式->全部更改)
     
    6.文本文件关联到windows程序notepad++
     
    我使用AppleScript应用程序解决了此问题。步骤如下:
     
    打开Finder->应用程序->Automator->打开->选择新建应用程序->实用工具->运行Apple Script->拖动到右边
    输入以下内容:

    on run {inputparameters}

    tell application "Finder"

    --set dirPath to (get insertion location)

    set filePathAlias to selection as alias

    set filePath to POSIX path of filePathAlias

    end tell

     

    --display dialog "打开" & filePath

     

    (* 调用shell脚本 *)

    do shell script "/usr/local/bin/wine /Users/hdwang/App/npp.7.4.2.bin/notepad++.exe "" & filePath & """

     

    return input

    end run

    保存到应用程序即可(notepad.app)。

    然后,你对着txt文件,设置一下打开方式(notepad.app),以后就可以双击txt文件打开notepad++了,棒不棒!
     
  • 相关阅读:
    Vue vue-resource三种请求数据方式pet,post,jsonp
    Vue 各个阶段生命周期函数
    Vue v-if和v-show的使用.区别
    vue v-for循环中key属性的使用
    vue v-for循环使用
    Vue 设置style属性
    Vue 设置class样式
    Vue 双向数据绑定v-model
    Vue的事件修饰符
    关于“svn: Can't connect to host '*.*.*.*': 由于连接方在一段时间后没有正确答复或连接”的解决方法
  • 原文地址:https://www.cnblogs.com/hdwang/p/7211164.html
Copyright © 2020-2023  润新知