Skip to content

Commit

Permalink
Use the same DOCDIR on Windows than on other platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
b4n committed Mar 3, 2016
1 parent debe145 commit 40a2527
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 2 additions & 3 deletions geany.nsi.in
Expand Up @@ -189,9 +189,9 @@ SectionEnd
Section "Documentation" SEC04
SectionIn 1
SetOverwrite ifnewer
SetOutPath "$INSTDIR"
SetOutPath "$INSTDIR\share\doc\geany\html"
File /r "${RESOURCEDIR}\doc"
WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "$INSTDIR\doc\Manual.html"
WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "$INSTDIR\share\doc\geany\html\index.html"
!insertmacro MUI_STARTMENU_WRITE_BEGIN ${PRODUCT_NAME}
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Documentation.lnk" "$INSTDIR\Documentation.url"
!insertmacro MUI_STARTMENU_WRITE_END
Expand Down Expand Up @@ -302,7 +302,6 @@ Section Uninstall
Delete "$DESKTOP\Geany.lnk"

RMDir /r "$INSTDIR\bin"
RMDir /r "$INSTDIR\doc"
RMDir /r "$INSTDIR\data"
RMDir /r "$INSTDIR\etc"
RMDir /r "$INSTDIR\include"
Expand Down
4 changes: 2 additions & 2 deletions src/utils.c
Expand Up @@ -1912,7 +1912,7 @@ gchar *utils_get_help_url(const gchar *suffix)

#ifdef G_OS_WIN32
skip = 8;
uri = g_strconcat("file:///", app->docdir, "/Manual.html", NULL);
uri = g_strconcat("file:///", app->docdir, "/index.html", NULL);
g_strdelimit(uri, "\\", '/'); /* replace '\\' by '/' */
#else
skip = 7;
Expand Down Expand Up @@ -2119,7 +2119,7 @@ const gchar *utils_resource_dir(GeanyResourceDirType type)

resdirs[RESOURCE_DIR_DATA] = g_build_filename(prefix, "data", NULL);
resdirs[RESOURCE_DIR_ICON] = g_build_filename(prefix, "share", "icons", NULL);
resdirs[RESOURCE_DIR_DOC] = g_build_filename(prefix, "doc", NULL);
resdirs[RESOURCE_DIR_DOC] = g_build_filename(prefix, "share", "doc", "geany", "html", NULL);
resdirs[RESOURCE_DIR_LOCALE] = g_build_filename(prefix, "share", "locale", NULL);
resdirs[RESOURCE_DIR_PLUGIN] = g_build_filename(prefix, "lib", "geany", NULL);
g_free(prefix);
Expand Down
8 changes: 3 additions & 5 deletions wscript
Expand Up @@ -673,7 +673,7 @@ def build(bld):
tagmanager/src/tm_tagmanager.h
tagmanager/src/tm_workspace.h ''')
# Docs
base_dir = '${PREFIX}' if is_win32 else '${DOCDIR}'
base_dir = '${DOCDIR}'
ext = '.txt' if is_win32 else ''
for filename in 'AUTHORS ChangeLog COPYING README NEWS THANKS TODO'.split():
basename = _uc_first(filename, bld)
Expand All @@ -685,11 +685,9 @@ def build(bld):
# local_html_doc_filename supports installing HTML doc from in-tree geany.html if it exists
local_html_doc_filename = os.path.join(bld.path.abspath(), 'doc', 'geany.html')
if os.path.exists(html_doc_filename) or os.path.exists(local_html_doc_filename):
html_dir = '' if is_win32 else 'html/'
html_name = 'Manual.html' if is_win32 else 'index.html'
start_dir = bld.path.find_dir('doc/images')
bld.install_files('${DOCDIR}/%simages' % html_dir, start_dir.ant_glob('*.png'), cwd=start_dir)
bld.install_as('${DOCDIR}/%s%s' % (html_dir, html_name), 'doc/geany.html')
bld.install_files('${DOCDIR}/html/images', start_dir.ant_glob('*.png'), cwd=start_dir)
bld.install_as('${DOCDIR}/html/index.html', 'doc/geany.html')

bld.install_as('${DOCDIR}/%s' % _uc_first('manual.txt', bld), 'doc/geany.txt')
bld.install_as('${DOCDIR}/ScintillaLicense.txt', 'scintilla/License.txt')
Expand Down

0 comments on commit 40a2527

Please sign in to comment.