更新构建脚本

This commit is contained in:
XIAOYI12 2024-09-01 14:59:32 +08:00
parent fcecb41165
commit fb7818c44f

View File

@ -1,37 +1,14 @@
import os import os
import sys import sys
gcc = '/i686_elf_tools/bin/i686-elf-gcc.exe -w -std=gnu99 -I include/ -std=gnu99 -ffreestanding -c -Wincompatible-pointer-types '
def check_os(): asm = '/i686_elf_tools/bin/i686-elf-as.exe'
if sys.platform.startswith('darwin'): nasm = "nasm -f elf32"
return "Mac OS X" ld = '/i686_elf_tools/bin/i686-elf-g++.exe'
elif sys.platform.startswith('win'): cd = os.getcwd() # 获取当前执行目录 'D:\CrashPowerDOS-main\'
return "Windows" out = "target"
elif sys.platform.startswith('linux'): dir_ = "\\"
return "Linux" src = "src\\"
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/"
def clean(): def clean():
print("Clean target folder") print("Clean target folder")