From fb7818c44f6e85c02132cb9c2c8bab721aa88678 Mon Sep 17 00:00:00 2001 From: xiaoyi1212 Date: Sun, 1 Sep 2024 14:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9E=84=E5=BB=BA=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.py | 39 ++++++++------------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/build.py b/build.py index 65c94cf..57ae5ec 100644 --- a/build.py +++ b/build.py @@ -1,37 +1,14 @@ import os import sys - -def check_os(): - if sys.platform.startswith('darwin'): - return "Mac OS X" - elif sys.platform.startswith('win'): - return "Windows" - elif sys.platform.startswith('linux'): - return "Linux" - else: - return "Unknown" - - -if check_os() == "Windows": - gcc = '/i686_elf_tools/bin/i686-elf-gcc.exe -w -std=gnu99 -I include/ -std=gnu99 -ffreestanding -c -Wincompatible-pointer-types ' - asm = '/i686_elf_tools/bin/i686-elf-as.exe' - nasm = "nasm -f elf32" - ld = '/i686_elf_tools/bin/i686-elf-g++.exe' - cd = os.getcwd() # 获取当前执行目录 'D:\CrashPowerDOS-main\' - out = "target" - dir_ = "\\" - src = "src\\" -elif check_os() == "Linux": - gcc = 'gcc.exe -w -std=gnu99 -I include/ -std=gnu99 -ffreestanding -c -Wincompatible-pointer-types ' - asm = 'gcc.exe' - nasm = "nasm -f elf32" - ld = 'g++.exe' - cd = os.getcwd() # 获取当前执行目录 '\mnt\d\CrashPowerDOS-main\' - out = "target" - dir_ = "/" - src = "./src/" - +gcc = '/i686_elf_tools/bin/i686-elf-gcc.exe -w -std=gnu99 -I include/ -std=gnu99 -ffreestanding -c -Wincompatible-pointer-types ' +asm = '/i686_elf_tools/bin/i686-elf-as.exe' +nasm = "nasm -f elf32" +ld = '/i686_elf_tools/bin/i686-elf-g++.exe' +cd = os.getcwd() # 获取当前执行目录 'D:\CrashPowerDOS-main\' +out = "target" +dir_ = "\\" +src = "src\\" def clean(): print("Clean target folder")