Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LSL4Unity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
The Openvibe Group
Unity Apps
LSL4Unity
Commits
5764df44
Commit
5764df44
authored
3 years ago
by
MONSEIGNE Thibaut
Browse files
Options
Downloads
Patches
Plain Diff
Quick Fix for Build with new Unity Editor
parent
b8234c57
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#263372
passed
3 years ago
Stage: documentation
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Editor/BuildHooks.cs
+18
-13
18 additions, 13 deletions
Editor/BuildHooks.cs
with
18 additions
and
13 deletions
Editor/BuildHooks.cs
+
18
−
13
View file @
5764df44
...
@@ -9,6 +9,9 @@ public class BuildHooks
...
@@ -9,6 +9,9 @@ public class BuildHooks
{
{
private
const
string
LIB_LSL_NAME
=
"liblsl"
;
private
const
string
LIB_LSL_NAME
=
"liblsl"
;
private
const
string
PLUGIN_DIR
=
"Plugins"
;
private
const
string
PLUGIN_DIR
=
"Plugins"
;
private
const
string
X86_FOLDER
=
"x86"
;
private
const
string
X64_FOLDER
=
"x86_64"
;
private
const
string
IOS_FOLDER
=
"iOS"
;
/// <summary> Called after the build. See also <see cref="PostProcessBuildAttribute"/>. </summary>
/// <summary> Called after the build. See also <see cref="PostProcessBuildAttribute"/>. </summary>
/// <param name="target"> The build target. </param>
/// <param name="target"> The build target. </param>
...
@@ -26,16 +29,16 @@ public class BuildHooks
...
@@ -26,16 +29,16 @@ public class BuildHooks
switch
(
target
)
switch
(
target
)
{
{
case
BuildTarget
.
StandaloneWindows
:
case
BuildTarget
.
StandaloneWindows
:
RenameLibFile
(
pluginDir
,
LSLEditorIntegration
.
LIB32_NAME
,
LSLEditorIntegration
.
LIB64_NAME
,
LSLEditorIntegration
.
DLL_ENDING
);
RenameLibFile
(
pluginDir
,
X86_FOLDER
,
LSLEditorIntegration
.
LIB32_NAME
,
LSLEditorIntegration
.
LIB64_NAME
,
LSLEditorIntegration
.
DLL_ENDING
);
break
;
break
;
case
BuildTarget
.
StandaloneWindows64
:
case
BuildTarget
.
StandaloneWindows64
:
RenameLibFile
(
pluginDir
,
LSLEditorIntegration
.
LIB64_NAME
,
LSLEditorIntegration
.
LIB32_NAME
,
LSLEditorIntegration
.
DLL_ENDING
);
RenameLibFile
(
pluginDir
,
X64_FOLDER
,
LSLEditorIntegration
.
LIB64_NAME
,
LSLEditorIntegration
.
LIB32_NAME
,
LSLEditorIntegration
.
DLL_ENDING
);
break
;
break
;
case
BuildTarget
.
StandaloneLinux64
:
case
BuildTarget
.
StandaloneLinux64
:
RenameLibFile
(
pluginDir
,
LSLEditorIntegration
.
LIB64_NAME
,
LSLEditorIntegration
.
LIB32_NAME
,
LSLEditorIntegration
.
SO_ENDING
);
RenameLibFile
(
pluginDir
,
X64_FOLDER
,
LSLEditorIntegration
.
LIB64_NAME
,
LSLEditorIntegration
.
LIB32_NAME
,
LSLEditorIntegration
.
SO_ENDING
);
break
;
break
;
case
BuildTarget
.
StandaloneOSX
:
case
BuildTarget
.
StandaloneOSX
:
RenameLibFile
(
pluginDir
,
LSLEditorIntegration
.
LIB64_NAME
,
LSLEditorIntegration
.
LIB32_NAME
,
LSLEditorIntegration
.
BUNDLE_ENDING
);
RenameLibFile
(
pluginDir
,
IOS_FOLDER
,
LSLEditorIntegration
.
LIB64_NAME
,
LSLEditorIntegration
.
LIB32_NAME
,
LSLEditorIntegration
.
BUNDLE_ENDING
);
break
;
break
;
}
}
}
}
...
@@ -46,16 +49,18 @@ public class BuildHooks
...
@@ -46,16 +49,18 @@ public class BuildHooks
/// <param name="srcName"> Name of the source file. </param>
/// <param name="srcName"> Name of the source file. </param>
/// <param name="oldName"> Name of the old. </param>
/// <param name="oldName"> Name of the old. </param>
/// <param name="extension"> The extension. </param>
/// <param name="extension"> The extension. </param>
private
static
void
RenameLibFile
(
string
pluginDir
,
string
srcName
,
string
oldName
,
string
extension
)
private
static
void
RenameLibFile
(
string
pluginDir
,
string
subDir
,
string
srcName
,
string
oldName
,
string
extension
)
{
{
var
oldFile
=
Path
.
Combine
(
pluginDir
,
oldName
+
extension
);
var
oldDir
=
Path
.
Combine
(
pluginDir
,
subDir
);
Debug
.
Log
(
"[LSL BUILD Hook] Delete obsolete file: "
+
oldFile
);
var
oldFile
=
Path
.
Combine
(
oldDir
,
oldName
+
extension
);
File
.
Delete
(
oldFile
);
Debug
.
Log
(
"[LSL BUILD Hook] Delete obsolete file: "
+
oldFile
);
File
.
Delete
(
oldFile
);
var
srcFile
=
Path
.
Combine
(
pluginDir
,
srcName
+
extension
);
var
dst
File
=
Path
.
Combine
(
pluginDir
,
LIB_LSL_NAME
+
extension
);
var
src
File
=
Path
.
Combine
(
oldDir
,
srcName
+
extension
);
Debug
.
Log
(
$"[LSL BUILD Hook] Renaming:
{
srcFile
}
to
{
dstFile
}
"
);
var
dstFile
=
Path
.
Combine
(
pluginDir
,
LIB_LSL_NAME
+
extension
);
File
.
Move
(
srcFile
,
dstFile
);
Debug
.
Log
(
$"[LSL BUILD Hook] Renaming:
{
srcFile
}
to
{
dstFile
}
"
);
}
File
.
Move
(
srcFile
,
dstFile
);
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment