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

UE5 Addition #37

Merged
merged 5 commits into from
Jun 7, 2024
Merged

UE5 Addition #37

merged 5 commits into from
Jun 7, 2024

Conversation

VerzatileDev
Copy link
Contributor

Changes

Fixed an ( Issue ) Related to Char* , from illegal move to a string value instead

This ensures and avoids the issue of rebuilding it through the batch file
Additionally fixes the Problem for manual build through Project - > Plugins
( Note: Building is only nessecary if the files such as " Binaries / Intermediate " are missing from the plugin files )

Updated the CLI version, which is now directly downloading the latest available on WakaTime website and supports the " waka_ " prefix before the apiKey for reference

(waka_apiKey)
(Note: CLI and Prefix use is in reference to the CLI version being used, both with or without a prefix should work based on testing, unless the Wakatime APIKey does not get changed, on that note Restart the Engine And it should work as intended sending a heartbeat to the servers).

Removed user specific code from the files

.Vscode
(Not nessecary to be included because these are built by and for each developer and commonly cannot be used by others, its directly for the one that made it)

Build Info

To Download the Source, building can only be done through:

  • Batch file of Unreal Engine.
  • Add the Plugin to the Project -> Plugins ( Building it from Engine -> plugins wont work ).

(Note if there are issues Building it, please references to the following https://www.youtube.com/watch?v=2HHJ6AYnwFw&list=WL&index=428 ) And References that in https://github.com/TheAshenWolf/WakaTimeForUE/issues ), Any issues with the code will be written in the CMD files, that can be fixed ( It sections them out in detail! )

To Download the Working version, Pre-Built for Unreal Engine 5 use or see https://github.com/VerzatileDev/WakaTimeForUE/releases/tag/v.1.2.5

Future

Updates to accomidate the Plugin version within code will be done in a different Update instead as the following is specifically used to build and Update the version of the plugin to accomidate UE5 and new Updates to CLI versions of Wakatime.

This includes rest of the code changes, as the following update it aimed towards fixing current problems to make it work within UE5

Changed Version Name
Changed Supported Engine version Details. (Describes the current version available.
Installed - False  ( This will be set true if Added to Unreal Engine itself )
The following is user specific and is not required to be listed and should not be listed as such on githubs repository.
The following aims to avoid illegal move in c++
Which changes the method to instead use string rather than a char* within this method.

- See the the check for nullpointer additionally as it is important to check for it to avoid killing the whole plugin with the engine incase it is empty which would case memory leak and much more.
In the following update:

- Plugin version has been updated from 1.2.4 to 1.2.5
- Get latest CLI version directly from the Website which downloads Wakatime-CLI .zip - > directly if not available.  Thank you for the reference for the latest @TheAshenWolf

-> extracts amd64 version windows.

Issues
---

1. When changing the WakaTime Api Key within the Unreal Project it will not send heartbeats when the API key is changed ( might need to take a look into that)
2. Plugin version should correlate to reading it from the " .uplugin " directly currently it is hardcoded into the core code.
3. It can only build it automatically through " Project - > plugins ", it cannot do that within " Engine - > plugin " which requires files to be built beforehand.

- Reference: In case the plugin does not work it can be built by CMD through See the following " https://www.youtube.com/watch?v=2HHJ6AYnwFw&list=WL&index=427 "
Updated .uplugin with further necessary changes.

EnabledByDefault: When plugin is added to the project plugins or Engine Plugins it will be automatically set as true.

IsBetaVersion: States that its a full available version ( Turning it on adds safeguards that are not nessecary ).

Updated:

Version: 10205 to accomidate the Version Name.
@@ -429,7 +426,7 @@ void FWakaTimeForUEModule::SendHeartbeat(bool bFileSave, string FilePath, string
Command += "--project \"" + GetProjectName() + "\" ";
Command += "--entity-type \"app\" ";
Command += "--language \"Unreal Engine\" ";
Command += "--plugin \"unreal-wakatime/1.2.2\" ";
Command += "--plugin \"unreal-wakatime/1.2.5\" "; // Update this with the plugin version from .uplugin (Unreal Plugin Settings) (Avoid Hardcoding it here) TODO
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this section for Future Update to get it from the .uplugin file instead.

@VerzatileDev
Copy link
Contributor Author

Possibly be able to change the Version that is shown on the Plugin as referenced here #38 Would be a good addition so that Unreal 4 and 5 are seperated.

@TheAshenWolf
Copy link
Owner

Downloaded source, built it (after struggles with missing SDKs), got few heartbeats.

Seems to be working properly, great job!

@TheAshenWolf TheAshenWolf merged commit 51a481e into TheAshenWolf:release Jun 7, 2024
@VerzatileDev
Copy link
Contributor Author

Yeah I think as far as SDK's goes that is not something we have to touch nessecarily, as if they are already developing with unreal they should be familiar with it I would say at least.

@TheAshenWolf
Copy link
Owner

Oh, the SDKs were unrelated to the plugin :D I was reinstalling Unreal from scratch, so some stuff was missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants