Compare commits

..

86 Commits

Author SHA1 Message Date
8c6847ee0d Merge branch 'development' 2014-08-27 00:03:47 +01:00
f66f598fca Increment version 2014-08-27 00:03:06 +01:00
de8d2d22f6 Fix the build 2014-08-26 23:52:49 +01:00
72c045dc2d Merge pull request #244 from narnaud/fix-clinkversion
Fix clink version
2014-08-26 12:37:52 +01:00
5ee2fb2a8d Fix clink version 2014-08-26 13:20:38 +02:00
2ba40773b3 Merge pull request #241 from narnaud/fix-vim
The latest msysgit comes with vim 7.4.
2014-08-26 08:51:57 +01:00
662663813e The latest msysgit comes with vim 7.4. 2014-08-26 05:50:07 +02:00
2ec650557e Merge pull request #199 from Jackbennett/docs-integration
New section for user help with an integration feature of Cmder.
2014-08-18 16:09:43 +01:00
932e517c2f Merge pull request #208 from MartiUK/master
Bump versions
2014-08-04 22:13:33 +01:00
6a9d6dd37e bump versions again 2014-08-04 22:13:23 +01:00
e9707b2022 Bump versions 2014-06-19 08:27:44 +01:00
ef91a9c272 New section for user help with an integration feature of Cmder. 2014-05-16 19:37:46 +01:00
9939b1ba7f CMDER_ROOT variable is now also in path
Now you can call cmder /whatever from cmder shell
2014-04-29 15:32:56 +02:00
c032b5f8a0 Using verbose output 2014-04-28 13:22:22 +02:00
9ce90d337b Using earlier version of msvcp and vcr 2014-04-28 13:22:22 +02:00
2a722ee3f3 Remove XP Launcher from TODO list. 2014-04-23 09:29:19 +01:00
3cfd032007 Merge pull request #180 from CoolOppo/patch-1
Update Clink URL
2014-04-14 08:03:47 +01:00
21f0f1dbb2 Update Clink URL
The current Clink URL takes you to the old page on Google
2014-04-13 14:43:05 -04:00
38c13a7f4b Merge branch 'master' of https://github.com/bliker/cmder 2014-04-11 14:31:44 +02:00
97980f5f34 XP compatible launcher 2014-04-11 14:31:16 +02:00
e3e1effef3 Disable click 2014-04-11 14:09:22 +02:00
2542358965 Color scheme from upstream
Before the monokai in the Conemu was different and not matching
colors correctly. Now that was fixed so no need to keep ours.
2014-04-11 14:02:56 +02:00
6b37074dd5 Reordered the PATH, closing #37
Now the msysgit is being loaded first, so find will invoke
the correct and better version
2014-04-11 14:02:34 +02:00
1b7e647b4b Merge pull request #177 from Jackbennett/7zip
Try to find 7-zip if it's installed before an error.
2014-04-11 13:56:32 +02:00
e6618f21a3 Try to find 7-zip if it's installed before an error.
Create an alias to 7z.exe in the script scope.
2014-04-10 18:34:31 +01:00
56a9a2036f Disable left click cursor change by default
Fixes #109
2014-04-10 14:51:03 +02:00
f6c3a0c390 Merge pull request #152 from bliker/scripts
New build and pack scripts
2014-04-10 14:44:39 +02:00
46f6f677dc Silencing the noise 2014-04-10 14:42:20 +02:00
d5d8b0944b Removed old ruby scripts 2014-04-10 13:13:20 +02:00
8e676b3fc7 Added history files 2014-04-10 13:12:38 +02:00
b9379b3ae2 Computing hashes 2014-04-10 13:11:41 +02:00
db49c14422 Fixed paths 2014-04-10 13:11:25 +02:00
46bebee94c More recent package versions 2014-04-10 12:57:45 +02:00
691000fa15 Merge pull request #159 from kohenkatz/fix-context-menu
Add registration for right-click on folder item; Add context-menu icon
2014-04-10 11:45:39 +01:00
df064ec4be Merged 2014-04-10 12:43:34 +02:00
e1c60104ba Updated build and pack Powershell 2014-04-10 12:41:19 +02:00
3a8daf57f7 Merge pull request #167 from schlamar/patch-1
Only cd to $HOME if started in CMDER_ROOT.
2014-03-19 19:50:14 +00:00
fa33052096 Only cd to $HOME if started in CMDER_ROOT. 2014-03-19 12:25:41 +01:00
fe31accba4 Merge pull request #165 from glucas/use_home
Allow for existing HOME variable
2014-03-14 10:23:18 +00:00
ea22c658b7 CD to HOME by default. 2014-03-11 15:12:35 -04:00
303bfda521 Use HOME if already set. 2014-03-11 15:08:24 -04:00
1f8b0c009a Merge pull request #162 from Jackbennett/scripts
Minor changes for #152
2014-03-05 16:48:01 +01:00
cf74dba780 merging in new additions to the pull request 2014-03-05 14:49:23 +00:00
a9bfd2d2a2 Silencing the output from 7z so I can actually see what else the script is
doing.
Adding some clearer dubugging info for cleaning up folders
2014-03-05 14:00:35 +00:00
b0b8eaef1e Error checking for 7z extraction 2014-03-05 14:31:01 +01:00
5243d8bb8d In powershell you pretty much never want to use Write-Host, its output can't be redirected along the pipeline. You couldn't pipe this output to a logfile. 2014-03-05 13:28:18 +00:00
1225d410fa Merge branch 'scripts' of https://github.com/bliker/cmder into scripts
Conflicts:
	scripts/build.ps1
2014-03-05 12:39:33 +00:00
c661b1f300 Removed unused function 2014-03-05 12:08:26 +00:00
4c1f96c51d Adjusted the build script behavior
Removed some absolute path, and refactored the code so
it handles the nested folder archives
2014-03-05 12:08:24 +00:00
f4b6d8f9a8 Refactored mail download loop, better error handling 2014-03-05 11:22:58 +01:00
0314ee5d46 Removed unused function 2014-03-02 22:04:58 +01:00
6a761a88c1 Adjusted the build script behavior
Removed some absolute path, and refactored the code so
it handles the nested folder archives
2014-03-02 22:00:04 +01:00
447be262f8 A better way to find string length 2014-02-27 18:44:46 -05:00
371ffbc069 Add registration for right-click on folder item; Add context-menu icon
Existing code registered right-click only for blank areas of the
Explorer window.  This change adds a menu item for right-clicking on a
folder in the file list.
Also adds the program's icon to help find it in a crowded context menu.
2014-02-27 18:34:37 -05:00
6d0d93e0fd Merge pull request #157 from Jackbennett/scripts
Getting the build script to a working state
2014-02-26 22:29:31 +01:00
b4a264b1bc This commit amends far more than I would have liked to.
working script will;
Remove existing folders named in the sources
Download the packages listed in sources.json
Extracts the above packages
deletes the downloaded package
2014-02-26 16:46:23 +00:00
3bd0fe517f Need to use an optional package field;
incase url's that don't put the file in the url.
2014-02-26 16:42:48 +00:00
83cd726a41 First sources.json draft 2014-02-24 17:55:34 +01:00
b30056c4b3 First draft of new build script 2014-02-24 17:33:14 +01:00
7688823886 Checking for git and clink 2014-02-18 15:59:44 +01:00
878499cc0b Added bash 2014-02-02 19:08:59 +01:00
0f118fe42d Merge pull request #125 from saaguero/patch-1
Ability to change Font Size using Ctrl+MouseWheel
2014-01-31 08:27:58 -08:00
f719f9d51f Merge pull request #98 from jcheng31/patch-1
Update fast new tab shortcut in README.
2014-01-31 08:27:01 -08:00
86d77b9e6b Ability to change Font Size using Ctrl+MouseWheel 2014-01-28 18:10:15 -02:00
937df38131 Todo list & bonus alias
Added todo list and added an alias.
2014-01-21 23:48:41 +00:00
4120875e33 bump version 2014-01-02 21:23:40 +01:00
c91f8ac461 Conditional delete 2013-12-31 16:12:12 +01:00
c43ad3cb40 Cleanup of the cleanup file
Moved the cleanup to another branch
2013-12-31 15:51:03 +01:00
e0540e43da Update new tab shortcut in README. 2013-12-26 16:11:11 +08:00
cfa0bc9a26 Merge branch 'master' of https://github.com/bliker/cmder 2013-12-24 20:45:56 +01:00
4ac8f5ad82 keep the launcher for winxp 2013-12-24 20:45:43 +01:00
640bdba8bb Merge pull request #88 from sc0tt/master
Make cmd use Cmder icon
2013-12-24 11:42:45 -08:00
88e17fc44a Adding .dlls to git for now 2013-12-24 14:41:36 +01:00
67bdd93c3e Merge pull request #85 from MartiUK/gitcleanup
Git exe Cleanup + some bonuses
2013-12-24 05:38:49 -08:00
804126cf7d Merge pull request #2 from sicil1ano/dev
Git directory cleanup ruby script
2013-12-13 10:30:06 -08:00
94f0ea5c1a Fix Icon
Use the Cmder icon for the application instead of the Cmd.exe icon
2013-12-13 13:27:59 -05:00
71513486ee renamed gitcleanup script 2013-12-13 19:09:25 +01:00
3aeae2871a added missing next 2013-12-13 19:05:21 +01:00
d0e383e5c0 added cleanup script for git directory 2013-12-13 00:49:15 +01:00
2c8364ce58 fixed little mistake in vendor/readme 2013-12-13 00:32:22 +01:00
fc3422e1ba fixed errors and grammar 2013-12-13 00:32:22 +01:00
72aac17c3e Latest release 2013-12-12 19:18:04 +01:00
feec00f233 Merge pull request #1 from MartiUK/master
Remove any ruby implementations of gitcleanup
2013-12-12 04:30:06 -08:00
d9a6bb7e5f Remove any ruby implementations of gitcleanup 2013-12-12 12:29:09 +00:00
d396dd9d33 Initial commit of gitcleanup.py
Initial commit of gitcleanup.py
2013-12-12 12:24:08 +00:00
de30ed5424 Initial git cleanup creation 2013-12-09 17:21:47 +00:00
21 changed files with 335 additions and 221 deletions

3
.gitignore vendored
View File

@ -4,6 +4,9 @@
vendor/*
!vendor/*.md
!vendor/*.bat
!vendor/*.json
config/.history
Thumbs.db
*.exe
build/

3
Cmder.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
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"

BIN
Cmder.exe

Binary file not shown.

View File

@ -1,14 +1,14 @@
# 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.
![Cmder Screenshot](http://i.imgur.com/g1nNf0I.png)
## Why use it
The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies. That 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.
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
@ -19,6 +19,20 @@ The main advantage of Cmder is portability. It is designed to be totally self-co
*(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
### Tab manipulation
@ -26,7 +40,7 @@ The main advantage of Cmder is portability. It is designed to be totally self-co
* `Ctrl + t` : new tab dialog (maybe you want to open cmd as admin?)
* `Ctrl + w` : close tab
* `Ctrl + d` : close tab (if pressed on empty command)
* `Ctrl + alt + number` : fast new tab: `1` - CMD, `2` - Powershell `*` - More to come
* `Shift + alt + number` : fast new tab: `1` - CMD, `2` - Powershell `*` - More to come
* `Alt + enter`: Fullscreen
### Shell
@ -49,7 +63,11 @@ All aliases will be saved in `/config/aliases` file
## 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

View File

@ -1,3 +1,3 @@
## Bin
This folder will be injected into path at runtime
This folder will be injected into the PATH environment variable at runtime.

110
build.rb
View File

@ -1,110 +0,0 @@
# Samuel Vasko 2013
# Cmder build script
# Like really a beta
#
# This script downloads dependencies form google code. Each software is extracted
# in a folder with same name as the project on google code. So Conemu becomes
# conemu-maximus5. Correct files are beeing picked by using labels.
# I will move the script for getting files by labels from php to here as soon I feel like it
require 'fileutils'
require 'open-uri'
require 'uri'
def get_file project, query
urlToFile = URI.escape('http://samuelvasko.tk/gcode/?project='+project+'&query='+query)
open(urlToFile) do |resp|
urlToFile = URI.escape(resp.read.split(/\r?\n/).first)
end
extension = urlToFile.split('.').last
filename = project+'.'+extension
puts "\n ------ Downloading #{project} from #{urlToFile} ------- \n \n"
begin
open(urlToFile, 'rb') do |infile|
open(filename, 'wb') do |outfile|
outfile.write(infile.read)
end
end
rescue IOError => error
puts error
FileUtils.rm(filename) if File.exists?(filename)
exit(1)
end
system("7z x -o\"#{project}\" #{filename}")
File.unlink(project+"."+extension);
# When the folder contains another folder
# that is not what we want
if Dir.glob("#{project}/*").length == 1
temp_name = "#{project}_temp"
FileUtils.mv(project, temp_name)
FileUtils.mv(Dir.glob("#{temp_name}/*")[0], project)
FileUtils.rm_r(temp_name)
end
end
def find_on_path exe
path = ENV['PATH'].split(File::PATH_SEPARATOR)
for dir in path
if File.exists?(File.join(dir, exe))
return true
end
end
return false
end
puts '
______ _ _ _ _ _
| ___ \ (_) | | (_) | |
| |_/ /_ _ _| | __| |_ _ __ __ _ ___ _ __ ___ __| | ___ _ __
| ___ \ | | | | |/ _` | | \'_ \ / _` | / __| \'_ ` _ \ / _` |/ _ \ \'__|
| |_/ / |_| | | | (_| | | | | | (_| | | (__| | | | | | (_| | __/ |
\____/ \__,_|_|_|\__,_|_|_| |_|\__, | \___|_| |_| |_|\__,_|\___|_|
__/ |
|___/
'
unless find_on_path('7z.exe')
puts '7z.exe not found. Ensure 7-zip is installed and on the PATH.'
exit(1)
end
build_exe = true
unless find_on_path('msbuild.exe')
puts 'msbuild.exe not found. We need that to build the executable.'
puts 'Do you want to continue? [Y/n]'
build_exe = false
exit(1) unless gets.chomp.downcase == 'y'
end
puts 'Cleanup'
if Dir.exists?('vendor')
Dir.glob('vendor/*') { |file| FileUtils.rm_rf(file) if File.directory?(file) }
end
Dir.chdir('vendor')
puts 'Getting files'
get_file('clink', 'label:Type-Archive label:Featured')
get_file('conemu-maximus5', 'label:Type-Archive label:Preview label:Featured')
get_file('msysgit', 'label:Type-Archive label:Featured')
puts 'Creating executable'
if build_exe
Dir.chdir('../launcher')
status = system('msbuild /p:Configuration=Release')
unless status
puts 'Looks like the build failied'
exit(1)
end
end
puts 'Done, bye'

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2013-11-29 16:19:40" build="131107">
<key name=".Vanilla" modified="2014-01-21 18:36:36" build="131215">
<value name="ColorTable00" type="dword" data="00222827"/>
<value name="ColorTable01" type="dword" data="009e5401"/>
<value name="ColorTable02" type="dword" data="0004aa74"/>
@ -18,21 +18,21 @@
<value name="ColorTable13" type="dword" data="00b87da8"/>
<value name="ColorTable14" type="dword" data="0081cccc"/>
<value name="ColorTable15" type="dword" data="00ffffff"/>
<value name="ColorTable16" type="dword" data="00000000"/>
<value name="ColorTable17" type="dword" data="00800000"/>
<value name="ColorTable18" type="dword" data="00008000"/>
<value name="ColorTable19" type="dword" data="00808000"/>
<value name="ColorTable20" type="dword" data="00000080"/>
<value name="ColorTable21" type="dword" data="00800080"/>
<value name="ColorTable22" type="dword" data="00008080"/>
<value name="ColorTable23" type="dword" data="00c0c0c0"/>
<value name="ColorTable24" type="dword" data="00808080"/>
<value name="ColorTable25" type="dword" data="00ff0000"/>
<value name="ColorTable26" type="dword" data="0000ff00"/>
<value name="ColorTable27" type="dword" data="00ffff00"/>
<value name="ColorTable28" type="dword" data="000000ff"/>
<value name="ColorTable29" type="dword" data="00ff00ff"/>
<value name="ColorTable30" type="dword" data="0000ffff"/>
<value name="ColorTable16" type="dword" data="00222827"/>
<value name="ColorTable17" type="dword" data="009e5401"/>
<value name="ColorTable18" type="dword" data="0004aa74"/>
<value name="ColorTable19" type="dword" data="00a6831a"/>
<value name="ColorTable20" type="dword" data="003403a7"/>
<value name="ColorTable21" type="dword" data="009c5689"/>
<value name="ColorTable22" type="dword" data="0049b6b6"/>
<value name="ColorTable23" type="dword" data="00cacaca"/>
<value name="ColorTable24" type="dword" data="007c7c7c"/>
<value name="ColorTable25" type="dword" data="00f58303"/>
<value name="ColorTable26" type="dword" data="0006d08d"/>
<value name="ColorTable27" type="dword" data="00e5c258"/>
<value name="ColorTable28" type="dword" data="004b04f3"/>
<value name="ColorTable29" type="dword" data="00b87da8"/>
<value name="ColorTable30" type="dword" data="0081cccc"/>
<value name="ColorTable31" type="dword" data="00ffffff"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="0e"/>
@ -53,7 +53,7 @@
<value name="ClipboardArrowStart" type="hex" data="00"/>
<value name="ClipboardAllLines" 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="TrueColorerSupport" type="hex" data="01"/>
<value name="FadeInactive" type="hex" data="01"/>
@ -349,7 +349,7 @@
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
<value name="SetFocusGui" 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.NewConsoleShift" type="dword" data="00001154"/>
<value name="Multi.NewConsolePopup" type="dword" data="80808000"/>
@ -415,10 +415,10 @@
<value name="KeyMacro01.Text" type="string" data="Task(&quot;cmd&quot;)"/>
<value name="KeyMacro02" type="dword" data="0012a032"/>
<value name="KeyMacro02.Text" type="string" data="Task(&quot;PowerShell&quot;)"/>
<value name="KeyMacro03" type="dword" data="00000000"/>
<value name="KeyMacro03.Text" type="string" data=""/>
<value name="KeyMacro04" type="dword" data="00000000"/>
<value name="KeyMacro04.Text" type="string" data=""/>
<value name="KeyMacro03" type="dword" data="000011d0"/>
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
<value name="KeyMacro04" type="dword" data="000011d1"/>
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
<value name="KeyMacro05" type="dword" data="00000000"/>
<value name="KeyMacro05.Text" type="string" data=""/>
<value name="KeyMacro06" type="dword" data="00000000"/>
@ -483,17 +483,17 @@
<value name="DndLKey" type="hex" data="00"/>
<value name="DndRKey" type="hex" data="a2"/>
<value name="WndDragKey" type="dword" data="00121101"/>
<key name="Tasks" modified="2013-11-29 16:19:41" build="131107">
<key name="Tasks" modified="2014-01-21 18:36:36" build="131215">
<value name="Count" type="dword" data="00000002"/>
<key name="Task1" modified="2013-11-29 16:19:41" build="131107">
<key name="Task1" modified="2014-01-21 18:36:36" build="131215">
<value name="Name" type="string" data="{cmd}"/>
<value name="GuiArgs" type="string" data=" /icon &quot;cmd.exe&quot;"/>
<value name="GuiArgs" type="string" data=" /icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="cmd /k &quot;%CMDER_ROOT%\vendor\init.bat&quot; -new_console:d:%USERPROFILE%"/>
<value name="Active" type="dword" data="00000000"/>
<value name="Count" type="dword" data="00000001"/>
<value name="Hotkey" type="dword" data="00000000"/>
</key>
<key name="Task2" modified="2013-11-29 16:19:41" build="131107">
<key name="Task2" modified="2014-01-21 18:36:36" build="131215">
<value name="Name" type="string" data="{PowerShell}"/>
<value name="GuiArgs" type="string" data="/dir &quot;%userprofile%&quot;"/>
<value name="Cmd1" type="string" data="powershell"/>
@ -502,11 +502,11 @@
<value name="Hotkey" type="dword" data="00000000"/>
</key>
</key>
<key name="Apps" modified="2013-11-29 16:19:41" build="131107">
<key name="Apps" modified="2014-01-21 18:36:36" build="131215">
<value name="Count" type="dword" data="00000000"/>
</key>
<key name="Colors" modified="2013-11-29 16:19:41" build="131107">
<key name="Palette1" modified="2013-11-29 16:19:41" build="131107">
<key name="Colors" modified="2014-01-21 18:36:36" build="131215">
<key name="Palette1" modified="2014-01-21 18:36:36" build="131215">
<value name="Name" type="string" data="Monokai"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="0e"/>
@ -573,6 +573,14 @@
<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>

View File

@ -1,3 +1,3 @@
## 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.

View File

@ -2,3 +2,4 @@ e.=explorer .
gl=git log --oneline --all --graph --decorate $*
ls=ls --color $*
pwd=cd
clear=cls

View File

@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
# 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}"

View File

@ -12,8 +12,11 @@
#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 L"Directory\\Background\\shell\\Cmder"
#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)
@ -154,30 +157,42 @@ HKEY GetRootKey(std::wstring opt)
return root;
}
void RegisterShellMenu(std::wstring opt)
void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
{
HKEY root = GetRootKey(opt);
HKEY cmderKey;
FAIL_ON_ERROR(
RegCreateKeyEx(root, SHELL_MENU_REGISTRY_PATH, 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));
HKEY command;
FAIL_ON_ERROR(
RegCreateKeyEx(cmderKey, L"command", 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &command, NULL));
// 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);
@ -185,15 +200,18 @@ void RegisterShellMenu(std::wstring opt)
RegCloseKey(root);
}
void UnregisterShellMenu(std::wstring opt)
void UnregisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
{
HKEY root = GetRootKey(opt);
HKEY cmderKey;
FAIL_ON_ERROR(
RegCreateKeyEx(root, SHELL_MENU_REGISTRY_PATH, 0, NULL,
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));
FAIL_ON_ERROR(RegDeleteKey(root, SHELL_MENU_REGISTRY_PATH));
#endif
RegCloseKey(cmderKey);
RegCloseKey(root);
}
@ -215,11 +233,13 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
}
else if (streqi(opt.first.c_str(), L"/REGISTER"))
{
RegisterShellMenu(opt.second);
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);
UnregisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_BACKGROUND);
UnregisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_LISTITEM);
}
else
{
@ -228,4 +248,4 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
}
return 0;
}
}

BIN
msvcp110.dll Normal file

Binary file not shown.

BIN
msvcr110.dll Normal file

Binary file not shown.

40
pack.rb
View File

@ -1,40 +0,0 @@
# Samuel Vasko 2013
# Cmder packing script -- Creates zip files for relase
require "fileutils"
def create_archive name, exclude
if exclude
exclude = " -x!cmder\\" + exclude
else
exclude = ""
end
system('ls')
puts "Running 7z a -x@cmder\\packignore" + exclude + " " + name + " cmder"
system("7z a -x@cmder\\packignore" + exclude + " " + name + " cmder")
end
targets = [
["cmder.zip"],
["cmder.7z"],
["cmder_mini.zip", "vendor\\msysgit"]
]
unless system("git describe --abbrev=0 --tags")
puts "Failied to get the last tag from git, looks like something is missing"
end
version = `git describe --abbrev=0 --tags`
FileUtils.touch('Version ' + version.chomp)
FileUtils.rm('config/.history')
Dir.chdir('..')
targets.each do |ar|
create_archive ar[0], ar[1]
end
Dir.chdir('cmder')
FileUtils.rm('Version ' + version.chomp)

View File

@ -1,8 +1,10 @@
cmder\launcher
cmder\icons
cmder\.gitignore
cmder\.gitattributes
cmder\.git
cmder\*.rb
cmder\packignore
cmder\Cmder.bat
launcher
icons
.gitignore
.gitattributes
.git
*.rb
build
config\.history
packignore
Cmder.bat

79
scripts/build.ps1 Normal file
View 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
View 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
View 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
View File

@ -1,3 +1,3 @@
## Vendor
Software from third parties + init sctipt
Third parties software & init script.

12
vendor/init.bat vendored
View File

@ -24,12 +24,18 @@
:: Enhance Path
@set git_install_root=%CMDER_ROOT%\vendor\msysgit
@set PATH=%PATH%;%CMDER_ROOT%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%git_install_root%\share\vim\vim73;
@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
@doskey /macrofile="%CMDER_ROOT%\config\aliases"
:: Set home path
@set HOME=%USERPROFILE%
@if not defined HOME set HOME=%USERPROFILE%
@if defined CMDER_START cd /d "%CMDER_START%"
@if defined CMDER_START (
@cd /d "%CMDER_START%"
) else (
@if "%CD%\" == "%CMDER_ROOT%" (
@cd /d "%HOME%"
)
)

17
vendor/sources.json vendored Normal file
View 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"
}
]