refactor(common): fixup help path script references

Relates-to: #12347
This commit is contained in:
Marc Durdin 2024-09-16 06:19:14 +07:00
parent 1ec1f0e1e8
commit 0e5fbb225d
10 changed files with 37 additions and 94 deletions

View file

@ -24,7 +24,7 @@ function generateReleaseNotes() {
# Pad release notes if whatsnew.md doesn't have any line items
# Play Store release notes have a limit of 500 characters
local DEFAULT_RELEASE_NOTE="* Additional bug fixes and improvements"
local FILTERED_LINES=$( grep '^\s*\*.*$' "$KEYMAN_ROOT/android/help/about/whatsnew.md" || [[ $? == 1 ]] ) # Continue if grep has no matches
local FILTERED_LINES=$( grep '^\s*\*.*$' "$KEYMAN_ROOT/android/docs/help/about/whatsnew.md" || [[ $? == 1 ]] ) # Continue if grep has no matches
if [ -z "$FILTERED_LINES" ]; then
FILTERED_LINES="$DEFAULT_RELEASE_NOTE"
builder_warn "Warning: whatsnew.md empty so using default release note: '$FILTERED_LINES'"
@ -32,7 +32,7 @@ function generateReleaseNotes() {
# Change IFS to new line
local old_IFS="${IFS}"
IFS=$'\n'
IFS=$'\n'
for line in $FILTERED_LINES
do
local CHARS_IN_RELEASE_NOTES=$( wc -m < "$PLAY_RELEASE_NOTES" )

View file

@ -10,23 +10,23 @@ Target Operating System and Platform Versions
### Keyman for Windows
Helpfile: [os.md](../../windows/src/desktop/help/common/os.md)
Helpfile: [os.md](../../windows/docs/help/common/os.md)
### Keyman for macOS
Helpfile: [requirements.md](../../mac/help/about/requirements.md)
Helpfile: [requirements.md](../../mac/docs/help/about/requirements.md)
### Keyman for Linux
Helpfile: [common/index.md](../../linux/help/common/index.md#q-what-linux-distros-will-keyman-work-with)
Helpfile: [common/index.md](../../linux/docs/help/common/index.md#q-what-linux-distros-will-keyman-work-with)
### Keyman iPhone and iPad
Helpfile: [system-requirements.md](../../ios/help/about/system-requirements.md)
Helpfile: [system-requirements.md](../../ios/docs/help/about/system-requirements.md)
### Keyman for Android
Helpfile: [system-requirements.md](../../android/help/about/system-requirements.md)
Helpfile: [system-requirements.md](../../android/docs/help/about/system-requirements.md)
----

View file

@ -10,23 +10,23 @@ Target Operating System and Platform Versions
### Keyman for Windows
Helpfile: [os.md](../../windows/src/desktop/help/common/os.md)
Helpfile: [os.md](../../windows/docs/help/common/os.md)
### Keyman for macOS
Helpfile: [requirements.md](../../mac/help/about/requirements.md)
Helpfile: [requirements.md](../../mac/docs/help/about/requirements.md)
### Keyman for Linux
Helpfile: [common/index.md](../../linux/help/common/index.md#q-what-linux-distros-will-keyman-work-with)
Helpfile: [common/index.md](../../linux/docs/help/common/index.md#q-what-linux-distros-will-keyman-work-with)
### Keyman iPhone and iPad
Helpfile: [system-requirements.md](../../ios/help/about/system-requirements.md)
Helpfile: [system-requirements.md](../../ios/docs/help/about/system-requirements.md)
### Keyman for Android
Helpfile: [system-requirements.md](../../android/help/about/system-requirements.md)
Helpfile: [system-requirements.md](../../android/docs/help/about/system-requirements.md)
----

View file

@ -72,11 +72,11 @@ fi
if [ -n "$generate_help" ]; then
echo "Generating markdown help pages..."
mkdir -p ../help/reference
buildtools/help2md ./km-package-get -o ../help/reference/km-package-get.md -n "Download a Keyman keyboard package" -I maninc/km-package-get.inc
buildtools/help2md ./km-package-install -o ../help/reference/km-package-install.md -n "Install a Keyman keyboard package" -I maninc/km-package-install.inc
buildtools/help2md ./km-config -o ../help/reference/km-config.md -n "Launches Keyman Configuration for installing and showing information about Keyman keyboards" -I maninc/km-config.inc
buildtools/help2md ./km-kvk2ldml -o ../help/reference/km-kvk2ldml.md -n "Convert a Keyman on-screen keyboard file to LDML" -I maninc/km-kvk2ldml.inc
buildtools/help2md ./km-package-list-installed -o ../help/reference/km-package-list-installed.md -n "List installed Keyman keyboard packages" -I maninc/km-package-list-installed.inc
buildtools/help2md ./km-package-uninstall -o ../help/reference/km-package-uninstall.md -n "Uninstall a Keyman keyboard package" -I maninc/km-package-uninstall.inc
mkdir -p ../docs/help/reference
buildtools/help2md ./km-package-get -o ../docs/help/reference/km-package-get.md -n "Download a Keyman keyboard package" -I maninc/km-package-get.inc
buildtools/help2md ./km-package-install -o ../docs/help/reference/km-package-install.md -n "Install a Keyman keyboard package" -I maninc/km-package-install.inc
buildtools/help2md ./km-config -o ../docs/help/reference/km-config.md -n "Launches Keyman Configuration for installing and showing information about Keyman keyboards" -I maninc/km-config.inc
buildtools/help2md ./km-kvk2ldml -o ../docs/help/reference/km-kvk2ldml.md -n "Convert a Keyman on-screen keyboard file to LDML" -I maninc/km-kvk2ldml.inc
buildtools/help2md ./km-package-list-installed -o ../docs/help/reference/km-package-list-installed.md -n "List installed Keyman keyboard packages" -I maninc/km-package-list-installed.inc
buildtools/help2md ./km-package-uninstall -o ../docs/help/reference/km-package-uninstall.md -n "Uninstall a Keyman keyboard package" -I maninc/km-package-uninstall.inc
fi

View file

@ -28,7 +28,7 @@ builder_describe_outputs \
clean_action() {
rm -rf dist make_deb build ./*.egg-info keyman_config/version.py
find . \( -name __pycache__ -o -name keyman-config.mo \) -exec rm -rf {} +
rm -rf ../help/reference/km-*.md
rm -rf ../docs/help/reference/km-*.md
# Don't delete this file during a package build because they are
# part of the source package. We can't generate it during a package

View file

@ -57,7 +57,7 @@ dpkg-source --tar-ignore=*~ \
--tar-ignore=linux/keyman-config/keyman_config/version.py \
--tar-ignore=linux/keyman-config/buildtools/build-langtags.py \
--tar-ignore=__pycache__ \
--tar-ignore=linux/help \
--tar-ignore=linux/docs/help \
--tar-ignore=mac \
--tar-ignore=node_modules \
--tar-ignore=oem \

View file

@ -36,7 +36,7 @@ function _build_help_build() {
local CSS="$KEYMAN_ROOT/resources/build/offline-help-style-spec.txt"
local PLATFORM="$1"
cd "$KEYMAN_ROOT/$PLATFORM/help"
cd "$KEYMAN_ROOT/$PLATFORM/docs/help"
local MD=`find . -name "*.md"`
local DESTHTM="$KEYMAN_ROOT/$PLATFORM/$2"
@ -53,9 +53,9 @@ function _build_help_build() {
#
# Copy Images
#
cd "$KEYMAN_ROOT/$PLATFORM/help/"
cd "$KEYMAN_ROOT/$PLATFORM/docs/help/"
mkdir -p "$DESTHTM/${PLATFORM}_images"
cp $KEYMAN_ROOT/$PLATFORM/help/${PLATFORM}_images/* "$DESTHTM/${PLATFORM}_images/"
cp $KEYMAN_ROOT/$PLATFORM/docs/help/${PLATFORM}_images/* "$DESTHTM/${PLATFORM}_images/"
}
#
@ -74,7 +74,7 @@ function _build_help_build() {
#
# ### Description
#
# Expects to find .md source under $KEYMAN_ROOT/$platform/help/, and
# Expects to find .md source under $KEYMAN_ROOT/$platform/docs/help/, and
# will write the output .html to $KEYMAN_ROOT/$platform/$output_path.
#
function build_help_html() {

View file

@ -74,19 +74,19 @@ function upload {
function upload_keyman_help {
case $platform in
android)
upload android/help products/android/$VERSION_RELEASE
upload android/docs/help products/android/$VERSION_RELEASE
;;
ios)
upload ios/help products/iphone-and-ipad/$VERSION_RELEASE
upload ios/docs/help products/iphone-and-ipad/$VERSION_RELEASE
;;
linux)
pushd "$KEYMAN_ROOT/linux/keyman-config" > /dev/null
./build.sh build
popd > /dev/null
upload linux/help products/linux/$VERSION_RELEASE
upload linux/docs/help products/linux/$VERSION_RELEASE
;;
mac)
upload mac/help products/mac/$VERSION_RELEASE
upload mac/docs/help products/mac/$VERSION_RELEASE
;;
windows)
# Note: `/windows/src/desktop/help/build.sh web` must be run first

View file

@ -25,6 +25,11 @@ builder_describe_outputs \
#-------------------------------------------------------------------------------------------------------------------
# All content is stored in windows/docs/help
HELP_SOURCE_PATH="$KEYMAN_ROOT/windows/docs/help"
cd "$HELP_SOURCE_PATH"
MD=`find -name "*.md"`
DESTCHM="$KEYMAN_ROOT/windows/bin/help/desktop"
DESTWEB="$KEYMAN_ROOT/windows/bin/help/md/desktop"
@ -121,7 +126,7 @@ function do_build_chm() {
#
mkdir -p "$DESTCHM/desktop_images"
cp "$THIS_SCRIPT_PATH/desktop_images"/* "$DESTCHM/desktop_images/"
cp "$HELP_SOURCE_PATH/desktop_images"/* "$DESTCHM/desktop_images/"
#
# Prepare TOC and HHP files
@ -129,7 +134,7 @@ function do_build_chm() {
pushd "$DESTCHM" > /dev/null
cp "$THIS_SCRIPT_PATH/keymandesktop.hhp" "$DESTCHM/keymandesktop.hhp"
cp "$HELP_SOURCE_PATH/keymandesktop.hhp" "$DESTCHM/keymandesktop.hhp"
find -name '*.htm' >> "$DESTCHM/keymandesktop.hhp"
build_hhc_header
@ -163,7 +168,7 @@ function do_build_web() {
done
mkdir -p "$DESTWEB/desktop_images"
cp "$THIS_SCRIPT_PATH/desktop_images"/* "$DESTWEB/desktop_images/"
cp "$HELP_SOURCE_PATH/desktop_images"/* "$DESTWEB/desktop_images/"
}
builder_run_action clean:chm do_clean_chm

View file

@ -1,62 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{61F7EA69-424D-41F9-B734-1EF0661A564C}"
ProjectSection(SolutionItems) = preProject
chm.xsl = chm.xsl
home.xml = home.xml
index.xml = index.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "context", "context", "{803201BB-4DA1-4A4C-9D6D-BA6BC19BF9EA}"
ProjectSection(SolutionItems) = preProject
context\activate.xml = context\activate.xml
context\charactermap.xml = context\charactermap.xml
context\configuration_addins.xml = context\configuration_addins.xml
context\configuration_hotkeys.xml = context\configuration_hotkeys.xml
context\configuration_keyboards.xml = context\configuration_keyboards.xml
context\configuration_languages.xml = context\configuration_languages.xml
context\configuration_options.xml = context\configuration_options.xml
context\configuration_support.xml = context\configuration_support.xml
context\keyman.xml = context\keyman.xml
context\manualactivate.xml = context\manualactivate.xml
context\onscreenkeyboard.xml = context\onscreenkeyboard.xml
context\selectlanguage.xml = context\selectlanguage.xml
context\splash.xml = context\splash.xml
context\traymenu.xml = context\traymenu.xml
context\welcome.xml = context\welcome.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "guide", "guide", "{773446EB-3B8A-4D7A-848E-A6A643A0F78A}"
ProjectSection(SolutionItems) = preProject
guide\changehotkey.xml = guide\changehotkey.xml
guide\install.xml = guide\install.xml
guide\install_keyboard.xml = guide\install_keyboard.xml
guide\keyboard_uninstall.xml = guide\keyboard_uninstall.xml
guide\keyboard_unload.xml = guide\keyboard_unload.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "main", "main", "{2C8697CC-0686-48E5-AFB5-E836E96D4FAD}"
ProjectSection(SolutionItems) = preProject
main\license.xml = main\license.xml
main\purchase.xml = main\purchase.xml
main\welcome.xml = main\welcome.xml
main\whatsnew.xml = main\whatsnew.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{D17860DB-EFA1-444B-BE05-5889A338F552}"
ProjectSection(SolutionItems) = preProject
ref\systemshadowkeyboards.xml = ref\systemshadowkeyboards.xml
EndProjectSection
EndProject
Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{803201BB-4DA1-4A4C-9D6D-BA6BC19BF9EA} = {61F7EA69-424D-41F9-B734-1EF0661A564C}
{773446EB-3B8A-4D7A-848E-A6A643A0F78A} = {61F7EA69-424D-41F9-B734-1EF0661A564C}
{2C8697CC-0686-48E5-AFB5-E836E96D4FAD} = {61F7EA69-424D-41F9-B734-1EF0661A564C}
{D17860DB-EFA1-444B-BE05-5889A338F552} = {61F7EA69-424D-41F9-B734-1EF0661A564C}
EndGlobalSection
EndGlobal