Skip to content

Commit

Permalink
Update mincmd.ahk
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick768 authored Nov 30, 2020
1 parent c99f1f4 commit cb7f749
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions mincmd.ahk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;#NoTrayIcon
#NoTrayIcon
#NoEnv
#SingleInstance, Force

Expand All @@ -14,17 +14,19 @@ If (not FileExist("clink*.*") and not FileExist("cygwin1.dll") and not FileExist
DownloadLatestMintty()
DownloadLatestWinPty()
DownloadLatestClink()
Sleep, 1000
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

If (InStr(FileExist("profile"), "D"))
If (not InStr(FileExist("profile"), "D"))
FileCreateDir, profile

SetWorkingDir, profile
If not FileExist("mincmd_settings.ini")
{
SetWorkingDir, profile
If not FileExist("mincmd_settings.ini")
{
FileAppend,
(
FileAppend,
(
--- Settings ---
registerContextMenu=false

Expand All @@ -48,17 +50,9 @@ set "HOME=`%cd`%\home\`%USERNAME`%"
popd
"`%cygwinDir`%\bash" --login -i
----- AliasScript_Stop -----
), mincmd_settings.ini
}
SetWorkingDir, %A_ScriptDir%
}
else
{
FileCreateDir, profile
SetWorkingDir, profile
FileAppend,, mincmd_settings.ini
SetWorkingDir, %A_ScriptDir%
), mincmd_settings.ini
}
SetWorkingDir, %A_ScriptDir%

contextMenu = false

Expand Down Expand Up @@ -367,7 +361,7 @@ DownloadLatestWinPty()
URLDownloadToFile, https://github.com/rprichard/winpty/releases/download/%winPty_version%/winpty-%winPty_version%-cygwin-%cygWin_version%-x64.tar.gz, winPty.tar.gz

DownloadLatestTarTool()
RunWait, TarTool.exe winPty.tar.gz .\
RunWait, TarTool.exe winPty.tar.gz .\,, Hide

winPtyDir = winpty-%winPty_version%-cygwin-%cygWin_version%-x64
FileCopy, %winPtyDir%\bin\winpty.*, %A_ScriptDir%
Expand Down

0 comments on commit cb7f749

Please sign in to comment.