From d87eeda5f31ca8fe6a1a1b3957d300e8a2fe05d6 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sat, 19 Jan 2008 05:53:11 +0000 Subject: [PATCH] Made Aegisub open the local documentation files instead of the online ones, and changed the installer to install docs as well - they will be retrieved from trunk/docs/output, so make sure to run the Perl script there (just use the batch file). Originally committed to SVN as r1778. --- aegisub/help_button.cpp | 13 +++++++++---- installer/aegisub2.iss | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/aegisub/help_button.cpp b/aegisub/help_button.cpp index f2caf65b2..38f20ec7f 100644 --- a/aegisub/help_button.cpp +++ b/aegisub/help_button.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include "help_button.h" #include "utils.h" @@ -79,9 +80,13 @@ void HelpButton::OpenPage(const wxString pageID) { // Get the file type wxFileType *type = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("html")); if (type) { - wxString path = StandardPaths::DecodePath(wxString::Format(_T("http://docs.aegisub.net/%s"),page.c_str())); - //wxString command = type->GetOpenCommand(path); - //if (!command.empty()) wxExecute(command); + //wxString path = StandardPaths::DecodePath(wxString::Format(_T("http://docs.aegisub.net/%s"),page.c_str())); + wxString docsPath = StandardPaths::DecodePath(_T("?data/docs")); +#ifdef __WINDOWS__ + docsPath.Replace(_T("\\"),_T("/")); + docsPath = _T("/") + docsPath; +#endif + wxString path = StandardPaths::DecodePath(wxString::Format(_T("file://%s/%s.html"),docsPath.c_str(),page.c_str())); wxLaunchDefaultBrowser(path); } } @@ -102,7 +107,7 @@ void HelpButton::InitStatic() { page[_T("Export")] = _T("Exporting"); page[_T("Fonts Collector")] = _T("Fonts_Collector"); page[_T("Kanji Timer")] = _T("Kanji_Timer"); - page[_T("Main")] = _T(""); + page[_T("Main")] = _T("Main_Page"); page[_T("Options")] = _T("Options"); page[_T("Paste Over")] = _T("Paste_Over"); page[_T("Properties")] = _T("Properties"); diff --git a/installer/aegisub2.iss b/installer/aegisub2.iss index 911d70518..25f421a66 100644 --- a/installer/aegisub2.iss +++ b/installer/aegisub2.iss @@ -179,6 +179,8 @@ Source: ..\bin\dictionaries\th_it_IT.idx; DestDir: {app}\dictionaries; Flags: ig ; localization Source: ..\bin\locale\pt_BR\aegisub.mo; DestDir: {app}\locale\pt_BR; Flags: ignoreversion; Components: i18n/pt_BR Source: ..\bin\locale\pt_BR\wxstd.mo; DestDir: {app}\locale\pt_BR; Flags: ignoreversion; Components: i18n/pt_BR +; documentation +Source: ..\docs\output\*; DestDir: {app}\docs; Flags: ignoreversion recursesubdirs; Components: docs; Excludes: "*svn" [Icons] Name: {commonprograms}\Aegisub\{#MyAppName}; Filename: {app}\Aegisub.exe; WorkingDir: {app}; IconIndex: 0; Components: main/icons; Comment: Aegisub subtitle editor @@ -195,13 +197,14 @@ Name: main; Description: Aegisub; Types: compact full custom; Languages: ; Flags Name: main/pdb; Description: Debug database (helps diagnose crashes); Types: full Name: main/icons; Description: Programs menu icons; Types: custom compact full Name: main/qcklnch; Description: Quick launch icon; Types: custom compact full +Name: docs; Description: Documentation files; Types: custom compact full Name: codec; Description: Media formats support; Flags: fixed; Types: custom compact full Name: codec/vsfilter; Description: VSFilter 2.38-aegisub; Types: compact full custom; Flags: fixed Name: auto; Description: Automation 4 scripting support; Types: compact full Name: auto/lua; Description: Lua; Types: compact full; Flags: checkablealone; Languages: Name: auto/lua/samples; Description: Lua sample scripts; Types: full #if IncludePerl != 0 -Name: auto/perl; Description: Perl (requires a Perl distribution); Types: compact full; Flags: checkablealone; Languages: +Name: auto/perl; Description: Perl (requires a Perl 5.10 distribution); Types: compact full; Flags: checkablealone; Languages: Name: auto/perl/samples; Description: Perl sample scripts; Types: compact full; Flags: checkablealone; Languages: #endif Name: auto/auto3; Description: Automation 3 backwards compatibility; Types: full