File tree Expand file tree Collapse file tree 9 files changed +143
-36
lines changed
.idea/.idea.StartManager/.idea Expand file tree Collapse file tree 9 files changed +143
-36
lines changed Original file line number Diff line number Diff line change 22REM 设置解决方案文件路径
33set SOLUTION_PATH = ClientSample.sln
44
5- REM 导航到解决方案目录
5+ REM 切换到解决方案所在的目录
66cd /d %~dp0
77
88REM 运行dotnet build命令
@@ -11,7 +11,6 @@ dotnet build %SOLUTION_PATH% -c Release
1111REM 检查构建是否成功
1212if %errorlevel% neq 0 (
1313 echo Build failed
14- exit /b %errorlevel%
1514) else (
1615 echo Build succeeded
1716)
Original file line number Diff line number Diff line change 1+ @ echo off
2+ REM 设置解决方案文件路径
3+ set SOLUTION_PATH = ServerSample.sln
4+
5+ REM 切换到解决方案所在的目录
6+ cd /d %~dp0
7+
8+ REM 运行dotnet build命令
9+ dotnet build %SOLUTION_PATH% -c Release
10+
11+ REM 检查构建是否成功
12+ if %errorlevel% neq 0 (
13+ echo Build failed
14+ ) else (
15+ echo Build succeeded
16+ )
Original file line number Diff line number Diff line change @@ -4,6 +4,57 @@ class Program
44{
55 static void Main ( string [ ] args )
66 {
7- Console . WriteLine ( "Hello, World!" ) ;
7+ bool exit = false ;
8+ ShowMenu ( ) ;
9+ while ( ! exit )
10+ {
11+ string input = Console . ReadLine ( ) ;
12+ switch ( input )
13+ {
14+ case "1" :
15+ Option1 ( ) ;
16+ break ;
17+ case "2" :
18+ Option2 ( ) ;
19+ break ;
20+ case "3" :
21+ Option3 ( ) ;
22+ break ;
23+ case "4" :
24+ exit = true ;
25+ break ;
26+ default :
27+ Console . WriteLine ( "无效的选择,请重新输入。" ) ;
28+ break ;
29+ }
30+ }
31+ }
32+
33+ static void ShowMenu ( )
34+ {
35+ Console . WriteLine ( "请选择一个选项:" ) ;
36+ Console . WriteLine ( "1. 启动服务端" ) ;
37+ Console . WriteLine ( "2. 启动客户端" ) ;
38+ Console . WriteLine ( "3. 还原" ) ;
39+ Console . WriteLine ( "4. 退出" ) ;
40+ Console . Write ( "输入你的选择: " ) ;
41+ }
42+
43+ static void Option1 ( )
44+ {
45+ Console . WriteLine ( "你选择了选项1" ) ;
46+ // 在这里添加选项1的逻辑
47+ }
48+
49+ static void Option2 ( )
50+ {
51+ Console . WriteLine ( "你选择了选项2" ) ;
52+ // 在这里添加选项2的逻辑
53+ }
54+
55+ static void Option3 ( )
56+ {
57+ Console . WriteLine ( "你选择了选项3" ) ;
58+ // 在这里添加选项3的逻辑
859 }
960}
Original file line number Diff line number Diff line change 1010 <InvariantGlobalization >true</InvariantGlobalization >
1111 </PropertyGroup >
1212
13+ <ItemGroup >
14+ <None Remove =" build.bat" />
15+ </ItemGroup >
16+
1317</Project >
Original file line number Diff line number Diff line change 1+ @ echo off
2+ REM 设置解决方案文件路径
3+ set SOLUTION_PATH = StartManager.sln
4+
5+ REM 切换到解决方案所在的目录
6+ cd /d %~dp0
7+
8+ REM 运行dotnet build命令
9+ dotnet build %SOLUTION_PATH% -c Release
10+
11+ REM 检查构建是否成功
12+ if %errorlevel% neq 0 (
13+ echo Build failed
14+ ) else (
15+ echo Build succeeded
16+ )
Original file line number Diff line number Diff line change 1+ @ echo off
2+ REM 设置解决方案文件路径
3+ set SOLUTION_PATH = UpgradeSample.sln
4+
5+ REM 切换到解决方案所在的目录
6+ cd /d %~dp0
7+
8+ REM 运行dotnet build命令
9+ dotnet build %SOLUTION_PATH% -c Release
10+
11+ REM 检查构建是否成功
12+ if %errorlevel% neq 0 (
13+ echo Build failed
14+ ) else (
15+ echo Build succeeded
16+ )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ @ echo off
2+ REM 保存初始目录
3+ set InitialDir = %CD%
4+
5+ echo Starting hfs.exe...
6+ start " " .\FileService\hfs.exe
7+ echo hfs.exe has been started.
8+
9+ echo Running Server.bat
10+ call .\Server\build.bat
11+ echo .\Server\build.bat completed
12+
13+ cd /d %InitialDir%
14+ echo Running Upgrade.bat
15+ call .\Upgrade\build.bat
16+ echo .\Upgrade\build.bat completed
17+
18+ cd /d %InitialDir%
19+ echo Running StartManager.bat
20+ call .\StartManager\build.bat
21+ echo .\StartManager\build.bat completed
22+
23+ cd /d %InitialDir%
24+ echo Running Client.bat
25+ call .\Client\build.bat
26+ echo .\Client\build.bat completed
27+
28+ echo All scripts completed.
29+
30+ REM 使用 timeout 命令进行2秒倒计时
31+ timeout /t 3 /nobreak > nul
32+
33+ cd /d %InitialDir%
34+ echo Running StartManager
35+ start " " .\StartManager\bin\Release\net8.0\StartManager.exe
36+
37+ exit
You can’t perform that action at this time.
0 commit comments