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

Port State Functions and project builds #1

Closed
ryobg opened this issue Feb 6, 2018 · 11 comments
Closed

Port State Functions and project builds #1

ryobg opened this issue Feb 6, 2018 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@ryobg
Copy link
Owner

ryobg commented Feb 6, 2018

As it turns out original code did some custom changes to SKSE. Here I will keep a track of notes wrt to changes done in x64 branch in order to support State Functions. This currently is blocking issue to continue with the build.

Some insight was provided for that though comment #1 and comment #2 - thanks javierhimura!

@ryobg ryobg added the bug Something isn't working label Feb 6, 2018
@ryobg ryobg self-assigned this Feb 6, 2018
@javierhimura
Copy link

I checked the files that are not the same between 1.7.0.1 and JContainers and all the changes from JContainers in PapyrusArgs.cpp and PapyrusArgs.h are included

I think that means the only files actually changed in JContainers are PapyrusNativeFunctionDef.inl and PapyrusNativeFunctionDef_Base.inl

I am not sure how to merge the part of LongSignature in PapyrusNativeFunctionDef.inl, in the original JContainers file only ShortSignature was included, LongSignature is a later adition from SKSE team, but at the same time probably JContainers only needs to have LongSignature adapted with state functions for compiling, it cant use a function that did not exits when the project was made.

@javierhimura
Copy link

I commit a merge with the changes, i cant test if the change compile until i arrive home, that is why i did not made a merge request yet

javierhimura@948aabc

@ryobg
Copy link
Owner Author

ryobg commented Feb 6, 2018

I just started to take a look at your changes.

https://github.com/javierhimura/JContainers/blob/948aabc8b3a86a9bd03bd3ef7ef9ad2430fc7eab/dep/skse/skse64/PapyrusNativeFunctionDef.inl#L28

I think here you should adopt the definition of the class which will be available later in the JContainer code. See the original code.

#define CLASS_NAME __MACRO_JOIN__(NativeFunctionWithState, NUM_PARAMS)

@ryobg
Copy link
Owner Author

ryobg commented Feb 6, 2018

Small other remark wrt to the added shit structure - I would check to change the type of the callback there depending on whether it is Long callback or not. Maybe in practice it matters not, but I can't check now.

Something to check for is whether the JContainer callback should be based on the long or short callback. I'm not sure what is the difference and if the long ones are to map into the higher addresses, the code can crash.

I will be unavailable in the next several hours. Thanks for all!

@javierhimura
Copy link

In the original SKSE code in JContainers only the definition of short callback was included, it seems long callback was added in SKSE releases after the last commit of JContainers

@ryobg
Copy link
Owner Author

ryobg commented Feb 6, 2018

I'm now onto it, will incorporate your logic and go further. Will post here what happened.

ryobg added a commit that referenced this issue Feb 6, 2018
…). Fixed some build errors. Unresolved link symbols currently.
@ryobg
Copy link
Owner Author

ryobg commented Feb 6, 2018

Ok. I think that solution looks good enough. Testing will say. I suspect that there is a memory leak as it is not apparent who delete shit.

Currently there are unresolved linking errors, as it is not clear for me how the SKSE code should be linked. I have to check the original project.

@javierhimura
Copy link

For the linker in the source of the Oldrim version of SKSE inside the api_example project there is a file export.def, it does not exits in the source of SKSE64 because it does not include the source of the api example, but probably those plugins have been made based on the api_example and that means it is only needed to copy export.def to the JContainers project folder

@javierhimura
Copy link

javierhimura commented Feb 7, 2018

I made tha commit that allow JContainers project to compile, i turn SKSE project into a static library with a reference to the new SKSE64.lib in JContainers, the post-build project still fails because the compilation is creating the dll in a folder x64/Release but the python code is searching in /Release folder, but at leas with this a dll can be compiled to test it in game
javierhimura@ba91e03
Probably this is not the best solution, with this change all the content of skse64.dll is being duplicated inside JContainers.dll

EDIT:
In the original JContainers source code the SKSE project is also a Static Library
https://github.com/SilverIce/JContainers/blob/develop/dep/skse/skse/skse.vcxproj

@ryobg
Copy link
Owner Author

ryobg commented Feb 7, 2018

Hey, I didn't had internet connection so went ahead. What you say I can confirm. I just pushed here and later will see how to fix the Post-Build project. So far everything links and we have dlls.

@ryobg ryobg changed the title Port State Functions Port State Functions and project builds Feb 7, 2018
ryobg added a commit that referenced this issue Feb 7, 2018
…xpecting hard-coded path for Mod Organizer in Post-Build. Most important isthat making a distribution seems to work.
@ryobg
Copy link
Owner Author

ryobg commented Feb 7, 2018

Ok, a disitrubtion archive can be made in Release configuration. Ready for testing I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants