mirror of
https://github.com/cmderdev/cmder.git
synced 2025-07-16 20:49:54 +08:00
Compare commits
156 Commits
v1.0.0-bet
...
v1.1.4
Author | SHA1 | Date | |
---|---|---|---|
8c6847ee0d | |||
f66f598fca | |||
de8d2d22f6 | |||
72c045dc2d | |||
5ee2fb2a8d | |||
2ba40773b3 | |||
662663813e | |||
2ec650557e | |||
932e517c2f | |||
6a9d6dd37e | |||
e9707b2022 | |||
ef91a9c272 | |||
9939b1ba7f | |||
c032b5f8a0 | |||
9ce90d337b | |||
2a722ee3f3 | |||
3cfd032007 | |||
21f0f1dbb2 | |||
38c13a7f4b | |||
97980f5f34 | |||
e3e1effef3 | |||
2542358965 | |||
6b37074dd5 | |||
1b7e647b4b | |||
e6618f21a3 | |||
56a9a2036f | |||
f6c3a0c390 | |||
46f6f677dc | |||
d5d8b0944b | |||
8e676b3fc7 | |||
b9379b3ae2 | |||
db49c14422 | |||
46bebee94c | |||
691000fa15 | |||
df064ec4be | |||
e1c60104ba | |||
3a8daf57f7 | |||
fa33052096 | |||
fe31accba4 | |||
ea22c658b7 | |||
303bfda521 | |||
1f8b0c009a | |||
cf74dba780 | |||
a9bfd2d2a2 | |||
b0b8eaef1e | |||
5243d8bb8d | |||
1225d410fa | |||
c661b1f300 | |||
4c1f96c51d | |||
f4b6d8f9a8 | |||
0314ee5d46 | |||
6a761a88c1 | |||
447be262f8 | |||
371ffbc069 | |||
6d0d93e0fd | |||
b4a264b1bc | |||
3bd0fe517f | |||
83cd726a41 | |||
b30056c4b3 | |||
7688823886 | |||
878499cc0b | |||
0f118fe42d | |||
f719f9d51f | |||
86d77b9e6b | |||
937df38131 | |||
4120875e33 | |||
c91f8ac461 | |||
c43ad3cb40 | |||
e0540e43da | |||
cfa0bc9a26 | |||
4ac8f5ad82 | |||
640bdba8bb | |||
88e17fc44a | |||
67bdd93c3e | |||
804126cf7d | |||
94f0ea5c1a | |||
71513486ee | |||
3aeae2871a | |||
d0e383e5c0 | |||
2c8364ce58 | |||
fc3422e1ba | |||
72aac17c3e | |||
feec00f233 | |||
d9a6bb7e5f | |||
d396dd9d33 | |||
4f5a96aec7 | |||
cbe2f25dcb | |||
fcea0b5b49 | |||
08e478f7a9 | |||
de30ed5424 | |||
27f0eb2c95 | |||
394c24eb16 | |||
d1d8c3ef76 | |||
4744fb1c61 | |||
3c979780f9 | |||
092c046456 | |||
c1029ab245 | |||
fc19a8b328 | |||
340d70a596 | |||
fa179f6528 | |||
e5e9e67ee7 | |||
8e0312aec4 | |||
8f6a473a40 | |||
2b12546cb0 | |||
ed42db82f6 | |||
5c20bbb08d | |||
56613b9758 | |||
1ef7ca682f | |||
9feec9e0c2 | |||
686e3516ed | |||
48e4046754 | |||
d3d2b80d88 | |||
6126437762 | |||
168958ce2b | |||
ee50cc5e7c | |||
f7d1dfa2b7 | |||
12d21de1c3 | |||
a231fd9f60 | |||
9d5d3e1556 | |||
d95f25207d | |||
f3d93c0f99 | |||
47b725bf0f | |||
6ae803987b | |||
027be08286 | |||
42bad3e509 | |||
2ac148ce22 | |||
55aef09412 | |||
0bde8b361a | |||
f9c6d61ee0 | |||
bbcbd2ece9 | |||
6f6d9f29ec | |||
4d926e0836 | |||
75cb46392e | |||
471e341a97 | |||
c2b37021d4 | |||
3fefa9698e | |||
14799b307d | |||
4c4930704f | |||
42d22f1e17 | |||
2d0a7093d4 | |||
f8b96665a8 | |||
049e54dfe0 | |||
dc0cc7350b | |||
8489977575 | |||
ee898d9d28 | |||
a516858048 | |||
4dc1065399 | |||
eaa78c6bf3 | |||
2521097f72 | |||
3704ff3e2e | |||
c2c0e1c3aa | |||
ec5f8f9808 | |||
aefb0f2709 | |||
2cceaaef23 | |||
2c0a6d095f | |||
e38aded028 |
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -3,4 +3,10 @@
|
|||||||
|
|
||||||
vendor/*
|
vendor/*
|
||||||
!vendor/*.md
|
!vendor/*.md
|
||||||
!vendor/*.bat
|
!vendor/*.bat
|
||||||
|
!vendor/*.json
|
||||||
|
|
||||||
|
config/.history
|
||||||
|
Thumbs.db
|
||||||
|
*.exe
|
||||||
|
build/
|
@ -1,2 +1,3 @@
|
|||||||
@echo off
|
@echo off
|
||||||
start vendor/ConEmu/ConEmu.exe /Title Cmder /LoadCfgFile ../../config/ConEmu.xml
|
SET CMDER_ROOT=%~dp0
|
||||||
|
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\ConEmu.xml"
|
||||||
|
33
Readme.md
33
Readme.md
@ -1,14 +1,14 @@
|
|||||||
# Cmder
|
# Cmder
|
||||||
|
|
||||||
**Yes, you can [download latest release](https://github.com/bliker/cmder/releases)**
|
Latest release is **[v1.1.4](https://github.com/bliker/cmder/releases/tag/v1.1.4)**
|
||||||
|
|
||||||
Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://code.google.com/p/conemu-maximus5/) with *major* config overhaul. Monokai color scheme, amazing [clink](https://code.google.com/p/clink/) and custom prompt layout.
|
Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://code.google.com/p/conemu-maximus5/) with *major* config overhaul. Monokai color scheme, amazing [clink](https://github.com/mridgers/clink) and custom prompt layout.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Why use it
|
## Why use it
|
||||||
|
|
||||||
The main advantage of Cmder is portablibity. It is designed to be totally self-container. With no external dependencies. That makes is great for **USB Sticks** or **Dropbox**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.
|
The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, that is makes it great for **USB Sticks** or **Dropbox**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -19,19 +19,34 @@ The main advantage of Cmder is portablibity. It is designed to be totally self-c
|
|||||||
|
|
||||||
*(There will be a version with installer)*
|
*(There will be a version with installer)*
|
||||||
|
|
||||||
|
## Integration
|
||||||
|
|
||||||
|
So you've experimented with cmder a little and want to give it a shot in a more permanent home;
|
||||||
|
|
||||||
|
### Shortcut to open Cmder in a chosen folder
|
||||||
|
|
||||||
|
1. Open a terminal as an Administrator
|
||||||
|
1. Navigate to the directory you have placed Cmder
|
||||||
|
1. Execute `.\cmder.exe /REGISTER ALL`*
|
||||||
|
|
||||||
|
In a file explorer window right click in or on a directory to see "Cmder Here" in the context menu.
|
||||||
|
|
||||||
|
*If you get a message "Access Denied" ensure you are executing the command in an Administrator prompt.
|
||||||
|
|
||||||
## Keyboard shortcuts
|
## Keyboard shortcuts
|
||||||
|
|
||||||
### Tab manipulation
|
### Tab manipulation
|
||||||
|
|
||||||
* `Ctrl + t` : new tab dialog (maybe you want to open cmd as admin?)
|
* `Ctrl + t` : new tab dialog (maybe you want to open cmd as admin?)
|
||||||
* `Ctrl + w` : close tab
|
* `Ctrl + w` : close tab
|
||||||
* `Ctrl + alt + number` : fast new tab: `1` - CMD, `2` - Powershell `*` - More to come
|
* `Ctrl + d` : close tab (if pressed on empty command)
|
||||||
|
* `Shift + alt + number` : fast new tab: `1` - CMD, `2` - Powershell `*` - More to come
|
||||||
* `Alt + enter`: Fullscreen
|
* `Alt + enter`: Fullscreen
|
||||||
|
|
||||||
### Shell
|
### Shell
|
||||||
|
|
||||||
* `Shift + Up` : Traverse up in directory structure (lovely feature!)
|
* `Shift + Up` : Traverse up in directory structure (lovely feature!)
|
||||||
* `End, Home, ctrl` : Traversing text with as usual on Windows
|
* `End, Home, Ctrl` : Traversing text with as usual on Windows
|
||||||
* `Ctrl + r` : History search
|
* `Ctrl + r` : History search
|
||||||
* `Shift + mouse` : Select and copy text from buffer
|
* `Shift + mouse` : Select and copy text from buffer
|
||||||
|
|
||||||
@ -48,7 +63,11 @@ All aliases will be saved in `/config/aliases` file
|
|||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
|
|
||||||
1. Write a Todo list
|
1. Complete PowerShell compatibility.
|
||||||
|
2. Workaround git.exe overload after msysgit download (Granted this is an upstream issue).
|
||||||
|
3. Redo Build/Pack scripts or remove them altogether.
|
||||||
|
4. Git Bash
|
||||||
|
5. Check for clink and git before injecting them
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
@ -74,4 +93,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
## Bin
|
## Bin
|
||||||
|
|
||||||
Thif folder will be injected into path at runtime
|
This folder will be injected into the PATH environment variable at runtime.
|
||||||
|
@ -1,4 +1,28 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo %* >> %~dp0..\config\aliases
|
if ["%1"] == ["/?"] goto:p_help
|
||||||
doskey /macrofile=%~dp0..\config\aliases
|
if ["%2"] == [""] echo Insufficient parameters. & goto:p_help
|
||||||
|
::validate alias
|
||||||
|
setlocal
|
||||||
|
for /f "delims== tokens=1" %%G in ("%*") do set _temp2=%%G
|
||||||
|
|
||||||
|
set _temp=%_temp2: =%
|
||||||
|
|
||||||
|
if not ["%_temp%"] == ["%_temp2%"] (
|
||||||
|
echo Your alias name can not contain a space
|
||||||
|
endlocal
|
||||||
|
goto:eof
|
||||||
|
)
|
||||||
|
|
||||||
|
echo %* >> "%CMDER_ROOT%\config\aliases"
|
||||||
|
doskey /macrofile="%CMDER_ROOT%\config\aliases"
|
||||||
echo Alias created
|
echo Alias created
|
||||||
|
endlocal
|
||||||
|
goto:eof
|
||||||
|
|
||||||
|
:p_help
|
||||||
|
echo.Usage:
|
||||||
|
echo. alias name=full command
|
||||||
|
echo. $* allows the alias to assume all the parameters of the supplied command.
|
||||||
|
echo. $1-$9 Allows you to seperate parameter by number, much like %%1 in batch.
|
||||||
|
echo. $T is the command seperator, allowing you to string several commands together into one alias.
|
||||||
|
echo. For more information, read DOSKEY/?
|
||||||
|
@ -1 +0,0 @@
|
|||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<key name="Software">
|
<key name="Software">
|
||||||
<key name="ConEmu">
|
<key name="ConEmu">
|
||||||
<key name=".Vanilla" modified="2013-07-16 16:32:45">
|
<key name=".Vanilla" modified="2014-01-21 18:36:36" build="131215">
|
||||||
<value name="ColorTable00" type="dword" data="00222827"/>
|
<value name="ColorTable00" type="dword" data="00222827"/>
|
||||||
<value name="ColorTable01" type="dword" data="009e5401"/>
|
<value name="ColorTable01" type="dword" data="009e5401"/>
|
||||||
<value name="ColorTable02" type="dword" data="0004aa74"/>
|
<value name="ColorTable02" type="dword" data="0004aa74"/>
|
||||||
@ -18,21 +18,21 @@
|
|||||||
<value name="ColorTable13" type="dword" data="00b87da8"/>
|
<value name="ColorTable13" type="dword" data="00b87da8"/>
|
||||||
<value name="ColorTable14" type="dword" data="0081cccc"/>
|
<value name="ColorTable14" type="dword" data="0081cccc"/>
|
||||||
<value name="ColorTable15" type="dword" data="00ffffff"/>
|
<value name="ColorTable15" type="dword" data="00ffffff"/>
|
||||||
<value name="ColorTable16" type="dword" data="00000000"/>
|
<value name="ColorTable16" type="dword" data="00222827"/>
|
||||||
<value name="ColorTable17" type="dword" data="00800000"/>
|
<value name="ColorTable17" type="dword" data="009e5401"/>
|
||||||
<value name="ColorTable18" type="dword" data="00008000"/>
|
<value name="ColorTable18" type="dword" data="0004aa74"/>
|
||||||
<value name="ColorTable19" type="dword" data="00808000"/>
|
<value name="ColorTable19" type="dword" data="00a6831a"/>
|
||||||
<value name="ColorTable20" type="dword" data="00000080"/>
|
<value name="ColorTable20" type="dword" data="003403a7"/>
|
||||||
<value name="ColorTable21" type="dword" data="00800080"/>
|
<value name="ColorTable21" type="dword" data="009c5689"/>
|
||||||
<value name="ColorTable22" type="dword" data="00008080"/>
|
<value name="ColorTable22" type="dword" data="0049b6b6"/>
|
||||||
<value name="ColorTable23" type="dword" data="00c0c0c0"/>
|
<value name="ColorTable23" type="dword" data="00cacaca"/>
|
||||||
<value name="ColorTable24" type="dword" data="00808080"/>
|
<value name="ColorTable24" type="dword" data="007c7c7c"/>
|
||||||
<value name="ColorTable25" type="dword" data="00ff0000"/>
|
<value name="ColorTable25" type="dword" data="00f58303"/>
|
||||||
<value name="ColorTable26" type="dword" data="0000ff00"/>
|
<value name="ColorTable26" type="dword" data="0006d08d"/>
|
||||||
<value name="ColorTable27" type="dword" data="00ffff00"/>
|
<value name="ColorTable27" type="dword" data="00e5c258"/>
|
||||||
<value name="ColorTable28" type="dword" data="000000ff"/>
|
<value name="ColorTable28" type="dword" data="004b04f3"/>
|
||||||
<value name="ColorTable29" type="dword" data="00ff00ff"/>
|
<value name="ColorTable29" type="dword" data="00b87da8"/>
|
||||||
<value name="ColorTable30" type="dword" data="0000ffff"/>
|
<value name="ColorTable30" type="dword" data="0081cccc"/>
|
||||||
<value name="ColorTable31" type="dword" data="00ffffff"/>
|
<value name="ColorTable31" type="dword" data="00ffffff"/>
|
||||||
<value name="ExtendColors" type="hex" data="00"/>
|
<value name="ExtendColors" type="hex" data="00"/>
|
||||||
<value name="ExtendColorIdx" type="hex" data="0e"/>
|
<value name="ExtendColorIdx" type="hex" data="0e"/>
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<value name="ClipboardArrowStart" type="hex" data="00"/>
|
<value name="ClipboardArrowStart" type="hex" data="00"/>
|
||||||
<value name="ClipboardAllLines" type="hex" data="01"/>
|
<value name="ClipboardAllLines" type="hex" data="01"/>
|
||||||
<value name="ClipboardFirstLine" type="hex" data="01"/>
|
<value name="ClipboardFirstLine" type="hex" data="01"/>
|
||||||
<value name="ClipboardClickPromptPosition" type="hex" data="02"/>
|
<value name="ClipboardClickPromptPosition" type="hex" data="00"/>
|
||||||
<value name="ClipboardDeleteLeftWord" type="hex" data="01"/>
|
<value name="ClipboardDeleteLeftWord" type="hex" data="01"/>
|
||||||
<value name="TrueColorerSupport" type="hex" data="01"/>
|
<value name="TrueColorerSupport" type="hex" data="01"/>
|
||||||
<value name="FadeInactive" type="hex" data="01"/>
|
<value name="FadeInactive" type="hex" data="01"/>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<value name="StartFarEditors" type="hex" data="00"/>
|
<value name="StartFarEditors" type="hex" data="00"/>
|
||||||
<value name="StoreTaskbarkTasks" type="hex" data="00"/>
|
<value name="StoreTaskbarkTasks" type="hex" data="00"/>
|
||||||
<value name="StoreTaskbarCommands" type="hex" data="00"/>
|
<value name="StoreTaskbarCommands" type="hex" data="00"/>
|
||||||
<value name="CmdLineHistory" type="multi"><line data=";C:\Users\bliker\Desktop\cmder\lib\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\"/></value>
|
<value name="CmdLineHistory" type="multi"><line data=";C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\"/></value>
|
||||||
<value name="SingleInstance" type="hex" data="00"/>
|
<value name="SingleInstance" type="hex" data="00"/>
|
||||||
<value name="ShowHelpTooltips" type="hex" data="01"/>
|
<value name="ShowHelpTooltips" type="hex" data="01"/>
|
||||||
<value name="Multi" type="hex" data="01"/>
|
<value name="Multi" type="hex" data="01"/>
|
||||||
@ -125,10 +125,10 @@
|
|||||||
<value name="UseCurrentSizePos" type="hex" data="01"/>
|
<value name="UseCurrentSizePos" type="hex" data="01"/>
|
||||||
<value name="WindowMode" type="dword" data="0000051f"/>
|
<value name="WindowMode" type="dword" data="0000051f"/>
|
||||||
<value name="ConWnd Width" type="dword" data="0000006f"/>
|
<value name="ConWnd Width" type="dword" data="0000006f"/>
|
||||||
<value name="ConWnd Height" type="dword" data="00000026"/>
|
<value name="ConWnd Height" type="dword" data="0000001a"/>
|
||||||
<value name="Cascaded" type="hex" data="01"/>
|
<value name="Cascaded" type="hex" data="01"/>
|
||||||
<value name="ConWnd X" type="dword" data="00000108"/>
|
<value name="ConWnd X" type="dword" data="000000bc"/>
|
||||||
<value name="ConWnd Y" type="dword" data="000000c1"/>
|
<value name="ConWnd Y" type="dword" data="00000065"/>
|
||||||
<value name="16bit Height" type="dword" data="00000000"/>
|
<value name="16bit Height" type="dword" data="00000000"/>
|
||||||
<value name="AutoSaveSizePos" type="hex" data="00"/>
|
<value name="AutoSaveSizePos" type="hex" data="00"/>
|
||||||
<value name="IntegralSize" type="hex" data="00"/>
|
<value name="IntegralSize" type="hex" data="00"/>
|
||||||
@ -193,7 +193,7 @@
|
|||||||
<value name="FARuseASCIIsort" type="hex" data="00"/>
|
<value name="FARuseASCIIsort" type="hex" data="00"/>
|
||||||
<value name="ShellNoZoneCheck" type="hex" data="00"/>
|
<value name="ShellNoZoneCheck" type="hex" data="00"/>
|
||||||
<value name="FixAltOnAltTab" type="hex" data="00"/>
|
<value name="FixAltOnAltTab" type="hex" data="00"/>
|
||||||
<value name="DisableMouse" type="hex" data="00"/>
|
<value name="DisableMouse" type="hex" data="01"/>
|
||||||
<value name="RSelectionFix" type="hex" data="01"/>
|
<value name="RSelectionFix" type="hex" data="01"/>
|
||||||
<value name="MouseSkipActivation" type="hex" data="01"/>
|
<value name="MouseSkipActivation" type="hex" data="01"/>
|
||||||
<value name="MouseSkipMoving" type="hex" data="01"/>
|
<value name="MouseSkipMoving" type="hex" data="01"/>
|
||||||
@ -249,7 +249,7 @@
|
|||||||
<value name="StatusBar.Hide.Proc" type="hex" data="00"/>
|
<value name="StatusBar.Hide.Proc" type="hex" data="00"/>
|
||||||
<value name="StatusBar.Hide.Title" type="hex" data="01"/>
|
<value name="StatusBar.Hide.Title" type="hex" data="01"/>
|
||||||
<value name="StatusBar.Hide.Resize" type="hex" data="00"/>
|
<value name="StatusBar.Hide.Resize" type="hex" data="00"/>
|
||||||
<value name="Tabs" type="hex" data="02"/>
|
<value name="Tabs" type="hex" data="01"/>
|
||||||
<value name="TabsLocation" type="hex" data="01"/>
|
<value name="TabsLocation" type="hex" data="01"/>
|
||||||
<value name="TabSelf" type="hex" data="01"/>
|
<value name="TabSelf" type="hex" data="01"/>
|
||||||
<value name="TabLazy" type="hex" data="01"/>
|
<value name="TabLazy" type="hex" data="01"/>
|
||||||
@ -329,7 +329,7 @@
|
|||||||
<value name="Update.CheckOnStartup" type="hex" data="01"/>
|
<value name="Update.CheckOnStartup" type="hex" data="01"/>
|
||||||
<value name="Update.CheckHourly" type="hex" data="00"/>
|
<value name="Update.CheckHourly" type="hex" data="00"/>
|
||||||
<value name="Update.ConfirmDownload" type="hex" data="01"/>
|
<value name="Update.ConfirmDownload" type="hex" data="01"/>
|
||||||
<value name="Update.UseBuilds" type="hex" data="02"/>
|
<value name="Update.UseBuilds" type="hex" data="01"/>
|
||||||
<value name="Update.UseProxy" type="hex" data="00"/>
|
<value name="Update.UseProxy" type="hex" data="00"/>
|
||||||
<value name="Update.Proxy" type="string" data=""/>
|
<value name="Update.Proxy" type="string" data=""/>
|
||||||
<value name="Update.ProxyUser" type="string" data=""/>
|
<value name="Update.ProxyUser" type="string" data=""/>
|
||||||
@ -349,7 +349,7 @@
|
|||||||
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
|
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
|
||||||
<value name="SetFocusGui" type="dword" data="00000000"/>
|
<value name="SetFocusGui" type="dword" data="00000000"/>
|
||||||
<value name="SetFocusChild" type="dword" data="00000000"/>
|
<value name="SetFocusChild" type="dword" data="00000000"/>
|
||||||
<value name="ChildSystemMenu" type="dword" data="00000000"/>
|
<value name="ChildSystemMenu" type="dword" data="006b2d288000000"/>
|
||||||
<value name="Multi.NewConsole" type="dword" data="80808000"/>
|
<value name="Multi.NewConsole" type="dword" data="80808000"/>
|
||||||
<value name="Multi.NewConsoleShift" type="dword" data="00001154"/>
|
<value name="Multi.NewConsoleShift" type="dword" data="00001154"/>
|
||||||
<value name="Multi.NewConsolePopup" type="dword" data="80808000"/>
|
<value name="Multi.NewConsolePopup" type="dword" data="80808000"/>
|
||||||
@ -411,14 +411,14 @@
|
|||||||
<value name="Key.JumpNextMonitor" type="dword" data="80808000"/>
|
<value name="Key.JumpNextMonitor" type="dword" data="80808000"/>
|
||||||
<value name="Key.TileToLeft" type="dword" data="80808000"/>
|
<value name="Key.TileToLeft" type="dword" data="80808000"/>
|
||||||
<value name="Key.TileToRIght" type="dword" data="80808000"/>
|
<value name="Key.TileToRIght" type="dword" data="80808000"/>
|
||||||
<value name="KeyMacro01" type="dword" data="00121131"/>
|
<value name="KeyMacro01" type="dword" data="0012a031"/>
|
||||||
<value name="KeyMacro01.Text" type="string" data="Task("cmd")"/>
|
<value name="KeyMacro01.Text" type="string" data="Task("cmd")"/>
|
||||||
<value name="KeyMacro02" type="dword" data="00121132"/>
|
<value name="KeyMacro02" type="dword" data="0012a032"/>
|
||||||
<value name="KeyMacro02.Text" type="string" data="Task("PowerShell")"/>
|
<value name="KeyMacro02.Text" type="string" data="Task("PowerShell")"/>
|
||||||
<value name="KeyMacro03" type="dword" data="00000000"/>
|
<value name="KeyMacro03" type="dword" data="000011d0"/>
|
||||||
<value name="KeyMacro03.Text" type="string" data=""/>
|
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
|
||||||
<value name="KeyMacro04" type="dword" data="00000000"/>
|
<value name="KeyMacro04" type="dword" data="000011d1"/>
|
||||||
<value name="KeyMacro04.Text" type="string" data=""/>
|
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
|
||||||
<value name="KeyMacro05" type="dword" data="00000000"/>
|
<value name="KeyMacro05" type="dword" data="00000000"/>
|
||||||
<value name="KeyMacro05.Text" type="string" data=""/>
|
<value name="KeyMacro05.Text" type="string" data=""/>
|
||||||
<value name="KeyMacro06" type="dword" data="00000000"/>
|
<value name="KeyMacro06" type="dword" data="00000000"/>
|
||||||
@ -483,28 +483,30 @@
|
|||||||
<value name="DndLKey" type="hex" data="00"/>
|
<value name="DndLKey" type="hex" data="00"/>
|
||||||
<value name="DndRKey" type="hex" data="a2"/>
|
<value name="DndRKey" type="hex" data="a2"/>
|
||||||
<value name="WndDragKey" type="dword" data="00121101"/>
|
<value name="WndDragKey" type="dword" data="00121101"/>
|
||||||
<key name="Tasks" modified="2013-07-16 16:32:45">
|
<key name="Tasks" modified="2014-01-21 18:36:36" build="131215">
|
||||||
<value name="Count" type="dword" data="00000002"/>
|
<value name="Count" type="dword" data="00000002"/>
|
||||||
<key name="Task1" modified="2013-07-16 16:32:45">
|
<key name="Task1" modified="2014-01-21 18:36:36" build="131215">
|
||||||
<value name="Name" type="string" data="{cmd}"/>
|
<value name="Name" type="string" data="{cmd}"/>
|
||||||
<value name="GuiArgs" type="string" data=" /icon "cmd.exe""/>
|
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\cmder.exe""/>
|
||||||
<value name="Cmd1" type="string" data="cmd /k vendor\init.bat"/>
|
<value name="Cmd1" type="string" data="cmd /k "%CMDER_ROOT%\vendor\init.bat" -new_console:d:%USERPROFILE%"/>
|
||||||
<value name="Active" type="dword" data="00000000"/>
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
<value name="Count" type="dword" data="00000001"/>
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
</key>
|
</key>
|
||||||
<key name="Task2" modified="2013-07-16 16:32:45">
|
<key name="Task2" modified="2014-01-21 18:36:36" build="131215">
|
||||||
<value name="Name" type="string" data="{PowerShell}"/>
|
<value name="Name" type="string" data="{PowerShell}"/>
|
||||||
<value name="GuiArgs" type="string" data="/dir "%userprofile%""/>
|
<value name="GuiArgs" type="string" data="/dir "%userprofile%""/>
|
||||||
<value name="Cmd1" type="string" data="powershell"/>
|
<value name="Cmd1" type="string" data="powershell"/>
|
||||||
<value name="Active" type="dword" data="00000000"/>
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
<value name="Count" type="dword" data="00000001"/>
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
</key>
|
</key>
|
||||||
</key>
|
</key>
|
||||||
<key name="Apps" modified="2013-07-16 16:32:45">
|
<key name="Apps" modified="2014-01-21 18:36:36" build="131215">
|
||||||
<value name="Count" type="dword" data="00000000"/>
|
<value name="Count" type="dword" data="00000000"/>
|
||||||
</key>
|
</key>
|
||||||
<key name="Colors" modified="2013-07-16 16:32:45">
|
<key name="Colors" modified="2014-01-21 18:36:36" build="131215">
|
||||||
<key name="Palette1" modified="2013-07-16 16:32:45">
|
<key name="Palette1" modified="2014-01-21 18:36:36" build="131215">
|
||||||
<value name="Name" type="string" data="Monokai"/>
|
<value name="Name" type="string" data="Monokai"/>
|
||||||
<value name="ExtendColors" type="hex" data="00"/>
|
<value name="ExtendColors" type="hex" data="00"/>
|
||||||
<value name="ExtendColorIdx" type="hex" data="0e"/>
|
<value name="ExtendColorIdx" type="hex" data="0e"/>
|
||||||
@ -547,6 +549,38 @@
|
|||||||
</key>
|
</key>
|
||||||
<value name="Count" type="dword" data="00000001"/>
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
</key>
|
</key>
|
||||||
|
<value name="OneTabPerGroup" type="hex" data="00"/>
|
||||||
|
<value name="ActivateSplitMouseOver" type="hex" data="01"/>
|
||||||
|
<value name="TabBtnDblClick" type="dword" data="00000000"/>
|
||||||
|
<value name="ConsoleExceptionHandler" type="hex" data="00"/>
|
||||||
|
<value name="SaveCmdHistory" type="hex" data="00"/>
|
||||||
|
<value name="CTS.IBeam" type="hex" data="01"/>
|
||||||
|
<value name="Multi.SplitSizeVU" type="dword" data="00105d26"/>
|
||||||
|
<value name="Multi.SplitSizeVD" type="dword" data="00105d28"/>
|
||||||
|
<value name="Multi.SplitSizeHL" type="dword" data="00105d25"/>
|
||||||
|
<value name="Multi.SplitSizeHR" type="dword" data="00105d27"/>
|
||||||
|
<value name="Multi.SplitFocusU" type="dword" data="00005d26"/>
|
||||||
|
<value name="Multi.SplitFocusD" type="dword" data="00005d28"/>
|
||||||
|
<value name="Multi.SplitFocusL" type="dword" data="00005d25"/>
|
||||||
|
<value name="Multi.SplitFocusR" type="dword" data="00005d27"/>
|
||||||
|
<value name="CloseGroupPrcKey" type="dword" data="00000000"/>
|
||||||
|
<value name="SetDefaultTerminalStartupTSA" type="hex" data="01"/>
|
||||||
|
<value name="CTS.HtmlFormat" type="hex" data="00"/>
|
||||||
|
<value name="TabIcons" type="hex" data="01"/>
|
||||||
|
<value name="Multi.NewConsolePopup2" type="dword" data="00000000"/>
|
||||||
|
<value name="CloseAllConKey" type="dword" data="00000000"/>
|
||||||
|
<value name="CloseExceptConKey" type="dword" data="00000000"/>
|
||||||
|
<value name="CTS.VkCopyFmt0" type="dword" data="00001143"/>
|
||||||
|
<value name="CTS.VkCopyFmt1" type="dword" data="00101143"/>
|
||||||
|
<value name="CTS.VkCopyFmt2" type="dword" data="00000000"/>
|
||||||
|
<value name="ProcessNewConArg" type="hex" data="01"/>
|
||||||
|
<value name="HighlightMouseRow" type="hex" data="00"/>
|
||||||
|
<value name="HighlightMouseCol" type="hex" data="00"/>
|
||||||
|
<value name="HighlightMouseSwitch" type="dword" data="00005d4c"/>
|
||||||
|
<value name="TransparencyInc" type="dword" data="00000000"/>
|
||||||
|
<value name="TransparencyDec" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.MaximizeWidth" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.MaximizeHeight" type="dword" data="00000000"/>
|
||||||
</key>
|
</key>
|
||||||
</key>
|
</key>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
## Config
|
## Config
|
||||||
|
|
||||||
All config files must be in this folder, if there is no option to set the folder directly, it has to be hardlinked.
|
All config files must be in this folder. If there is no option to set this folder directly, it has to be hardlinked.
|
@ -1,3 +1,5 @@
|
|||||||
e.=explorer .
|
e.=explorer .
|
||||||
gl=git log --oneline --all --graph --decorate
|
gl=git log --oneline --all --graph --decorate $*
|
||||||
hej=dir
|
ls=ls --color $*
|
||||||
|
pwd=cd
|
||||||
|
clear=cls
|
||||||
|
50
config/git.lua
Normal file
50
config/git.lua
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
-- Find out current branch
|
||||||
|
-- @return {false|git branch name}
|
||||||
|
---
|
||||||
|
function get_git_branch()
|
||||||
|
for line in io.popen("git branch 2>nul"):lines() do
|
||||||
|
local m = line:match("%* (.+)$")
|
||||||
|
if m then
|
||||||
|
return m
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Get the status of working dir
|
||||||
|
-- @return {bool}
|
||||||
|
---
|
||||||
|
function get_git_status()
|
||||||
|
return os.execute("git diff --quiet --ignore-submodules HEAD")
|
||||||
|
end
|
||||||
|
|
||||||
|
function git_prompt_filter()
|
||||||
|
|
||||||
|
-- Colors for git status
|
||||||
|
local colors = {
|
||||||
|
clean = "\x1b[1;37;40m",
|
||||||
|
dirty = "\x1b[31;1m",
|
||||||
|
}
|
||||||
|
|
||||||
|
local branch = get_git_branch()
|
||||||
|
if branch then
|
||||||
|
-- Has branch => therefore it is a git folder, now figure out status
|
||||||
|
if get_git_status() then
|
||||||
|
color = colors.clean
|
||||||
|
else
|
||||||
|
color = colors.dirty
|
||||||
|
end
|
||||||
|
|
||||||
|
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", color.."("..branch..")")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- No git present or not in git file
|
||||||
|
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", "")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
clink.prompt.register_filter(git_prompt_filter, 50)
|
5
config/prompt.lua
Normal file
5
config/prompt.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
function lambda_prompt_filter()
|
||||||
|
clink.prompt.value = string.gsub(clink.prompt.value, "{lamb}", "λ")
|
||||||
|
end
|
||||||
|
|
||||||
|
clink.prompt.register_filter(lambda_prompt_filter, 40)
|
BIN
icons/cmder.ico
Normal file
BIN
icons/cmder.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
icons/cmder_icon.psd
Normal file
BIN
icons/cmder_icon.psd
Normal file
Binary file not shown.
BIN
icons/icon_16.png
Normal file
BIN
icons/icon_16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
icons/icon_256.png
Normal file
BIN
icons/icon_256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
BIN
icons/icon_32.png
Normal file
BIN
icons/icon_32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
icons/icon_48.png
Normal file
BIN
icons/icon_48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
181
launcher/.gitignore
vendored
Normal file
181
launcher/.gitignore
vendored
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.sln.docstates
|
||||||
|
*.filters
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
x64/
|
||||||
|
build/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
|
||||||
|
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
|
||||||
|
!packages/*/build/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
#NUNIT
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_i.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# JustCode is a .NET coding addin-in
|
||||||
|
.JustCode
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
*.ncrunch*
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.Publish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
|
||||||
|
# NuGet Packages Directory
|
||||||
|
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||||
|
#packages/
|
||||||
|
## TODO: If the tool you use requires repositories.config, also uncomment the next line
|
||||||
|
#!packages/repositories.config
|
||||||
|
|
||||||
|
# Windows Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Windows Store app package directory
|
||||||
|
AppPackages/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
sql/
|
||||||
|
*.Cache
|
||||||
|
ClientBin/
|
||||||
|
[Ss]tyle[Cc]op.*
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file to a newer
|
||||||
|
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
App_Data/*.mdf
|
||||||
|
App_Data/*.ldf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# =========================
|
||||||
|
# Windows detritus
|
||||||
|
# =========================
|
||||||
|
|
||||||
|
# Windows image file caches
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
# Recycle Bin used on file shares
|
||||||
|
$RECYCLE.BIN/
|
22
launcher/CmderLauncher.sln
Normal file
22
launcher/CmderLauncher.sln
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Express 2013 for Windows Desktop
|
||||||
|
VisualStudioVersion = 12.0.21005.1
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmderLauncher", "CmderLauncher.vcxproj", "{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
98
launcher/CmderLauncher.vcxproj
Normal file
98
launcher/CmderLauncher.vcxproj
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>CmderLauncher</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<TargetName>Cmder</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<TargetName>Cmder</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MinSpace</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy $(TargetPath) $(SolutionDir)..\$(TargetFileName)</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="src\Resource.rc" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="src\resource.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\CmderLauncher.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
251
launcher/src/CmderLauncher.cpp
Normal file
251
launcher/src/CmderLauncher.cpp
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
#include <windows.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
#include <Shlwapi.h>
|
||||||
|
#include "resource.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#pragma comment(lib, "Shlwapi.lib")
|
||||||
|
|
||||||
|
#ifndef UNICODE
|
||||||
|
#error "Must be compiled with unicode support."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define USE_TASKBAR_API (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
|
||||||
|
|
||||||
|
#define XP (_WIN32_WINNT < _WIN32_WINNT_VISTA)
|
||||||
|
|
||||||
|
#define MB_TITLE L"Cmder Launcher"
|
||||||
|
#define SHELL_MENU_REGISTRY_PATH_BACKGROUND L"Directory\\Background\\shell\\Cmder"
|
||||||
|
#define SHELL_MENU_REGISTRY_PATH_LISTITEM L"Directory\\shell\\Cmder"
|
||||||
|
|
||||||
|
#define streqi(a, b) (_wcsicmp((a), (b)) == 0)
|
||||||
|
|
||||||
|
#define WIDEN2(x) L ## x
|
||||||
|
#define WIDEN(x) WIDEN2(x)
|
||||||
|
#define __WFUNCTION__ WIDEN(__FUNCTION__)
|
||||||
|
|
||||||
|
#define FAIL_ON_ERROR(x) { DWORD ec; if ((ec = (x)) != ERROR_SUCCESS) { ShowErrorAndExit(ec, __WFUNCTION__, __LINE__); } }
|
||||||
|
|
||||||
|
void ShowErrorAndExit(DWORD ec, const wchar_t * func, int line)
|
||||||
|
{
|
||||||
|
wchar_t * buffer;
|
||||||
|
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
|
NULL, ec, 0, (LPWSTR) &buffer, 0, NULL) == 0)
|
||||||
|
{
|
||||||
|
buffer = L"Unknown error. FormatMessage failed.";
|
||||||
|
}
|
||||||
|
|
||||||
|
wchar_t message[1024];
|
||||||
|
swprintf_s(message, L"%s\nFunction: %s\nLine: %d", buffer, func, line);
|
||||||
|
LocalFree(buffer);
|
||||||
|
|
||||||
|
MessageBox(NULL, message, MB_TITLE, MB_OK | MB_ICONERROR);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef struct _option
|
||||||
|
{
|
||||||
|
std::wstring name;
|
||||||
|
bool hasVal;
|
||||||
|
std::wstring value;
|
||||||
|
bool set;
|
||||||
|
} option;
|
||||||
|
|
||||||
|
typedef std::pair<std::wstring, std::wstring> optpair;
|
||||||
|
|
||||||
|
|
||||||
|
optpair GetOption()
|
||||||
|
{
|
||||||
|
wchar_t * cmd = GetCommandLine();
|
||||||
|
int argc;
|
||||||
|
wchar_t ** argv = CommandLineToArgvW(cmd, &argc);
|
||||||
|
optpair pair;
|
||||||
|
|
||||||
|
if (argc == 1)
|
||||||
|
{
|
||||||
|
pair = optpair(L"/START", L"");
|
||||||
|
}
|
||||||
|
else if (argc == 2 && argv[1][0] != L'/')
|
||||||
|
{
|
||||||
|
pair = optpair(L"/START", argv[1]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pair = optpair(argv[1], argc > 2 ? argv[2] : L"");
|
||||||
|
}
|
||||||
|
|
||||||
|
LocalFree(argv);
|
||||||
|
|
||||||
|
return pair;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartCmder(std::wstring path)
|
||||||
|
{
|
||||||
|
#if USE_TASKBAR_API
|
||||||
|
wchar_t appId[MAX_PATH] = { 0 };
|
||||||
|
#endif
|
||||||
|
wchar_t exeDir[MAX_PATH] = { 0 };
|
||||||
|
wchar_t icoPath[MAX_PATH] = { 0 };
|
||||||
|
wchar_t cfgPath[MAX_PATH] = { 0 };
|
||||||
|
wchar_t conEmuPath[MAX_PATH] = { 0 };
|
||||||
|
wchar_t args[MAX_PATH * 2 + 256] = { 0 };
|
||||||
|
|
||||||
|
GetModuleFileName(NULL, exeDir, sizeof(exeDir));
|
||||||
|
|
||||||
|
#if USE_TASKBAR_API
|
||||||
|
wcscpy_s(appId, exeDir);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PathRemoveFileSpec(exeDir);
|
||||||
|
|
||||||
|
PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
|
||||||
|
PathCombine(cfgPath, exeDir, L"config\\ConEmu.xml");
|
||||||
|
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
|
||||||
|
|
||||||
|
swprintf_s(args, L"/Icon \"%s\" /Title Cmder /LoadCfgFile \"%s\"", icoPath, cfgPath);
|
||||||
|
|
||||||
|
SetEnvironmentVariable(L"CMDER_ROOT", exeDir);
|
||||||
|
SetEnvironmentVariable(L"CMDER_START", path.c_str());
|
||||||
|
|
||||||
|
STARTUPINFO si = { 0 };
|
||||||
|
si.cb = sizeof(STARTUPINFO);
|
||||||
|
#if USE_TASKBAR_API
|
||||||
|
si.lpTitle = appId;
|
||||||
|
si.dwFlags = STARTF_TITLEISAPPID;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PROCESS_INFORMATION pi;
|
||||||
|
|
||||||
|
CreateProcess(conEmuPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsUserOnly(std::wstring opt)
|
||||||
|
{
|
||||||
|
bool userOnly;
|
||||||
|
|
||||||
|
if (streqi(opt.c_str(), L"ALL"))
|
||||||
|
{
|
||||||
|
userOnly = false;
|
||||||
|
}
|
||||||
|
else if (streqi(opt.c_str(), L"USER"))
|
||||||
|
{
|
||||||
|
userOnly = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox(NULL, L"Unrecognized option for /REGISTER or /UNREGISTER. Must be either ALL or USER.", MB_TITLE, MB_OK);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return userOnly;
|
||||||
|
}
|
||||||
|
|
||||||
|
HKEY GetRootKey(std::wstring opt)
|
||||||
|
{
|
||||||
|
HKEY root;
|
||||||
|
|
||||||
|
if (IsUserOnly(opt))
|
||||||
|
{
|
||||||
|
FAIL_ON_ERROR(RegCreateKeyEx(HKEY_CURRENT_USER, L"Software\\Classes", 0, NULL,
|
||||||
|
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &root, NULL));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
root = HKEY_CLASSES_ROOT;
|
||||||
|
}
|
||||||
|
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||||
|
{
|
||||||
|
// First, get the paths we will use
|
||||||
|
|
||||||
|
wchar_t exePath[MAX_PATH] = { 0 };
|
||||||
|
wchar_t icoPath[MAX_PATH] = { 0 };
|
||||||
|
|
||||||
|
GetModuleFileName(NULL, exePath, sizeof(exePath));
|
||||||
|
|
||||||
|
wchar_t commandStr[MAX_PATH + 20] = { 0 };
|
||||||
|
swprintf_s(commandStr, L"\"%s\" \"%%V\"", exePath);
|
||||||
|
|
||||||
|
// Now that we have `commandStr`, it's OK to change `exePath`...
|
||||||
|
PathRemoveFileSpec(exePath);
|
||||||
|
|
||||||
|
PathCombine(icoPath, exePath, L"icons\\cmder.ico");
|
||||||
|
|
||||||
|
// Now set the registry keys
|
||||||
|
|
||||||
|
HKEY root = GetRootKey(opt);
|
||||||
|
|
||||||
|
HKEY cmderKey;
|
||||||
|
FAIL_ON_ERROR(
|
||||||
|
RegCreateKeyEx(root, keyBaseName, 0, NULL,
|
||||||
|
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||||
|
|
||||||
|
FAIL_ON_ERROR(RegSetValue(cmderKey, L"", REG_SZ, L"Cmder Here", NULL));
|
||||||
|
FAIL_ON_ERROR(RegSetValueEx(cmderKey, L"NoWorkingDirectory", 0, REG_SZ, (BYTE *)L"", 2));
|
||||||
|
|
||||||
|
FAIL_ON_ERROR(RegSetValueEx(cmderKey, L"Icon", 0, REG_SZ, (BYTE *)icoPath, wcslen(icoPath) * sizeof(wchar_t)));
|
||||||
|
|
||||||
|
HKEY command;
|
||||||
|
FAIL_ON_ERROR(
|
||||||
|
RegCreateKeyEx(cmderKey, L"command", 0, NULL,
|
||||||
|
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &command, NULL));
|
||||||
|
|
||||||
|
FAIL_ON_ERROR(RegSetValue(command, L"", REG_SZ, commandStr, NULL));
|
||||||
|
|
||||||
|
RegCloseKey(command);
|
||||||
|
RegCloseKey(cmderKey);
|
||||||
|
RegCloseKey(root);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UnregisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||||
|
{
|
||||||
|
HKEY root = GetRootKey(opt);
|
||||||
|
HKEY cmderKey;
|
||||||
|
FAIL_ON_ERROR(
|
||||||
|
RegCreateKeyEx(root, keyBaseName, 0, NULL,
|
||||||
|
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||||
|
#if XP
|
||||||
|
FAIL_ON_ERROR(SHDeleteKey(cmderKey, NULL));
|
||||||
|
#else
|
||||||
|
FAIL_ON_ERROR(RegDeleteTree(cmderKey, NULL));
|
||||||
|
#endif
|
||||||
|
RegCloseKey(cmderKey);
|
||||||
|
RegCloseKey(root);
|
||||||
|
}
|
||||||
|
|
||||||
|
int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||||
|
_In_opt_ HINSTANCE hPrevInstance,
|
||||||
|
_In_ LPTSTR lpCmdLine,
|
||||||
|
_In_ int nCmdShow)
|
||||||
|
{
|
||||||
|
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||||
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
|
UNREFERENCED_PARAMETER(nCmdShow);
|
||||||
|
|
||||||
|
optpair opt = GetOption();
|
||||||
|
|
||||||
|
if (streqi(opt.first.c_str(), L"/START"))
|
||||||
|
{
|
||||||
|
StartCmder(opt.second);
|
||||||
|
}
|
||||||
|
else if (streqi(opt.first.c_str(), L"/REGISTER"))
|
||||||
|
{
|
||||||
|
RegisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_BACKGROUND);
|
||||||
|
RegisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_LISTITEM);
|
||||||
|
}
|
||||||
|
else if (streqi(opt.first.c_str(), L"/UNREGISTER"))
|
||||||
|
{
|
||||||
|
UnregisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_BACKGROUND);
|
||||||
|
UnregisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_LISTITEM);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n /START <path>\n /REGISTER [USER/ALL]\n /UNREGISTER [USER/ALL]", MB_TITLE, MB_OK);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
BIN
launcher/src/Resource.rc
Normal file
BIN
launcher/src/Resource.rc
Normal file
Binary file not shown.
BIN
launcher/src/resource.h
Normal file
BIN
launcher/src/resource.h
Normal file
Binary file not shown.
BIN
msvcp110.dll
Normal file
BIN
msvcp110.dll
Normal file
Binary file not shown.
BIN
msvcr110.dll
Normal file
BIN
msvcr110.dll
Normal file
Binary file not shown.
10
packignore
Normal file
10
packignore
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
launcher
|
||||||
|
icons
|
||||||
|
.gitignore
|
||||||
|
.gitattributes
|
||||||
|
.git
|
||||||
|
*.rb
|
||||||
|
build
|
||||||
|
config\.history
|
||||||
|
packignore
|
||||||
|
Cmder.bat
|
79
scripts/build.ps1
Normal file
79
scripts/build.ps1
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
<#
|
||||||
|
.Synopsis
|
||||||
|
Build Cmder
|
||||||
|
.DESCRIPTION
|
||||||
|
Use this script to build your own edition of Cmder
|
||||||
|
|
||||||
|
This script builds dependencies from current vendor/sources.json file and unpacks them.
|
||||||
|
|
||||||
|
You will need to make this script executable by setting your Powershell Execution Policy to Remote signed
|
||||||
|
Then unblock the script for execution with UnblockFile .\build.ps1
|
||||||
|
.EXAMPLE
|
||||||
|
.\build.ps1
|
||||||
|
|
||||||
|
Executes the default build for cmder, this is equivalent to the "minimum" style package in the releases
|
||||||
|
.EXAMPLE
|
||||||
|
.\build -verbose
|
||||||
|
|
||||||
|
Execute the build and see what's going on.
|
||||||
|
.EXAMPLE
|
||||||
|
.\build.ps1 -SourcesPath '~/custom/vendors.json'
|
||||||
|
|
||||||
|
Build cmder with your own packages. See vendor/sources.json for the syntax you need to copy.
|
||||||
|
.NOTES
|
||||||
|
AUTHORS
|
||||||
|
Samuel Vasko, Jack Bennett
|
||||||
|
Part of the Cmder project.
|
||||||
|
.LINK
|
||||||
|
https://github.com/bliker/cmder - Project Home
|
||||||
|
#>
|
||||||
|
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true)]
|
||||||
|
Param(
|
||||||
|
# CmdletBinding will give us;
|
||||||
|
# -verbose switch to turn on logging and
|
||||||
|
# -whatif switch to not actually make changes
|
||||||
|
|
||||||
|
# Path to the vendor configuration source file
|
||||||
|
[string]$sourcesPath = "..\vendor\sources.json",
|
||||||
|
|
||||||
|
# Vendor folder location
|
||||||
|
[string]$saveTo = "..\vendor\",
|
||||||
|
|
||||||
|
# Launcher folder location
|
||||||
|
[string]$launcher = "..\launcher"
|
||||||
|
)
|
||||||
|
|
||||||
|
. "$PSScriptRoot\utils.ps1"
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
Push-Location -Path $saveTo
|
||||||
|
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
|
||||||
|
|
||||||
|
# Check for requirements
|
||||||
|
Ensure-Exists $sourcesPath
|
||||||
|
Ensure-Executable "7z"
|
||||||
|
|
||||||
|
foreach ($s in $sources) {
|
||||||
|
Write-Verbose "Getting $($s.name) from URL $($s.url)"
|
||||||
|
|
||||||
|
# We do not care about the extensions/type of archive
|
||||||
|
$tempArchive = "$($s.name).tmp"
|
||||||
|
Delete-Existing $tempArchive
|
||||||
|
Delete-Existing $s.name
|
||||||
|
|
||||||
|
Invoke-WebRequest -Uri $s.url -OutFile $tempArchive -ErrorAction Stop
|
||||||
|
Extract-Archive $tempArchive $s.name
|
||||||
|
|
||||||
|
if ((Get-Childitem $s.name).Count -eq 1) {
|
||||||
|
Flatten-Directory($s.name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pop-Location
|
||||||
|
|
||||||
|
Push-Location -Path $launcher
|
||||||
|
msbuild CmderLauncher.vcxproj /p:configuration=Release
|
||||||
|
Pop-Location
|
||||||
|
|
||||||
|
Write-Verbose "All good and done!"
|
57
scripts/pack.ps1
Normal file
57
scripts/pack.ps1
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<#
|
||||||
|
.Synopsis
|
||||||
|
Pack cmder
|
||||||
|
.DESCRIPTION
|
||||||
|
Use this script to pack cmder into release archives
|
||||||
|
|
||||||
|
You will need to make this script executable by setting your Powershell Execution Policy to Remote signed
|
||||||
|
Then unblock the script for execution with UnblockFile .\pack.ps1
|
||||||
|
.EXAMPLE
|
||||||
|
.\pack.ps1
|
||||||
|
|
||||||
|
Creates default archives for cmder
|
||||||
|
.EXAMPLE
|
||||||
|
.\build -verbose
|
||||||
|
|
||||||
|
Creates default archives for cmder with plenty of information
|
||||||
|
.NOTES
|
||||||
|
AUTHORS
|
||||||
|
Samuel Vasko, Jack Bennett
|
||||||
|
Part of the Cmder project.
|
||||||
|
.LINK
|
||||||
|
https://github.com/bliker/cmder - Project Home
|
||||||
|
#>
|
||||||
|
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true)]
|
||||||
|
Param(
|
||||||
|
# CmdletBinding will give us;
|
||||||
|
# -verbose switch to turn on logging and
|
||||||
|
# -whatif switch to not actually make changes
|
||||||
|
|
||||||
|
# Path to the vendor configuration source file
|
||||||
|
[string]$cmderRoot = "..",
|
||||||
|
|
||||||
|
# Vendor folder locaton
|
||||||
|
[string]$saveTo = "..\build"
|
||||||
|
)
|
||||||
|
|
||||||
|
. "$PSScriptRoot\utils.ps1"
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
Ensure-Executable "7z"
|
||||||
|
|
||||||
|
$targets = @{
|
||||||
|
"cmder.zip" = $null;
|
||||||
|
"cmder.7z" = $null;
|
||||||
|
"cmder_mini.zip" = "-x!`"vendor\msysgit`"";
|
||||||
|
}
|
||||||
|
|
||||||
|
Delete-Existing "..\Version*"
|
||||||
|
|
||||||
|
$version = Invoke-Expression "git describe --abbrev=0 --tags"
|
||||||
|
(New-Item -ItemType file "$cmderRoot\Version $version") | Out-Null
|
||||||
|
|
||||||
|
foreach ($t in $targets.GetEnumerator()) {
|
||||||
|
Create-Archive $cmderRoot "$saveTo\$($t.Name)" $t.Value
|
||||||
|
$hash = (Digest-MD5 "$saveTo\$($t.Name)")
|
||||||
|
Add-Content "$saveTo\hashes.txt" $hash
|
||||||
|
}
|
50
scripts/utils.ps1
Normal file
50
scripts/utils.ps1
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
function Ensure-Executable ($command) {
|
||||||
|
try { Get-Command $command -ErrorAction Stop > $null }
|
||||||
|
catch {
|
||||||
|
If( ($command -eq "7z") -and (Test-Path "$env:programfiles\7-zip\7z.exe") ){
|
||||||
|
set-alias -Name "7z" -Value "$env:programfiles\7-zip\7z.exe" -Scope script
|
||||||
|
}
|
||||||
|
ElseIf( ($command -eq "7z") -and (Test-Path "$env:programw6432\7-zip\7z.exe") ) {
|
||||||
|
set-alias -Name "7z" -Value "$env:programw6432\7-zip\7z.exe" -Scope script
|
||||||
|
}
|
||||||
|
Else {
|
||||||
|
Write-Error "Missing $command! Ensure it is installed and on in the PATH"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Delete-Existing ($path) {
|
||||||
|
Write-Verbose "Remove $path"
|
||||||
|
Remove-Item -Recurse -force $path -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
function Extract-Archive ($source, $target) {
|
||||||
|
Invoke-Expression "7z x -y -o$($target) $source > `$null"
|
||||||
|
if ($lastexitcode -ne 0) {
|
||||||
|
Write-Error "Extracting of $source failied"
|
||||||
|
}
|
||||||
|
Remove-Item $source
|
||||||
|
}
|
||||||
|
|
||||||
|
function Create-Archive ($source, $target, $params) {
|
||||||
|
$command = "7z a -x@`"$source\packignore`" $params $target $source > `$null"
|
||||||
|
Write-Verbose "Running: $command"
|
||||||
|
Invoke-Expression $command
|
||||||
|
if ($lastexitcode -ne 0) {
|
||||||
|
Write-Error "Compressing $source failied"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# If directory contains only one child directory
|
||||||
|
# Flatten it instead
|
||||||
|
function Flatten-Directory ($name) {
|
||||||
|
$child = (Get-Childitem $name)[0]
|
||||||
|
Rename-Item $name -NewName "$($name)_moving"
|
||||||
|
Move-Item -Path "$($name)_moving\$child" -Destination $name
|
||||||
|
Remove-Item -Recurse "$($name)_moving"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Digest-MD5 ($path) {
|
||||||
|
return Invoke-Expression "md5sum $path"
|
||||||
|
}
|
2
vendor/Readme.md
vendored
2
vendor/Readme.md
vendored
@ -1,3 +1,3 @@
|
|||||||
## Vendor
|
## Vendor
|
||||||
|
|
||||||
Softwere from third parties + init sctipt
|
Third parties software & init script.
|
||||||
|
36
vendor/init.bat
vendored
36
vendor/init.bat
vendored
@ -1,25 +1,41 @@
|
|||||||
@echo off
|
:: Init Script for cmd.exe
|
||||||
|
:: Sets some nice defaults
|
||||||
|
:: Created as part of cmder project
|
||||||
|
|
||||||
:: Set prompt style
|
:: Change the prompt style
|
||||||
prompt $E[1;32;40m$P $_$E[1;30;40m$$ $E[0m
|
:: Mmm tasty lamb
|
||||||
|
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40m{lamb}$S$E[0m
|
||||||
|
|
||||||
:: Pick right version of clink
|
:: Pick right version of clink
|
||||||
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
@if "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
||||||
set architecture=86
|
set architecture=86
|
||||||
) else (
|
) else (
|
||||||
set architecture=64
|
set architecture=64
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Run clink
|
:: Run clink
|
||||||
vendor\clink\clink_x%architecture%.exe inject --quiet --profile config
|
@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config"
|
||||||
|
|
||||||
set rootDir=%CD%
|
:: Prepare for msysgit
|
||||||
|
|
||||||
|
:: I do not even know, copypasted from their .bat
|
||||||
|
@set PLINK_PROTOCOL=ssh
|
||||||
|
@if not defined TERM set TERM=cygwin
|
||||||
|
|
||||||
:: Enhance Path
|
:: Enhance Path
|
||||||
PATH=%PATH%;%rootDir%\bin
|
@set git_install_root=%CMDER_ROOT%\vendor\msysgit
|
||||||
|
@set PATH=%CMDER_ROOT%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%git_install_root%\share\vim\vim74;%CMDER_ROOT%;%PATH%
|
||||||
|
|
||||||
:: Add aliases
|
:: Add aliases
|
||||||
doskey /macrofile=%rootDir%\config\aliases
|
@doskey /macrofile="%CMDER_ROOT%\config\aliases"
|
||||||
|
|
||||||
:: cd into users homedir
|
:: Set home path
|
||||||
cd /d "%userprofile%"
|
@if not defined HOME set HOME=%USERPROFILE%
|
||||||
|
|
||||||
|
@if defined CMDER_START (
|
||||||
|
@cd /d "%CMDER_START%"
|
||||||
|
) else (
|
||||||
|
@if "%CD%\" == "%CMDER_ROOT%" (
|
||||||
|
@cd /d "%HOME%"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
17
vendor/sources.json
vendored
Normal file
17
vendor/sources.json
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "msysgit",
|
||||||
|
"version": "1.9.4-preview",
|
||||||
|
"url": "https://github.com/msysgit/msysgit/releases/download/Git-1.9.4-preview20140611/PortableGit-1.9.4-preview20140611.7z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clink",
|
||||||
|
"version": "0.4.2",
|
||||||
|
"url": "https://github.com/mridgers/clink/releases/download/0.4.2/clink_0.4.2.zip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "conemu-maximus5",
|
||||||
|
"version": "140707",
|
||||||
|
"url": "https://conemu.codeplex.com/downloads/get/880090"
|
||||||
|
}
|
||||||
|
]
|
Reference in New Issue
Block a user