zoukankan      html  css  js  c++  java
  • msys + mintty

    最近需要频繁的使用msys+mingw。下面是我从sourceforge上下载的“Personal Builds”:

    Mingw64:   mingw64-x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z

    Msys:      msys+7za+wget+svn+git+mercurial+cvs-rev13.7z

    msys.bat 默认使用的 terminal 是sh.exe,功能有限,用久了还挺不方便的:

    1. line buffer 很小,看不到以前的cmdline history
    2. 不支持跨行复制,不支持鼠标右键复制黏贴
    3. vim使用TagList插件后,屏幕就全乱了

    昨晚折腾了一下,换成 “msys.bat -mintty” ,瞬间舒服了很多。

    为了分清mingw64还是mingw32, 本想将msys.bat里的 “$MSYSTEM” 换成 “MINGW64”

    - if "x%MSYSTEM%" == "x" set MSYSTEM=MINGW32
    - if "%1" == "MINGW32" set MSYSTEM=MINGW32
    - if "%1" == "MSYS" set MSYSTEM=MSYS
    
    + if "x%MSYSTEM%" == "x" set MSYSTEM=MINGW64
    + if "%1" == "MINGW32" set MSYSTEM=MINGW64
    + if "%1" == "MSYS" set MSYSTEM=MSYS
    

    结果导致编译 ffmpeg 在 configure 时出错

    $ ./configure
    Unknown OS 'mingw64_nt-6.1'.
    
    If you think configure made a mistake, make sure you are using the latest
    version from Git.  If the latest version fails, report the problem to the
    ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
    Include the log file "config.log" produced by configure as this will help
    solve the problem.

    看了一下 configure 的源码

    exesuf() {
        case $1 in
            mingw32*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
        esac
    }

    由于直接使用 “mingw32*” 而不是 “mingw*” 进行匹配,无法支持mingw64系统。为了避免麻烦,还是将 “$MSYSTEM” 改回 “MINGW32”。取而代之,通过修改 “$PS1” 来区分系统环境(msys/mingw32/mingw64)

  • 相关阅读:
    土豆网自动播放代码
    js倒计时小插件(兼容大部分浏览器)
    带按钮的网页播放器代码(附文件)
    列出目录下所有文件
    day19 进度条 & 随机验证码
    day18 json与pickle
    day14.2_三元表达式、列表生成式
    day14.1_生成器
    day13_迭代器
    day12.2_完善装饰器
  • 原文地址:https://www.cnblogs.com/jogh/p/4845671.html
Copyright © 2011-2022 走看看