You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Confusion about cross-platform support: Backend service seems hardcoded to `TissueLab_AI.exe #7
First of all, thank you so much for developing and maintaining the TissueLab_AI project!
I noticed that the README.md states that the project supports cross-platform execution (Windows, Linux, macOS).
However, I encountered an issue when trying to run the project in a Linux environment. To debug this, I looked into the Electron main process code, specifically the spawnBackendService function and the logic in the app.on('ready') event.
I found that this part of the code seems to hardcode the path to the Windows executable(in ./app/electron/main.js):
functionspawnBackendService(){// This line is hardcoded to "windows/TissueLab_AI.exe"constbackendServicePath=path.join(__dirname,'../service/dist/TissueLab_AI/windows/TissueLab_AI.exe');// This check will fail on Linux/macOS and prevent the service from startingif(!fssync.existsSync(backendServicePath)){console.error(`[ELECTRON] Backend Service not found at: ${backendServicePath}`);// ...returnfalse;};backendServiceProcess=spawn(backendServicePath,[],{stdio: 'inherit'});// ...}
In the app.on('ready') event, this function is called, and on a Linux system, spawnBackendService() always returns false because it cannot find the .exe file.
My questions are:
Does this mean that the backend service in the current version only supports Windows?
If the project does support cross-platform, is there a different startup script I should be using, or am I expected to manually compile a Linux version of the backend service (e.g., a linux/TissueLab_AI binary)?
Should the spawnBackendService function check the current operating system (e.g., using process.platform) and then dynamically decide which binary path to load?
I've been looking closer at the repository, and I've realized something that I'd like to clarify.
The spawnBackendService function I mentioned, which directly launches the .exe, seems to be a Windows-only convenience method.
However, I see that you have also provided the complete backend service source code (the Django project).
This leads me to believe that for cross-platform development (on Linux/macOS), the intended workflow is to bypass Electron's service spawning entirely. Instead, I should manually run the backend service from its source code before I launch the Electron application.
Could you please confirm if this is the correct and intended approach? If so, this would perfectly explain the cross-platform support mentioned in the README.
Yes! The spawnBackendService is currently a Windows-only convenience that launches a prebuilt .exe, so it won’t work on Linux/macOS.
For cross-platform usage, the intended workflow is to:
manually start the backend service (FastAPI) from source, and
then launch the Electron app separately
So yes, bypassing spawnBackendService on Linux/macOS is the correct approach.
Activity
cjjcn commentedon Nov 10, 2025
Follow-up:
I've been looking closer at the repository, and I've realized something that I'd like to clarify.
The
spawnBackendServicefunction I mentioned, which directly launches the.exe, seems to be a Windows-only convenience method.However, I see that you have also provided the complete backend service source code (the Django project).
This leads me to believe that for cross-platform development (on Linux/macOS), the intended workflow is to bypass Electron's service spawning entirely. Instead, I should manually run the backend service from its source code before I launch the Electron application.
Could you please confirm if this is the correct and intended approach? If so, this would perfectly explain the cross-platform support mentioned in the README.
Thanks again!
Songhao-LI commentedon Apr 3, 2026
Hi @cjjcn ,
Sorry for the late reply.
Yes! The
spawnBackendServiceis currently a Windows-only convenience that launches a prebuilt.exe, so it won’t work on Linux/macOS.For cross-platform usage, the intended workflow is to:
So yes, bypassing
spawnBackendServiceon Linux/macOS is the correct approach.