1

I just installed Cygwin and would like to use that for ST3's build system instead of CMD. I can't seem to find good documentation about it. Anyone have any ideas?

1 Answer 1

4

I just had the same question and solved it with reading some related Question-Thread on Stackoverflow, which I listed at the End of my answer.

Overview of what I answer:

Working Solution to get Sublime Text to Build through Cygwin.


1. Create shell-script file SublimeTextBuildScript.sh

#!/usr/bin/bash -l

cd "/cygdrive/x/cheatsheet-template"
ls -lha 
make

1.1 Optional: Switch the line-ending

Changing Lineending Setting in Sublime Text - Trouble with written shell-scripts from/via Sublime Text

Solves: Troubles while executing the shell-script with Line-endings. I saw some error-messages with "\r" in the message while testing.

1.2 Helpfully: Mintty Command Line Options

Helpfully to get it done: Mintty Command Line Options

2. (Test-)Command for SublimeText Custom Build System:

D:\Applications\cygwin64\bin\mintty.exe -h always /cygdrive/d/Applications/Hochguertel/bin/SublimeTextBuildScript.sh

2.1 Testing result

Testing your Solution (Build-Script) from/via Windows Command Shell

3. Put it all together

3.1 Create an Build System

Sublime Text -> Tools -> Build-System -> New Build System...

Sublime Text -> Tools -> Build-System -> New Build System...

3.2 Configure the Build System

{
    "shell_cmd": "D:\\Applications\\cygwin64\\bin\\mintty.exe -h always
 /cygdrive/d/Applications/Hochguertel/bin/SublimeTextBuildScript.sh"
}

Configuration of the new Build System in Sublime 3 with Cygwin (Mintty.exe)

3.3 Save the configurated Build System

File-Extension: .sublime-build

Filename: Cheatsheet Build.sublime-build

Save the Cygwin (Mintty.exe) Sublime Text Build System - Cheatsheet Build.sublime-build

3.4 Activating the created Build System

Sublime Text -> Tools -> Build System -> "Cheatsheet Build"

Selecting the created Build System

4.0 Testing the Cygwin Environment Build System via Sublime Text

Sublime Text -> Tools -> Build

Run Build

Working Cygwin Build System Solution with Sublime Text:

Working Cygwin Build System Solution with Sublime Text

Sources of information (Stackoverflow Links)

HTH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.