Skip to content

Commit eda4962

Browse files
authored
Merge pull request #448 from Unity-Technologies/Uni-68872-fix-package-validation
Fixed issues causing package validation failure
2 parents 6dfc8fa + 0e2f1c5 commit eda4962

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

CMakeLists.txt

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,28 @@ MESSAGE(STATUS "CMAKE_INSTALL_PREFIX is: " ${CMAKE_INSTALL_PREFIX})
66
project (UnityFbxExporterEditorPackage NONE)
77

88
###########################################################################
9-
# Get git tag as package version
109

10+
# Get git tag as package version
1111
find_package(Git REQUIRED)
1212
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags HEAD
13-
OUTPUT_VARIABLE COM_UNITY_FORMATS_FBX_VERSION
14-
OUTPUT_STRIP_TRAILING_WHITESPACE)
13+
OUTPUT_VARIABLE PACKAGE_VERSION
14+
OUTPUT_STRIP_TRAILING_WHITESPACE)
15+
# only keep x.y.z[-preview.n]
16+
string(REGEX REPLACE "^.*([0-9]\.[0-9]\.[0-9].*)$" "\\1" PACKAGE_VERSION "${PACKAGE_VERSION}")
17+
18+
# Get git revision hash as package revision
19+
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
20+
OUTPUT_VARIABLE PACKAGE_REVISION
21+
OUTPUT_STRIP_TRAILING_WHITESPACE)
22+
23+
# Get git repo url
24+
execute_process(COMMAND ${GIT_EXECUTABLE} config --get remote.origin.url
25+
OUTPUT_VARIABLE PACKAGE_REPO_URL
26+
OUTPUT_STRIP_TRAILING_WHITESPACE)
27+
28+
configure_file(${CMAKE_SOURCE_DIR}/proto.com.unity.formats.fbx/package.json.in ${CMAKE_BINARY_DIR}/package.json @ONLY)
29+
30+
configure_file(${CMAKE_SOURCE_DIR}/proto.com.unity.formats.fbx/Documentation~/index.md.in ${CMAKE_BINARY_DIR}/index.md @ONLY)
1531

1632
###########################################################################
1733
# Zip integrations folder
@@ -67,12 +83,17 @@ add_custom_target(${MAX_INTEGRATION_ZIP_TARGET} ALL DEPENDS ${MAX_INTEGRATION_ZI
6783
install(
6884
DIRECTORY "${CMAKE_SOURCE_DIR}/proto.com.unity.formats.fbx/"
6985
DESTINATION "${CMAKE_INSTALL_PREFIX}/com.unity.formats.fbx"
86+
PATTERN "*.in" EXCLUDE
7087
)
7188
install(
7289
FILES "${CMAKE_BINARY_DIR}/${MAYA_INTEGRATION_ZIP_NAME}" "${CMAKE_BINARY_DIR}/${MAX_INTEGRATION_ZIP_NAME}"
7390
DESTINATION "${CMAKE_INSTALL_PREFIX}/com.unity.formats.fbx/Editor/Integrations~"
7491
)
7592
install(
76-
FILES "${CMAKE_SOURCE_DIR}/CHANGELOG.md" "${CMAKE_SOURCE_DIR}/LICENSE.md"
93+
FILES "${CMAKE_BINARY_DIR}/index.md"
94+
DESTINATION "${CMAKE_INSTALL_PREFIX}/com.unity.formats.fbx/Documentation~"
95+
)
96+
install(
97+
FILES "${CMAKE_SOURCE_DIR}/CHANGELOG.md" "${CMAKE_SOURCE_DIR}/LICENSE.md" "${CMAKE_BINARY_DIR}/package.json"
7798
DESTINATION "${CMAKE_INSTALL_PREFIX}/com.unity.formats.fbx"
7899
)

proto.com.unity.formats.fbx/Documentation~/index.md renamed to proto.com.unity.formats.fbx/Documentation~/index.md.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FBX Exporter
22

3-
__Version__: 2.0.0-preview
3+
__Version__: @PACKAGE_VERSION@
44

55
The FBX Exporter package provides round-trip workflows between Unity and 3D modeling software. Use this workflow to send geometry, Lights, Cameras, and animation from Unity to Autodesk® Maya®, Autodesk® Maya LT™, or Autodesk® 3ds Max®, and back again, with minimal effort.
66

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "com.unity.formats.fbx",
33
"displayName" : "FBX Exporter",
4-
"version" : "2.0.0-preview",
5-
"dependencies" : { "com.autodesk.fbx" : "2.0.0-preview" },
4+
"version" : "@PACKAGE_VERSION@",
5+
"dependencies" : { "com.autodesk.fbx" : "2.0.0-preview.1" },
66
"unity": "2018.2",
77
"description" : "The Unity FBX Exporter package makes it easy to send geometry and animation from Unity 2018.2 or later to any application that supports FBX and back again with minimal effort.\n\nIn particular, this round-trip workflow enables you to export Unity scenes to FBX, import into Maya, Maya LT, or 3ds Max using an artist-friendly interface, export Unity-ready FBX geometry and animation, and safely merge your changes back into those Assets to continue your work.\n\nThe exporter provides support for GameObject hierarchies, Materials, Textures, Cameras, Lights, Skinned Meshes, and Animation. The Unity FBX importer provides support for hierarchies, Materials, Textures, Stingray Physically Based Shader (PBS), Cameras, Animation and Animated custom properties (when present in the FBX file).\n\nThis package includes a plug-in for Autodesk Maya 2017 or later, Autodesk Maya LT 2017 or later, and 3ds Max 2017 or later.",
8-
"keywords" : [ "fbx", "animation", "modeling", "maya", "max" ]
8+
"keywords" : [ "fbx", "animation", "modeling", "maya", "max" ],
9+
"repository.url": "@PACKAGE_REPO_URL@",
10+
"repository.revision": "@PACKAGE_REVISION@"
911
}

0 commit comments

Comments
 (0)