diff --git a/i2p2www/downloads.py b/i2p2www/downloads.py index 2c6c16f9..419d5ac9 100644 --- a/i2p2www/downloads.py +++ b/i2p2www/downloads.py @@ -104,7 +104,21 @@ def downloads_firefox(): # The Lab def downloads_lab(): - return render_template('downloads/lab.html') + # TODO: read mirror list or list of available files + if request.headers.get('X-I2P-Desthash') and not request.headers.get('X-Forwarded-Server'): + def_mirror = DEFAULT_I2P_MIRROR + else: + def_mirror = DEFAULT_MIRROR + return render_template('downloads/lab.html', def_mirror=def_mirror) + +# Mac DMG page +def downloads_mac(): + # TODO: read mirror list or list of available files + if request.headers.get('X-I2P-Desthash') and not request.headers.get('X-Forwarded-Server'): + def_mirror = DEFAULT_I2P_MIRROR + else: + def_mirror = DEFAULT_MIRROR + return render_template('downloads/mac.html', def_mirror=def_mirror) def downloads_config(): return render_template('downloads/config.html') diff --git a/i2p2www/legacy.py b/i2p2www/legacy.py index 715d27eb..4f5b9d0f 100644 --- a/i2p2www/legacy.py +++ b/i2p2www/legacy.py @@ -19,6 +19,7 @@ LEGACY_FUNCTIONS_MAP={ 'debian': {'function': 'downloads_debian', 'params': {}}, 'firefox': {'function': 'downloads_firefox', 'params': {}}, 'lab': {'function': 'downloads_lab', 'params': {}}, + 'mac': {'function': 'downloads_mac', 'params': {}}, 'download': {'function': 'downloads_list', 'params': {}}, 'installation': {'function': 'downloads_list', 'params': {}}, 'meetings': {'function': 'meetings_index', 'params': {}}, diff --git a/i2p2www/pages/downloads/list.html b/i2p2www/pages/downloads/list.html index db73a608..d6f2a941 100644 --- a/i2p2www/pages/downloads/list.html +++ b/i2p2www/pages/downloads/list.html @@ -128,6 +128,13 @@ I2P connections.

java -jar i2pinstall_{{ i2pversion }}.jar -console to follow the install procedure in your terminal. {%- endtrans %} + +

{% trans %}DMG Bundle (BETA){% endtrans %}

+ If you do not want to use the installer or do not have a Java Runtime Environment available + on your Mac, you can try our latest DMG bundle. +
+ {% trans %}Mac OS DMG Bundle (BETA){% endtrans %} +
{% endcall %}
{%- trans %}I2P for Linux{%- endtrans %}
diff --git a/i2p2www/pages/downloads/mac.html b/i2p2www/pages/downloads/mac.html new file mode 100644 index 00000000..7b3b0b4d --- /dev/null +++ b/i2p2www/pages/downloads/mac.html @@ -0,0 +1,59 @@ +{% extends "global/layout.html" %} +{%- from "downloads/macros" import package_outer with context -%} +{% block title %}Mac OS DMG Bundle (BETA){% endblock %} +{% block content %} + +

{{ _('Mac OS DMG Bundle (BETA)') }}

+

{% trans -%} +We are excited to offer you a DMG bundle for Mac OS. It installs and behaves the same way many other Mac OS applications do and does not require a Java Runtime Environment to be available. +{%- endtrans %}

+

{{ _('How do I use it?') }}

+

{% trans -%} +I2P behaves like any other Mac application. When you launch I2P, the I2P icon will appear on the Dock and a few seconds later a browser will open with the I2P console page, inviting you to complete the setup wizard. +{%- endtrans %}

+

{% trans -%} +If you want to browse hidden websites ('eepsites') on the I2P network, you need to configure your browser. +{%- endtrans %}

+ +{%- set name = 'Windows' -%} +{%- set icon = 'images/download/mac-osx.png' -%} +{%- set filename = 'I2P-%s.dmg' -%} +{%- set hash = '07c729c26fc8a31c0e74fe7b4de7be1f8e390d018748322ada35b29de9d' -%} + +{% call package_outer('osx', name, icon) %} +
+ + {{ ver(filename) }}
+ {{ _('Mirror:') }} {{ def_mirror.org }} +
+ {{ _('select alternate mirror') }} +
+
+
+ {{ hash }} +
+
+

{% trans -%} +Download that file and double-click on it. Accept the License Agreement, then drag the I2P icon on top of the Applications icon. Launch I2P from Finder. + {%- endtrans %}

+{% endcall %} + +

{{ _('Limitations') }}

+

{% trans -%} +I2P will not install any launch agents on your Mac. If you want I2P to start on system startup, you need to configure a launch agent yourself. You can configure I2P to launch when your user logs in by right-clicking on the I2P Dock icon. +{%- endtrans %}

+

{{ _('Source Code and Issue Tracking') }}

+
{% trans -%} +If you would like to examine the source code for individual components, you may +find it on i2pgit.org. +{%- endtrans %}
+
{% trans -%}Gitlab Repository{%- endtrans %}
+
{% trans -%} +If you wish to file an issue about the DMG Bundle, please use Gitlab to +contact us. For security-sensitive issues, please remember to check the +"This issue is confidential and should only be visible to team members with at least Reporter access" +option when filing the issue. +{%- endtrans %}
+
{% trans -%}Gitlab Repository{%- endtrans %}
+ +{% endblock %} diff --git a/i2p2www/sitemap.py b/i2p2www/sitemap.py index 355eb921..77202a04 100644 --- a/i2p2www/sitemap.py +++ b/i2p2www/sitemap.py @@ -115,6 +115,9 @@ def render_sitemap(): urls.append({ 'path': '/download/lab', }) + urls.append({ + 'path': '/download/mac', + }) # Render and return the sitemap response = make_response(render_template('global/sitemap.xml', url_root=url_root, langs=LANG_FRAGS, diff --git a/i2p2www/urls.py b/i2p2www/urls.py index aee5f2bb..37fbc46b 100644 --- a/i2p2www/urls.py +++ b/i2p2www/urls.py @@ -95,6 +95,7 @@ url('//download/windows', 'downloads.downloads_windows') url('//download/firefox', 'downloads.downloads_firefox') url('//download/config', 'downloads.downloads_config') url('//download/lab', 'downloads.downloads_lab') +url('//download/mac', 'downloads.downloads_mac') url('//download///mirrors', 'downloads.downloads_select') url('//download///any//download', 'downloads.downloads_redirect', defaults={'protocol': None, 'domain': None}) url('//download////any//download', 'downloads.downloads_redirect', defaults={'domain': None})