Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c5773db0b
|
@@ -38,13 +38,3 @@ Resources/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
# LFS: everything under Source/ThirdParty/
|
||||
Source/ThirdParty/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
# LFS: everything under Handbook/dist/
|
||||
Handbook/dist/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
# Except
|
||||
.gitignore filter= diff= merge= text
|
||||
.gitattributes filter= diff= merge= text
|
||||
|
||||
# LFS: sgum-packager Linux and Windows binaries
|
||||
Packager/sgum-packager filter=lfs diff=lfs merge=lfs -text
|
||||
Packager/sgum-packager.exe filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -125,11 +125,3 @@ DerivedDataCache/*
|
||||
|
||||
# Do not ignore anything inside the ThirdParty directory at all
|
||||
!Source/ThirdParty/**/*
|
||||
|
||||
# The Handbook
|
||||
Documentation/
|
||||
Handbook/book/
|
||||
|
||||
# sgum-packager
|
||||
# Do not ignore the sgum-packager Windows binary
|
||||
!Packager/sgum-packager.exe
|
||||
@@ -5,186 +5,6 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.1.1] - 2024-08-18
|
||||
|
||||
This is a bugfix release with no actual plugin code changes, mostly addressing issues in the documentation and third-party dependencies caused by source control merge conflicts.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix the messed up changelog file caused by cherry-picking merge conflicts between the dev branch and the master branch.
|
||||
- Fix a bug that causes a handbook revision mismatch when deploying the handbook from the dev branch.
|
||||
- Fix a bug where `SG_GIT_IS_SHALLOW_CLONE` while building the handbook is always set to `yes` even if it's not a shadow clone because `SG_DOT_GIT_SHALLOW_FILE` evaluates to an empty string when the `.git/shallow` file does not exist.
|
||||
- Fix some documentation typos.
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed Android NDK r25 armv7 and x86 dependencies brought back by mistake while merging v2.1.0 from the dev branch to the master branch.
|
||||
|
||||
## [2.1.0] - 2024-08-16
|
||||
|
||||
This is a minor release focusing mainly on bringing OpenXR-compatible hand tracking support (`XR_EXT_hand_tracking`) and Head-mounted Display automatic detection for adjusting wrist tracker offsets automatically at runtime.
|
||||
|
||||
### Added
|
||||
|
||||
- Added SenseGloveTracking and module which provides OpenXR-compatible hand tracking by implementing `XR_EXT_hand_tracking` support, HMD auto-detection, and SenseGlove device tracking.
|
||||
- Added USenseGloveTrackingKismet module in order to expose part of the SenseGloveTracking functionality to Blueprint.
|
||||
- Added FSGXRTracker, the underlying main class that implements the OpenXR compatibility.
|
||||
- Added USGXRTrackerKismetLibrary in order to allow Blueprint to retrieve the FXRMotionControllerData directly from our tracking module.
|
||||
- Added the SGTrackingTypes header to the SenseGloveTypes module in order to define and share SenseGloveTracking module types through this header across the plugin modules.
|
||||
- A fallback to HMD and wrist tracker hardware auto-detection mechanism has been added to be triggered in situations when automatic detection of the wrist tracker hardware is desired, e.g., either by not setting it explicitly, or setting it to the default None value. Please note that this is still highly experimental and HTC VIVE Focus 3 and HTC XR Elite cannot be distinguished in the current iteration. Though, since the tracker devices and offsets for both headsets are the same in the end it does not make a difference if both headsets are detected as each other.
|
||||
- Added ESGHeadMountedDisplayDevice enum with supported HMDs list.
|
||||
- Added ESGViveHMDDetectionPriority enum in order to choose which headset we attempt to detect between VIVE Focus 3 and VIVE XR Elite as we cannot distinguish them, yet.
|
||||
- Added the FSGHMDTracker utility class, in order to easily gather information about the HMD device at runtime.
|
||||
- Added USGHMDTrackerKismetLibrary which exposes the equivalent C++ HMD auto-detection functionality to Blueprint.
|
||||
- Added FSGHMDTrackingSettings config struct.
|
||||
- Added the FSGGloveTracer utility class, in order to easily check the left or right glove connectivity or retrieve the connected glove instances.
|
||||
- Added USGGloveTrackerKismetLibrary which exposes the equivalent C++ functionality to Blueprint.
|
||||
- Added FSGGloveTrackingSettings config struct.
|
||||
- Added FSGTrackingSettings config struct.
|
||||
- Added FSGHandTrackingSettings config struct.
|
||||
- Added FSGWristTrackingDebuggingSettings config struct.
|
||||
- Added FSGVirtualHandSettings config struct.
|
||||
- Added FSGVirtualHandAnimationSettings config struct.
|
||||
- Added FSGVirtualHandDebuggingSettings config struct.
|
||||
- Added FSGVirtualHandGrabSettings config struct.
|
||||
- Added FSGVirtualHandHapticsSettings config struct.
|
||||
- Added FSGVirtualHandMeshSettings config struct.
|
||||
- Added FSGVirtualHandPhalangesLengthSettings config struct.
|
||||
- Added FSGVirtualHandTouchSettings config struct.
|
||||
- Added USGVirtualHandComponent::OnHandVisibilityChanged() event in order to notify other components/actors whenever the virtual hand mesh appears or disappears (for example, this could happen when a glove is connected/disconnected).
|
||||
- GetMotionControllerData() has been introduced to the USGVitualHandComponent in order to retrieve the OpenXR-compatible glove data in Unreal's FXRMotionControllerData format.
|
||||
- Added FSGVirtualHandAnimInstanceProxy::GetMotionControllerData and many more accessor methods usable only by child classes to allow consumption of the data required for manipulating the virtual hand mesh animations.
|
||||
- GetMotionControllerData() has been introduced to the USGWristTrackerComponent in order to retrieve the OpenXR-compatible glove data in Unreal's FXRMotionControllerData format.
|
||||
- Added USGGrabComponent::SimulatePhysics() method.
|
||||
- Added FSGDebugCube.
|
||||
- Added FSGDebugCubeSettings.
|
||||
- Added the SenseGloveDebugKismet module in order to allow drawing of debugging, cubes, gizmos, and virtual hands from Blueprint.
|
||||
- Added USGDebugCubeKismetLibrary in order to expose the FSGDebugCube functionalities to Blueprint.
|
||||
- Added USGDebugGizmoKismetLibrary in order to expose the FSGDebugGizmo functionalities to Blueprint.
|
||||
- Added USGDebugVirtualHandKismetLibrary in order to expose the FSGDebugVirtualHand functionalities to Blueprint.
|
||||
- Added a new static Draw() method overload to DebugGizmo which allows passing an FQuat instead of a FRotator.
|
||||
- Introduced a new FXRMotionControllerData compatible hand animation system with the ability to take the mesh bone's transforms into account for a more reliable hand animation.
|
||||
- Introduced a new FXRMotionControllerData compatible wrist tracking system.
|
||||
- Introduced a new FXRMotionControllerData compatible hand interaction manipulation system.
|
||||
- Added the ability to fallback to hand tracking when a glove is not present and use the bare hands for interactions, or a combination of glove and hand tracking if no motion controller input is detected.
|
||||
- Added the SenseGlove grab/touch sockets one-click-setup ability on any Epic-compliant virtual hand mesh from within the Unreal Editor's Content Browser, Skeleton Editor, or Skeletal Mesh Editor by extending the Unreal Editor.
|
||||
- Added FSGAssetUtils editor-only class.
|
||||
- Added FSGContentBrowserExtension editor-only class.
|
||||
- Added FSGPluginStyle editor-only class.
|
||||
- Added FSGSocketsEditor editor-only class.
|
||||
- Added FSGSocketsEditorCommands editor-only class.
|
||||
- Added the FSGInitializationSettings config struct in order to control how the plugin is initialized.
|
||||
- Introduced the FSGGameUserSettings for managing the Engine Scalability Settings through the SenseGlove plugin in order to change the graphics settings on the fly.
|
||||
- Added USGGameUserSettingsKismetLibrary in order to allow all the Engine Scalability Settings to be managed from the Blueprint side.
|
||||
- Added FSGGameUserSettingsSettings config struct.
|
||||
- Added the SenseGlove console commands: SG_GetEngineScalabilitySettings() and SG_SetEngineScalabilitySettings(Scalability).
|
||||
- Added SGHardwareBenchmarkingSettings config struct.
|
||||
- Introduced ESGEngineScalabilitySettings enum.
|
||||
- Added FSGVirtualHandSettingsOverrides config struct used by the new settings override system.
|
||||
- Added SGWristTrackingSettingsOverrides config structured by the new settings override system.
|
||||
- Added support for Android API level 32 in addition to the API level 29.
|
||||
- Introduced the SenseGlove Unreal Engine Handbook as an attempt at documenting the SenseGlove Unreal Engine Plugin.
|
||||
- Merged the `pack` utility branch to the plugin's source code at `/Packager` which adds the SenseGlove Unreal Engine Marketplace Packager v0.4.0-a65bb20 binaries and configurations.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed a bug when the virtual hand inside the game is not visible but still collides with other objects inside the scene, mistakenly triggering events like OnGrabStateUpdated and OnTouchStateUpdated.
|
||||
- Fixed a bug where USGGrabComponent's `bAffectPhysicsState` does not enables physics on its owning actor at `BeginPlay()`.
|
||||
- Fixed various wrong Kismet script names and their class exports.
|
||||
- Fixed the display name for various overloads of the Blueprint-exposed function `Queue Command Vibro Level` to expose sensible display names.
|
||||
- Some Android UPL tweaks, permission, and build fixes.
|
||||
- Many other large and small fixes and improvements that might not be listed here.
|
||||
- A few small bugfixes that have already been backported to the v2.0.x series.
|
||||
|
||||
### Changed
|
||||
|
||||
- Now, if bValidateIfDefaultClassesAreSGCompliant option from FSGInitializationSettings is enabled (default) the SenseGlove plugin checks for default SenseGlove-compliant GameMode, GameInstance, etc, at module initialization and tries to set to default, native SenseGlove classes, if any of those default classes are not a SenseGlove or a SenseGlove-derived class.
|
||||
- The USGSettings has been fully revamped with more customizations added and categorized in a different manner adding many new structs and removing some, in order to have fine-grained control over the various aspects and functionality of the plugin components.
|
||||
- The USGSettings constructor visibility has been changed from public to private.
|
||||
- The Settings override system has been overhauled as well affecting how we override settings from the USGVirtualHandComponent and USGWristTrackerComponent.
|
||||
- The SenseGlove libraries have been updated to v2.104.1-55fddbd2.
|
||||
- GetHandPose() has been replaced by GetMotionControllerData inside USGVirtualHandComponent (see the relevant entry in the Added and Removed sections).
|
||||
- Many functions inside USGVirtualHandComponent for retrieving bone names or reference transforms has been renamed to return different data types; e.g. GetLeftHandFingerBoneNames(), GetRightHandFingerBoneNames(), GetLeftHandFingerBoneName(), and GetRightHandFingerBoneName() renamed to GetLeftHandBoneNames(), GetRightHandBoneNames(), GetLeftHandBoneName(), and GetRightHandBoneName() respectively.
|
||||
- bHiddenInGameIfNoGloveDetected UPROPERTY from USGVirtualHandComponent has been renamed to bVisibleWhenHandDataUnavailable and accordingly all of its getters and setters; bVisibleWhenHandDataUnavailable = false now acts as bHiddenInGameIfNoGloveDetected = true, and vice-versa.
|
||||
- USGWristTrackerComponent now uses FXRMotionControllerData for wrist tracking instead of calculating the wrist location by calling the SenseGlove API.
|
||||
- FSGVirtualHandAnimInstanceProxy now relies on FXRMotionControllerData to animate the hands instead of a TMap of bone names and rotations which allows it to also apply the bone locations.
|
||||
- The new OpenXR animation system now takes into account the mesh bone's transforms for a more reliable hand animation.
|
||||
- FSGDebugVirtualHand::Draw now accepts a FXRMotionControllerData parameter instead of all WristLocation, WristRotation, JointPositions, and JointRotations parameters.
|
||||
- FSGDebugVirtualHandSettings has been renamed to FSGVirtualHandDebuggingSettings.
|
||||
- The value for USGGrabComponent's AttachmentSocketName uproperty now defaults to the value of the plugin's GrabAttachPointSocketName instead of Name_NONE.
|
||||
- The USGGrabComponent now enables `bGravityEnabled`, `bSimulatePhysics`, and calls `WakeRigidBody` on its owning actor at `BeginPlay()` if `bAffectPhysicsState` is enabled.
|
||||
- Updated the Directory Structure section of the main README file to reflect the latest toolchain support status.
|
||||
- The `/CHANGELOG.md` file has been migrated to `/Handbook/src/overview/changelog.md`
|
||||
- The `/LICENSE.md` file has been migrated to `/Handbook/src/license/senseglove-unreal-engine-plugin.md`
|
||||
- The `/LICENSE-THIRD-PARTY.md` file has been migrated to `/Handbook/src/license/third-party.md` and every third-party component's license has been split; adding `/Handbook/src/license/senseglove-sdk.md` for the SenseGlove SDK, `/Handbook/src/license/boost-cpp-libraries.md` for the Boost C++ Libraries, and `/Handbook/src/license/serial-communication-library.md` for the Serial Communication Library.
|
||||
- The Platform Support Matrix section of the main README file has been migrated to `/Handbook/src/overview/platform-support-matrix.md`.
|
||||
- The Planned Features Completion Status section of the main README file has been migrated to `/Handbook/src/overview/planned-features-completion-status.md`.
|
||||
- The Directory Structure section of the main README file has been migrated to `/Handbook/src/overview/directory-structure.md`.
|
||||
- The SenseGlove settings' main config struct is now marked as DefaultConfig which means it does not require to be saved when settings are changed and they take effect immediately as the user updates them.
|
||||
- Replaced all bitfield uproperties with booleans.
|
||||
- Changed the DocsURL from the [old Blueprint docs website](https://senseglove.gitlab.io/unreal-blueprint-docs/) to [the new SenseGlove Unreal Engine Handbook website](https://unreal.docs.senseglove.com/).
|
||||
- The Blueprint signature for various overloads of the Blueprint-exposed function `Queue Command Vibro Level` has been changed to expose sensible display names.
|
||||
|
||||
### Removed
|
||||
|
||||
- Dropped support for Unreal Engine 5.1 and Epic Native Toolchain v20 (used to build UE 5.0 and 5.1 Linux dependencies).
|
||||
- Removed the Allbreaker virtual hand model as it's no longer compatible with the SenseGlove plugin.
|
||||
- Removed ASGVirtualHandActor as it was experimental and we no longer maintain it and haven't been doing so for a long time.
|
||||
- Removed FSGVirtualHandAnimInstanceProxy::GetBonesRotations().
|
||||
- Removed USGVirtualHandComponent::GetHandPose() and it's no longer possible to get the hand pose data from USGVirtualHandComponent as GetHandPose() has been removed. If you need it, you could always use the SenseGlove low-level API to retrieve it from the glove.
|
||||
- Removed also GetFingerBoneName(), GetFingerBoneRefTransform(), GetFingerBoneRefRotation() and GetFingerBoneRefRotation() from USGVirtualHandComponent.
|
||||
- Removed some remnants of UE 5.1 and older releases from the C++ code.
|
||||
- Removed the `pack` utility branch and merge it to the plugin's source code at `/Packager`.
|
||||
|
||||
### Known Issues
|
||||
|
||||
- With the new OpenXR release, the separation of the real and virtual hand rendering is broken. The reason is the animation system now uses the OpenXR data in the world transforms which yields better animations, but comes at the cost of overriding the the hand position set by the wrist tracker component's position and rotation. If `FXRMotionControllerData` is invalid and `bVisibleWhenHandDataUnavailable` is enabled for example, the system works as expected, since the animation system won't proceed to animate the hand meshes without valid `FXRMotionControllerData`. Since the animation system is only aware of the hand mesh it's animating versus the real hand and virtual hand meshes it means either it should become aware of the physics events like begin and end overlap events and also the real vs virtual hands, or it should resort back to animating the virtual hand meshes in local or component space. This release marks this feature as broken for now until we come up with a reasonable solution in the future.
|
||||
- The `UXRDeviceVisualizationComponent` provided by Unreal Engine is used in the SGPawn class as ControllerVisualizerLeft and ControllerVisualizerRight for implementing the wrist tracking hardware visualization feature. However, it is not compatible with the new OpenXR system in certain scenarios. For instance, when the motion controllers serve as wrist tracking hardware since the SenseGlove plugin is now introduced to the engine as an `OpenXRHandTracking` system, it causes the UXRDeviceVisualizationComponent to visualize the wrist tracking hardware at coordinates (0.0f, 0.0f, 0.0f) instead of their actual location and rotation in the world. This happens because the component incorrectly registers them as inactive, possibly because it's assumed hand tracking and motion controllers cannot be in use at the same time. Currently, we use this feature solely for debugging, and we have an alternative in the form of wrist-tracking debug gizmos, which can be toggled on or off via the settings system. In future releases, we might remove this feature due to its incompatibility, unless we find a solution to make the `UXRDeviceVisualizationComponent` work with the new system. Alternatively, we may develop our own version of the `UXRDeviceVisualizationComponent`.
|
||||
- Although the SenseGlove OpenXR implementation is fully compatible with the `IOpenXRHMD` interface and the `FOpenXRHMD` `XRTrackingSystem`, it is not compatible with the `FOculusXRHMD` backend provided by the Meta XR plugin. The same issue likely applies to the VIVE OpenXR plugin. So, if these plugins are enabled in your project, the SenseGlove OpenXR will not function as intended, effectively breaking the plugin's functionality. It seems these plugins are necessary in order to make the fallback to the hand-tracking feature work on Android. While we may add support and compatibility with Meta XR and VIVE OpenXR plugins in the future, for the time being, if your project requires these plugins, we advise continuing with the `v2.0.x` release of the SenseGlove Unreal Engine plugin until this issue is addressed.
|
||||
|
||||
## [2.0.8] - 2024-07-15
|
||||
|
||||
This is a bugfix release that contains a somewhat important bugfix backported from the next release of the plugin as documented below.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix a bug where the SGPawn right-hand grab colliders' default size is mistakenly set to the default value for the left-hand grab colliders at CDO initialization time.
|
||||
|
||||
## [2.0.7] - 2024-05-29
|
||||
|
||||
This is a bugfix release with no actual plugin code changes, only fixing issues with binary assets incompatible with UE versions earlier than 5.4.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Make the Allbreaker assets compatible with UE5.1+ again as the v2.0.5 update breaks compatibility with UE versions earlier than 5.4, thus leaving the engine unable to load those assets.
|
||||
|
||||
## [2.0.6] - 2024-05-29
|
||||
|
||||
This is a bugfix release with no actual plugin code changes, only removing development/test assets from UE 5.3 that were never meant to be shipped.
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed the dev/test virtual hand models that leaked into the 5.3 branch.
|
||||
|
||||
### Fixed
|
||||
|
||||
## [2.0.5] - 2024-05-22
|
||||
|
||||
This is a bugfix release with no actual plugin code changes, only focusing on fixing the Allbreaker virtual hand model issues.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix the wrong palm bone names on the Allbreaker virtual hand models.
|
||||
|
||||
## [2.0.4] - 2024-05-17
|
||||
|
||||
This is a bugfix release with no actual plugin's code change.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix our in-house Unreal Engine Marketplace submission tool's configurations where the Content folder (containing the Allbreaker hand model) is mistakenly ignored during the submission. This release reintroduces the Virtual Hand Model and its material missing from the previous release.
|
||||
- Fix the SenseGlove.uproject's wrong versioning submitted to the Unreal Engine Marketplace.
|
||||
|
||||
## [2.0.3] - 2024-05-15
|
||||
|
||||
This is a bugfix release addressing mostly RunUAT build issues on Unreal Engine 5.4.
|
||||
@@ -219,7 +39,7 @@ This is a bugfix release.
|
||||
|
||||
- Fix a bug inside both SGVirtualHandComponent and SGWristTrackerComponent where the connected glove's UObject instance gets destroyed and re-instantiated every frame. With this fix now the glove instance will be created or destroyed only when a glove connects to or disconnects from the system.
|
||||
- Update the outdated Platform Support Matrix and its remarks section to reflect the latest status information.
|
||||
- Fix the wrong header file description sections for the header files inside `SenseGloveKismet/Public/SGKismet/`.
|
||||
- Fix the wrong header file description sections for the header files inside <code>SenseGloveKismet/Public/SGKismet/</code>.
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
[FilterPlugin]
|
||||
/CHANGELOG.md
|
||||
/Config/FilterPlugin.ini
|
||||
/Documentation/the-senseglove-unreal-engine-handbook.pdf
|
||||
/Documentation/the-senseglove-unreal-engine-handbook.zip
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# author: Mamadou Babaei <mamadou@senseglove.com>
|
||||
#
|
||||
# (The MIT License)
|
||||
#
|
||||
# Copyright (c) 2020 - 2024 SenseGlove
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
|
||||
# pmake might add -J (private)
|
||||
FLAGS=${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W}
|
||||
|
||||
all: .DEFAULT
|
||||
.DEFAULT:
|
||||
@which gmake > /dev/null 2>&1 || \
|
||||
(echo "BSD Make is not supported; The build requires GNU Make." && exit 1)
|
||||
@gmake ${.FLAGS} ${.TARGETS}
|
||||
@@ -1,672 +0,0 @@
|
||||
#
|
||||
# author: Mamadou Babaei <mamadou@senseglove.com>
|
||||
#
|
||||
# (The MIT License)
|
||||
#
|
||||
# Copyright (c) 2020 - 2024 SenseGlove
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Generic Settings
|
||||
################################################################################
|
||||
|
||||
SG_PROJECT_NAME := The SenseGlove Unreal Engine Handbook
|
||||
|
||||
SG_PROJECT_GIT_REPOSITORY := https://dev.azure.com/SenseGlove/SenseGlove-Unreal/_git/SenseGlove-Unreal
|
||||
|
||||
SG_HANDBOOK_ESCAPED_NAME := $(shell echo $(SG_PROJECT_NAME) | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
|
||||
|
||||
SG_HANDBOOK_DIR := $(CURDIR)
|
||||
SG_HANDBOOK_SRC_DIR := $(SG_HANDBOOK_DIR)/src
|
||||
SG_HANDBOOK_TOML_FILE := $(realpath $(SG_HANDBOOK_DIR)/book.toml)
|
||||
SG_HANDBOOK_CONFIG_HOME_DIR := SenseGlove/ue-handbook
|
||||
SG_HANDBOOK_DEPLOY_CONFIG_FILENAME := deploy.conf
|
||||
SG_HANDBOOK_DEPLOY_TEMP_DIR_NAME := unreal-docs-senseglove-com-deploy-XXXXXXXXXX
|
||||
SG_HANDBOOK_FAVICON_FILE := $(SG_HANDBOOK_SRC_DIR)/favicon.svg
|
||||
|
||||
SG_DOT_GIT_DIR := $(realpath $(SG_HANDBOOK_DIR)/../.git)
|
||||
SG_DOT_GIT_SHALLOW_FILE := $(SG_DOT_GIT_DIR)/shallow
|
||||
|
||||
SG_PLUGIN_DIR := $(realpath $(SG_HANDBOOK_DIR)/..)
|
||||
SG_PLUGIN_RESOURCES_DIR := $(SG_PLUGIN_DIR)/Resources
|
||||
SG_PLUGIN_FILE := $(SG_PLUGIN_DIR)/SenseGlove.uplugin
|
||||
|
||||
SG_DOCUMENTATION_URL := https://unreal.docs.senseglove.com
|
||||
SG_DOCUMENTATION_DIR := $(SG_PLUGIN_DIR)/Documentation
|
||||
SG_DOCUMENTATION_EPUB_DIR := $(SG_DOCUMENTATION_DIR)/epub
|
||||
SG_DOCUMENTATION_HTML_DIR_NAME := html
|
||||
SG_DOCUMENTATION_HTML_DIR := $(SG_DOCUMENTATION_DIR)/$(SG_DOCUMENTATION_HTML_DIR_NAME)
|
||||
SG_DOCUMENTATION_PDF_DIR := $(SG_DOCUMENTATION_DIR)/pdf-outline
|
||||
SG_DOCUMENTATION_PDF_FILE := $(SG_DOCUMENTATION_PDF_DIR)/output.pdf
|
||||
SG_DOCUMENTATION_PACK_DIR_NAME := pack
|
||||
SG_DOCUMENTATION_PACK_DIR := $(SG_DOCUMENTATION_DIR)/$(SG_DOCUMENTATION_PACK_DIR_NAME)
|
||||
|
||||
SG_HANDBOOK_PACKED_HTML_DIR := $(SG_DOCUMENTATION_PACK_DIR)/$(SG_HANDBOOK_ESCAPED_NAME)
|
||||
SG_HANDBOOK_PACKED_HTML_FILE := $(SG_DOCUMENTATION_PACK_DIR)/$(SG_HANDBOOK_ESCAPED_NAME).zip
|
||||
SG_HANDBOOK_PACKED_PDF_FILE := $(SG_DOCUMENTATION_PACK_DIR)/$(SG_HANDBOOK_ESCAPED_NAME).pdf
|
||||
|
||||
SG_BROWSER_BINARY_PATH_LINUX := $(shell which brave-bin 2>/dev/null)
|
||||
SG_BROWSER_BINARY_PATH_WINDOWS := C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe
|
||||
|
||||
SG_RSYNC_BIN_PATH_WINDOWS := C:\Program Files\cwrsync\bin
|
||||
SG_RSYNC_BINARY_PATH_WINDOWS := $(SG_RSYNC_BIN_PATH_WINDOWS)\rsync.exe
|
||||
SG_RSYNC_SSH_BINARY_PATH_WINDOWS := $(SG_RSYNC_BIN_PATH_WINDOWS)\ssh.exe
|
||||
|
||||
################################################################################
|
||||
# Platform Detection
|
||||
################################################################################
|
||||
|
||||
SG_BUILD_ARCH_AMD64 := amd64
|
||||
SG_BUILD_PLATFORM_LINUX := linux
|
||||
SG_BUILD_PLATFORM_WINDOWS := windows
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
SG_BUILD_PLATFORM := $(SG_BUILD_PLATFORM_WINDOWS)
|
||||
# Running a 32-bit (x86) Command Prompt sets PROCESSOR_ARCHITECTURE to x86,
|
||||
# and instead defines PROCESSOR_ARCHITEW6432 for 64-bit Windows detection.
|
||||
ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
|
||||
SG_BUILD_ARCH := $(SG_BUILD_ARCH_AMD64)
|
||||
else # ($(PROCESSOR_ARCHITEW6432),AMD64)
|
||||
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
|
||||
SG_BUILD_ARCH := $(SG_BUILD_ARCH_AMD64)
|
||||
endif # ($(PROCESSOR_ARCHITECTURE),AMD64)
|
||||
endif # ($(PROCESSOR_ARCHITEW6432),AMD64)
|
||||
else # ($(OS),Windows_NT)
|
||||
SG_PLATFORM_UNAME := $(shell uname -s)
|
||||
ifeq ($(SG_PLATFORM_UNAME),Linux)
|
||||
SG_BUILD_PLATFORM := $(SG_BUILD_PLATFORM_LINUX)
|
||||
SG_PLATFORM_UNAME_ARCH := $(shell uname -m)
|
||||
endif # ($(SG_PLATFORM_UNAME),Linux)
|
||||
ifeq ($(SG_PLATFORM_UNAME_ARCH),x86_64)
|
||||
SG_BUILD_ARCH := $(SG_BUILD_ARCH_AMD64)
|
||||
endif # ($(SG_PLATFORM_UNAME_ARCH),x86_64)
|
||||
endif # ($(OS),Windows_NT)
|
||||
|
||||
################################################################################
|
||||
# Target Settings - mdbook
|
||||
################################################################################
|
||||
|
||||
SG_MDBOOK_HOST := "localhost"
|
||||
SG_MDBOOK_PORT := "8000"
|
||||
SG_MDBOOK_SRC_DIR := "${SG_HANDBOOK_DIR}/src"
|
||||
SG_MDBOOK_DEST_DIR := "${SG_DOCUMENTATION_DIR}"
|
||||
SG_MDBOOK_WATCHER := "poll"
|
||||
|
||||
SG_PLUGIN_CHANGELOG_FILE := $(SG_PLUGIN_DIR)/CHANGELOG.md
|
||||
SG_PLUGIN_DIRECTORY_STRUCTURE_FILE := $(SG_PLUGIN_DIR)/DIRECTORY_STRUCTURE.md
|
||||
SG_PLUGIN_LICENSE_FILE := $(SG_PLUGIN_DIR)/LICENSE.md
|
||||
SG_PLUGIN_LICENSE_THIRD_PARTY_FILE := $(SG_PLUGIN_DIR)/LICENSE_THIRD_PARTY.md
|
||||
SG_PLUGIN_PLANNED_FEATURES_COMPLETION_STATUS_FILE := $(SG_PLUGIN_DIR)/PLANNED_FEATURES_COMPLETION_STATUS.md
|
||||
SG_PLUGIN_PLATFORM_SUPPORT_MATRIX_FILE := $(SG_PLUGIN_DIR)/PLATFORM_SUPPORT_MATRIX.md
|
||||
|
||||
################################################################################
|
||||
# Version and Build Information
|
||||
################################################################################
|
||||
|
||||
SG_GIT_TREE_STATE_CLEAN := clean
|
||||
SG_GIT_TREE_STATE_DIRTY := dirty
|
||||
|
||||
SG_GIT_NO := no
|
||||
SG_GIT_YES := yes
|
||||
|
||||
SG_RELEASE_BRANCH_PATTERN := ^[0-9]+\.[0-9]+$$
|
||||
|
||||
SG_GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||
SG_GIT_TAG := $(shell git describe --tags --abbrev=0 2>/dev/null)
|
||||
SG_GIT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
SG_GIT_COMMIT_NUMS_SINCE_TAG := $(shell git rev-list --count HEAD ^`git describe --tags --abbrev=0 2>/dev/null` 2>/dev/null)
|
||||
SG_GIT_TREE_STATE := $(shell test -n "`git status --porcelain 2>/dev/null`" && echo "$(SG_GIT_TREE_STATE_DIRTY)" || echo "$(SG_GIT_TREE_STATE_CLEAN)")
|
||||
SG_GIT_IS_SHALLOW_CLONE := $(shell [ -d $(SG_DOT_GIT_DIR) ] && [ -f $(SG_DOT_GIT_SHALLOW_FILE) ] && echo "$(SG_GIT_YES)" || echo "$(SG_GIT_NO)")
|
||||
SG_GIT_LATEST_REMOTE_TAG := $(shell git -c versionsort.suffix=- ls-remote --exit-code --refs --sort=version:refname --tags $(SG_PROJECT_GIT_REPOSITORY) '*.*.*' | tail -n 1 | sed 's/.*refs\/tags\///' 2>/dev/null)
|
||||
|
||||
SG_PLUGIN_VERSION := $(shell grep -o '"VersionName": "[^"]*"' ${SG_PLUGIN_FILE} | awk -F'"' '{print "v" $$4}')
|
||||
|
||||
ifeq ($(strip $(SG_GIT_COMMIT_NUMS_SINCE_TAG)),)
|
||||
SG_GIT_COMMIT_NUMS_SINCE_TAG := 0
|
||||
endif # ($(strip $(SG_GIT_COMMIT_NUMS_SINCE_TAG)),)
|
||||
|
||||
ifneq ($(strip $(SG_GIT_TAG)),)
|
||||
SG_GIT_VERSION := $(SG_GIT_TAG)
|
||||
endif # ($(strip $(SG_GIT_TAG)),)
|
||||
|
||||
ifeq ($(strip $(SG_GIT_VERSION)),)
|
||||
ifeq ($(strip $(SG_GIT_IS_SHALLOW_CLONE)),$(SG_GIT_YES))
|
||||
ifneq ($(strip $(SG_GIT_LATEST_REMOTE_TAG)),)
|
||||
SG_GIT_VERSION := $(SG_GIT_LATEST_REMOTE_TAG)
|
||||
endif # ($(strip $(SG_GIT_LATEST_REMOTE_TAG)),)
|
||||
endif # ($(strip $(SG_GIT_IS_SHALLOW_CLONE)),$(SG_GIT_YES))
|
||||
endif # ($(strip $(SG_GIT_VERSION)),)
|
||||
|
||||
SG_GIT_VERSION_MAJOR := $(shell echo $(SG_GIT_VERSION) | cut -d '.' -f 1 | tr -d -c 0-9)
|
||||
ifeq ($(SG_GIT_VERSION_MAJOR),)
|
||||
SG_GIT_VERSION_MAJOR := 0
|
||||
endif # ($(SG_GIT_VERSION_MAJOR),)
|
||||
|
||||
SG_GIT_VERSION_MINOR := $(shell echo $(SG_GIT_VERSION) | cut -d '.' -f 2 | tr -d -c 0-9)
|
||||
ifeq ($(SG_GIT_VERSION_MINOR),)
|
||||
SG_GIT_VERSION_MINOR := 0
|
||||
endif # ($(SG_GIT_VERSION_MINOR),)
|
||||
|
||||
SG_GIT_VERSION_PATCH := $(shell echo $(SG_GIT_VERSION) | cut -d '.' -f 3 | tr -d -c 0-9)
|
||||
ifeq ($(SG_GIT_VERSION_PATCH),)
|
||||
SG_GIT_VERSION_PATCH := 0
|
||||
endif # ($(SG_GIT_VERSION_PATCH),)
|
||||
|
||||
SG_PLUGIN_VERSION_MAJOR := $(shell echo $(SG_PLUGIN_VERSION) | cut -d '.' -f 1 | tr -d -c 0-9)
|
||||
ifeq ($(SG_PLUGIN_VERSION_MAJOR),)
|
||||
SG_PLUGIN_VERSION_MAJOR := 0
|
||||
endif
|
||||
|
||||
SG_PLUGIN_VERSION_MINOR := $(shell echo $(SG_PLUGIN_VERSION) | cut -d '.' -f 2 | tr -d -c 0-9)
|
||||
ifeq ($(SG_PLUGIN_VERSION_MINOR),)
|
||||
SG_PLUGIN_VERSION_MINOR := 0
|
||||
endif # ($(SG_PLUGIN_VERSION_MINOR),)
|
||||
|
||||
SG_PLUGIN_VERSION_PATCH := $(shell echo $(SG_PLUGIN_VERSION) | cut -d '.' -f 3 | tr -d -c 0-9)
|
||||
ifeq ($(SG_PLUGIN_VERSION_PATCH),)
|
||||
SG_PLUGIN_VERSION_PATCH := 0
|
||||
endif # ($(SG_PLUGIN_VERSION_PATCH),)
|
||||
|
||||
SG_BUILD_HOST := $(shell hostname)
|
||||
SG_BUILD_TIME := $(shell date '+%a %b %d, %Y %H:%M %Z %z')
|
||||
|
||||
ifeq ($(strip $(SG_GIT_BRANCH)),dev)
|
||||
ifeq ($(strip $(SG_GIT_TAG)),)
|
||||
SG_HANDBOOK_REVISION := next
|
||||
endif # ($(strip $(SG_GIT_TAG)),)
|
||||
endif # ($(strip $(SG_GIT_BRANCH)),dev)
|
||||
|
||||
SG_IS_GIT_BRANCH_HEAD_OR_MASTER := $(or $(filter HEAD,$(strip $(SG_GIT_BRANCH))),$(filter master,$(strip $(SG_GIT_BRANCH))))
|
||||
|
||||
ifneq ($(SG_IS_GIT_BRANCH_HEAD_OR_MASTER),)
|
||||
ifeq ($(strip $(SG_GIT_COMMIT_NUMS_SINCE_TAG)),0)
|
||||
ifeq ($(strip $(SG_GIT_TREE_STATE)),$(SG_GIT_TREE_STATE_CLEAN))
|
||||
ifeq ($(strip $(SG_GIT_VERSION)),$(strip $(SG_PLUGIN_VERSION)))
|
||||
SG_HANDBOOK_REVISION := $(SG_PLUGIN_VERSION_MAJOR).$(SG_PLUGIN_VERSION_MINOR)
|
||||
endif # ($(strip $(SG_GIT_VERSION)),$(strip $(SG_PLUGIN_VERSION)))
|
||||
endif # ($(strip $(SG_GIT_TREE_STATE)),$(SG_GIT_TREE_STATE_CLEAN))
|
||||
endif # ($(strip $(SG_GIT_COMMIT_NUMS_SINCE_TAG)),0)
|
||||
endif # ($(SG_IS_GIT_BRANCH_HEAD_OR_MASTER),)
|
||||
|
||||
ifeq ($(strip $(SG_GIT_IS_SHALLOW_CLONE)),$(SG_GIT_YES))
|
||||
SG_IS_GIT_BRANCH_RELEASE := $(shell echo $(SG_GIT_BRANCH) | grep -E '$(SG_RELEASE_BRANCH_PATTERN)' || echo "")
|
||||
ifneq ($(SG_IS_GIT_BRANCH_RELEASE),)
|
||||
ifeq ($(strip $(SG_GIT_VERSION)),$(strip $(SG_PLUGIN_VERSION)))
|
||||
SG_HANDBOOK_REVISION := $(SG_PLUGIN_VERSION_MAJOR).$(SG_PLUGIN_VERSION_MINOR)
|
||||
endif # ($(strip $(SG_GIT_VERSION)),$(strip $(SG_PLUGIN_VERSION)))
|
||||
endif # ($(SG_IS_GIT_BRANCH_RELEASE),)
|
||||
endif # ($(strip $(SG_GIT_IS_SHALLOW_CLONE)),$(SG_GIT_YES))
|
||||
|
||||
ifeq ($(strip $(SG_HANDBOOK_REVISION)),)
|
||||
SG_HANDBOOK_REVISION := mismatched
|
||||
endif # ($(strip $(SG_HANDBOOK_REVISION)),)
|
||||
|
||||
ifneq ($(strip $(SG_HANDBOOK_REVISION)),mismatched)
|
||||
SG_MDBOOK_HTML_SITE_URL := $(SG_HANDBOOK_REVISION)
|
||||
SG_HANDBOOK_REVISION_URL := $(SG_DOCUMENTATION_URL)/$(SG_HANDBOOK_REVISION)
|
||||
SG_HANDBOOK_RELEASE_NAME := $(shell echo $(SG_PROJECT_NAME)-$(SG_HANDBOOK_REVISION) | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
|
||||
SG_HANDBOOK_PDF_URL := $(SG_HANDBOOK_REVISION_URL)/$(SG_HANDBOOK_RELEASE_NAME).pdf
|
||||
endif # ($(strip $(SG_HANDBOOK_REVISION)),mismatched)
|
||||
|
||||
################################################################################
|
||||
# mdbook-pdf Configuration
|
||||
################################################################################
|
||||
|
||||
ifneq ($(strip $(SG_HANDBOOK_REVISION)),mismatched)
|
||||
SG_MDBOOK_HTML_SITE_URL := /$(SG_HANDBOOK_REVISION)/
|
||||
endif # ($(strip $(SG_HANDBOOK_REVISION)),mismatched)
|
||||
|
||||
ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
SG_MDBOOK_PDF_BROWSER_BINARY_PATH := $(SG_BROWSER_BINARY_PATH_LINUX)
|
||||
else ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_WINDOWS))
|
||||
SG_MDBOOK_PDF_BROWSER_BINARY_PATH := $(SG_BROWSER_BINARY_PATH_WINDOWS)
|
||||
else # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
$(error The target operating system is not supported!)
|
||||
endif # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
|
||||
ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
SG_LINUX_PYTHON_VENV_DIR := $(shell mktemp -d)/sg-ue-handbook-venv
|
||||
SG_LINUX_PYTHON_VENV_BIN_DIR := $(SG_LINUX_PYTHON_VENV_DIR)/bin
|
||||
export PATH := $(SG_LINUX_PYTHON_VENV_BIN_DIR):$(PATH)
|
||||
export PWD := $(SG_LINUX_PYTHON_VENV_BIN_DIR)
|
||||
export VIRTUAL_ENV := $(SG_LINUX_PYTHON_VENV_DIR)
|
||||
else ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_WINDOWS))
|
||||
SG_DIST_DIR := $(SG_HANDBOOK_DIR)/dist
|
||||
SG_WINPYTHON_DIR := $(SG_DIST_DIR)/winpython
|
||||
SG_WINPYTHON_BIN_DIR := $(SG_WINPYTHON_DIR)//python-3.12.4.amd64
|
||||
SG_WINPYTHON_BIN_SCRIPTS_DIR := $(SG_WINPYTHON_BIN_DIR)/Scripts
|
||||
SG_WINPYTHON_SCRIPTS_DIR := $(SG_WINPYTHON_DIR)/scripts
|
||||
export PATH := $(SG_WINPYTHON_SCRIPTS_DIR);$(PATH)
|
||||
export PATH := $(SG_WINPYTHON_BIN_SCRIPTS_DIR);$(PATH)
|
||||
export PATH := $(SG_WINPYTHON_BIN_DIR);$(PATH)
|
||||
export PATH := $(SG_RSYNC_BIN_PATH_WINDOWS);$(PATH)
|
||||
else # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
$(error The target operating system is not supported!)
|
||||
endif # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
|
||||
################################################################################
|
||||
# Deployment Configuration
|
||||
################################################################################
|
||||
|
||||
ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
SG_HANDBOOK_DEPLOY_CONFIG_FILE := $(shell echo ~/.config/$(SG_HANDBOOK_CONFIG_HOME_DIR)/$(SG_HANDBOOK_DEPLOY_CONFIG_FILENAME))
|
||||
else ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_WINDOWS))
|
||||
SG_HANDBOOK_DEPLOY_CONFIG_FILE := $(shell cygpath -u $(LOCALAPPDATA)/$(SG_HANDBOOK_CONFIG_HOME_DIR)/$(SG_HANDBOOK_DEPLOY_CONFIG_FILENAME))
|
||||
else # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
$(error The target operating system is not supported!)
|
||||
endif # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
|
||||
################################################################################
|
||||
# Deployment Temporary Directory Setup
|
||||
################################################################################
|
||||
|
||||
$(info Setting up a deployment temporary directory '$(SG_HANDBOOK_DEPLOY_TEMP_DIR_NAME)')
|
||||
SG_HANDBOOK_DEPLOY_TEMP_DIR := $(shell mktemp -d -t $(SG_HANDBOOK_DEPLOY_TEMP_DIR_NAME))
|
||||
$(info Temporary directory has been set up at '$(SG_HANDBOOK_DEPLOY_TEMP_DIR)')
|
||||
|
||||
SG_HANDBOOK_DEPLOY_GENERATED_PDF_FILE := $(SG_HANDBOOK_DEPLOY_TEMP_DIR)/$(SG_HANDBOOK_RELEASE_NAME).pdf
|
||||
|
||||
SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE := $(SG_HANDBOOK_DEPLOY_TEMP_DIR)/revisions.txt
|
||||
|
||||
SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE := $(SG_HANDBOOK_DEPLOY_TEMP_DIR)/index.html
|
||||
|
||||
################################################################################
|
||||
# Env Configuration Functions
|
||||
################################################################################
|
||||
|
||||
define load_env
|
||||
$(eval ENV_FILE := $(1))
|
||||
@echo "Loading configuration file '$(ENV_FILE)'..."
|
||||
$(eval include $(ENV_FILE))
|
||||
$(eval export)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Make Targets - All
|
||||
################################################################################
|
||||
|
||||
.PHONY: all
|
||||
all: help
|
||||
|
||||
################################################################################
|
||||
# Make Targets - Misc
|
||||
################################################################################
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo ""
|
||||
@echo "Available make targets:"
|
||||
@echo ""
|
||||
@echo " - make build"
|
||||
@echo " - make clean"
|
||||
@echo " - make deploy"
|
||||
@echo " - make help"
|
||||
@echo " - make info"
|
||||
@echo " - make pack"
|
||||
@echo " - make serve"
|
||||
@echo ""
|
||||
|
||||
.PHONY: info
|
||||
info:
|
||||
@echo ""
|
||||
@echo "$(SG_PROJECT_NAME) build information:"
|
||||
@echo ""
|
||||
@echo " - Handbook Revision : $(SG_HANDBOOK_REVISION)"
|
||||
@echo " - Handbook Revision URL : $(SG_HANDBOOK_REVISION_URL)"
|
||||
@echo " - Handbook PDF URL : $(SG_HANDBOOK_PDF_URL)"
|
||||
@echo " - Git Branch : $(SG_GIT_BRANCH)"
|
||||
@echo " - Git Tag : $(SG_GIT_TAG)"
|
||||
@echo " - Git Commit : $(SG_GIT_COMMIT)"
|
||||
@echo " - Git Commits Since Tag : $(SG_GIT_COMMIT_NUMS_SINCE_TAG)"
|
||||
@echo " - Git Tree State : $(SG_GIT_TREE_STATE)"
|
||||
@echo " - Git Is Shallow Clone : $(SG_GIT_IS_SHALLOW_CLONE)"
|
||||
@echo " - Git Latest Remote Tag : $(SG_GIT_LATEST_REMOTE_TAG)"
|
||||
@echo " - Git Version : $(SG_GIT_VERSION)"
|
||||
@echo " - Git Version Major : $(SG_GIT_VERSION_MAJOR)"
|
||||
@echo " - Git Version Minor : $(SG_GIT_VERSION_MINOR)"
|
||||
@echo " - Git Version Patch : $(SG_GIT_VERSION_PATCH)"
|
||||
@echo " - Plugin Version : $(SG_PLUGIN_VERSION)"
|
||||
@echo " - Plugin Version Major : $(SG_PLUGIN_VERSION_MAJOR)"
|
||||
@echo " - Plugin Version Minor : $(SG_PLUGIN_VERSION_MINOR)"
|
||||
@echo " - Plugin Version Patch : $(SG_PLUGIN_VERSION_PATCH)"
|
||||
@echo " - Build Host : $(SG_BUILD_HOST)"
|
||||
@echo " - Build Time : $(SG_BUILD_TIME)"
|
||||
@echo ""
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@echo "Cleaning up $(SG_PROJECT_NAME)..."
|
||||
@rm -rf "$(SG_MDBOOK_DEST_DIR)"
|
||||
@echo "$(SG_PROJECT_NAME) has been cleaned up successfully!"
|
||||
|
||||
.PHONY: install-build-deps
|
||||
install-build-deps:
|
||||
@echo "Installing build dependencies if they have not already been installed..."
|
||||
@cargo install mdbook --vers "^0.4" --locked
|
||||
@cargo install xq --vers "^0.4" --locked
|
||||
@cargo install mdbook-alerts --vers "^0.6" --locked
|
||||
@cargo install mdbook-pdf --vers "^0.1" --locked
|
||||
ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@echo "Installing mdbook-pdf-outline..."
|
||||
@python -m venv $(VIRTUAL_ENV) \
|
||||
&& . $(SG_LINUX_PYTHON_VENV_BIN_DIR)/activate \
|
||||
&& pip install mdbook-pdf-outline 2>/dev/null
|
||||
endif # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
|
||||
################################################################################
|
||||
# Make Targets - mdBook
|
||||
################################################################################
|
||||
|
||||
.PHONY: prepare
|
||||
prepare:
|
||||
@echo "Preparing the handbook $(SG_HANDBOOK_DIR)..."
|
||||
prepare: prepare-src
|
||||
prepare: prepare-dest
|
||||
|
||||
.PHONY: prepare-dest
|
||||
prepare-dest:
|
||||
@echo "Preparing the handbook target dir $(SG_MDBOOK_DEST_DIR)..."
|
||||
|
||||
.PHONY: prepare-src
|
||||
prepare-src:
|
||||
@echo "Preparing the handbook source dir $(SG_MDBOOK_SRC_DIR)..."
|
||||
|
||||
.PHONY: verify-handbook-revision
|
||||
verify-handbook-revision:
|
||||
ifeq ($(SG_HANDBOOK_REVISION), next)
|
||||
@echo "Building an unstable handbook for the next release..."
|
||||
else # ($(SG_HANDBOOK_REVISION), next)
|
||||
ifeq ($(SG_HANDBOOK_REVISION), mismatched)
|
||||
@echo ""
|
||||
@echo "Failed to verify the handbook build due to some discrepancies. Please verify the following:"
|
||||
@echo ""
|
||||
@echo "If you're building a release handbook:"
|
||||
@echo " - You are either on a release tag, e.g. v2.1.0, or on the master branch."
|
||||
@echo " - No commit has been made since the targeted tag."
|
||||
@echo " - The Git tree state is clean."
|
||||
@echo " - The Git version and plugin version match each other."
|
||||
@echo ""
|
||||
@echo "If you're building an unstable handbook for the next release:"
|
||||
@echo " - You're building from the dev branch."
|
||||
@echo " - The Git version value evaluates to empty."
|
||||
@echo ""
|
||||
@echo "If you're packaging the handbook:"
|
||||
@echo " - You're on a release branch."
|
||||
@echo " - You're shallow cloning."
|
||||
@echo " - The remorte Git repository contains releae tags."
|
||||
@echo ""
|
||||
@exit 1
|
||||
else # ($(SG_HANDBOOK_REVISION), mismatched)
|
||||
@echo "Building a release handbook: $(SG_HANDBOOK_REVISION)..."
|
||||
endif # ($(SG_HANDBOOK_REVISION), mismatched)
|
||||
endif # ($(SG_HANDBOOK_REVISION), next)
|
||||
|
||||
.PHONY: serve
|
||||
serve: info
|
||||
serve: install-build-deps
|
||||
serve: prepare
|
||||
serve: _mdbook_serve
|
||||
|
||||
.PHONY: build
|
||||
build: info
|
||||
build: install-build-deps
|
||||
build: prepare
|
||||
build: verify-handbook-revision
|
||||
build: _mdbook_build
|
||||
|
||||
.PHONY: pack
|
||||
pack: info
|
||||
pack: install-build-deps
|
||||
pack: prepare
|
||||
pack: verify-handbook-revision
|
||||
pack: _mdbook_build
|
||||
pack: _pack
|
||||
|
||||
.PHONY: deploy
|
||||
deploy: info
|
||||
deploy: install-build-deps
|
||||
deploy: clean
|
||||
deploy: prepare
|
||||
deploy: verify-handbook-revision
|
||||
deploy: _mdbook_build
|
||||
deploy: _deploy
|
||||
|
||||
.PHONY: _mdbook_serve
|
||||
_mdbook_serve:
|
||||
@echo "Serving $(SG_HANDBOOK_DIR)..."
|
||||
@env SG_PROJECT_NAME='$(SG_PROJECT_NAME)' \
|
||||
SG_HANDBOOK_REVISION='$(SG_HANDBOOK_REVISION)' \
|
||||
SG_HANDBOOK_REVISION_URL='$(SG_HANDBOOK_REVISION_URL)' \
|
||||
SG_HANDBOOK_PDF_URL='$(SG_HANDBOOK_PDF_URL)' \
|
||||
SG_GIT_BRANCH='$(SG_GIT_BRANCH)' \
|
||||
SG_GIT_TAG='$(SG_GIT_TAG)' \
|
||||
SG_GIT_COMMIT='$(SG_GIT_COMMIT)' \
|
||||
SG_GIT_COMMIT_NUMS_SINCE_TAG='$(SG_GIT_COMMIT_NUMS_SINCE_TAG)' \
|
||||
SG_GIT_TREE_STATE='$(SG_GIT_TREE_STATE)' \
|
||||
SG_GIT_IS_SHALLOW_CLONE='$(SG_GIT_IS_SHALLOW_CLONE)' \
|
||||
SG_GIT_LATEST_REMOTE_TAG='$(SG_GIT_LATEST_REMOTE_TAG)' \
|
||||
SG_GIT_VERSION='$(SG_GIT_VERSION)' \
|
||||
SG_GIT_VERSION_MAJOR='$(SG_GIT_VERSION_MAJOR)' \
|
||||
SG_GIT_VERSION_MINOR='$(SG_GIT_VERSION_MINOR)' \
|
||||
SG_GIT_VERSION_PATCH='$(SG_GIT_VERSION_PATCH)' \
|
||||
SG_PLUGIN_VERSION='$(SG_PLUGIN_VERSION)' \
|
||||
SG_PLUGIN_VERSION_MAJOR='$(SG_PLUGIN_VERSION_MAJOR)' \
|
||||
SG_PLUGIN_VERSION_MINOR='$(SG_PLUGIN_VERSION_MINOR)' \
|
||||
SG_PLUGIN_VERSION_PATCH='$(SG_PLUGIN_VERSION_PATCH)' \
|
||||
SG_BUILD_HOST='$(SG_BUILD_HOST)' \
|
||||
SG_BUILD_TIME='$(SG_BUILD_TIME)' \
|
||||
MDBOOK_output__html__site_url='$(SG_MDBOOK_HTML_SITE_URL)' \
|
||||
MDBOOK_output__pdf__browser_binary_path='$(SG_MDBOOK_PDF_BROWSER_BINARY_PATH)' \
|
||||
mdbook serve \
|
||||
-n $(SG_MDBOOK_HOST) \
|
||||
-p $(SG_MDBOOK_PORT) \
|
||||
--watcher $(SG_MDBOOK_WATCHER) \
|
||||
--dest-dir $(SG_MDBOOK_DEST_DIR)
|
||||
|
||||
.PHONY: _mdbook_build
|
||||
_mdbook_build:
|
||||
@echo "Building $(SG_HANDBOOK_DIR)..."
|
||||
@env SG_PROJECT_NAME='$(SG_PROJECT_NAME)' \
|
||||
SG_HANDBOOK_REVISION='$(SG_HANDBOOK_REVISION)' \
|
||||
SG_HANDBOOK_REVISION_URL='$(SG_HANDBOOK_REVISION_URL)' \
|
||||
SG_HANDBOOK_PDF_URL='$(SG_HANDBOOK_PDF_URL)' \
|
||||
SG_GIT_BRANCH='$(SG_GIT_BRANCH)' \
|
||||
SG_GIT_TAG='$(SG_GIT_TAG)' \
|
||||
SG_GIT_COMMIT='$(SG_GIT_COMMIT)' \
|
||||
SG_GIT_COMMIT_NUMS_SINCE_TAG='$(SG_GIT_COMMIT_NUMS_SINCE_TAG)' \
|
||||
SG_GIT_IS_SHALLOW_CLONE='$(SG_GIT_IS_SHALLOW_CLONE)' \
|
||||
SG_GIT_LATEST_REMOTE_TAG='$(SG_GIT_LATEST_REMOTE_TAG)' \
|
||||
SG_GIT_TREE_STATE='$(SG_GIT_TREE_STATE)' \
|
||||
SG_GIT_VERSION='$(SG_GIT_VERSION)' \
|
||||
SG_GIT_VERSION_MAJOR='$(SG_GIT_VERSION_MAJOR)' \
|
||||
SG_GIT_VERSION_MINOR='$(SG_GIT_VERSION_MINOR)' \
|
||||
SG_GIT_VERSION_PATCH='$(SG_GIT_VERSION_PATCH)' \
|
||||
SG_PLUGIN_VERSION='$(SG_PLUGIN_VERSION)' \
|
||||
SG_PLUGIN_VERSION_MAJOR='$(SG_PLUGIN_VERSION_MAJOR)' \
|
||||
SG_PLUGIN_VERSION_MINOR='$(SG_PLUGIN_VERSION_MINOR)' \
|
||||
SG_PLUGIN_VERSION_PATCH='$(SG_PLUGIN_VERSION_PATCH)' \
|
||||
SG_BUILD_HOST='$(SG_BUILD_HOST)' \
|
||||
SG_BUILD_TIME='$(SG_BUILD_TIME)' \
|
||||
MDBOOK_output__html__site_url='$(SG_MDBOOK_HTML_SITE_URL)' \
|
||||
MDBOOK_output__pdf__browser_binary_path='$(SG_MDBOOK_PDF_BROWSER_BINARY_PATH)' \
|
||||
mdbook build \
|
||||
--dest-dir $(SG_MDBOOK_DEST_DIR)
|
||||
|
||||
.PHONY: _pack
|
||||
_pack:
|
||||
@echo "Packing '$(SG_HANDBOOK_DIR)'..."
|
||||
@echo "Cleaning up the pack directory '$(SG_DOCUMENTATION_PACK_DIR)'..."
|
||||
@rm -rf "$(SG_DOCUMENTATION_PACK_DIR)"
|
||||
@echo "Creating the pack directory '$(SG_DOCUMENTATION_PACK_DIR)'..."
|
||||
@mkdir -p "$(SG_DOCUMENTATION_PACK_DIR)"
|
||||
@echo "Moving '$(SG_DOCUMENTATION_HTML_DIR)' to '$(SG_HANDBOOK_PACKED_HTML_DIR)'..."
|
||||
ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@mv $(SG_DOCUMENTATION_HTML_DIR) $(SG_HANDBOOK_PACKED_HTML_DIR)
|
||||
else # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@powershell -Command "Move-Item '$(SG_DOCUMENTATION_HTML_DIR)' '$(SG_HANDBOOK_PACKED_HTML_DIR)'"
|
||||
endif # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@echo "Compressing '$(SG_HANDBOOK_PACKED_HTML_DIR)' to '$(SG_HANDBOOK_PACKED_HTML_FILE)'..."
|
||||
ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@cd $(SG_DOCUMENTATION_PACK_DIR) \
|
||||
&& zip $(SG_HANDBOOK_PACKED_HTML_FILE) -r $(SG_HANDBOOK_ESCAPED_NAME)
|
||||
else # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@cd $(SG_DOCUMENTATION_PACK_DIR) \
|
||||
&& powershell Compress-Archive $(SG_HANDBOOK_ESCAPED_NAME) $(SG_HANDBOOK_PACKED_HTML_FILE)
|
||||
endif # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@echo "Moving '$(SG_DOCUMENTATION_PDF_FILE)' to '$(SG_HANDBOOK_PACKED_PDF_FILE)'..."
|
||||
ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@mv $(SG_DOCUMENTATION_PDF_FILE) $(SG_HANDBOOK_PACKED_PDF_FILE)
|
||||
else # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@powershell -Command "Move-Item '$(SG_DOCUMENTATION_PDF_FILE)' '$(SG_HANDBOOK_PACKED_PDF_FILE)'"
|
||||
endif # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
|
||||
.PHONY: _deploy
|
||||
_deploy:
|
||||
@echo "Deploying '$(SG_HANDBOOK_DIR)'..."
|
||||
@echo "Loading the Handbook deployment configuration file..."
|
||||
@$(call load_env, $(SG_HANDBOOK_DEPLOY_CONFIG_FILE))
|
||||
@echo "Deploying '$(SG_HANDBOOK_DIR)' to '$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_REMOTE_DIR)/$(SG_HANDBOOK_REVISION)'..."
|
||||
ifeq ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@rsync \
|
||||
-avze "ssh -p $(SG_HANDBOOK_SSH_PORT)" \
|
||||
--perms \
|
||||
--chmod=u+rwx,g+rx,o+rx,g-w,o-wx \
|
||||
--delete $(SG_DOCUMENTATION_HTML_DIR)/ \
|
||||
$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_REMOTE_DIR)/$(SG_HANDBOOK_REVISION)
|
||||
else # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@cd $(SG_DOCUMENTATION_DIR) \
|
||||
&& "$(SG_RSYNC_BINARY_PATH_WINDOWS)" \
|
||||
-avze "\"$(SG_RSYNC_SSH_BINARY_PATH_WINDOWS)\" -p $(SG_HANDBOOK_SSH_PORT)" \
|
||||
--perms \
|
||||
--chmod=u+rwx,g+rx,o+rx,g-w,o-wx \
|
||||
--delete $(SG_DOCUMENTATION_HTML_DIR_NAME)/ \
|
||||
$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_REMOTE_DIR)/$(SG_HANDBOOK_REVISION)
|
||||
endif # ($(SG_BUILD_PLATFORM),$(SG_BUILD_PLATFORM_LINUX))
|
||||
@echo "Copying '$(SG_DOCUMENTATION_PDF_FILE)' to '$(SG_HANDBOOK_DEPLOY_GENERATED_PDF_FILE)'..."
|
||||
@cp -v $(SG_DOCUMENTATION_PDF_FILE) $(SG_HANDBOOK_DEPLOY_GENERATED_PDF_FILE)
|
||||
@echo "Uploading '$(SG_HANDBOOK_DEPLOY_GENERATED_PDF_FILE)' to '$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_REMOTE_DIR)/$(SG_HANDBOOK_REVISION)'..."
|
||||
@scp \
|
||||
-P $(SG_HANDBOOK_SSH_PORT) \
|
||||
$(SG_HANDBOOK_DEPLOY_GENERATED_PDF_FILE) \
|
||||
$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_REMOTE_DIR)/$(SG_HANDBOOK_REVISION)
|
||||
@cp -v $(SG_DOCUMENTATION_PDF_FILE) $(SG_HANDBOOK_DEPLOY_GENERATED_PDF_FILE)
|
||||
@echo "Retrieving the list of deployed handbook revisions from '$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_PORT)/$(SG_HANDBOOK_SSH_REMOTE_DIR)'..."
|
||||
@ssh \
|
||||
-p $(SG_HANDBOOK_SSH_PORT) $(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST) \
|
||||
"mkdir -p $(SG_HANDBOOK_SSH_REMOTE_DIR)"
|
||||
@ssh \
|
||||
-p $(SG_HANDBOOK_SSH_PORT) $(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST) \
|
||||
"find $(SG_HANDBOOK_SSH_REMOTE_DIR) -maxdepth 1 -type d ! -path $(SG_HANDBOOK_SSH_REMOTE_DIR) -exec basename {} \; | sort -r" \
|
||||
> $(SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE)
|
||||
@{ \
|
||||
grep -i 'next' $(SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE); \
|
||||
grep -vi 'next' $(SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE) \
|
||||
| sort -r; \
|
||||
} > $(SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE).tmp
|
||||
@mv $(SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE).tmp $(SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE)
|
||||
@echo "Revisions list saved to '$(SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE)'!"
|
||||
@echo "Current revisions:"
|
||||
@sed 's/^/ - /' $(SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE)
|
||||
@echo "Generating '$(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)'..."
|
||||
@echo "<html>" > $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<head>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<title>Welcome to $(SG_PROJECT_NAME)</title>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<link rel='icon' href='favicon.svg'>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<link rel='shortcut icon' href='favicon.svg'>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<style>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "body {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "font-family: Arial, sans-serif;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "background-color: #003070;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "color: #fff;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "margin: 0;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "padding: 0;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo ".container {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "padding: 2.0em;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo ".logo-container {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "text-align: center;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo ".logo-container img {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "max-width: 100%;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "height: auto;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo ".title-container {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "text-align: center;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo ".revisions-container {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "display: table;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "width: 300px;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "margin: 0 auto;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "padding: 20px;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo ".row {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "display: table-row;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo ".cell {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "display: table-cell;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "background-color: #004890;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "border-radius: 5px;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "margin: 10px;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "padding: 20px;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "text-align: center;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "transition: transform 0.2s;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo ".cell:hover {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "transform: scale(1.05);" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo ".cell a {" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "text-decoration: none;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "color: #fff;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "font-weight: bold;" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "}" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "</style>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "</head>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<body>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<div class='container'>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<div class='logo-container'>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<img src="favicon.svg" alt='SenseGlove' />" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "</div>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<div class='title-container'>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<h1>Welcome to the SenseGlove Unreal Engine Handbook</h1>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<h3>Please choose a revision to continue!</h3>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<h5>* Please note that the next revision is the documentation for the unstable next release of the plugin and subject to change!</h5>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "</div>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "<div class='revisions-container'>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@while read dir; \
|
||||
do \
|
||||
echo "<div class='row'><div class='cell'><a href=\"$$dir\">$$dir</a></div></div>"; \
|
||||
done < $(SG_HANDBOOK_DEPLOY_REVISION_LIST_FILE) >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "</div>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "</div>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "</body>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "</html>" >> $(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)
|
||||
@echo "Uploading '$(SG_HANDBOOK_FAVICON_FILE)' to '$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_REMOTE_DIR)'"
|
||||
@scp \
|
||||
-P $(SG_HANDBOOK_SSH_PORT) \
|
||||
$(SG_HANDBOOK_FAVICON_FILE) \
|
||||
$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_REMOTE_DIR)
|
||||
@echo "Uploading '$(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE)' to '$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_REMOTE_DIR)'"
|
||||
@scp \
|
||||
-P $(SG_HANDBOOK_SSH_PORT) \
|
||||
$(SG_HANDBOOK_DEPLOY_GENERATED_HOME_INDEX_FILE) \
|
||||
$(SG_HANDBOOK_SSH_USER)@$(SG_HANDBOOK_SSH_HOST):$(SG_HANDBOOK_SSH_REMOTE_DIR)
|
||||
@@ -1,91 +0,0 @@
|
||||
# The SenseGlove Unreal Engine Handbook
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Brave Browser (for PDF generation; in case you have Brave installed in a non-conventional path, or you'd like to use a different Chromium-based browser you need to adjust the path inside the GNUmakefile).
|
||||
- cygpath (Windows only) provided by [Git for Windows](https://gitforwindows.org/).
|
||||
- GNU Make.
|
||||
- Git.
|
||||
- PowerShell (Windows only) required only by the `pack` make target.
|
||||
- Python3 along with venv and pip. For Windows, a version of [WinPython](https://winpython.github.io/) is already shipped with this repo, so it's not an external requirement.
|
||||
- Rsync and OpenSSH ([cwRsync](https://itefix.net/cwrsync) provides these for Windows) required only by the `deploy` make target.
|
||||
- The Rust Toolchain and the Cargo package manager.
|
||||
- Other common Unix utilities such as `awk`, `cp`, `cut`, `date`, `find`, `grep`, `hostname`, `mkdir`, `mktemp`, `mv`, `scp`, `sed`, `ssh`, `sort`, `tr`, and `uname` provided by most distors. On Windows these are mostly provided by [Git for Windows](https://gitforwindows.org/).
|
||||
- `zip` command (Linux only) required only by the `pack` make target.
|
||||
|
||||
### Microsoft Windows Prerequisites Installation Notes
|
||||
|
||||
- Download and install [Git for Windows](https://gitforwindows.org/).
|
||||
- Download and install [the Rust Toolchain](https://rustup.rs/).
|
||||
- Download [a without-guile binary build of GNU Make for Windows from ezwinports](https://sourceforge.net/projects/ezwinports/files/), e.g. <code>make-4.4.1-without-guile-w32-bin.zip</code>.
|
||||
- <code>make-\*-without-guile-w32-bin.zip/*</code> contents should be extracted and copied to your <code>Git\\mingw64\\</code>, e.g. <code>C:\\Program Files\\Git\\mingw64\\</code>, merging the folders, WITHOUT overwriting/replacing any existing files.
|
||||
- After Git Bash installation, the changes to environment variables require a reboot. In order for these changes to take effect reboot the system, then proceed to the build section.
|
||||
- Download and install [cwRsync](https://itefix.net/cwrsync) which is only required for the `deploy` make target. In case you won't intend to use that, this could be skipped.
|
||||
|
||||
## How to preview, build, and deploy?
|
||||
|
||||
In order to generate the handbook, on either GNU/Linux and Microsoft Windows everything is done through running the <code>make</code> command. Simply entering the <code>make</code> or <code>make help</code> inside your desired terminal will show you all the available make targets:
|
||||
|
||||
```sh
|
||||
$ make help
|
||||
|
||||
Available make targets:
|
||||
|
||||
- make build
|
||||
- make clean
|
||||
- make deploy
|
||||
- make help
|
||||
- make info
|
||||
- make pack
|
||||
- make serve
|
||||
```
|
||||
|
||||
### make info
|
||||
|
||||
This target prints the build and version information.
|
||||
|
||||
### make clean
|
||||
|
||||
This target cleans up the output directory for the generated handbook, which is the <code>/Documentation</code> folder.
|
||||
|
||||
### make serve
|
||||
|
||||
This tatget could be used for viewing or live-previwing the handbook while editing simultaneously editing it. Simply run this tatget and leave your terminal open and inside your web browser of choice head to <code>http://localhost:8000/</code>. You can modify the handbook source code inside any text editor and upon saving your web browser will refresh in realtime once a change is detected.
|
||||
|
||||
### make build
|
||||
|
||||
This tatget builds the final handbook and outputs it to the <code>/Documentation</code> folder.
|
||||
|
||||
If you're building a release handbook, please make sure:
|
||||
|
||||
- You are either on a release tag, e.g. v2.1.0, or on the master branch.
|
||||
- No commit has been made since the targeted tag.
|
||||
- The Git tree state is clean.
|
||||
- The Git version and plugin version match each other.
|
||||
|
||||
If you're building an unstable handbook for the next release, please make sure:
|
||||
|
||||
- You're building from the dev branch.
|
||||
- The Git version value evaluates to empty.
|
||||
|
||||
### make deploy
|
||||
|
||||
This tatget is used to build and upload the final draft of the handbook. This tatget first runs the <code>clean</code> target and then the <code>build</code> target; and only then attempts to upload the content. Thus, any rule that applies to the <code>build</code> target, will apply to this target as well.
|
||||
|
||||
_Noete_: Building on Windows requires sourcing the deployment configuration file, otherwise the deployment will fail; e.g.:
|
||||
|
||||
```sh
|
||||
$ source /c/Users/mamadou/AppData/Local/SenseGlove/ue-handbook/deploy.conf && make deploy
|
||||
```
|
||||
|
||||
Also, on Windows you probably need to adjust the follwoing variables at the top of the `GNUmakefile`:
|
||||
|
||||
```make
|
||||
SG_RSYNC_BIN_PATH_WINDOWS := C:\Program Files\cwrsync\bin
|
||||
SG_RSYNC_BINARY_PATH_WINDOWS := $(SG_RSYNC_BIN_PATH_WINDOWS)\rsync.exe
|
||||
SG_RSYNC_SSH_BINARY_PATH_WINDOWS := $(SG_RSYNC_BIN_PATH_WINDOWS)\ssh.exe
|
||||
```
|
||||
|
||||
### make pack
|
||||
|
||||
This target is meant to be used by the `sgum-packager` utility located in the [Packager](../Packager) folder in order to deploy the documentation in various formats along with the plugin to the Unreal Engine Marketplace.
|
||||
@@ -1,104 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# author: Mamadou Babaei <mamadou@senseglove.com>
|
||||
#
|
||||
# (The MIT License)
|
||||
#
|
||||
# Copyright (c) 2020 - 2024 SenseGlove
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
|
||||
if [ "$1" = "supports" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
readonly JSON_INPUT=$(cat)
|
||||
|
||||
readonly CONTEXT=$(echo "${JSON_INPUT}" | xq '.[0]')
|
||||
readonly BOOK=$(echo "${JSON_INPUT}" | xq '.[1]')
|
||||
|
||||
escape_string() {
|
||||
printf '%s' "$1" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g'
|
||||
}
|
||||
|
||||
SG_PROJECT_NAME_ESCAPED=$(escape_string "${SG_PROJECT_NAME}")
|
||||
SG_HANDBOOK_REVISION_ESCAPED=$(escape_string "${SG_HANDBOOK_REVISION}")
|
||||
SG_HANDBOOK_REVISION_URL_ESCAPED=$(escape_string "${SG_HANDBOOK_REVISION_URL}")
|
||||
SG_HANDBOOK_PDF_URL_ESCAPED=$(escape_string "${SG_HANDBOOK_PDF_URL}")
|
||||
SG_GIT_BRANCH_ESCAPED=$(escape_string "${SG_GIT_BRANCH}")
|
||||
SG_GIT_TAG_ESCAPED=$(escape_string "${SG_GIT_TAG}")
|
||||
SG_GIT_COMMIT_ESCAPED=$(escape_string "${SG_GIT_COMMIT}")
|
||||
SG_GIT_COMMIT_NUMS_SINCE_TAG_ESCAPED=$(escape_string "${SG_GIT_COMMIT_NUMS_SINCE_TAG}")
|
||||
SG_GIT_TREE_STATE_ESCAPED=$(escape_string "${SG_GIT_TREE_STATE}")
|
||||
SG_GIT_IS_SHALLOW_CLONE_ESCAPED=$(escape_string "${SG_GIT_IS_SHALLOW_CLONE}")
|
||||
SG_GIT_LATEST_REMOTE_TAG_ESCAPED=$(escape_string "${SG_GIT_LATEST_REMOTE_TAG}")
|
||||
SG_GIT_VERSION_ESCAPED=$(escape_string "${SG_GIT_VERSION}")
|
||||
SG_GIT_VERSION_MAJOR_ESCAPED=$(escape_string "${SG_GIT_VERSION_MAJOR}")
|
||||
SG_GIT_VERSION_MINOR_ESCAPED=$(escape_string "${SG_GIT_VERSION_MINOR}")
|
||||
SG_GIT_VERSION_PATCH_ESCAPED=$(escape_string "${SG_GIT_VERSION_PATCH}")
|
||||
SG_PLUGIN_VERSION_ESCAPED=$(escape_string "${SG_PLUGIN_VERSION}")
|
||||
SG_PLUGIN_VERSION_MAJOR_ESCAPED=$(escape_string "${SG_PLUGIN_VERSION_MAJOR}")
|
||||
SG_PLUGIN_VERSION_MINOR_ESCAPED=$(escape_string "${SG_PLUGIN_VERSION_MINOR}")
|
||||
SG_PLUGIN_VERSION_PATCH_ESCAPED=$(escape_string "${SG_PLUGIN_VERSION_PATCH}")
|
||||
SG_BUILD_HOST_ESCAPED=$(escape_string "${SG_BUILD_HOST}")
|
||||
SG_BUILD_TIME_ESCAPED=$(escape_string "${SG_BUILD_TIME}")
|
||||
|
||||
PARSED_BOOK=$(echo "${BOOK}" | xq "
|
||||
.sections[] |= (
|
||||
if has(\"Chapter\") then
|
||||
.Chapter.content |=
|
||||
walk(if type == \"string\" then
|
||||
. | gsub(\"{{ #sg-project-name }}\"; \"${SG_PROJECT_NAME_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-handbook-revision }}\"; \"${SG_HANDBOOK_REVISION_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-handbook-revision-url }}\"; \"${SG_HANDBOOK_REVISION_URL_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-handbook-pdf-url }}\"; \"${SG_HANDBOOK_PDF_URL_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-branch }}\"; \"${SG_GIT_BRANCH_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-tag }}\"; \"${SG_GIT_TAG_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-commit }}\"; \"${SG_GIT_COMMIT_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-commit-nums-since-tag }}\"; \"${SG_GIT_COMMIT_NUMS_SINCE_TAG_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-tree-state }}\"; \"${SG_GIT_TREE_STATE_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-is-shallow-clone }}\"; \"${SG_GIT_IS_SHALLOW_CLONE_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-latest-remote-tag }}\"; \"${SG_GIT_LATEST_REMOTE_TAG_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-version }}\"; \"${SG_GIT_VERSION_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-version-major }}\"; \"${SG_GIT_VERSION_MAJOR_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-version-minor }}\"; \"${SG_GIT_VERSION_MINOR_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-git-version-patch }}\"; \"${SG_GIT_VERSION_PATCH_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-plugin-version }}\"; \"${SG_PLUGIN_VERSION_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-plugin-version-major }}\"; \"${SG_PLUGIN_VERSION_MAJOR_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-plugin-version-minor }}\"; \"${SG_PLUGIN_VERSION_MINOR_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-plugin-version-patch }}\"; \"${SG_PLUGIN_VERSION_PATCH_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-build-host }}\"; \"${SG_BUILD_HOST_ESCAPED}\") |
|
||||
gsub(\"{{ #sg-build-time }}\"; \"${SG_BUILD_TIME_ESCAPED}\")
|
||||
else
|
||||
.
|
||||
end)
|
||||
else
|
||||
.
|
||||
end
|
||||
)")
|
||||
|
||||
# For debugging purpose only!
|
||||
#echo "CONTEXT: ${CONTEXT}" >&2
|
||||
#echo "BOOK: ${BOOK}" >&2
|
||||
#echo "PARSED_BOOK: ${PARSED_BOOK}" >&2
|
||||
|
||||
echo "${PARSED_BOOK}" | xq '.'
|
||||
@@ -1,109 +0,0 @@
|
||||
#
|
||||
# author: Mamadou Babaei <mamadou@senseglove.com>
|
||||
#
|
||||
# (The MIT License)
|
||||
#
|
||||
# Copyright (c) 2020 - 2024 SenseGlove
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
|
||||
[book]
|
||||
authors = ["Mamadou Babaei"]
|
||||
description = "Welcome to the SenseGlove Unreal Engine documentation!"
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
text-direction = "ltr"
|
||||
title = "The SenseGlove Unreal Engine Handbook"
|
||||
|
||||
[build]
|
||||
build-dir = "book"
|
||||
create-missing = false
|
||||
extra-watch-dirs = ["assets"]
|
||||
use-default-preprocessors = true
|
||||
|
||||
[preprocessor.index]
|
||||
|
||||
[preprocessor.links]
|
||||
|
||||
[preprocessor.alerts]
|
||||
|
||||
[preprocessor.senseglove]
|
||||
after = [ "index", "links" ]
|
||||
command = "sh ./bin/sg-preprocessor.sh"
|
||||
|
||||
[output.html]
|
||||
additional-css = ["styles/custom.css"]
|
||||
additional-js = []
|
||||
cname = "unreal.docs.senseglove.com"
|
||||
copy-fonts = true
|
||||
default-theme = "navy"
|
||||
git-repository-url = "https://dev.azure.com/SenseGlove/_git/SenseGlove-Unreal"
|
||||
git-repository-icon = "fa-git"
|
||||
input-404 = "404.md"
|
||||
mathjax-support = false
|
||||
no-section-label = false
|
||||
preferred-dark-theme = "navy"
|
||||
smart-punctuation = false
|
||||
theme = ""
|
||||
|
||||
[output.html.fold]
|
||||
enable = false
|
||||
level = 0
|
||||
|
||||
[output.html.print]
|
||||
enable = true
|
||||
page-break = true
|
||||
|
||||
[output.html.search]
|
||||
boost-hierarchy = 1
|
||||
boost-paragraph = 1
|
||||
boost-title = 2
|
||||
copy-js = true
|
||||
enable = true
|
||||
expand = true
|
||||
heading-split-level = 3
|
||||
limit-results = 128
|
||||
teaser-word-count = 64
|
||||
use-boolean-and = true
|
||||
|
||||
[output.pdf]
|
||||
trying-times = 1
|
||||
timeout = 300
|
||||
# https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
|
||||
landscape = false
|
||||
display-header-footer = true
|
||||
print-background = false
|
||||
scale = 1.0
|
||||
paper-width = 8
|
||||
paper-height = 10
|
||||
margin-top = 0.5
|
||||
margin-bottom = 0.5
|
||||
margin-left = 0.5
|
||||
margin-right = 0.5
|
||||
page-ranges = ""
|
||||
ignore-invalid-page-ranges = false
|
||||
header-template = "<h3 style='font-size:8px; margin-left: 48%' class='title'></h3>"
|
||||
footer-template = "<p style='font-size:10px; margin-left: 48%'><span class='pageNumber'></span> / <span class='totalPages'></span></p>"
|
||||
prefer-css-page-size = true
|
||||
|
||||
[output.pdf-outline]
|
||||
optional = true
|
||||
like-wkhtmltopdf = true
|
||||
@@ -1,6 +0,0 @@
|
||||
# Reset all rules from parent .gitignore files!
|
||||
!*/
|
||||
!**/*
|
||||
|
||||
# Recursively ignore all __pycache__ folders!
|
||||
__pycache__/
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
LFS
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
LFS
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user