Skip to content

Commit 7d3dba1

Browse files
donglymysterywolf
authored andcommitted
rt-thread env 从 CmdInit.cmd 中分离出来
1 parent 528b0e4 commit 7d3dba1

File tree

4 files changed

+216
-90
lines changed

4 files changed

+216
-90
lines changed

logo.ico

4.19 KB
Binary file not shown.

tools/ConEmu/ConEmu.xml

Lines changed: 94 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<key name="Software">
33
<key name="ConEmu">
4-
<key name=".Vanilla" modified="2024-02-13 22:17:56" build="230724">
4+
<key name=".Vanilla" modified="2024-02-14 12:44:03" build="230724">
55
<value name="StartType" type="hex" data="02"/>
66
<value name="CmdLine" type="string" data=""/>
77
<value name="StartTasksFile" type="string" data=""/>
8-
<value name="StartTasksName" type="string" data="{Shells::cmd}"/>
8+
<value name="StartTasksName" type="string" data="{rtt-env}"/>
99
<value name="StartFarFolders" type="hex" data="00"/>
1010
<value name="StartFarEditors" type="hex" data="00"/>
1111
<value name="ColorTable00" type="dword" data="00222827"/>
@@ -264,11 +264,11 @@
264264
<value name="Cascaded" type="hex" data="01"/>
265265
<value name="IntegralSize" type="hex" data="00"/>
266266
<value name="WindowMode" type="dword" data="0000051f"/>
267-
<value name="ConWnd X" type="long" data="469"/>
268-
<value name="ConWnd Y" type="long" data="333"/>
267+
<value name="ConWnd X" type="long" data="1083"/>
268+
<value name="ConWnd Y" type="long" data="336"/>
269269
<value name="LastMonitor" type="string" data="0,0,2560,1390"/>
270-
<value name="ConWnd Width" type="dword" data="0000007c"/>
271-
<value name="ConWnd Height" type="dword" data="00000023"/>
270+
<value name="ConWnd Width" type="dword" data="0000007b"/>
271+
<value name="ConWnd Height" type="dword" data="00000022"/>
272272
<value name="16bit Height" type="ulong" data="0"/>
273273
<value name="StartCreateDelay" type="ulong" data="100"/>
274274
<value name="ExtendFonts" type="hex" data="00"/>
@@ -599,9 +599,18 @@
599599
<value name="Update.DownloadPath" type="string" data="%TEMP%\ConEmu"/>
600600
<value name="Update.LeavePackages" type="hex" data="00"/>
601601
<value name="Update.PostUpdateCmd" type="string" data="echo Last successful update&gt;ConEmuUpdate.info &amp;&amp; date /t&gt;&gt;ConEmuUpdate.info &amp;&amp; time /t&gt;&gt;ConEmuUpdate.info"/>
602-
<key name="Tasks" modified="2018-03-08 18:23:55" build="180206">
603-
<value name="Count" type="long" data="14"/>
604-
<key name="Task1" modified="2018-03-08 18:23:55" build="180206">
602+
<key name="Tasks" modified="2024-02-13 23:54:10" build="230724">
603+
<value name="Count" type="long" data="22"/>
604+
<key name="Task1" modified="2024-02-14 12:43:37" build="230724">
605+
<value name="Name" type="string" data="{rtt-env}"/>
606+
<value name="Flags" type="dword" data="00000004"/>
607+
<value name="Hotkey" type="dword" data="00000000"/>
608+
<value name="GuiArgs" type="string" data='/icon "%ConEmuBaseDir%\..\..\..\logo.ico"'/>
609+
<value name="Active" type="long" data="0"/>
610+
<value name="Count" type="long" data="1"/>
611+
<value name="Cmd1" type="string" data='cmd.exe /k ""%ConEmuBaseDir%\CmdInit.cmd" "%ConEmuBaseDir%\..\..\bin\env-init.bat""'/>
612+
</key>
613+
<key name="Task2" modified="2024-02-13 23:54:10" build="230724">
605614
<value name="Name" type="string" data="{Shells::cmd}"/>
606615
<value name="Flags" type="dword" data="00000002"/>
607616
<value name="Hotkey" type="dword" data="00000000"/>
@@ -610,7 +619,7 @@
610619
<value name="Count" type="long" data="1"/>
611620
<value name="Cmd1" type="string" data='cmd.exe /k "%ConEmuBaseDir%\CmdInit.cmd"'/>
612621
</key>
613-
<key name="Task2" modified="2018-03-08 18:23:55" build="180206">
622+
<key name="Task3" modified="2024-02-13 23:54:10" build="230724">
614623
<value name="Name" type="string" data="{Shells::cmd (Admin)}"/>
615624
<value name="Flags" type="dword" data="00000004"/>
616625
<value name="Hotkey" type="dword" data="00000000"/>
@@ -619,7 +628,7 @@
619628
<value name="Count" type="long" data="1"/>
620629
<value name="Cmd1" type="string" data='cmd.exe /k "%ConEmuBaseDir%\CmdInit.cmd" -new_console:a'/>
621630
</key>
622-
<key name="Task3" modified="2018-03-08 18:23:55" build="180206">
631+
<key name="Task4" modified="2024-02-13 23:54:10" build="230724">
623632
<value name="Name" type="string" data="{Shells::cmd-32}"/>
624633
<value name="Flags" type="dword" data="00000004"/>
625634
<value name="Hotkey" type="dword" data="00000000"/>
@@ -628,7 +637,7 @@
628637
<value name="Count" type="long" data="1"/>
629638
<value name="Cmd1" type="string" data='"%windir%\syswow64\cmd.exe" /k "%ConEmuBaseDir%\CmdInit.cmd"'/>
630639
</key>
631-
<key name="Task4" modified="2018-03-08 18:23:55" build="180206">
640+
<key name="Task5" modified="2024-02-13 23:54:10" build="230724">
632641
<value name="Name" type="string" data="{Shells::cmd 64/32}"/>
633642
<value name="Flags" type="dword" data="00000004"/>
634643
<value name="Hotkey" type="dword" data="00000000"/>
@@ -638,7 +647,7 @@
638647
<value name="Cmd1" type="string" data='&gt; "%windir%\system32\cmd.exe" /k ""%ConEmuBaseDir%\CmdInit.cmd" &amp; echo This is Native cmd.exe"'/>
639648
<value name="Cmd2" type="string" data='"%windir%\syswow64\cmd.exe" /k ""%ConEmuBaseDir%\CmdInit.cmd" &amp; echo This is 32 bit cmd.exe -new_console:s50V"'/>
640649
</key>
641-
<key name="Task5" modified="2018-03-08 18:23:55" build="180206">
650+
<key name="Task6" modified="2024-02-13 23:54:10" build="230724">
642651
<value name="Name" type="string" data="{Shells::PowerShell}"/>
643652
<value name="Flags" type="dword" data="00000004"/>
644653
<value name="Hotkey" type="dword" data="00000000"/>
@@ -647,7 +656,7 @@
647656
<value name="Count" type="long" data="1"/>
648657
<value name="Cmd1" type="string" data="powershell.exe"/>
649658
</key>
650-
<key name="Task6" modified="2018-03-08 18:23:55" build="180206">
659+
<key name="Task7" modified="2024-02-13 23:54:10" build="230724">
651660
<value name="Name" type="string" data="{Shells::PowerShell (Admin)}"/>
652661
<value name="Flags" type="dword" data="00000004"/>
653662
<value name="Hotkey" type="dword" data="00000000"/>
@@ -656,7 +665,7 @@
656665
<value name="Count" type="long" data="1"/>
657666
<value name="Cmd1" type="string" data="powershell.exe -new_console:a"/>
658667
</key>
659-
<key name="Task7" modified="2018-03-08 18:23:55" build="180206">
668+
<key name="Task8" modified="2024-02-13 23:54:10" build="230724">
660669
<value name="Name" type="string" data="{Bash::Git bash}"/>
661670
<value name="Flags" type="dword" data="00000004"/>
662671
<value name="Hotkey" type="dword" data="00000000"/>
@@ -665,7 +674,7 @@
665674
<value name="Count" type="long" data="1"/>
666675
<value name="Cmd1" type="string" data='set "PATH=%ConEmuDrive%\Program Files\Git\usr\bin;%PATH%" &amp; "%ConEmuDrive%\Program Files\Git\git-cmd.exe" --no-cd --command=%ConEmuBaseDirShort%\conemu-msys2-64.exe /usr/bin/bash.exe -l -i -new_console:p'/>
667676
</key>
668-
<key name="Task8" modified="2018-03-08 18:23:55" build="180206">
677+
<key name="Task9" modified="2024-02-13 23:54:10" build="230724">
669678
<value name="Name" type="string" data="{Bash::MinGW bash}"/>
670679
<value name="Flags" type="dword" data="00000004"/>
671680
<value name="Hotkey" type="dword" data="00000000"/>
@@ -674,7 +683,7 @@
674683
<value name="Count" type="long" data="1"/>
675684
<value name="Cmd1" type="string" data='set CHERE_INVOKING=1 &amp; set "PATH=%ConEmuDrive%\MinGW\msys\1.0\bin;%PATH%" &amp; %ConEmuBaseDirShort%\conemu-msys-32.exe -new_console:p %ConEmuDrive%\MinGW\msys\1.0\bin\bash.exe --login -i -new_console:C:"%ConEmuDrive%\MinGW\msys\1.0\msys.ico"'/>
676685
</key>
677-
<key name="Task9" modified="2018-03-08 18:23:55" build="180206">
686+
<key name="Task10" modified="2024-02-13 23:54:10" build="230724">
678687
<value name="Name" type="string" data="{Bash::Msys2-32}"/>
679688
<value name="Flags" type="dword" data="00000004"/>
680689
<value name="Hotkey" type="dword" data="00000000"/>
@@ -683,7 +692,7 @@
683692
<value name="Count" type="long" data="1"/>
684693
<value name="Cmd1" type="string" data='set CHERE_INVOKING=1 &amp; set "PATH=%ConEmuDrive%\msys32\usr\bin;%PATH%" &amp; %ConEmuBaseDirShort%\conemu-msys2-32.exe -new_console:p %ConEmuDrive%\msys32\usr\bin\bash.exe --login -i -new_console:C:"%ConEmuDrive%\msys32\msys2.ico"'/>
685694
</key>
686-
<key name="Task10" modified="2018-03-08 18:23:55" build="180206">
695+
<key name="Task11" modified="2024-02-13 23:54:10" build="230724">
687696
<value name="Name" type="string" data="{Putty}"/>
688697
<value name="Flags" type="dword" data="00000004"/>
689698
<value name="Hotkey" type="dword" data="00000000"/>
@@ -692,7 +701,7 @@
692701
<value name="Count" type="long" data="1"/>
693702
<value name="Cmd1" type="string" data='"Putty.exe"'/>
694703
</key>
695-
<key name="Task11" modified="2018-03-08 18:23:55" build="180206">
704+
<key name="Task12" modified="2024-02-13 23:54:10" build="230724">
696705
<value name="Name" type="string" data="{Helper::Show ANSI colors}"/>
697706
<value name="Flags" type="dword" data="00000004"/>
698707
<value name="Hotkey" type="dword" data="00000000"/>
@@ -701,7 +710,7 @@
701710
<value name="Count" type="long" data="1"/>
702711
<value name="Cmd1" type="string" data='cmd.exe /k type "%ConEmuBaseDir%\Addons\AnsiColors16t.ans" -cur_console:n'/>
703712
</key>
704-
<key name="Task12" modified="2018-03-08 18:23:55" build="180206">
713+
<key name="Task13" modified="2024-02-13 23:54:10" build="230724">
705714
<value name="Name" type="string" data="{SDK::VS 12.0 x86 tools prompt}"/>
706715
<value name="Flags" type="dword" data="00000004"/>
707716
<value name="Hotkey" type="dword" data="00000000"/>
@@ -710,7 +719,7 @@
710719
<value name="Count" type="long" data="1"/>
711720
<value name="Cmd1" type="string" data='cmd /k ""%ConEmuDrive%\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" x86 -new_console:t:"VS 12.0" -new_console:C:"%CommonProgramFiles(x86)%\microsoft shared\MSEnv\VSFileHandler.dll,28"'/>
712721
</key>
713-
<key name="Task13" modified="2018-03-08 18:23:55" build="180206">
722+
<key name="Task14" modified="2024-02-13 23:54:10" build="230724">
714723
<value name="Name" type="string" data="{SDK::VS 12.0 x64 tools prompt}"/>
715724
<value name="Flags" type="dword" data="00000004"/>
716725
<value name="Hotkey" type="dword" data="00000000"/>
@@ -719,7 +728,7 @@
719728
<value name="Count" type="long" data="1"/>
720729
<value name="Cmd1" type="string" data='cmd /k ""%ConEmuDrive%\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" x64 -new_console:t:"VS 12.0" -new_console:C:"%CommonProgramFiles(x86)%\microsoft shared\MSEnv\VSFileHandler.dll,28"'/>
721730
</key>
722-
<key name="Task14" modified="2018-03-08 18:23:55" build="180206">
731+
<key name="Task15" modified="2024-02-13 23:54:10" build="230724">
723732
<value name="Name" type="string" data="{Tools::Chocolatey (Admin)}"/>
724733
<value name="Flags" type="dword" data="00000004"/>
725734
<value name="Hotkey" type="dword" data="00000000"/>
@@ -728,6 +737,69 @@
728737
<value name="Count" type="long" data="1"/>
729738
<value name="Cmd1" type="string" data='*cmd.exe /k Title Chocolatey &amp; "%ConEmuBaseDir%\Addons\ChocolateyAbout.cmd"'/>
730739
</key>
740+
<key name="Task16" modified="2024-02-13 23:54:10" build="230724">
741+
<value name="Name" type="string" data="{Shells::PowerShell Core}"/>
742+
<value name="Flags" type="dword" data="00000004"/>
743+
<value name="Hotkey" type="dword" data="00000000"/>
744+
<value name="GuiArgs" type="string" data=""/>
745+
<value name="Active" type="long" data="0"/>
746+
<value name="Count" type="long" data="1"/>
747+
<value name="Cmd1" type="string" data="pwsh.exe"/>
748+
</key>
749+
<key name="Task17" modified="2024-02-13 23:54:10" build="230724">
750+
<value name="Name" type="string" data="{Shells::PowerShell Core (Admin)}"/>
751+
<value name="Flags" type="dword" data="00000004"/>
752+
<value name="Hotkey" type="dword" data="00000000"/>
753+
<value name="GuiArgs" type="string" data=""/>
754+
<value name="Active" type="long" data="0"/>
755+
<value name="Count" type="long" data="1"/>
756+
<value name="Cmd1" type="string" data="pwsh.exe -new_console:a"/>
757+
</key>
758+
<key name="Task18" modified="2024-02-13 23:54:10" build="230724">
759+
<value name="Name" type="string" data="{Bash::bash}"/>
760+
<value name="Flags" type="dword" data="00000004"/>
761+
<value name="Hotkey" type="dword" data="00000000"/>
762+
<value name="GuiArgs" type="string" data=""/>
763+
<value name="Active" type="long" data="0"/>
764+
<value name="Count" type="long" data="1"/>
765+
<value name="Cmd1" type="string" data="%windir%\system32\wsl.exe -cur_console:pm:/mnt"/>
766+
</key>
767+
<key name="Task19" modified="2024-02-13 23:54:10" build="230724">
768+
<value name="Name" type="string" data="{Bash::Msys2-64}"/>
769+
<value name="Flags" type="dword" data="00000004"/>
770+
<value name="Hotkey" type="dword" data="00000000"/>
771+
<value name="GuiArgs" type="string" data=""/>
772+
<value name="Active" type="long" data="0"/>
773+
<value name="Count" type="long" data="1"/>
774+
<value name="Cmd1" type="string" data='set CHERE_INVOKING=1 &amp; set "PATH=%ConEmuDrive%\msys64\usr\bin;%PATH%" &amp; %ConEmuBaseDirShort%\conemu-msys2-64.exe -new_console:p %ConEmuDrive%\msys64\usr\bin\bash.exe --login -i -new_console:C:"%ConEmuDrive%\msys64\msys2.ico"'/>
775+
</key>
776+
<key name="Task20" modified="2024-02-13 23:54:10" build="230724">
777+
<value name="Name" type="string" data="{WSL::Alpine}"/>
778+
<value name="Flags" type="dword" data="00000004"/>
779+
<value name="Hotkey" type="dword" data="00000000"/>
780+
<value name="GuiArgs" type="string" data=""/>
781+
<value name="Active" type="long" data="0"/>
782+
<value name="Count" type="long" data="1"/>
783+
<value name="Cmd1" type="string" data="%windir%\system32\wsl.exe -cur_console:pm:/mnt --distribution Alpine"/>
784+
</key>
785+
<key name="Task21" modified="2024-02-13 23:54:10" build="230724">
786+
<value name="Name" type="string" data="{WSL::Ubuntu}"/>
787+
<value name="Flags" type="dword" data="00000004"/>
788+
<value name="Hotkey" type="dword" data="00000000"/>
789+
<value name="GuiArgs" type="string" data=""/>
790+
<value name="Active" type="long" data="0"/>
791+
<value name="Count" type="long" data="1"/>
792+
<value name="Cmd1" type="string" data="%windir%\system32\wsl.exe -cur_console:pm:/mnt --distribution Ubuntu"/>
793+
</key>
794+
<key name="Task22" modified="2024-02-13 23:54:10" build="230724">
795+
<value name="Name" type="string" data="{WSL::WSL}"/>
796+
<value name="Flags" type="dword" data="00000004"/>
797+
<value name="Hotkey" type="dword" data="00000000"/>
798+
<value name="GuiArgs" type="string" data=""/>
799+
<value name="Active" type="long" data="0"/>
800+
<value name="Count" type="long" data="1"/>
801+
<value name="Cmd1" type="string" data="%windir%\system32\wsl.exe -cur_console:pm:/mnt"/>
802+
</key>
731803
</key>
732804
<key name="Apps" modified="2018-03-08 18:23:55" build="180206">
733805
<value name="Count" type="long" data="0"/>

tools/ConEmu/ConEmu/CmdInit.cmd

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -39,74 +39,6 @@ if "%ConEmuIsAdmin%" == "ADMIN" (
3939
rem Finally reset color and add notify ConEmu about prompt input start coords
4040
set ConEmuPrompt3=$E[m$S$E]9;12$E\
4141

42-
43-
:: ============= RT-Thread ENV Path ==================
44-
set ENV_ROOT=%~dp0..\..\..
45-
set PYTHONPATH=%ENV_ROOT%\tools\Python27
46-
set PYTHONHOME=%ENV_ROOT%\tools\Python27
47-
set RTT_EXEC_PATH=%ENV_ROOT%\tools\gnu_gcc\arm_gcc\mingw\bin
48-
set RTT_CC=gcc
49-
set PKGS_ROOT=%ENV_ROOT%\packages
50-
set SCONS=%PYTHONPATH%\Scripts
51-
set PATH=%ENV_ROOT%\tools\git-2.41.0-32-bit\cmd;%PATH%
52-
set PATH=%ENV_ROOT%\tools\bin;%PATH%
53-
set PATH=%RTT_EXEC_PATH%;%PATH%
54-
set PATH=%PYTHONHOME%;%PATH%
55-
set PATH=%PYTHONPATH%;%PATH%
56-
set PATH=%SCONS%;%PATH%
57-
set PATH=%ENV_ROOT%\tools\qemu\qemu64;%PATH%
58-
59-
:: ====== RT-Thread ENV Change Code Page ================
60-
61-
chcp 65001 > nul
62-
python %~dp0..\..\scripts\env.py -v
63-
echo ^\ ^| /
64-
echo - RT - Thread Operating System
65-
echo / ^| ^\
66-
echo 2006 - 2022 Copyright by RT-Thread team
67-
68-
Setlocal ENABLEDELAYEDEXPANSION
69-
::启用命令扩展,参加setlocal /?命令
70-
set str1=%~dp0
71-
set str=%str1%
72-
set env_root=%~dp0
73-
74-
:next
75-
if not "%str%"=="" (
76-
set /a num+=1
77-
if "!str:~0,1!"==" " (
78-
echo.
79-
echo *******************************************************************
80-
echo Env 工具所在路径如下:
81-
echo %env_root:~0,-21%
82-
echo 警告:以上路径不能包含中文或空格,请将 Env 移动到符合要求的路径中。
83-
echo *******************************************************************
84-
endlocal
85-
goto break_str
86-
)
87-
set "str=%str:~1%"
88-
goto next
89-
)
90-
endlocal
91-
92-
set "str=%~dp0"
93-
>"%tmp%\t.t" echo;WSH.Echo(/[\u4E00-\u9FFF]/.test(WSH.Arguments(0)))
94-
for /f %%a in ('cscript -nologo -e:jscript "%tmp%\t.t" "%str%"') do if %%a neq 0 (goto not_support_chinese) else goto break_str
95-
96-
:not_support_chinese
97-
echo.
98-
echo *******************************************************************
99-
echo Env 工具所在路径如下:
100-
echo %env_root:~0,-29%
101-
echo 警告:以上路径不能包含中文或空格,请将 Env 移动到符合要求的路径中。
102-
echo *******************************************************************
103-
104-
:break_str
105-
106-
chcp 437 > nul
107-
108-
:: ======================================================
109-
11042
rem Show 'git status' extract in prompt?
11143
if /I "%~1" == "/git" goto git
11244
if /I "%~1" == "-git" goto git

0 commit comments

Comments
 (0)