cx_Freeze - how do I convert multiple files into the build folder

后端 未结 2 1288
太阳男子
太阳男子 2021-01-23 03:43

I\'ve made a program which launches another python program using os.startfile().

I wanted to have this as two exe files, launching the second b

2条回答
  •  一向
    一向 (楼主)
    2021-01-23 04:24

    A program created by cx_Freeze isn't a single exe file. It's the entire folder created under the build folder. If you just copy the exe file, you are only copying part of the program.

    Instead of trying to have two exe files in the same folder, what you should do is have two folders, each being a complete cx_Freeze program. Your subprocess call should be calling ../program2/program2.exe instead of just ./program2.exe.

提交回复
热议问题