-
Notifications
You must be signed in to change notification settings - Fork 14
Fix for UE4.25.1 #3
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
base: master
Are you sure you want to change the base?
Conversation
I also added
|
Wonder why i had to change way more Datatype names when fixing the compile issues also changed cast to castField<> Have you tested your changes yet, as i couldn't, so haven't made a PR yet. (also on which platform did you compile, maybe thats why i got more cmake errors) |
I have it running on my 4.25.1 Source Built - using VS17 on a Windows 10 machine. |
Hey everyone! @RobQuistNL @ben-mkiv Sorry for the silence, I haven't used UE4 since half a year, since I moved to building a custom engine and am working on web based projects. Hence, time for this is pretty limitied, but I will give this a very rough review code wise. Best, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some minor comments, apart from that, looks good 👍
Source/CISQLite3/CISQLite3.Build.cs
Outdated
PublicDependencyModuleNames.AddRange( | ||
PrivatePCHHeaderFile = "Private/CISQLite3PrivatePCH.h"; | ||
PublicDependencyModuleNames.AddRange( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this indentation happened, this change seems to be whitespace only?
|
||
#include "SQLiteBlueprintFunctionLibrary.h" | ||
#include "CISQLite3PrivatePCH.h" | ||
#include "Engine.h" | ||
#include "Misc/CString.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the PCH needs the BlueprintFunctionLibrary or why is this? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea, I'm a complete noob in UE4 and C++ 😆
I don't quite remember why, but this fixed some issues I had..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, found it. CString.h
was moved to Misc/CString.h
, and the order of imports was important, so they moved.
@@ -17,7 +17,7 @@ USQLiteDatabase::USQLiteDatabase(const FObjectInitializer& ObjectInitializer) | |||
|
|||
bool USQLiteDatabase::CreateDatabase(const FString& Filename, bool RelativeToProjectContentDirectory) | |||
{ | |||
const FString actualFilename = RelativeToProjectContentDirectory ? FPaths::ProjectContentDir() + Filename : Filename; | |||
const FString actualFilename = RelativeToProjectContentDirectory ? FPaths::ConvertRelativePathToFull(FPaths::ProjectContentDir()) + Filename : Filename; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember fighting path issues on Android, but I don't think this should be a problem.
Anyone test this on Android coincidentally? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested on anything else but Windows, sorry. I'm not sure why I did this either, but IIRC a relative path didn't work correctly.
I'm sorry for the incredibly low quality of the MR - I just managed to make it work on my machine and decided to share ;p
Thanks for your time!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, sharing is always valuable, maybe someone using this on Android will pick it up and verify 👍
For anyone landing here: These changes fix the plugin for UE4.25.1 on Windows, tested on Windows only. |
@@ -111,6 +111,7 @@ struct SQLiteQueryResult | |||
bool Success; | |||
FString ErrorMessage; | |||
TArray<SQLiteResultValue> Results; | |||
int InsertedId = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a functional change - not sure if this is the way you'd like it.. But I really needed the "last insert id" for an inserted record from a regular query (I'm only using this as a C++ module, not using the blueprints), so you might want to check that out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a SQLite (litterally, specific to sqlite) query for that SELECT last_insert_rowid();
or something. It returns the same as sqlite3_last_insert_rowid(db)
. (Might be slower, though).
If you could check out how that functions is implemented... if it's trivial, we can (and probably should) keep this, otherwise I recommend the query.
@Squareys pushed some changes (and reverted the random whitespace change) |
This fixed my compile errors on a UE4.25.1 build.