zoukankan      html  css  js  c++  java
  • 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++了,棒不棒!
     
  • 相关阅读:
    【HANA系列】SAP HANA跟我学HANA系列之创建计算视图一
    【HANA系列】SAP HANA计算视图中的RANK使用方法
    【ABAP系列】SAP ABAP7.40新语法简介第一篇
    【ABAP系列】SAP ABAP7.40新语法简介第二篇
    【MM系列】SAP 根据PO查找对应的打印FORM
    【ABAP系列】SAP BOM反查
    【FICO系列】SAP FICO折旧记账时出现错误:没有找到与所做选择一致的数据
    【PI系列】SAP IDOC发送状态03,PI没有收到消息的解决办法
    Struts2_属性驱动
    struts2_struts.xml配置文件讲解
  • 原文地址:https://www.cnblogs.com/hdwang/p/7211164.html
Copyright © 2011-2022 走看看