Windows: Play is disabled / "could not start" because the launcher looks for bin\longshot.exe, but the build puts longshot.exe in the folder root #53

Open
opened 2026-11-13 20:18:03 +00:00 by JapaSandey · 0 comments

On Windows, a finished build places longshot.exe (and longshot_vk.dll, SDL2.dll, SDL3.dll, wgpu_native.dll…) directly in the game folder, e.g. C:\Longshot\longshot.exe. There is no bin\ folder.

The launcher only looks in bin\:

// Core/GameFolder.cs:32
public static string ExePath(string folder, Platform platform) => Path.Combine(folder, "bin", Platforms.GameExe(platform));
public static bool IsBuilt(string folder, Platform platform) => File.Exists(ExePath(folder, platform));

As a result:

  • the version shows as "not built" and Play is disabled, even though the game is built and runs fine when started directly;
  • after a build, Play fails with: could not start: An error occurred trying to start process 'C:\Longshot\bin\longshot.exe' with working directory 'C:\Longshot'. The system cannot find the file specified.

Suggested fix: keep bin\ first and fall back to the folder root on Windows:

public static string ExePath(string folder, Platform platform)
{
    var exe = Platforms.GameExe(platform);
    var inBin = Path.Combine(folder, "bin", exe);
    if (File.Exists(inBin)) return inBin;
    var atRoot = Path.Combine(folder, exe);
    return platform == Platform.Windows && File.Exists(atRoot) ? atRoot : inBin;
}

(Alternatively, make_game.py could place the Windows build in bin\, if that is the intended layout.)

Environment: Windows, Longshot v3.0.0-rc.3, launcher from the 2026-11-13 release.

On Windows, a finished build places `longshot.exe` (and `longshot_vk.dll`, `SDL2.dll`, `SDL3.dll`, `wgpu_native.dll`…) directly in the game folder, e.g. `C:\Longshot\longshot.exe`. There is no `bin\` folder. The launcher only looks in `bin\`: ```csharp // Core/GameFolder.cs:32 public static string ExePath(string folder, Platform platform) => Path.Combine(folder, "bin", Platforms.GameExe(platform)); public static bool IsBuilt(string folder, Platform platform) => File.Exists(ExePath(folder, platform)); ``` As a result: - the version shows as "not built" and **Play is disabled**, even though the game is built and runs fine when started directly; - after a build, Play fails with: `could not start: An error occurred trying to start process 'C:\Longshot\bin\longshot.exe' with working directory 'C:\Longshot'. The system cannot find the file specified.` **Suggested fix:** keep `bin\` first and fall back to the folder root on Windows: ```csharp public static string ExePath(string folder, Platform platform) { var exe = Platforms.GameExe(platform); var inBin = Path.Combine(folder, "bin", exe); if (File.Exists(inBin)) return inBin; var atRoot = Path.Combine(folder, exe); return platform == Platform.Windows && File.Exists(atRoot) ? atRoot : inBin; } ``` (Alternatively, make_game.py could place the Windows build in `bin\`, if that is the intended layout.) Environment: Windows, Longshot v3.0.0-rc.3, launcher from the 2026-11-13 release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher#53
No description provided.