Skip to content

Commit

Permalink
[548224] Make it easier for users to report issues with the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
merks committed Nov 3, 2019
1 parent 23aa67d commit bd2be37
Show file tree
Hide file tree
Showing 4 changed files with 296 additions and 0 deletions.
Expand Up @@ -119,6 +119,10 @@ public final class SimpleInstallerDialog extends AbstractSimpleDialog implements

private static final String MARKET_PLACE_MENU_ITEM_TEXT = "MARKETPLACE" + StringUtil.HORIZONTAL_ELLIPSIS;

private static final String ASK_A_QUESTION_MENU_ITEM_TEXT = "ASK A QUESTION" + StringUtil.HORIZONTAL_ELLIPSIS;

private static final String REPORT_A_PROBLEM_MENU_ITEM_TEXT = "REPORT A PROBLEM" + StringUtil.HORIZONTAL_ELLIPSIS;

private static final String ABOUT_MENU_ITEM_TEXT = "ABOUT";

private static final String EXIT_MENU_ITEM_TEXT = "EXIT";
Expand All @@ -133,6 +137,12 @@ public final class SimpleInstallerDialog extends AbstractSimpleDialog implements

private static final boolean MARKETPLACE_MENU_ITEM_ENABLED = !"false".equals(PropertiesUtil.getProperty(SetupProperties.PROP_SETUP_INSTALLER_MARKETPLACE));

private static final String HOST = PropertiesUtil.getProperty("oomph.setup.installer.host", "https://www.eclipse.org/setups/installer");

private static final String PROBLEM_REPORT_URL = PropertiesUtil.getProperty(SetupProperties.PROP_SETUP_INSTALLER_PROBLEM_REPORT, HOST + "/problem/");

private static final String FORUM_URL = PropertiesUtil.getProperty(SetupProperties.PROP_SETUP_INSTALLER_FORUM, HOST + "/question/");

private static Font defaultFont;

private static Point defaultSize;
Expand Down Expand Up @@ -713,6 +723,36 @@ public void widgetSelected(SelectionEvent e)
});
}

if (!StringUtil.isEmpty(FORUM_URL))
{
SimpleInstallerMenu.InstallerMenuItem askAQuestionItem = new SimpleInstallerMenu.InstallerMenuItem(menu);
askAQuestionItem.setText(ASK_A_QUESTION_MENU_ITEM_TEXT);
askAQuestionItem.setToolTipText("Ask a question about the installer");
askAQuestionItem.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
OS.INSTANCE.openSystemBrowser(FORUM_URL + "?version=" + URI.encodeQuery(SelfUpdate.getProductVersion(), false));
}
});
}

if (!StringUtil.isEmpty(PROBLEM_REPORT_URL))
{
SimpleInstallerMenu.InstallerMenuItem reportAProblemItem = new SimpleInstallerMenu.InstallerMenuItem(menu);
reportAProblemItem.setText(REPORT_A_PROBLEM_MENU_ITEM_TEXT);
reportAProblemItem.setToolTipText("Report a problem with the installer");
reportAProblemItem.addSelectionListener(new SelectionAdapter()
{
@Override
public void widgetSelected(SelectionEvent e)
{
OS.INSTANCE.openSystemBrowser(PROBLEM_REPORT_URL + "?version=" + URI.encodeQuery(SelfUpdate.getProductVersion(), false));
}
});
}

SimpleInstallerMenu.InstallerMenuItem aboutItem = new SimpleInstallerMenu.InstallerMenuItem(menu);
aboutItem.setText(ABOUT_MENU_ITEM_TEXT);
aboutItem.setToolTipText("Show information about this installer");
Expand Down
Expand Up @@ -63,6 +63,10 @@ public class SetupProperties

public static final String PROP_SETUP_INSTALLER_MARKETPLACE = "oomph.setup.installer.marketplace";

public static final String PROP_SETUP_INSTALLER_PROBLEM_REPORT = "oomph.setup.installer.problem.report";

public static final String PROP_SETUP_INSTALLER_FORUM = "oomph.setup.installer.forum";

public static final String PROP_SETUP_INSTALLER_URI_SCHEME = "oomph.setup.installer.uri.scheme.";

public static final String PROP_SETUP_PRODUCT_CATALOG_FILTER = "oomph.setup.product.catalog.filter";
Expand Down
113 changes: 113 additions & 0 deletions releng/org.eclipse.oomph.releng/www/installer/problem/index.php
@@ -0,0 +1,113 @@
<?php
// header( 'Cache-control: no cache' );
error_reporting(0);
$host = $_SERVER['DOCUMENT_ROOT'];
require_once($host . "/eclipse.org-common/system/app.class.php");
require_once($host . "/eclipse.org-common/system/nav.class.php");
require_once($host . "/eclipse.org-common/system/menu.class.php");
require_once($host . "/eclipse.org-common/system/breadcrumbs.class.php");
$App = new App();
$Nav = new Nav();
$Menu = new Menu();
$Breadcrumb = new Breadcrumb();
include($App->getProjectCommon());

// Shorten the default breadcrumbs to remove the setups folder for which there is no HTML.
$Breadcrumb->removeCrumb($Breadcrumb->getCrumbCount() - 1);
$Breadcrumb->addCrumb("Oomph", "http://www.eclipse.org/oomph", "_self");
$Breadcrumb->addCrumb("Eclipse Installer Problems", ".", "_self");

#
# Begin: page-specific settings. Change these.
$pageTitle = "Installer Problems";
$pageKeywords = "Oomph Installer";
$pageAuthor = "Ed Merks";


$eclipse_installer = '<span style="color: #2c2255; font-family: Arial, Helvetica, sans-serif;">eclipse</span> <span class="orange">installer</span>';

$version = $_GET["version"];
$version_label = "";
$version_parameter = "";
$bugzilla_version = "";
$bugzilla_short_desc = "&short_desc=Installer";
if (!$version)
{
$version = "Self Hosting";
}
else
{
$version_label = "&nbsp;Version: " . $version;
$version_parameter = "?version=" . $version;
if (preg_match('/([0-9.]+)( Build ([0-9]+))?/', $version, $match))
{
$bugzilla_version = "&version=" . $match[1];
if (count($match) == 4)
{
$bugzilla_short_desc .= " Build " . $match[3];
}
}
}

$bugzilla = htmlEntities("https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Oomph&component=Setup" . $bugzilla_version . $bugzilla_short_desc);
$question = htmlEntities("../question/$version_parameter");

# Add page-specific Nav bars here
# Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank), level (1, 2 or 3)
# $Nav->addNavSeparator("My Page Links", "downloads.php");
# $Nav->addCustomNav("My Link", "mypage.php", "_self", 3);
# $Nav->addCustomNav("Google", "http://www.google.com/", "_blank", 3);

$Nav->addNavSeparator("Documentation", "");
$Nav->addCustomNav("Eclipse Oomph Wiki", "https://wiki.eclipse.org/Oomph", "_blank", 1);
$Nav->addCustomNav("Eclipse Installer", "https://wiki.eclipse.org/Eclipse_Installer", "_blank", 1);
$Nav->addNavSeparator("Community", "");
$Nav->addCustomNav("Get an Eclipse Account", "https://accounts.eclipse.org/user/register", "_blank", 1);
$Nav->addCustomNav("Ask a Question", $question, "_self", 1);
$Nav->addCustomNav("Report a Problem", $bugzilla, "_blank", 1);
$Nav->addNavSeparator("Download", "");
$Nav->addCustomNav("Eclipse Installers", "https://wiki.eclipse.org/Eclipse_Installer", "_blank", 1);
$Nav->addCustomNav("Eclipse Packages", "https://www.eclipse.org/downloads/packages/", "_blank", 1);

$html = <<<EOHTML
<div id="maincontent">
<div id="midcolumnwide">
<div style="font-size: 150%;">
<a href="https://wiki.eclipse.org/Oomph" target="oomph_wiki"><img style="width: 3ex; height: 3ex;" src="../oomph256.png"/></a>
<img style="max-width: 12em;" src="../EclipseInstaller.png"/>
<span style="font-size: 66%;">$version_label</span>
</div>
<br/>
<p>
Before <a href="$bugzilla">reporting a problem</a>,
please consider <a href="$question">asking a question</a> instead.
Of course it's a good idea to read the <a href="https://www.eclipse.org/downloads/packages/installer">general instructions</a> for how to use the $eclipse_installer before doing either.
</p>
<p>
Keep in mind that we cannot fix the network.
Networks and servers can and do fail and this is beyound our control.
</p>
<p>
You will need an <b><a href="https://accounts.eclipse.org/user/register" target="_blank">Eclipse Account</a></b> to report problems via <a href="$bugzilla">Bugzilla</a>.
</p>
<p>
Please provide as much detail as possible.
I.e., include screen captures and/or attach log details, as well as information about your operating system version.
</p>
<br>
</div>
</div>
<div id="rightcolumn">
$sidebar
</div>
EOHTML;

# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html, $Breadcrumb);

?>
139 changes: 139 additions & 0 deletions releng/org.eclipse.oomph.releng/www/installer/question/index.php
@@ -0,0 +1,139 @@
<?php
// header( 'Cache-control: no cache' );
error_reporting(0);
$host = $_SERVER['DOCUMENT_ROOT'];
require_once($host . "/eclipse.org-common/system/app.class.php");
require_once($host . "/eclipse.org-common/system/nav.class.php");
require_once($host . "/eclipse.org-common/system/menu.class.php");
require_once($host . "/eclipse.org-common/system/breadcrumbs.class.php");
$App = new App();
$Nav = new Nav();
$Menu = new Menu();
$Breadcrumb = new Breadcrumb();
include($App->getProjectCommon());

// Shorten the default breadcrumbs to remove the setups folder for which there is no HTML.
$Breadcrumb->removeCrumb($Breadcrumb->getCrumbCount() - 1);
$Breadcrumb->addCrumb("Oomph", "http://www.eclipse.org/oomph", "_self");
$Breadcrumb->addCrumb("Eclipse Installer Questions", ".", "_self");

#
# Begin: page-specific settings. Change these.
$pageTitle = "Installer Questions";
$pageKeywords = "Oomph Installer";
$pageAuthor = "Ed Merks";

$eclipse_installer = '<span style="color: #2c2255; font-family: Arial, Helvetica, sans-serif;">eclipse</span> <span class="orange">installer</span>';

$version = $_GET["version"];
$version_label = "";
$version_parameter = "";
if (!$version)
{
$version = "Self Hosting";
}
else
{
$version_label = "&nbsp;Version: " . $version;
$version_parameter = "?version=" . $version;
}

# Add page-specific Nav bars here
# Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank), level (1, 2 or 3)
# $Nav->addNavSeparator("My Page Links", "downloads.php");
# $Nav->addCustomNav("My Link", "mypage.php", "_self", 3);
# $Nav->addCustomNav("Google", "http://www.google.com/", "_blank", 3);

$Nav->addNavSeparator("Documentation", "");
$Nav->addCustomNav("Eclipse Oomph Wiki", "https://wiki.eclipse.org/Oomph", "_blank", 1);
$Nav->addCustomNav("Eclipse Installer", "https://wiki.eclipse.org/Eclipse_Installer", "_blank", 1);
$Nav->addNavSeparator("Community", "");
$Nav->addCustomNav("Get an Eclipse Account", "https://accounts.eclipse.org/user/register", "_blank", 1);
$Nav->addCustomNav("Ask a Question", "https://www.eclipse.org/forums/index.php/f/287/", "_blank", 1);
$Nav->addCustomNav("Report a Problem", "../problem/$version_parameter", "_blank", 1);
$Nav->addNavSeparator("Download", "");
$Nav->addCustomNav("Eclipse Installers", "https://wiki.eclipse.org/Eclipse_Installer", "_blank", 1);
$Nav->addCustomNav("Eclipse Packages", "https://www.eclipse.org/downloads/packages/", "_blank", 1);

$html = <<<EOHTML
<div id="maincontent">
<div id="midcolumnwide">
<div style="font-size: 150%;">
<a href="https://wiki.eclipse.org/Oomph" target="oomph_wiki"><img style="width: 3ex; height: 3ex;" src="../oomph256.png"/></a>
<img style="max-width: 12em;" src="../EclipseInstaller.png"/>
<span style="font-size: 66%;">$version_label</span>
</div>
<br/>
<p>
Before asking a question on the <a href="https://www.eclipse.org/forums/index.php/f/287/">Oomph forum</a>,
please read the <a href="https://www.eclipse.org/downloads/packages/installer">general instructions</a> for how to use the $eclipse_installer.
While it's true that there's <a href=""https://en.wikipedia.org/wiki/No_such_thing_as_a_stupid_question">no such thing as a stupid question</a>,
good answers nevertheless depend on the <a href="https://stackoverflow.com/help/how-to-ask">quality of the question</a>.
Help us help you by providing details.
<p>
</p>
You will need an <b><a href="https://accounts.eclipse.org/user/register" target="_blank">Eclipse Account</a></b> to post to the forum.
</p>
<hr>
<h3>Where Should I Install?</h3>
<p>
Eclipse installations are generally designed for personal use and are self-updating.
As such, you should typically install to a location for which you personally have write access.
This is why the default location for the installation is in your home folder.
<p>
</p>
While it is possible to use the $eclipse_installer to create a so-called shared, read-only installation,
you should read carefully the additional considerations below.
In particular, it's important to either disable the use of the shared bundle pool,
or to ensure that the shared bundle pool is also located in a read-only location that is accessible to all users.
</p>
<hr>
<h3>How is my Network Used?</h3>
<p>
If you are behind a network proxy, you will likely need to configure your <a href="https://help.eclipse.org/2019-09/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-net-preferences.htm">network connections</a> first.
The $eclipse_installer will automatically open a dialog for these settings if the catalog fails to load.
</p>
<p>
The $eclipse_installer relies heavily on the network to load the latest catalog
and to fetch information and artifacts from various p2 update sites.
Unfortunately many things can go wrong with the network between you and the servers providing this data.
It is not entirely a rare occurrence that the download.eclipse.org server itself becomes over loaded.
To avoid this, installation artifacts will typically be downloaded from so-called mirror sites; unfortunately the servers for these sites too can fail for various reasons.
If you experience a network failure, please try again a short while later.
</p>
<hr>
<h3>What Else Should I Consider?</h3>
<p>
By default the $eclipse_installer uses a shared bundle pool to reuse installation artifacts across multiple installations.
This has the advantage of making each individual installation very small so that you can easily and quickly create many specialized installations for different use cases with minimal network traffic and minimal disk footprint.
<p>
</p>
Use the $eclipse_installer's <span style="font-variant: small-caps;">Bundle Pools...</span> menu item to manage where this pool is physically located on disk; this location can become large.
The <span style="font-variant: small-caps;">Bundle Pool Management</span> dialog supports garbage collecting of unused artifacts,
i.e., if you delete an installation, the artifact it uses can potentially be removed from disk.
In addition, if some artifact becomes corrupted, or if a corrupted artifact is downloaded from some mirror site, this dialog can be used to detect the damage and to repair it.
</p>
<hr>
<h3>Can't I Just a Download a Package?</h3>
<p>
If the $eclipse_installer fails to serve its purpose, you can always <a href="https://www.eclipse.org/downloads/packages/">download a pre-packaged installation</a> as an alternative.
</p>
<br>
</div>
</div>
<div id="rightcolumn">
$sidebar
</div>
EOHTML;

# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html, $Breadcrumb);

?>

0 comments on commit bd2be37

Please sign in to comment.