From 78e23c018ce973e9ebb31e603a9b783f2228c1a7 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 22 Dec 2020 16:10:08 +0100 Subject: [PATCH] makepackage: Update links to manual in Windows installer for Sphinx --- makepanda/installer.nsi | 13 +++---------- makepanda/makepackage.py | 1 + 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/makepanda/installer.nsi b/makepanda/installer.nsi index 04b3201388..2c6920c87e 100644 --- a/makepanda/installer.nsi +++ b/makepanda/installer.nsi @@ -92,7 +92,6 @@ LangString DESC_SecMaxPlugins ${LANG_ENGLISH} "Plug-ins for Autodesk 3ds Max (${ LangString DESC_SecMayaPlugins ${LANG_ENGLISH} "Plug-ins and scripts for Autodesk Maya (${REGVIEW}-bit) that can be used to export models to Panda3D." var READABLE -var MANPAGE ; See http://nsis.sourceforge.net/Check_if_a_file_exists_at_compile_time for documentation !macro !defineifexist _VAR_NAME _FILE_NAME @@ -671,8 +670,8 @@ Section "Sample programs" SecSamples SetOutPath $INSTDIR WriteINIStr $INSTDIR\Website.url "InternetShortcut" "URL" "https://www.panda3d.org/" - WriteINIStr $INSTDIR\Manual.url "InternetShortcut" "URL" "https://www.panda3d.org/manual/index.php" - WriteINIStr $INSTDIR\Samples.url "InternetShortcut" "URL" "https://www.panda3d.org/manual/index.php/Sample_Programs_in_the_Distribution" + WriteINIStr $INSTDIR\Manual.url "InternetShortcut" "URL" "https://docs.panda3d.org/${MAJOR_VER}" + WriteINIStr $INSTDIR\Samples.url "InternetShortcut" "URL" "https://docs.panda3d.org/${MAJOR_VER}/python/more-resources/samples/index" SetOutPath $INSTDIR CreateShortCut "$SMPROGRAMS\${TITLE}\Panda3D Manual.lnk" "$INSTDIR\Manual.url" "" "$INSTDIR\pandaIcon.ico" 0 "" "" "Panda3D Manual" CreateShortCut "$SMPROGRAMS\${TITLE}\Panda3D Website.lnk" "$INSTDIR\Website.url" "" "$INSTDIR\pandaIcon.ico" 0 "" "" "Panda3D Website" @@ -692,16 +691,10 @@ Section "Sample programs" SecSamples Call Capitalize Pop $R0 StrCpy $READABLE $R0 - Push $1 - Push "-" - Push "_" - Call StrRep - Pop $R0 - StrCpy $MANPAGE $R0 DetailPrint "Creating shortcuts for sample program $READABLE" CreateDirectory "$SMPROGRAMS\${TITLE}\Sample Programs\$READABLE" SetOutPath $INSTDIR\samples\$1 - WriteINIStr $INSTDIR\samples\$1\ManualPage.url "InternetShortcut" "URL" "https://www.panda3d.org/wiki/index.php/Sample_Programs:_$MANPAGE" + WriteINIStr $INSTDIR\samples\$1\ManualPage.url "InternetShortcut" "URL" "https://docs.panda3d.org/${MAJOR_VER}/python/more-resources/samples/$1" CreateShortCut "$SMPROGRAMS\${TITLE}\Sample Programs\$READABLE\Manual Page.lnk" "$INSTDIR\samples\$1\ManualPage.url" "" "$INSTDIR\pandaIcon.ico" 0 "" "" "Manual Entry on this Sample Program" CreateShortCut "$SMPROGRAMS\${TITLE}\Sample Programs\$READABLE\View Source Code.lnk" "$INSTDIR\samples\$1" iloop: diff --git a/makepanda/makepackage.py b/makepanda/makepackage.py index 31835cfd99..f9e534ca52 100755 --- a/makepanda/makepackage.py +++ b/makepanda/makepackage.py @@ -220,6 +220,7 @@ def MakeInstallerNSIS(version, file, title, installdir, runtime=False, compresso 'BUILT' : '..\\' + outputdir, 'SOURCE' : '..', 'REGVIEW' : regview, + 'MAJOR_VER' : '.'.join(version.split('.')[:2]), } # Are we shipping a version of Python?