UE4SS-RE / RE-UE4SS

Injectable LUA scripting system, SDK generator, live property editor and other dumping utilities for UE4/5 games
http://docs.ue4ss.com/
MIT License
1.37k stars 187 forks source link

Port/strings Typedef #574

Closed Yangff closed 4 months ago

Yangff commented 5 months ago

This PR just moves StringType from File to String.

Right now, CharType is set to whcar_t, for a verification build for Linux, one can try to build when it is set to char16_t.

It is not intended to solve the circlular dependency in this PR but we may someday as suggested by @localcc seperate Unreal module into Unreal and UnrealDef.

Once this is sovled, CharType should be set to TCHAR for normal build.

I think it's safe to say TCHAR will be UTF-16 at this point, if we want to support cases that TCHAR can be say... utf8/utf32.. then might need to wrap it with to_string or to_wstring based on platform/env.. or pull back the to_system macro for those cases..

I have not tested this change but cherrypick it from my current working branch as suggest by @narknon to allow this part to be easily reviewed and merged. I think this should be mostly okay but please check if it compiles.. In theory, it should not break anything because I re-exported everything under the RC::File:: namespace.

It is based on the fmt PR although it may not actaully related. It is also possible to merge this before the fmt change.

These is nothing to document at this point, although future code should avoid use File::* for string/char type I think.

Also, please try to avoid the use of wstring unless needed.

Yangff commented 5 months ago

I removed the need for #565 .

narknon commented 5 months ago

Requires

includes("String")

in deps\first\xmake.lua to build.

narknon commented 5 months ago

Also breaks anything referencing the old File ToString image

And requires the Unreal FMT branch to be merged.

Yangff commented 5 months ago

got it.. will steal some commits from another PR..

narknon commented 5 months ago

I merged fmt here and on uepseudo so these could be rebased onto main.

Yangff commented 5 months ago

Both should fixed. This PR is rebase to current main with fmt.

Yangff commented 5 months ago

image I think this should build ... at least on my local.

Yangff commented 4 months ago

moving the changes on UE4SS\src\SDKGenerator\UEHeaderGenerator.cpp to #575 I have no time on the next few weeks but I think both this and #575 can be merged somehow.

Buckminsterfullerene02 commented 4 months ago

Both shipping and debug works on DRG with various tool functions, except debug crashes on UHT dump, but it also does in latest main commit, so it is not related to this PR and I will make a seperate issue for that.