在创建操作系统时使用生成文件



(我对编程和这个网页都是新手(

据我所知,Linux有Makefiles(我将开始创建Os(,但我找不到如何在Windows中制作makefile的任何建议(我不想下载任何东西(

谢谢你的答案

我不认为你可以简单地从记事本++复制代码,因为有一些字符是不可打印的,你可以复制(,BELL,NULL等(。但是,如果您编写一个 python 脚本以二进制模式("rb"(读取文件,那么您可以成功做到这一点(我是根据经验说的(。

编辑:如果您有兴趣,这是复制文件的 Python 脚本:

INPUT_FILE = "C:/input.exe" # change it to the path of your existing file
OUTPUT_FILE = "C:/output.exe" # change it to the path of where you want your new file
input = open(INPUT_FILE, "rb")
data = input.read()
input.close()
output = open(OUTPUT_FILE, "wb")
output.write(data)
output.close()

最新更新