diff --git a/.gitignore b/.gitignore index 3d7cc77..92c6e69 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ dsa_priv.pem *.pyc .DS_Store *~ -Linux/build/ +Linux/dist +Windows/bungloo \ No newline at end of file diff --git a/Linux/deploy/Makefile.exmp b/Linux/Makefile.exmp similarity index 100% rename from Linux/deploy/Makefile.exmp rename to Linux/Makefile.exmp diff --git a/Linux/deploy/bungloo.desktop.exmp b/Linux/bungloo.desktop.exmp similarity index 100% rename from Linux/deploy/bungloo.desktop.exmp rename to Linux/bungloo.desktop.exmp diff --git a/Linux/deploy/debian/changelog b/Linux/debian/changelog similarity index 100% rename from Linux/deploy/debian/changelog rename to Linux/debian/changelog diff --git a/Linux/deploy/debian/compat b/Linux/debian/compat similarity index 100% rename from Linux/deploy/debian/compat rename to Linux/debian/compat diff --git a/Linux/deploy/debian/control b/Linux/debian/control similarity index 100% rename from Linux/deploy/debian/control rename to Linux/debian/control diff --git a/Linux/deploy/debian/copyright b/Linux/debian/copyright similarity index 100% rename from Linux/deploy/debian/copyright rename to Linux/debian/copyright diff --git a/Linux/deploy/debian/rules b/Linux/debian/rules similarity index 100% rename from Linux/deploy/debian/rules rename to Linux/debian/rules diff --git a/Linux/deploy/deploy.sh b/Linux/deploy.sh similarity index 87% rename from Linux/deploy/deploy.sh rename to Linux/deploy.sh index b902101..a60ebb8 100755 --- a/Linux/deploy/deploy.sh +++ b/Linux/deploy.sh @@ -2,8 +2,8 @@ VERSION="1.3.0" DEPLOYPATH="bungloo-${VERSION}" -LINUXPATH=".." -SHAREDPATH="../.." +QTPATH="../Qt" +SHAREDPATH=".." DISTPATH=dist rm -rf $DEPLOYPATH @@ -14,8 +14,8 @@ mkdir -p $DEPLOYPATH/bin mkdir -p $DEPLOYPATH/bungloo touch $DEPLOYPATH/bungloo/__init__.py -cp $LINUXPATH/Bungloo.py $DEPLOYPATH/bin/bungloo -cp $LINUXPATH/Helper.py $LINUXPATH/Windows.py $DEPLOYPATH/bungloo +cp $QTPATH/Bungloo.py $DEPLOYPATH/bin/bungloo +cp $QTPATH/Helper.py $QTPATH/Windows.py $DEPLOYPATH/bungloo cat setup.py.exmp | sed -e "s/{VERSION}/${VERSION}/g" > $DEPLOYPATH/setup.py cat Makefile.exmp | sed -e "s/{VERSION}/${VERSION}/g" > $DEPLOYPATH/Makefile cat bungloo.desktop.exmp | sed -e "s/{VERSION}/${VERSION}/g" > $DEPLOYPATH/bungloo.desktop diff --git a/Linux/deploy/setup.py.exmp b/Linux/setup.py.exmp similarity index 100% rename from Linux/deploy/setup.py.exmp rename to Linux/setup.py.exmp diff --git a/Linux/Bungloo.py b/Qt/Bungloo.py similarity index 93% rename from Linux/Bungloo.py rename to Qt/Bungloo.py index 3c357f8..82567d4 100755 --- a/Linux/Bungloo.py +++ b/Qt/Bungloo.py @@ -1,11 +1,12 @@ #!/usr/bin/env python2 import os, sys, pickle, subprocess, shutil -from PyQt4 import QtCore, QtGui, QtWebKit +from PyQt4 import QtCore, QtGui, QtWebKit, QtNetwork -RUNNING_LOCAL = os.path.basename(__file__) == "Bungloo.py" +RUNNING_LOCAL = os.path.basename(sys.argv[0]) == "Bungloo.py" +RUNNING_ON_WINDOWS = os.name == "nt" -if RUNNING_LOCAL: +if RUNNING_LOCAL or RUNNING_ON_WINDOWS: import Windows, Helper else: from bungloo import Windows, Helper @@ -13,6 +14,11 @@ else: class Bungloo: def __init__(self): + + sslConfig = QtNetwork.QSslConfiguration.defaultConfiguration() + sslConfig.setProtocol(QtNetwork.QSsl.TlsV1) + QtNetwork.QSslConfiguration.setDefaultConfiguration(sslConfig) + self.app = QtGui.QApplication(sys.argv) self.new_message_windows = [] self.controller = Controller(self) @@ -30,7 +36,7 @@ class Bungloo: def resources_path(self): if RUNNING_LOCAL: - return os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) + return os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..')) else: return Helper.Helper.get_resource_path() @@ -83,7 +89,10 @@ class Bungloo: self.oauth_implementation.log_out() self.timeline.hide() self.preferences.show() - self.timeline.evaluateJavaScript("bungloo.sidebar.logout()") + self.timeline.evaluateJavaScript("bungloo.sidebar.logout();") + + def next_show(self): + self.timeline.evaluateJavaScript("bungloo.sidebar.showContentForNext();") class Controller(QtCore.QObject): diff --git a/Linux/Helper.py b/Qt/Helper.py similarity index 88% rename from Linux/Helper.py rename to Qt/Helper.py index ea8a36e..09cd069 100644 --- a/Linux/Helper.py +++ b/Qt/Helper.py @@ -2,17 +2,17 @@ from PyQt4 import QtCore, QtGui, QtWebKit from PyQt4.QtCore import QTimer, QVariant, SIGNAL from PyQt4.QtGui import * -from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply +from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply, QSslSocket from PyQt4.QtWebKit import QWebView -import os +import os, sys import array class Helper: - @classmethod - def get_resource_path(cls): - return os.path.dirname(__file__) + @classmethod + def get_resource_path(cls): + return os.path.dirname(sys.argv[0]) class WebPage(QtWebKit.QWebPage): def __init__(self, parent=0, app=None): @@ -43,6 +43,8 @@ class WebViewCreator(QtWebKit.QWebView): self.customContextMenuRequested.connect(self.context_menu_requested) self.actions = [] + self.page().networkAccessManager().sslErrors.connect(lambda reply, errors: self.handleSslErrors(reply, errors)) + def copy_link(): self.page().triggerAction(QtWebKit.QWebPage.CopyLinkToClipboard) self.action_copy_link = QtGui.QAction('Copy Lin&k', self, triggered=copy_link) @@ -85,7 +87,10 @@ class WebViewCreator(QtWebKit.QWebView): def load_finished(self, ok, callback=None): frame = self.page().mainFrame() if self.is_local: - frame.evaluateJavaScript("var OS_TYPE = 'linux';") + os_type = "linux" + if os.name == "nt": + os_type = "windows" + frame.evaluateJavaScript("var OS_TYPE = '" + os_type + "';") js_plugin_path = os.path.expanduser('~/.config/bungloo/Plugin.js') if os.access(js_plugin_path, os.R_OK): @@ -100,6 +105,12 @@ class WebViewCreator(QtWebKit.QWebView): if callback: callback(ok) + def handleSslErrors(self, reply, errors): + if os.name == "nt": # ignore SSL errors on Windows (yes a uggly workaround, don't know how to fix it yet) + for error in errors: + print error.errorString() + reply.ignoreSslErrors(errors) + class NetworkAccessManager(QNetworkAccessManager): @@ -113,6 +124,7 @@ class NetworkAccessManager(QNetworkAccessManager): self.setCookieJar(old_manager.cookieJar()) self.setProxy(old_manager.proxy()) self.setProxyFactory(old_manager.proxyFactory()) + self.sslErrors.connect(lambda reply, errors: old_manager.sslErrors) def createRequest(self, operation, request, data): if request.url().scheme() != "bungloo": diff --git a/Linux/Windows.py b/Qt/Windows.py similarity index 96% rename from Linux/Windows.py rename to Qt/Windows.py index 5fe85c3..6cca8f3 100644 --- a/Linux/Windows.py +++ b/Qt/Windows.py @@ -1,5 +1,5 @@ from PyQt4 import QtCore, QtGui, QtWebKit -import Helper, urllib, urllib2 +import Helper, urllib, urllib2, os class Preferences: @@ -154,12 +154,19 @@ class Timeline: searchAction.setStatusTip("Show Search") searchAction.triggered.connect(self.app.search_show) + nextAction = QtGui.QAction("&Next View", self.window) + nextAction.setShortcut("Ctrl+6") + nextAction.setStatusTip("Show Next") + nextAction.triggered.connect(self.app.next_show) + windowMenu = menubar.addMenu("&View") windowMenu.addAction(timelineAction) windowMenu.addAction(mentionsAction) windowMenu.addAction(conversationAction) windowMenu.addAction(profileAction) windowMenu.addAction(searchAction) + windowMenu.addSeparator() + windowMenu.addAction(nextAction) aboutAction = QtGui.QAction("&About Bungloo", self.window) aboutAction.setStatusTip("Open about page in Webbrowser") @@ -224,8 +231,10 @@ class Oauth: old_manager = self.auth_view.page().networkAccessManager() new_manager = Helper.NetworkAccessManager(old_manager, self.bungloo_callback) new_manager.authenticationRequired.connect(self.authentication_required) + new_manager.sslErrors.connect(lambda reply, errors: self.handleSslErrors(reply, errors)) self.auth_view.page().setNetworkAccessManager(new_manager) self.auth_view.show() + self.auth_view.load_url(url) return False @@ -250,6 +259,13 @@ class Oauth: if hasattr(self, "auth_view"): self.auth_view.hide() + def handleSslErrors(self, reply, errors): + if os.name == "nt": # ignore SSL errors on Windows (yes a uggly workaround, don't know how to fix it yet) + for error in errors: + print error.errorString() + reply.ignoreSslErrors(errors) + + class Login(QtGui.QDialog): def __init__(self): diff --git a/WebKit/css/default.css b/WebKit/css/default.css index aaec35b..cb42b0d 100644 --- a/WebKit/css/default.css +++ b/WebKit/css/default.css @@ -14,7 +14,7 @@ a { text-decoration: none; color: #00317a; outline: 0; -} +} #sidebar { position: fixed; @@ -214,37 +214,39 @@ p { font-weight: bold; } -li .from { - position: absolute; - top: -1.8em; - right: 10px; - display: none; - padding: 0.3em 0.9em; - -webkit-border-top-left-radius: 8px; - -webkit-border-top-right-radius: 8px; - -webkit-box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.1); - border: 1px solid white; - border-bottom: 0; - background: #ddd; - font-size: 0.9em; -} - li:hover .from { display: block; } +li .from { + position: absolute; + right: 3.5em; + display: none; + padding: 0.3em 0.9em; + background: #ddd; + font-size: 0.9em; + top: auto; + bottom: -1.8em; + z-index: 2; + -webkit-border-top-left-radius: 0; + -webkit-border-top-right-radius: 0; + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); + border: 1px solid #b9b9b9; + border-top: 0; +} -li:first-child:hover .from { - top: auto; - bottom: -1.8em; - z-index: 2; - -webkit-border-top-left-radius: 0; - -webkit-border-top-right-radius: 0; - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); - border: 1px solid #b9b9b9; - border-top: 0; +li:last-child:hover .from { + top: -1.8em; + bottom: auto; + -webkit-border-top-left-radius: 8px; + -webkit-border-top-right-radius: 8px; + -webkit-border-bottom-left-radius: 0px; + -webkit-border-bottom-right-radius: 0px; + -webkit-box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.1); + border: 1px solid white; + border-bottom: 0; } aside { diff --git a/WebKit/scripts/controller/Conversation.js b/WebKit/scripts/controller/Conversation.js index b488d32..61f2888 100644 --- a/WebKit/scripts/controller/Conversation.js +++ b/WebKit/scripts/controller/Conversation.js @@ -14,21 +14,23 @@ function(HostApp, Core, Paths, URI) { this.action = "conversation"; + this.container = document.createElement("div"); + this.container.className = this.action; this.body = document.createElement("ol"); - this.body.className = this.action; + this.container.appendChild(this.body) - document.getElementById("content").appendChild(this.body); + document.getElementById("content").appendChild(this.container); this.hide(); } Conversation.prototype = Object.create(Core.prototype); Conversation.prototype.show = function() { - Core.prototype.show.call(this, this.body); + Core.prototype.show.call(this, this.container); } Conversation.prototype.hide = function() { - Core.prototype.hide.call(this, this.body); + Core.prototype.hide.call(this, this.container); } diff --git a/WebKit/scripts/controller/Mentions.js b/WebKit/scripts/controller/Mentions.js index b60de05..7b3be31 100644 --- a/WebKit/scripts/controller/Mentions.js +++ b/WebKit/scripts/controller/Mentions.js @@ -17,7 +17,7 @@ function(HostApp, Timeline, URI, Paths, Core) { Timeline.call(this); this.action = "mentions"; - this.body.className = this.action; + this.container.className = this.action; this.hide(); } @@ -25,11 +25,11 @@ function(HostApp, Timeline, URI, Paths, Core) { Mentions.prototype = Object.create(Timeline.prototype); Mentions.prototype.show = function() { - Core.prototype.show.call(this, this.body); + Core.prototype.show.call(this, this.container); } Mentions.prototype.hide = function() { - Core.prototype.hide.call(this, this.body); + Core.prototype.hide.call(this, this.container); } diff --git a/WebKit/scripts/controller/Oauth.js b/WebKit/scripts/controller/Oauth.js index e4c04cc..20cb76f 100644 --- a/WebKit/scripts/controller/Oauth.js +++ b/WebKit/scripts/controller/Oauth.js @@ -25,7 +25,14 @@ function(HostApp, Paths, Hmac) { "write_followers": "Be able to block people who follow you", "read_followings": "Display following list and their older posts in conversations", "write_followings": "Follow ne entities" - } + }, + "tent_profile_info_types": [ "all" ], + "tent_post_types": [ + "https://tent.io/types/post/status/v0.1.0", + "https://tent.io/types/post/photo/v0.1.0", + "https://tent.io/types/post/repost/v0.1.0", + "https://tent.io/types/post/delete/v0.1.0" + ] }; this.register_data = null; this.profile = null; @@ -104,8 +111,8 @@ function(HostApp, Paths, Hmac) { + "&redirect_uri=" + this.app_info["redirect_uris"][0] + "&scope=" + Object.keys(this.app_info["scopes"]).join(",") + "&state=" + this.state - + "&tent_post_types=all" - + "&tent_profile_info_types=all"; + + "&tent_post_types=" + this.app_info["tent_post_types"].join(",") + + "&tent_profile_info_types=" + this.app_info["tent_profile_info_types"].join(","); HostApp.openAuthorizationURL(this.apiRoot() + auth); } diff --git a/WebKit/scripts/controller/Profile.js b/WebKit/scripts/controller/Profile.js index b3913d3..43e7e1b 100644 --- a/WebKit/scripts/controller/Profile.js +++ b/WebKit/scripts/controller/Profile.js @@ -15,6 +15,7 @@ function(HostApp, Core, Paths, URI) { this.action = "profile"; this.container = document.createElement("div"); + this.container.className = this.action; document.getElementById("content").appendChild(this.container); this.initProfileTemplate(); diff --git a/WebKit/scripts/controller/Search.js b/WebKit/scripts/controller/Search.js index 62b19a5..caaf12c 100644 --- a/WebKit/scripts/controller/Search.js +++ b/WebKit/scripts/controller/Search.js @@ -15,6 +15,7 @@ function(HostApp, Core, Paths, URI) { this.action = "search"; this.container = document.createElement("div"); + this.container.className = this.action; document.getElementById("content").appendChild(this.container); this.body = document.createElement("ol"); @@ -23,7 +24,7 @@ function(HostApp, Core, Paths, URI) { this.form.className = this.action; this.input = document.createElement("input"); this.input.type = "search"; - this.input.placeholder = "Search ..."; + this.input.placeholder = "Search"; this.form.appendChild(this.input); var _this = this; diff --git a/WebKit/scripts/controller/Sidebar.js b/WebKit/scripts/controller/Sidebar.js index 81d5599..7aa04c7 100644 --- a/WebKit/scripts/controller/Sidebar.js +++ b/WebKit/scripts/controller/Sidebar.js @@ -40,6 +40,9 @@ function(HostApp, Paths, Cache) { document.getElementById("sidebar").appendChild(this.body); + // initial seting of the
class + document.body.className = "body-timeline"; + this.setEntityAvatar(); } @@ -151,6 +154,9 @@ function(HostApp, Paths, Cache) { active_part.show(); + // Replace class + document.body.className = "body-" + active_li.className.split("-")[1]; + // Show active icon for(var li in this.menu) { if (this.menu[li] != active_part) { @@ -163,6 +169,29 @@ function(HostApp, Paths, Cache) { img.src = img.src_active; } + Sidebar.prototype.showContentForNext = function() { + + var parts = [ + "timeline", + "mentions", + "conversation", + "entityProfile", + "search" + ]; + + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + var img = this.menu[part].getElementsByTagName("img")[0]; + if (img.src.endsWith(img.src_active)) { + var next = parts[(i+1)%parts.length]; + this.showContentFor(bungloo[next], this.menu[next]); + return; + } + } + + + } + Sidebar.prototype.setUnreadMentions = function(count) { this.unreadMentionsSpan.innerHTML = count == 0 ? "" : count; if (count > 0) { diff --git a/WebKit/scripts/controller/Timeline.js b/WebKit/scripts/controller/Timeline.js index 4888ee4..19f9981 100644 --- a/WebKit/scripts/controller/Timeline.js +++ b/WebKit/scripts/controller/Timeline.js @@ -14,15 +14,17 @@ function(Core, Paths, HostApp, URI) { this.action = "timeline"; this.reload_blocked = false; - this.max_length = 200; + this.max_length = 20; this.timeout = 10 * 1000; // every 10 seconds this.since_id = null; this.since_id_entity = null; this.since_time = 0; + this.container = document.createElement("div"); + this.container.className = this.action; this.body = document.createElement("ol"); - this.body.className = this.action; - document.getElementById("content").appendChild(this.body); + this.container.appendChild(this.body) + document.getElementById("content").appendChild(this.container); var _this = this; this.reloadIntervall = setInterval(function() { _this.getNewData() }, this.timeout); @@ -33,11 +35,11 @@ function(Core, Paths, HostApp, URI) { Timeline.prototype = Object.create(Core.prototype); Timeline.prototype.show = function() { - Core.prototype.show.call(this, this.body); + Core.prototype.show.call(this, this.container); } Timeline.prototype.hide = function() { - Core.prototype.hide.call(this, this.body); + Core.prototype.hide.call(this, this.container); } diff --git a/WebKit/scripts/helper/Core.js b/WebKit/scripts/helper/Core.js index c3c3147..6d987ab 100644 --- a/WebKit/scripts/helper/Core.js +++ b/WebKit/scripts/helper/Core.js @@ -166,7 +166,7 @@ function(jQuery, Paths, URI, HostApp, Cache) { var template = this.getTemplate(); - template.item.id = "post-" + status.id; + template.item.id = "post-" + status.id + "-" + this.action; template.item.status = status; if (HostApp.stringForKey("entity") == status.entity && typeof status.__repost == "undefined") { @@ -183,6 +183,10 @@ function(jQuery, Paths, URI, HostApp, Cache) { template.remove.style.display = "none"; } + if (HostApp.stringForKey("entity") == status.entity) { + template.item.className += " own"; + } + template.reply_to.onclick = function() { var mentions = []; @@ -283,12 +287,7 @@ function(jQuery, Paths, URI, HostApp, Cache) { } template.message.innerHTML = this.replaceURLWithHTMLLinks(text, entities, template.message); - - // adding show search on click hash - $(template.message).find("a.hash").click(function(e) { - bungloo.search.searchFor("#" + e.target.innerHTML); - return false; - }); + this.afterChangingTextinMessageHTML(template.message) if (status.type == "https://tent.io/types/post/photo/v0.1.0") { @@ -373,7 +372,7 @@ function(jQuery, Paths, URI, HostApp, Cache) { Core.prototype.getRepost = function(repost, before_node) { - var post = document.getElementById("post-" + repost.content.id); + var post = document.getElementById("post-" + repost.content.id + "-" + this.action); if (post) { @@ -411,7 +410,7 @@ function(jQuery, Paths, URI, HostApp, Cache) { $(post).find(".reposted_by").show(); var li = $(""); - li.attr("id", "post-" + repost.id) + li.attr("id", "post-" + repost.id + "-" + this.action) var a = $(""); a.attr("href", repost.entity); @@ -713,12 +712,8 @@ function(jQuery, Paths, URI, HostApp, Cache) { + "" ); - // adding show profile on click node.innerHTML = new_text; - $(node).find("a.name").click(function(e) { - HostApp.showProfileForEntity(e.target.title); - return false; - }); + _this.afterChangingTextinMessageHTML(node); // adding comma between names when there is only // a space in between. @@ -816,7 +811,7 @@ function(jQuery, Paths, URI, HostApp, Cache) { var hash = /(^|\s)(#)(\w+)/ig; - return URI.withinString(text, callback).replace(hash, "$1$2$3"); + return URI.withinString(text, callback).replace(hash, "$1$2$3"); } Core.prototype.parseForMedia = function(text, images) { @@ -996,6 +991,20 @@ function(jQuery, Paths, URI, HostApp, Cache) { $(images).append(''); } + Core.prototype.afterChangingTextinMessageHTML = function(message_node) { + // adding show search on click hash + $(message_node).find("a.hash").click(function(e) { + bungloo.search.searchFor(e.target.innerHTML); + return false; + }); + + // adding show profile on click + $(message_node).find("a.name").click(function(e) { + HostApp.showProfileForEntity(e.target.title); + return false; + }); + } + return Core; diff --git a/WebKit/scripts/helper/HostApp.js b/WebKit/scripts/helper/HostApp.js index 50bcbe8..8fa8b3a 100644 --- a/WebKit/scripts/helper/HostApp.js +++ b/WebKit/scripts/helper/HostApp.js @@ -129,7 +129,10 @@ define(function() { } HostApp.osType = function() { - return OS_TYPE == "mac" ? "OS X" : "Linux"; + var os_name = "OS X"; + if (OS_TYPE == "windows") os_name = "Windows"; + if (OS_TYPE == "linux") os_name = "Linux" + return os_name; } HostApp.notificateViewsAboutDeletedPost = function(postId, entity) { diff --git a/WebKit/scripts/main.js b/WebKit/scripts/main.js index 8d783b9..39a90ab 100644 --- a/WebKit/scripts/main.js +++ b/WebKit/scripts/main.js @@ -110,6 +110,14 @@ var console = { function loadJsPlugin(js_url) { if (js_url) { + + requirejs.config({ + baseUrl: 'scripts', + paths: { + plugins: js_url.replace("Plugin.js", '') + } + }); + var js_plugin = document.createElement("script"); js_plugin.type = "text/javascript"; js_plugin.src = js_url; diff --git a/Windows/deploy.ps1 b/Windows/deploy.ps1 new file mode 100644 index 0000000..8441559 --- /dev/null +++ b/Windows/deploy.ps1 @@ -0,0 +1,12 @@ + +mkdir bungloo +Copy-Item ../Qt/* bungloo -Recurse +Copy-Item ../WebKit bungloo -Recurse +Copy-Item ../images bungloo -Recurse +Copy-Item setup.py bungloo +touch bungloo/__init__.py +Copy-Item msvcp90.dll bungloo +cd bungloo +python setup.py py2exe +cd .. +rm bungloo \ No newline at end of file diff --git a/Windows/installer.iss b/Windows/installer.iss new file mode 100644 index 0000000..4965a11 --- /dev/null +++ b/Windows/installer.iss @@ -0,0 +1,55 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "Bungloo" +#define MyAppVersion "1.3.0" +#define MyAppPublisher "Jabs Nu" +#define MyAppURL "http://jabs.nu/bungloo" +#define MyAppExeName "Bungloo.exe" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +; Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{5E44EE00-8ECE-40C8-AF6F-70397DD1DBFE} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={pf}\{#MyAppName} +DefaultGroupName={#MyAppName} +AllowNoIcons=yes +LicenseFile=C:\Users\Jeena\Documents\GitHub\Bungloo\LICENCE.txt +OutputBaseFilename=setup +SetupIconFile=C:\Users\Jeena\Documents\GitHub\Bungloo\images\Icon.ico +Compression=lzma +SolidCompression=yes + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 + +[Files] +Source: "C:\Users\Jeena\Documents\GitHub\Bungloo\Windows\bungloo\dist\Bungloo.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Users\Jeena\Documents\GitHub\Bungloo\Windows\bungloo\dist\library.zip"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Users\Jeena\Documents\GitHub\Bungloo\Windows\bungloo\dist\python27.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Users\Jeena\Documents\GitHub\Bungloo\Windows\bungloo\dist\w9xpopen.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Users\Jeena\Documents\GitHub\Bungloo\Windows\bungloo\dist\images\*"; DestDir: "{app}\images"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "C:\Users\Jeena\Documents\GitHub\Bungloo\Windows\bungloo\dist\WebKit\*"; DestDir: "{app}\WebKit"; Flags: ignoreversion recursesubdirs createallsubdirs +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + diff --git a/Windows/msvcp90.dll b/Windows/msvcp90.dll new file mode 100644 index 0000000..af6cc3d Binary files /dev/null and b/Windows/msvcp90.dll differ diff --git a/Windows/setup.py b/Windows/setup.py new file mode 100644 index 0000000..0ea0ceb --- /dev/null +++ b/Windows/setup.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python2 + +import os +from distutils.core import setup +import py2exe + +files = [] +for dirname, dirnames, filenames in os.walk('WebKit'): + for filename in filenames: + files += [(dirname, [os.path.join(dirname, filename)])] + +for dirname, dirnames, filenames in os.walk('images'): + for filename in filenames: + files += [(dirname, [os.path.join(dirname, filename)])] + +setup( + name = "Bungloo", + version = "1.3.0", + author = "Jeena Paradies", + author_email = "spam@jeenaparadies.net", + url = "http://jabs.nu/bungloo", + license = "BSD license", + data_files = files, + windows = ["Bungloo.py"], + options = { + "py2exe": { + "includes": ["sip", "ssl", "PyQt4.QtCore", "PyQt4.QtGui", "PyQt4.QtNetwork"], + "bundle_files": 2 + } + } + ) diff --git a/images/Icon.ico b/images/Icon.ico new file mode 100644 index 0000000..e386d9e Binary files /dev/null and b/images/Icon.ico differ diff --git a/images/Icon16.png b/images/Icon16.png new file mode 100644 index 0000000..765b5c8 Binary files /dev/null and b/images/Icon16.png differ diff --git a/images/Icon248.png b/images/Icon248.png new file mode 100644 index 0000000..83d5450 Binary files /dev/null and b/images/Icon248.png differ diff --git a/images/Icon32.png b/images/Icon32.png new file mode 100644 index 0000000..fed9bfc Binary files /dev/null and b/images/Icon32.png differ diff --git a/images/Icon48.png b/images/Icon48.png new file mode 100644 index 0000000..71dbc57 Binary files /dev/null and b/images/Icon48.png differ diff --git a/readme.md b/readme.md index 72227e2..6173013 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ Bungloo ======= -Bungloo is a slim Tent client for OS X and Linux written in mostly JavaScript. +Bungloo is a slim Tent client for OS X, Linux and Windows written in mostly JavaScript. For more info check out the Wiki page: https://github.com/jeena/Bungloo/wiki @@ -21,3 +21,4 @@ Thanks everyone in the Open Source community! Bungloo is using: - PyQt - http://wiki.python.org/moin/PyQt - Icon - http://www.fasticon.com - Linux monochrome icons - http://glyphicons.com +- py2exe - http://www.py2exe.org