Building .exe not working

I’m trying to make an .exe file to share a keyboard I made, and in the command line (or PowerShell) on Windows I try the following:

kmc build windows-package-installer source\keyboard.kps --msi keymandesktop.msi --exe setup-redist.exe --out-file keyboard.exe

…but I keep getting the error:
error KM04003: File does not exist.

  • I added the directory containing the kmc.cmd to my environment variables PATH
  • I have tried using double-quotes and/or full directory paths for each file in the above command
  • I have the keymandesktop.msi and setup-redist.exe files in the same directory I’m running the above command
  • I’ve tried moving the keyboard project folder (and keymandesktop.msi/setup-redist.exe files) to my desktop in case Windows is buggy with long directory paths
  • I’ve verified that each file is valid (i.e., doing dir /file_path/ in cmd/PowerShell)

The error: error KM04003: File does not exist. also does not specify what file does not exist so it’s hard to debug.

Can anyone help me with this?

I just tried this:
kmc build windows-package-installer source\comanche.kps --msi "C:\Program Files (x86)\Common Files\Keyman\Cached Installer Files\keymandesktop.msi" --exe .\setup-redist.exe --license .\LICENSE.md --out-file .\comanche.exe

which built. When I removed --license .\LICENSE.md I got the error you have. Keyman 17.0 added a requirement to include the LICENSE.md in the package. I suspect that is what is going on.

1 Like

Thank you very much! It works now

Tracking this at bug(developer): kmc KM04003 error doesn't specify what file is missing · Issue #12846 · keymanapp/keyman · GitHub