Compare commits

..

61 Commits

Author SHA1 Message Date
1108d7ca1f Merge branch 'master' of https://github.com/bliker/cmder into development 2014-01-31 17:32:48 +01:00
000a3e40e0 Merge branch 'master' into development 2014-01-31 17:31:25 +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
bf882f1dc1 Reordered the PATH, closing #37
Now the msysgit is being loaded first, so find will invoke
the correct and better version
2014-01-31 17:22:08 +01:00
8e0afaf846 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-01-31 17:16:29 +01:00
f8850b1344 Merge branch 'xplauncher' into development 2014-01-29 23:44:33 +00: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
6b2d288fbd Disable left click cursor change by default
Fixes #109
2014-01-21 19:40:05 +00:00
8303a7acbc XP compatible launcher
Building will have to be sorted but it's a start, please test as I don't
have an XP machine anymore.
2014-01-21 18:25:24 +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
4f5a96aec7 whops 2013-12-09 18:52:04 +01:00
cbe2f25dcb Hi there 2013-12-09 18:48:30 +01:00
fcea0b5b49 Real launcher added! :pops champagne: 2013-12-09 18:23:23 +01:00
08e478f7a9 Removed the batch launcher 2013-12-09 18:22:34 +01:00
de30ed5424 Initial git cleanup creation 2013-12-09 17:21:47 +00:00
27f0eb2c95 Quick and dirty packaging 2013-12-09 18:17:35 +01:00
394c24eb16 Now also compiles the launcher 2013-12-09 11:24:44 +01:00
d1d8c3ef76 Build and pack now 2013-12-09 01:00:36 +01:00
4744fb1c61 Messages are useless, I always clear them 2013-12-09 00:56:16 +01:00
3c979780f9 handles spaces better, also using CMDER_ROOT for everything 2013-12-09 00:55:18 +01:00
092c046456 Tricky whitespace 2013-12-09 00:52:46 +01:00
c1029ab245 Use windows native copy instead of cp 2013-12-07 21:56:19 +01:00
fc19a8b328 Merge branch 'master' of https://github.com/bliker/cmder 2013-12-07 21:44:46 +01:00
340d70a596 This somehow works in git folder 2013-12-07 21:44:33 +01:00
fa179f6528 Lambda is now handled by clink 2013-12-07 21:04:38 +01:00
e5e9e67ee7 Merge pull request #77 from jdsumsion/patch-1
Fixed a couple tiny typos in the readme
2013-12-07 10:52:06 -08:00
8e0312aec4 Merge pull request #62 from austinwagner/master
Add executable launcher
2013-12-07 10:50:34 -08:00
8f6a473a40 Add Cmder Here
Add option to launcher to register and unregister Cmder Here
2013-12-07 09:17:35 -05:00
2b12546cb0 Merge pull request #75 from brkc/term-cygwin
Change TERM from msys to cygwin.
2013-12-07 05:57:31 -08:00
ed42db82f6 Fixed a couple tiny typos in the readme
Also added a shortcut I saw in the config.
2013-12-05 11:08:08 -07:00
5c20bbb08d Merge pull request #74 from MartiUK/patch-2
Removed "C:\Users\bliker" reference in config/ConEmu.xml
2013-12-05 06:16:58 -08:00
56613b9758 Change TERM from msys to cygwin. 2013-12-05 06:03:13 -05:00
1ef7ca682f Removed "C:\Users\bliker" reference in config/ConEmu.xml
Fixes #71
2013-12-05 08:24:34 +00:00
9feec9e0c2 Better dirty check 2013-11-30 19:26:56 +01:00
686e3516ed Fix for #40 2013-11-30 19:22:19 +01:00
48e4046754 Add launcher
Fixes bliker/cmder#39
Launcher replaces functionality of batch file to allow taskbar pinning
2013-11-30 09:15:42 -05:00
d3d2b80d88 Merge pull request #60 from austinwagner/master
Remove wget dependency and verify existence of 7z.exe in build script
2013-11-29 08:59:26 -08:00
6126437762 Check for 7-zip before build 2013-11-29 11:48:32 -05:00
168958ce2b Remove wget dependency in build script 2013-11-29 11:47:08 -05:00
ee50cc5e7c Whops, fixed the start dir 2013-11-29 16:21:07 +01:00
23 changed files with 858 additions and 131 deletions

BIN
Cmder.exe Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
# Cmder
**Yes, you can [download latest release](https://github.com/bliker/cmder/releases)**
Latest release is **[v1.1.3](https://github.com/bliker/cmder/releases/tag/v1.1.3)**
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.
@ -8,7 +8,7 @@ Cmder is a **software package** created out of pure frustration over absence of
## Why use it
The main advantage of Cmder is portability. It is designed to be totally self-contained 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
@ -25,13 +25,14 @@ 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 + 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
### Shell
* `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
* `Shift + mouse` : Select and copy text from buffer
@ -48,7 +49,10 @@ 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. Launcher XP compatibility.
## 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.

View File

@ -13,8 +13,8 @@ if not ["%_temp%"] == ["%_temp2%"] (
goto:eof
)
echo %* >> %~dp0..\config\aliases
doskey /macrofile=%~dp0..\config\aliases
echo %* >> "%CMDER_ROOT%\config\aliases"
doskey /macrofile="%CMDER_ROOT%\config\aliases"
echo Alias created
endlocal
goto:eof

125
build.rb Normal file
View File

@ -0,0 +1,125 @@
# 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'
puts 'Build for XP? (Default: No)'
if gets.downcase =='yes' or 'y'
XP = true
elsif gets.downcase == 'no' or 'n'
XP = false
else
puts 'Defaulting to non-XP build'
XP = false
end
if build_exe
Dir.chdir('../launcher')
if XP
puts 'Building XP Compatible Launcher...'
status = system('msbuild /p:Configuration=ReleaseXP')
else
status = system('msbuild /p:Configuration=Release')
end
unless status
puts 'Looks like the build failed'
exit(1)
end
end
puts 'Done, bye'

View File

@ -1,70 +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'
def get_file project, query
# Should be changed to integrated downloader
urlToFile = 'wget -q -O - "http://samuelvasko.tk/gcode/?project='+project+'&query='+query+'"'
urlToFile = `#{urlToFile}`
urlToFile = urlToFile.split("\n").first
extension = urlToFile.split('.').last
filename = project+'.'+extension
puts "\n ------ Downloading #{project} ------- \n \n"
get_file = system("wget -O #{filename} #{urlToFile}")
unless get_file
puts "Failied to download #{project} from #{urlToFile}"
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
puts '
______ _ _ _ _ _
| ___ \ (_) | | (_) | |
| |_/ /_ _ _| | __| |_ _ __ __ _ ___ _ __ ___ __| | ___ _ __
| ___ \ | | | | |/ _` | | \'_ \ / _` | / __| \'_ ` _ \ / _` |/ _ \ \'__|
| |_/ / |_| | | | (_| | | | | | (_| | | (__| | | | | | (_| | __/ |
\____/ \__,_|_|_|\__,_|_|_| |_|\__, | \___|_| |_| |_|\__,_|\___|_|
__/ |
|___/
'
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 '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 12:17:57" 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"/>
@ -77,7 +77,7 @@
<value name="StartFarEditors" type="hex" data="00"/>
<value name="StoreTaskbarkTasks" 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="ShowHelpTooltips" type="hex" data="01"/>
<value name="Multi" type="hex" data="01"/>
@ -193,7 +193,7 @@
<value name="FARuseASCIIsort" type="hex" data="00"/>
<value name="ShellNoZoneCheck" 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="MouseSkipActivation" type="hex" data="01"/>
<value name="MouseSkipMoving" type="hex" data="01"/>
@ -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 12:17:57" 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 12:17:57" 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="Cmd1" type="string" data="cmd /k %CMDER_ROOT%\vendor\init.bat"/>
<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 12:17:57" 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 12:17:57" 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 12:17:57" build="131107">
<key name="Palette1" modified="2013-11-29 12:17:57" build="131107">
<key name="Colors" modified="2014-01-31 17:13:53" build="131107">
<key name="Palette1" modified="2014-01-31 17:13:53" build="131107">
<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

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

View File

@ -18,7 +18,7 @@ end
-- @return {bool}
---
function get_git_status()
return os.execute("git diff-files --quiet --ignore-submodules")
return os.execute("git diff --quiet --ignore-submodules HEAD")
end
function git_prompt_filter()

5
config/prompt.lua Normal file
View 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)

181
launcher/.gitignore vendored Normal file
View 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/

View File

@ -0,0 +1,28 @@

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
DebugXP|Win32 = DebugXP|Win32
Release|Win32 = Release|Win32
ReleaseXP|Win32 = ReleaseXP|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}.DebugXP|Win32.ActiveCfg = DebugXP|Win32
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.DebugXP|Win32.Build.0 = DebugXP|Win32
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.ActiveCfg = Release|Win32
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.Build.0 = Release|Win32
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.ReleaseXP|Win32.ActiveCfg = ReleaseXP|Win32
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.ReleaseXP|Win32.Build.0 = ReleaseXP|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,169 @@
<?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="DebugXP|Win32">
<Configuration>DebugXP</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseXP|Win32">
<Configuration>ReleaseXP</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)'=='DebugXP|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120_xp</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>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</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 Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'" Label="PropertySheets">
<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>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'" Label="PropertySheets">
<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)'=='DebugXP|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>Cmder</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>Cmder</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|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)'=='DebugXP|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;XP;%(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>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>false</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;XP;%(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>

View File

@ -0,0 +1,236 @@
#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 MB_TITLE L"Cmder Launcher"
#define SHELL_MENU_REGISTRY_PATH L"Directory\\Background\\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)
{
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));
wchar_t exePath[MAX_PATH] = { 0 };
GetModuleFileName(NULL, exePath, sizeof(exePath));
wchar_t commandStr[MAX_PATH + 20] = { 0 };
swprintf_s(commandStr, L"\"%s\" \"%%V\"", exePath);
FAIL_ON_ERROR(RegSetValue(command, L"", REG_SZ, commandStr, NULL));
RegCloseKey(command);
RegCloseKey(cmderKey);
RegCloseKey(root);
}
void UnregisterShellMenu(std::wstring opt)
{
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));
#ifdef XP
FAIL_ON_ERROR(SHDeleteKey(cmderKey, NULL));
FAIL_ON_ERROR(SHDeleteKey(root, SHELL_MENU_REGISTRY_PATH));
#else
FAIL_ON_ERROR(RegDeleteTree(cmderKey, NULL));
FAIL_ON_ERROR(RegDeleteKey(root, SHELL_MENU_REGISTRY_PATH));
#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);
}
else if (streqi(opt.first.c_str(), L"/UNREGISTER"))
{
UnregisterShellMenu(opt.second);
}
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

Binary file not shown.

BIN
launcher/src/resource.h Normal file

Binary file not shown.

BIN
msvcp120.dll Normal file

Binary file not shown.

BIN
msvcr120.dll Normal file

Binary file not shown.

40
pack.rb Normal file
View File

@ -0,0 +1,40 @@
# 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') if File.exists?('config/.history')
Dir.chdir('..')
targets.each do |ar|
create_archive ar[0], ar[1]
end
Dir.chdir('cmder')
FileUtils.rm('Version ' + version.chomp)

8
packignore Normal file
View File

@ -0,0 +1,8 @@
cmder\launcher
cmder\icons
cmder\.gitignore
cmder\.gitattributes
cmder\.git
cmder\*.rb
cmder\packignore
cmder\Cmder.bat

2
vendor/Readme.md vendored
View File

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

28
vendor/init.bat vendored
View File

@ -2,16 +2,9 @@
:: Sets some nice defaults
:: Created as part of cmder project
:: Setting prompt style
@for /f "tokens=2 delims=:." %%x in ('chcp') do @set cp=%%x
:: The slow part
:: World without Unicode is a sad world
@chcp 65001>nul
:: It has to be lambda, I already made a logo
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40mλ$S$E[0m
@chcp %cp%>nul
:: Change the prompt style
:: 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
@if "%PROCESSOR_ARCHITECTURE%"=="x86" (
@ -20,24 +13,23 @@
set architecture=64
)
@set rootDir="%~dp0\.."
:: Run clink
@%rootDir%\vendor\clink\clink_x%architecture%.exe inject --quiet --profile %rootDir%\config
@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config"
:: Prepare for msysgit
:: I do not even know, copypasted from their .bat
@set PLINK_PROTOCOL=ssh
@if not defined TERM set TERM=msys
@if not defined TERM set TERM=cygwin
:: Enhance Path
@set git_install_root=%rootDir%\vendor\msysgit
@set PATH=%PATH%;%rootDir%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%git_install_root%\share\vim\vim73;
@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\vim73;%PATH%
:: Add aliases
@doskey /macrofile="%rootDir%\config\aliases"
@doskey /macrofile="%CMDER_ROOT%\config\aliases"
:: Set home path
@set HOME=%USERPROFILE%
@echo Welcome to cmder!
@if defined CMDER_START cd /d "%CMDER_START%"