mirror of
https://github.com/godotengine/godot-git-plugin.git
synced 2026-01-01 01:48:28 +03:00
- Remove the `demo` project which isn't really useful. * Instead the `addons` subfolder is made top-level and that's where stuff gets written. - Update the README following recent PRs (#191, #199) as OpenSSL is now compiled from source for all platforms. * Also remove obsolete `build_openssl_universal_macos.sh` script. - Remove the bogus `plugin.cfg` which isn't necessary, and was confusing users who tried to enable it. * Fixes #267. - Bump min SCons version to 3.1.2 and Python to 3.6. - Bump `compatibility_minimum` to `4.2.0` following #196. - Remove some code in `godot-git-plugin/SCsub` that seems redundant with `godot-cpp` config. - Remove unnecessary `.exp` and `.lib` files in Windows artifact, rename its folder to `windows`. - Remove `export-ignore`s in `.gitattributes`, they're incomplete and not actually doing anything usable. - Fix artifacts URL handling in `release.sh`, make it executable. - CI: Update clang-format check to version 18.
54 lines
1.4 KiB
Python
54 lines
1.4 KiB
Python
#!/usr/bin/env python
|
|
|
|
import os
|
|
|
|
EnsureSConsVersion(3, 1, 2)
|
|
EnsurePythonVersion(3, 6)
|
|
|
|
opts = Variables([], ARGUMENTS)
|
|
|
|
env = Environment(ENV=os.environ)
|
|
|
|
# Define our options
|
|
opts.Add(PathVariable("target_path",
|
|
"The path where the lib is installed.", "addons/godot-git-plugin/"))
|
|
opts.Add(PathVariable("target_name", "The library name.",
|
|
"libgit_plugin", PathVariable.PathAccept))
|
|
|
|
# Updates the environment with the option variables.
|
|
opts.Update(env)
|
|
|
|
if ARGUMENTS.get("custom_api_file", "") != "":
|
|
ARGUMENTS["custom_api_file"] = "../" + ARGUMENTS["custom_api_file"]
|
|
|
|
ARGUMENTS["target"] = "editor"
|
|
env = SConscript("godot-cpp/SConstruct").Clone()
|
|
env.PrependENVPath("PATH", os.getenv("PATH")) # Prepend PATH, done upstream in recent godot-cpp verions.
|
|
|
|
# Force linking with LTO on windows MSVC, silence the linker complaining that libgit uses LTO but we are not linking with it.
|
|
if env["platform"] == "windows" and env.get("is_msvc", False):
|
|
env.AppendUnique(LINKFLAGS=["/LTCG"])
|
|
|
|
# OpenSSL Builder
|
|
env.Tool("openssl", toolpath=["tools"])
|
|
|
|
# SSH2 Builder
|
|
env.Tool("cmake", toolpath=["tools"])
|
|
env.Tool("ssh2", toolpath=["tools"])
|
|
env.Tool("git2", toolpath=["tools"])
|
|
|
|
opts.Update(env)
|
|
|
|
ssl = env.OpenSSL()
|
|
ssh2 = env.BuildSSH2(ssl)
|
|
ssl += ssh2
|
|
git2 = env.BuildGIT2(ssl)
|
|
|
|
Export("ssl")
|
|
Export("env")
|
|
|
|
SConscript("godot-git-plugin/SCsub")
|
|
|
|
# Generates help for the -h scons option.
|
|
Help(opts.GenerateHelpText(env))
|