Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_size = 4
indent_style = tab

[*.{yml,yaml}]
indent_size = 2
indent_style = space

[*.clang-format]
indent_size = 2
indent_style = space

[*.{cc,hh,cpp,hpp,h,cpp}]
# matching .clang-format IndentWidth
indent_size = 2
indent_style = tab
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,6 @@ compile_commands.json
# Generated Ecsact files

Source/**/*.ecsact.*

# Distribution
/Dist
8 changes: 8 additions & 0 deletions Config/FilterPlugin.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[FilterPlugin]
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
;
; Examples:
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll
4 changes: 3 additions & 1 deletion EcsactNet.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"CanContainContent": true,
"IsBetaVersion": true,
"IsExperimentalVersion": false,
"Installed": false,
"Installed": true,
"EngineVersion": "5.5.0",
"EnabledByDefault": false,
"Modules":
[
{
Expand Down
12 changes: 12 additions & 0 deletions Tools/DevInstall.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use Package.nu package-plugin

def main [--ue-install-dir: string] {
let info = package-plugin --ue-install-dir $ue_install_dir;
let engine_plugins_dir = [$info.ue_install, "Engine", "Plugins", "Marketplace"] | path join;
let plugin_extract_dir = [$engine_plugins_dir, $info.plugin_name] | path join;

print $"Extracting ($info.plugin_name) to ($plugin_extract_dir)";
mkdir $plugin_extract_dir;
tar -xf $info.plugin_archive -C $plugin_extract_dir;
print $"(ansi green)Unreal ($info.plugin_name) successfully installed to ($engine_plugins_dir)(ansi reset)";
}
73 changes: 73 additions & 0 deletions Tools/Package.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
def get-ue-install-dirs [] {
if (sys host | get name) != "Windows" {
print "Automatic unreal detection only supported on Windows"
print "Please specify the --ue-install-dir option"
exit 1
}

let eng_reg_version_keys = ^reg.exe query 'HKLM\SOFTWARE\EpicGames\Unreal Engine' | str trim | lines;
$eng_reg_version_keys | each {|key|
^reg.exe query $key /v 'InstalledDirectory' | str trim | lines | get 1 | str trim | split column ' ' key type value | get value
} | flatten
}

def get-ue-os [] {
match (sys host | get name) {
"Windows" => "Win64",
"Ubuntu" => "Linux",
_ => {
print $"unhandled host (sys host)"
exit 1
}
}
}

def ue-tool-extension [] {
match (sys host | get name) {
"Windows" => "bat",
_ => "sh",
}
}

export def package-plugin [--ue-install-dir: string] {
let install_dirs = if $ue_install_dir != null { [$ue_install_dir] } else { get-ue-install-dirs };
let plugin_dir = $env.FILE_PWD | path join '..' | path expand;
let dist_dir = [$plugin_dir, 'Dist'] | path join;
mkdir $dist_dir;
cd $plugin_dir;
let plugin_descriptor_filename = (ls *.uplugin).0.name;
let plugin_name = $plugin_descriptor_filename | split row ".uplugin" | get 0;
let dist_archive = [$plugin_dir, 'Dist', $"($plugin_name)Unreal-(get-ue-os).zip"] | path join;
let plugin_descriptor = [$plugin_dir, $plugin_descriptor_filename] | path join;
let temp_package_dir = mktemp -d --suffix $"($plugin_name)UnrealPluginPackage";

if ($install_dirs | length) == 0 {
print "Could not find Unreal Engine installation on your system";
exit 1;
}

let install_dir = if ($install_dirs | length) > 1 {
$install_dirs | input list
} else {
$install_dirs | get 0
};

print $"using ($install_dir)";

let engine_dir = [$install_dir, 'Engine'] | path join;
let uat = [$engine_dir, 'Build', 'BatchFiles', $"RunUAT.(ue-tool-extension)"] | path join;
^$uat BuildPlugin $"-Plugin=($plugin_descriptor)" $"-Package=($temp_package_dir)";

tar -a -cf $dist_archive -C $temp_package_dir '*';
rm -rf $temp_package_dir;

return {
ue_install: $install_dir,
plugin_name: $plugin_name,
plugin_archive: $dist_archive,
};
}

def main [--ue-install-dir: string] {
package-plugin --ue-install-dir $ue_install_dir
}