Skip to content
Open
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
13 changes: 6 additions & 7 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,17 @@ if($standalone) {

& "$scriptPath\src\ros2cs\build.ps1" @options
if($?) {
md -Force $scriptPath\install\asset | Out-Null
Copy-Item -Path $scriptPath\src\Ros2ForUnity -Destination $scriptPath\install\asset\ -Recurse -Force
md -Force $scriptPath\install\package | Out-Null
Copy-Item -Path $scriptPath\src\Ros2ForUnity -Destination $scriptPath\install\package\ -Recurse -Force

$plugin_path=Join-Path -Path $scriptPath -ChildPath "\install\asset\Ros2ForUnity\Plugins\"
$plugin_path=Join-Path -Path $scriptPath -ChildPath "\install\package\Ros2ForUnity\Runtime\Plugins\"
Write-Host "Deploying build to $plugin_path" -ForegroundColor Green
& "$scriptPath\deploy_unity_plugins.ps1" $plugin_path

Copy-Item -Path $scriptPath\src\Ros2ForUnity\metadata_ros2cs.xml -Destination $scriptPath\install\asset\Ros2ForUnity\Plugins\Windows\x86_64\
Copy-Item -Path $scriptPath\src\Ros2ForUnity\metadata_ros2cs.xml -Destination $scriptPath\install\asset\Ros2ForUnity\Plugins\
Copy-Item -Path $scriptPath\src\Ros2ForUnity\Runtime\metadata_ros2cs.xml -Destination $scriptPath\install\package\Ros2ForUnity\Runtime\Plugins\Windows\x86_64\
Copy-Item -Path $scriptPath\src\Ros2ForUnity\Runtime\metadata_ros2cs.xml -Destination $scriptPath\install\package\Ros2ForUnity\Runtime\Plugins\
Copy-Item -Path $scriptPath\README.md -Destination $scriptPath\install\package\Ros2ForUnity\
} else {
Write-Host "Ros2cs build failed!" -ForegroundColor Red
exit 1
}


8 changes: 8 additions & 0 deletions src/Ros2ForUnity/Runtime.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,24 @@ public void OnPostprocessBuild(BuildReport report)
var r2fuMetadataName = "metadata_ros2_for_unity.xml";
var r2csMetadataName = "metadata_ros2cs.xml";

// FileUtil.CopyFileOrDirectory: All file separators should be forward ones "/".
var r2fuMeta = ROS2ForUnity.GetRos2ForUnityPath() + "/" + r2fuMetadataName;
var r2csMeta = ROS2ForUnity.GetPluginPath() + "/" + r2csMetadataName;
var outputDir = Directory.GetParent(report.summary.outputPath);
var r2fuMeta = Path.Combine(ROS2ForUnity.rootPath, r2fuMetadataName);
var r2csMeta = Path.Combine(ROS2ForUnity.pluginPath, r2csMetadataName);

var outputDir = Directory.GetParent(report.summary.outputPath).ToString();
var execFilename = Path.GetFileNameWithoutExtension(report.summary.outputPath);

FileUtil.CopyFileOrDirectory(
r2fuMeta, outputDir + "/" + execFilename + "_Data/" + r2fuMetadataName);
r2fuMeta, Path.Combine(outputDir, execFilename + "_Data", r2fuMetadataName)
);

string r2csMetaTarget;
if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneLinux64) {
FileUtil.CopyFileOrDirectory(
r2csMeta, outputDir + "/" + execFilename + "_Data/Plugins/" + r2csMetadataName);
r2csMetaTarget = Path.Combine(outputDir, execFilename + "_Data", "Plugins", r2csMetadataName);
} else {
FileUtil.CopyFileOrDirectory(
r2csMeta, outputDir + "/" + execFilename + "_Data/Plugins/x86_64/" + r2csMetadataName);
r2csMetaTarget = Path.Combine(outputDir, execFilename + "_Data", "Plugins", "x86_64", r2csMetadataName);
}

FileUtil.CopyFileOrDirectory(r2csMeta, r2csMetaTarget);
}

}
Expand Down
11 changes: 11 additions & 0 deletions src/Ros2ForUnity/Runtime/Scripts/PostInstall.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/Ros2ForUnity/Runtime/Scripts/ROS2ClientExample.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading