mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Merge branch 'main' into 2027
This commit is contained in:
@@ -1,65 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from upstream_utils import Lib
|
||||
|
||||
|
||||
def crlf_to_lf():
|
||||
for root, _, files in os.walk("."):
|
||||
if ".git" in root:
|
||||
continue
|
||||
|
||||
for fname in files:
|
||||
filename = os.path.join(root, fname)
|
||||
print(f"Converting CRLF -> LF for {filename}")
|
||||
with open(filename, "rb") as f:
|
||||
content = f.read()
|
||||
content = content.replace(b"\r\n", b"\n")
|
||||
|
||||
with open(filename, "wb") as f:
|
||||
f.write(content)
|
||||
|
||||
subprocess.check_call(["git", "add", "-A"])
|
||||
subprocess.check_call(["git", "commit", "-m", "Fix line endings"])
|
||||
|
||||
|
||||
def copy_upstream_src(wpilib_root):
|
||||
wpiutil = os.path.join(wpilib_root, "wpiutil")
|
||||
|
||||
shutil.copy(
|
||||
os.path.join("Main", "StackWalker", "StackWalker.h"),
|
||||
os.path.join(wpiutil, "src/main/native/windows/StackWalker.h"),
|
||||
)
|
||||
|
||||
shutil.copy(
|
||||
os.path.join("Main", "StackWalker", "StackWalker.cpp"),
|
||||
os.path.join(wpiutil, "src/main/native/windows/StackWalker.cpp"),
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
name = "stack_walker"
|
||||
url = "https://github.com/JochenKalmbach/StackWalker"
|
||||
tag = "5b0df7a4db8896f6b6dc45d36e383c52577e3c6b"
|
||||
|
||||
patch_options = {
|
||||
"ignore_whitespace": True,
|
||||
}
|
||||
|
||||
stack_walker = Lib(
|
||||
name,
|
||||
url,
|
||||
tag,
|
||||
copy_upstream_src,
|
||||
patch_options,
|
||||
pre_patch_hook=crlf_to_lf,
|
||||
pre_patch_commits=1,
|
||||
)
|
||||
stack_walker.main()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,21 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Thad House <thadhouse1@gmail.com>
|
||||
Date: Sat, 22 Jul 2023 13:03:13 -0700
|
||||
Subject: [PATCH] Add advapi pragma
|
||||
|
||||
---
|
||||
Main/StackWalker/StackWalker.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Main/StackWalker/StackWalker.cpp b/Main/StackWalker/StackWalker.cpp
|
||||
index 89545f8612d0d099d48fcf4184a2f2a30cf8577f..b2bcbaa447c5db1a3bcc155fb317ebc8a8050e79 100644
|
||||
--- a/Main/StackWalker/StackWalker.cpp
|
||||
+++ b/Main/StackWalker/StackWalker.cpp
|
||||
@@ -91,6 +91,7 @@
|
||||
#include <new>
|
||||
|
||||
#pragma comment(lib, "version.lib") // for "VerQueryValue"
|
||||
+#pragma comment(lib, "Advapi32.lib") // for "GetUserName"
|
||||
|
||||
#pragma warning(disable : 4826)
|
||||
#if _MSC_VER >= 1900
|
||||
Reference in New Issue
Block a user