Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Linux Porting #384

Draft
wants to merge 213 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
213 commits
Select commit Hold shift + click to select a range
ae2a969
port to linux, build only
Yangff Feb 5, 2024
b172869
frpintf for output
Yangff Feb 8, 2024
6056888
should be !=
Yangff Feb 8, 2024
b472048
some testing
Yangff Feb 8, 2024
f4de0ad
no crash dump yet, comment out for now
Yangff Feb 8, 2024
6c4cadb
debugs
Yangff Feb 8, 2024
cfa20df
update deps
Yangff Feb 8, 2024
40b193a
haeder generator for Linux + DWARF
Yangff Feb 12, 2024
f163d1e
fix path and add results
Yangff Feb 12, 2024
8056bef
use argparse, not tested
Yangff Feb 12, 2024
9f88547
should be 501
Yangff Feb 12, 2024
d9c8610
new class list
Yangff Feb 12, 2024
282f1a3
support subclass
Yangff Feb 13, 2024
b956e95
add print function
Yangff Feb 13, 2024
85cb57b
no need for add
Yangff Feb 13, 2024
6118ca1
remove test flag
Yangff Feb 13, 2024
f6c29bb
remove UE4SS from its child process
Yangff Feb 13, 2024
060e14a
do not throw
Yangff Feb 13, 2024
49fbb8e
fixed throw problem!!
Yangff Feb 13, 2024
58ec512
fix classname
Yangff Feb 13, 2024
a3a0c46
exoprt get_game_directory()
Yangff Feb 14, 2024
43feb29
use path relative to get_game_directory()
Yangff Feb 14, 2024
dd255c0
make both people happy (for now)
Yangff Feb 14, 2024
79cca14
add github CI
Yangff Feb 16, 2024
03ab511
fix indent
Yangff Feb 16, 2024
4e72e87
trigger it
Yangff Feb 16, 2024
12b68b5
change remote to allow ci build(?)
Yangff Feb 16, 2024
e8b8429
use ssh key
Yangff Feb 16, 2024
45f28bb
ty fix checkout
Yangff Feb 16, 2024
90cab97
key again?
Yangff Feb 16, 2024
c339371
setup clang and rust
Yangff Feb 16, 2024
040eed6
modify ver
Yangff Feb 16, 2024
aedb607
should be Game__Shipping__Linux
Yangff Feb 16, 2024
7ec574e
can we get clang 16?
Yangff Feb 16, 2024
98746cc
try this action?
Yangff Feb 16, 2024
00a066d
trg ci
Yangff Feb 16, 2024
2f21e13
fix path
Yangff Feb 16, 2024
34f1c1b
setup sccache
Yangff Feb 17, 2024
51d0b9b
make m_mods a member variable
Yangff Feb 17, 2024
c2ce4f9
fix headergen
Yangff Feb 18, 2024
978d254
more fix on cxa_throw
Yangff Feb 18, 2024
791929f
fix comment
Yangff Feb 18, 2024
2122997
fixup rebase
Yangff Feb 19, 2024
22757df
resolved more conflicts
Yangff Feb 19, 2024
7f4dd82
avoid appending on existing file
Yangff Feb 19, 2024
6f6d38f
new string handling and ... maybe no need for fmt?
Yangff Feb 19, 2024
a607d9b
remove useless cast
Yangff Feb 19, 2024
79822c5
remove use of generic_string()
Yangff Feb 19, 2024
7387bbf
lua strings
Yangff Feb 19, 2024
d222725
unused cast
Yangff Feb 19, 2024
c59bce4
win32 compat
Yangff Feb 19, 2024
c40cbd8
update macro
Yangff Feb 20, 2024
c3ff41d
remove ununsed func
Yangff Feb 20, 2024
24b5d9d
seperate FileString
Yangff Feb 20, 2024
be621ef
Linux pong, use System String on parser
Yangff Feb 20, 2024
2cb322d
windows ping
Yangff Feb 20, 2024
d427714
add windows builder
Yangff Feb 20, 2024
c12d6cf
update script
Yangff Feb 20, 2024
e38c19e
change name
Yangff Feb 20, 2024
e6aa202
change path
Yangff Feb 20, 2024
d4e4db1
remove unused flag
Yangff Feb 20, 2024
567aeff
fix type
Yangff Feb 20, 2024
5f40e5f
move platform specific codes
Yangff Feb 21, 2024
d983fe1
windows fix
Yangff Feb 21, 2024
8b5b5a4
fix pointers
Yangff Feb 21, 2024
2bc81be
A tui that you can interact with...
Yangff Feb 21, 2024
4d771f1
use stderr for internal error to avoid breaking the UI
Yangff Feb 21, 2024
9615cad
use system call fs
Yangff Feb 22, 2024
f023892
fix size
Yangff Feb 22, 2024
6bab15e
print to stderr
Yangff Feb 22, 2024
8a1d144
fix size
Yangff Feb 22, 2024
4ced93e
disable buffer
Yangff Feb 22, 2024
79c7fd3
fix close
Yangff Feb 22, 2024
04b4868
*GeneratedFile->UEGeneratedFile and bug fix & perf improve
Yangff Feb 22, 2024
820ffe3
type fix
Yangff Feb 22, 2024
731d016
use w+ for overwrite
Yangff Feb 22, 2024
d3fd5d3
use filesystem::path
Yangff Feb 22, 2024
0e3b86b
use filesystem::path
Yangff Feb 22, 2024
1896d41
fix permission
Yangff Feb 22, 2024
c5c4097
define Linux GUI scale
Yangff Feb 22, 2024
c58db48
linux scaling
Yangff Feb 22, 2024
527843a
change header gen
Yangff Feb 22, 2024
e250ee9
fix lock
Yangff Feb 22, 2024
de95408
optimize the script path
Yangff Feb 22, 2024
a0fca04
add spacing
Yangff Feb 22, 2024
050bca0
optimize scripts
Yangff Feb 22, 2024
969c6c6
size tweak
Yangff Feb 22, 2024
ad4b581
hightlight the color on TUI
Yangff Feb 22, 2024
fd079f7
add TUI configure
Yangff Feb 23, 2024
ca3c52b
nerd font tweak
Yangff Feb 23, 2024
1c84bbb
add TUI switch and verify console setting at start
Yangff Feb 23, 2024
8fec8ce
add patch
Yangff Feb 23, 2024
a439b78
fix scrollbar size on windows
Yangff Feb 23, 2024
e3e9c93
fix crash on ctrl+c
Yangff Feb 23, 2024
a141b74
run when cmake change
Yangff Feb 23, 2024
d884e70
use wide char version
Yangff Feb 23, 2024
3747005
Case-insensitive path lookup
Yangff Feb 24, 2024
addb306
use Helper/String for case-insensitive cmp
Yangff Feb 24, 2024
849126b
add uengine
Yangff Feb 25, 2024
04668e9
Add input source for Linux TUI and update input handler initialization
Yangff Feb 25, 2024
423373f
add input related callbacks to imtui
Yangff Feb 25, 2024
66af611
missed commit for case-insensitive find mods.txt
Yangff Feb 25, 2024
c1abf05
begin to add cppmod back
Yangff Feb 25, 2024
c110143
fix windows input build
Yangff Feb 25, 2024
994b80b
update db
Yangff Feb 25, 2024
48a5a8b
add cppmod for linux
Yangff Feb 25, 2024
d0e90a9
use get_path_if_exists to look up
Yangff Feb 25, 2024
29ccaa5
add GLFW support, seperate build required, it looks a bit weird on WS…
Yangff Feb 25, 2024
a8b8c90
clang format
Yangff Feb 25, 2024
a1aa84b
add back glfw3 for win32
Yangff Feb 25, 2024
07e465b
remove settings.json
Yangff Feb 25, 2024
4da88c4
delete empty findzydis.cmake
Yangff Feb 25, 2024
3b52284
add missing header
Yangff Feb 25, 2024
d640680
add <stop_token>
Yangff Feb 25, 2024
2f49a09
Added <type_trait> include to Casting.hpp
UE4SS Feb 25, 2024
482bc9c
avoid clear key binding for none mod usage
Yangff Feb 25, 2024
332e048
fix tab->space
Yangff Feb 26, 2024
5686a89
generate SYSSTR for macrosetter.hpp
Yangff Feb 26, 2024
026193e
Fixed DynamicOutput for Clang 18
UE4SS Feb 26, 2024
e01a9fc
move headergen.py
Yangff Feb 26, 2024
86b9af0
remove unused settings so far
Yangff Feb 27, 2024
e8d1c37
use build.py to package linux release
Yangff Feb 27, 2024
5604923
remove unused settings
Yangff Feb 27, 2024
a7906a3
fix tab -> space
Yangff Feb 27, 2024
40f8362
define new macro for HAS_UI, HAS_GUI, HAS_TUI for if or not support U…
Yangff Feb 27, 2024
351fb56
style
Yangff Feb 27, 2024
dd38574
graceful exit, avoid crash or deadlock
Yangff Feb 27, 2024
7ea03db
this should be == 0
Yangff Feb 27, 2024
2024c54
should judge based on systemchartype, not io type
Yangff Feb 27, 2024
c2fdffa
no access to system_string here
Yangff Feb 27, 2024
ca5f0b4
destroy window (seems required for linux)
Yangff Feb 27, 2024
c7b4c0c
add Input support for glfw in case we want to ship this as default
Yangff Feb 27, 2024
2df257f
only use glfw input on linux
Yangff Feb 27, 2024
ce3ffaa
no need to throw
Yangff Feb 27, 2024
593f6b6
use local fstring
Yangff Feb 28, 2024
b4dc2d7
remove unnecessary convert
Yangff Feb 29, 2024
f37be60
modify path and scan folder for what to gen
Yangff Mar 2, 2024
b6c6cce
update upstream
Yangff Apr 14, 2024
0d3568a
min changes
Yangff Apr 15, 2024
01d4476
recover deps/third/polyhook_2/CMakeLists.txt
Yangff Apr 15, 2024
6e35bac
add more fixs for xmake
Yangff Apr 15, 2024
3e14c57
workaround and restruct
Yangff Apr 16, 2024
f3d42ee
os deps policy
Yangff Apr 16, 2024
3c8dfc4
should be ue string
Yangff Apr 16, 2024
ea87ce5
add -fpic flag
Yangff Apr 16, 2024
e4f67bb
fix rebase bug
Yangff Apr 16, 2024
faa55fc
buggy globs?
Yangff Apr 16, 2024
a816daf
use __typeof__ instead of typeof?
Yangff Apr 16, 2024
073afef
avoid remove_files issue
Yangff Apr 16, 2024
1e0f6ae
should not use *.? and update unreal
Yangff Apr 16, 2024
b6ba28b
still can't find imtui? why?
Yangff Apr 16, 2024
ad6925f
typo
Yangff Apr 16, 2024
c4637d9
upstream is not merged correctly
Yangff Apr 16, 2024
4f6697f
I've no idea why the pattern scan won't work. I'm done
Yangff Apr 16, 2024
009581c
track latest upstream
Yangff Apr 16, 2024
635fe9a
I hope I modified it right, because xmake won't build it again
Yangff Apr 16, 2024
1dda177
force link order on linux
Yangff Apr 17, 2024
ac2e0bf
move asmtk -> asmjit
Yangff Apr 17, 2024
be6e97a
remove comment
Yangff Apr 17, 2024
87dc38f
set correct config for imgui
Yangff Apr 17, 2024
91f9808
move back
Yangff Apr 17, 2024
b94439d
no file to include
Yangff Apr 17, 2024
0b500ab
move plat headers, modify generator path
Yangff Apr 20, 2024
023a6d7
thing
localcc May 19, 2024
00791f8
change init
localcc May 19, 2024
425e76b
fix xmake compilation
localcc May 22, 2024
f4103c0
use of moved value
Yangff May 24, 2024
dc6b656
add zig tool, add libcxx and remove ArgsParser
Yangff May 24, 2024
421c3a2
use TERMINFO, LCALL config for TUI
Yangff May 26, 2024
1c086b0
add bat for win
Yangff May 26, 2024
a7c738b
add target
Yangff May 26, 2024
6ed0c24
add allow arch for rust
Yangff May 26, 2024
91be338
config for zig as linker
Yangff May 26, 2024
30e97ac
force target and editon in the command
Yangff May 26, 2024
93c7ef7
test unified .bat proxy
Yangff May 26, 2024
681c83e
make both cmake and cargo happy
Yangff May 26, 2024
412e220
fix linux permission
Yangff May 26, 2024
3cf996b
might be a cleaner way
Yangff May 26, 2024
5b0c58e
switch to zig build
Yangff May 26, 2024
9027adb
the clean way refuse to work, sad
Yangff May 26, 2024
5ca2cf3
should use scriptdir
Yangff May 29, 2024
ab96110
some attempts
Yangff May 30, 2024
54cbc0a
bumpup container version
Yangff May 30, 2024
eed044d
24.04
Yangff May 30, 2024
82d6a5d
add -v
Yangff May 30, 2024
15eb0dc
show log
Yangff May 30, 2024
5d774bf
something wrong with 24.04, roll back
Yangff May 30, 2024
0e0ddb8
update cmd
Yangff May 30, 2024
291b378
make cppmod happy
Yangff Jun 2, 2024
5f40d8b
with soname we avoid abs path when link with -l
Yangff Jun 2, 2024
80ca709
fix wrong base ath
Yangff Jun 2, 2024
b99a555
use RTLD_LAZY to avoid missing string symbol in platform
Yangff Jun 2, 2024
2ea0eee
fix TUI bug
Yangff Jun 5, 2024
b036ad0
fix ui
Yangff Jun 5, 2024
b0207ee
xoffset makes it unable to move
Yangff Jun 5, 2024
d2c8855
should allow old code using STR when Output
Yangff Jun 5, 2024
224ec0b
allow access to TUI on both plat (unused on win)
Yangff Jun 7, 2024
fb3eb9d
test tui dynamically
Yangff Jun 7, 2024
1859889
use BackendProperty
Yangff Jun 8, 2024
2fccc07
add common.hpp
Yangff Jun 8, 2024
f1f1490
add WIN32 and dllext
Yangff Jun 8, 2024
3573a60
%s to %S on windows
Yangff Jun 8, 2024
6c98279
designators meet declaration order of class
Yangff Jun 8, 2024
9916917
typo
Yangff Jun 8, 2024
c30456a
get rid of the print
Yangff Jun 8, 2024
a619ffa
add missing links for windows
Yangff Jun 8, 2024
e8fd649
fix windows string type
Yangff Jun 8, 2024
c90a4c5
fix console size
Yangff Jun 9, 2024
98bc01e
verified value
Yangff Jun 9, 2024
087e753
fix xmake fix back
Yangff Jun 9, 2024
3dd00e3
update unreal
Yangff Jun 9, 2024
9b45520
fix windows build
Yangff Jun 9, 2024
db8c255
mod folder is not copied
Yangff Jun 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.x86_64-unknown-linux-gnu]
linker = "./tools/zig/zig-cc-rust.bat"
4 changes: 4 additions & 0 deletions .github/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
mkdir package
cp build/Output/Game__Shipping__Linux/UE4SS/bin/libUE4SS.so package
cp assets/UE4SS-settings.ini package
55 changes: 0 additions & 55 deletions .github/workflows/UpdateUESubmodule.yml

This file was deleted.

72 changes: 0 additions & 72 deletions .github/workflows/experimental.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/linux-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Linux Test Build

on:
workflow_dispatch: {}
push:
branches: [ "linux-port" ]
paths:
- "UE4SS/src/**"
- "UE4SS/include/**"
- "UE4SS/generated_src/**"
- "UE4SS/generated_include/**"
- "deps/**"
- "UE4SS/proxy_generator/**"
- ".github/workflows/linux-test.yml"
- "CMakeLists.txt"
- "cmake/**"
- tools/**
- xmake.lua

permissions:
contents: read

jobs:
make-release:
runs-on: ubuntu-22.04
steps:
- name: Setup github SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSHKEY }}
known_hosts: unnecessary
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # needed to get commits since last tag
ssh-key: ${{ secrets.SSHKEY }}
- uses: goto-bus-stop/setup-zig@v2
- run: zig cc -v
- name: Setup Rust
uses: dtolnay/[email protected]
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
actions-cache-folder: '.xmake-cache'
actions-cache-key: 'linux-test'
- name: Build
run: |
xmake f -y --ue4ssUI=TUI --ue4ssInput=y --ue4ssIsBeta=y --zig=y -m "Game__Shipping__Linux"
XMAKE_COLORTERM=nocolor xmake build -v -D > build.log
- name: Stripping
run: |
mkdir prepackage
objcopy --only-keep-debug Binaries/Game__Shipping__Linux/UE4SS/libUE4SS.so ./prepackage/libUE4SS.so.debug
cp Binaries/Game__Shipping__Linux/UE4SS/libUE4SS.so ./prepackage/libUE4SS.so
strip --strip-debug --strip-unneeded ./prepackage/libUE4SS.so
cd ./prepackage && objcopy --add-gnu-debuglink=libUE4SS.so.debug ./libUE4SS.so && cd ..
- name: Package
run: python ./tools/buildscripts/build.py package -d ./prepackage -s linux64
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: Linux-Release
path: |
release/zDEV-UE4SS_0.0.0.zip
build.log
52 changes: 0 additions & 52 deletions .github/workflows/pushdocs.yml

This file was deleted.

72 changes: 0 additions & 72 deletions .github/workflows/release.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/windows-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Windows Test Build

on:
workflow_dispatch:
push:
branches: [ "linux-port" ]
paths:
- "UE4SS/src/**"
- "UE4SS/include/**"
- "UE4SS/generated_src/**"
- "UE4SS/generated_include/**"
- "deps/**"
- "UE4SS/proxy_generator/**"
- ".github/workflows/windows-test.yml"
- "CMakeLists.txt"

permissions:
contents: read

jobs:
make-release:
runs-on: windows-2022
steps:
- name: Setup github SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSHKEY }}
known_hosts: unnecessary
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # needed to get commits since last tag
ssh-key: ${{ secrets.SSHKEY }}
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Setup Rust
uses: dtolnay/[email protected]
- name: Build
run: |
xmake f -m "Game__Shipping__Win64" -y
xmake build
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: Windows-Release
path: build/Output/Game__Shipping__Win64/UE4SS/bin
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "deps/first/Unreal"]
path = deps/first/Unreal
url = [email protected]:Re-UE4SS/UEPseudo.git
url = [email protected]:Yangff/UEPseudo.git
[submodule "deps/first/patternsleuth"]
path = deps/first/patternsleuth
url = [email protected]:trumank/patternsleuth.git
url = [email protected]:Yangff/patternsleuth.git
Loading