mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 14:18:42 +01:00
Add script to regenerate projects using premake (#755)
This commit is contained in:
28
util/generate_projects.py
Executable file
28
util/generate_projects.py
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
from os import getenv, path
|
||||
from subprocess import PIPE, run
|
||||
|
||||
PREMAKE_DIR = path.join(path.dirname(__file__), "../projects/premake")
|
||||
|
||||
|
||||
def has(prog):
|
||||
return run(["command", "-v", prog], stdout=PIPE, stderr=PIPE).returncode == 0
|
||||
|
||||
|
||||
def run_premake(action, os):
|
||||
run([premake, action, os], cwd=PREMAKE_DIR)
|
||||
|
||||
|
||||
premake = getenv("PREMAKE", "premake5")
|
||||
if not has(premake):
|
||||
print("error: {} is not found", premake, file=sys.stderr)
|
||||
exit(1)
|
||||
|
||||
run_premake("gmake2", "bsd")
|
||||
run_premake("gmake2", "linux")
|
||||
run_premake("gmake2", "macosx")
|
||||
run_premake("vs2017", "windows")
|
||||
run_premake("vs2019", "windows")
|
||||
run_premake("xcode4", "macosx")
|
||||
Reference in New Issue
Block a user