Repository navigation
Запуск в один клик: zip с BiStudent.exe, сервер стартует сам - #26
Merged
Merged
Conversation
When a Server folder sits next to BiStudent.exe, the client starts the server itself without a console window and ties it to a job object, so the server stops when the client exits or crashes. The login form hides the server address and waits for the server on sign-in. Only one client instance runs at a time, since the server lives with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKfFePzqcEUGQQ4JyA4NQn
The release is now BiStudent-win-x64.zip, laid out like the earlier releases: unpack, run BiStudent.exe, sign in. The client is a single-file exe with Models next to it; the server sits in the Server folder. scripts/package.ps1 builds the zip locally and in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKfFePzqcEUGQQ4JyA4NQn
- Native libraries ship next to the exe instead of being self-extracted: the first launch spent ~20 s unpacking ~200 MB into %TEMP%. Now the login window opens in about a second, first run included. - ReadyToRun for the client and server, and the request delegate generator for minimal APIs: the server is ready in ~1.8 s instead of ~4.5 s. - The client no longer pulls in WPF (OpenCvSharp4.Windows -> OpenCvSharp4.runtime.win), and the unused OpenCV ffmpeg plugin is not published. The client exe went from 259 MB to 130 MB. - The server listens on all IPv4 and IPv6 addresses. Bound to 0.0.0.0, every new connection to localhost first waited ~2 s for ::1 to be refused. - The client checks that the port is listening before polling /health, since a refused connection on Windows also takes ~2 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKfFePzqcEUGQQ4JyA4NQn
The lesson context menu was disposed inside its own Closed handler. WinForms was still closing it and then touched the disposed menu, which killed the app with ObjectDisposedException after a click outside the menu or on one of its items. The menu is now disposed after the close completes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKfFePzqcEUGQQ4JyA4NQn
- ApiClient.Dispose no longer disposes the token semaphore: a refresh still in flight after sign-out would call Release() on a disposed object. - ClientSettings.Save logs IO errors instead of throwing. A locked or read-only client.json killed the app from Program.Main or broke a request during token refresh. - MainForm does not switch pages once closing has started: closing the window while the camera was stopping and clicking a section went on building a page inside the disposed form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKfFePzqcEUGQQ4JyA4NQn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Зачем
Сейчас для запуска нужен установщик и отдельное консольное окно сервера. Если окно закрыть, клиент перестаёт отвечать, а после повторного запуска сервер не поднимается. Теперь всё как в релизах до v0.4.0: скачал zip, распаковал, запустил
BiStudent.exe, вошёл.Что сделано
BiStudent.exeлежит папкаServer, клиент запускает сервер без окна и привязывает его к Job Object Windows. Сервер завершается вместе с клиентом, даже если клиент упал или его закрыли через диспетчер задач. Поле «Адрес сервера» на форме входа в этом случае скрыто, вход дожидается готовности сервера. Второй экземпляр клиента не запускается.scripts/package.ps1собираетBiStudent-win-x64.zip: в корнеBiStudent.exeодним файлом,Models,README.txt, в папкеServerсервер. CI публикует этот zip в релиз после каждого слияния вmain. Inno Setup иinstaller/удалены.run-demo.ps1,dotnet run) всё работает как раньше.Проверка
dotnet build -warnaserrorбез предупреждений,dotnet test: 208 из 208.BiStudent.exeна пустой базе: