Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Merging master to release branch, will undo version bump in next PR #670

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions appshell/appshell_extension_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class AppShellExtensionHandler : public CefV8Handler {
CefString& exception) {

// The only messages that are handled here is getElapsedMilliseconds(),
// GetCurrentLanguage(), GetApplicationSupportDirectory(), and GetRemoteDebuggingPort().
// GetCurrentLanguage(), and GetApplicationSupportDirectory().
// All other messages are passed to the browser process.
if (name == "GetElapsedMilliseconds") {
retval = CefV8Value::CreateDouble(GetElapsedMilliseconds());
Expand All @@ -170,8 +170,6 @@ class AppShellExtensionHandler : public CefV8Handler {
retval = CefV8Value::CreateString(AppGetSupportDirectory());
} else if (name == "GetUserDocumentsDirectory") {
retval = CefV8Value::CreateString(AppGetDocumentsDirectory());
} else if (name == "GetRemoteDebuggingPort") {
retval = CefV8Value::CreateInt(REMOTE_DEBUGGING_PORT);
} else {
// Pass all messages to the browser process. Look in appshell_extensions.cpp for implementation.
CefRefPtr<CefBrowser> browser = CefV8Context::GetCurrentContext()->GetBrowser();
Expand Down
3 changes: 3 additions & 0 deletions appshell/appshell_extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "update.h"

extern std::vector<CefString> gDroppedFiles;
extern int g_remote_debugging_port;

namespace appshell_extensions {

Expand Down Expand Up @@ -842,6 +843,8 @@ class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate {
uberDict->SetList(0, dirContents);
uberDict->SetList(1, allStats);
responseArgs->SetList(2, uberDict);
} else if (message_name == "GetRemoteDebuggingPort") {
responseArgs->SetInt(2, g_remote_debugging_port);
}

else {
Expand Down
4 changes: 2 additions & 2 deletions appshell/appshell_extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ if (!brackets) {
* @return int. The remote debugging port used by the appshell.
*/
native function GetRemoteDebuggingPort();
appshell.app.getRemoteDebuggingPort = function () {
return GetRemoteDebuggingPort();
appshell.app.getRemoteDebuggingPort = function (callback) {
GetRemoteDebuggingPort(callback || _dummyCallback);
};


Expand Down
25 changes: 24 additions & 1 deletion appshell/cefclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <cstdlib>
#include <sstream>
#include <string>
#include <errno.h>
#include "include/cef_app.h"
#include "include/cef_browser.h"
#include "include/cef_command_line.h"
Expand All @@ -19,6 +20,7 @@
#include "config.h"

CefRefPtr<ClientHandler> g_handler;
int g_remote_debugging_port = 0;

#ifdef OS_WIN
bool g_force_enable_acc = false;
Expand Down Expand Up @@ -95,7 +97,28 @@ void AppGetSettings(CefSettings& settings, CefRefPtr<CefCommandLine> command_lin
command_line->GetSwitchValue(client::switches::kJavascriptFlags);

// Enable dev tools
settings.remote_debugging_port = REMOTE_DEBUGGING_PORT;
CefString debugger_port = command_line->GetSwitchValue("remote-debugging-port");
if (!debugger_port.empty()) {
const long port = strtol(debugger_port.ToString().c_str(), NULL, 10);
if (errno == ERANGE || port == 0) {
LOG(ERROR) << "Could not enable remote debugging."
<< " Error while parsing remote-debugging-port arg: "<< debugger_port.ToString();
errno = 0;
}
else {
static const long max_port_num = 65534;
static const long max_reserved_port_num = 1025;
if (port >= max_reserved_port_num && port <= max_port_num) {
g_remote_debugging_port = static_cast<int>(port);
settings.remote_debugging_port = g_remote_debugging_port;
}
else {
LOG(ERROR) << "Cannot enable remote debugging on port "<< port
<< ". Port numbers should be between "<< max_reserved_port_num
<< " and " << max_port_num << ".";
}
}
}

std::wstring versionStr = appshell::AppGetProductVersionString();

Expand Down
2 changes: 0 additions & 2 deletions appshell/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@

#endif

#define REMOTE_DEBUGGING_PORT 9234

// Comment out this line to enable OS themed drawing
#define DARK_UI
#define DARK_AERO_GLASS
Expand Down
4 changes: 2 additions & 2 deletions appshell/mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.14.0</string>
<string>1.15.0</string>
<key>CFBundleShortVersionString</key>
<string>1.14.0</string>
<string>1.15.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
Expand Down
4 changes: 2 additions & 2 deletions appshell/version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,14,0,0
FILEVERSION 1,15,0,0
/* PRODUCTVERSION 1,0,0,0 */
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
Expand All @@ -42,7 +42,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "brackets.io\0"
VALUE "FileDescription", "\0"
VALUE "FileVersion", "Release 1.14.0\0"
VALUE "FileVersion", "Release 1.15.0\0"
VALUE "ProductName", APP_NAME "\0"
VALUE "ProductVersion", "\0"
VALUE "LegalCopyright", "(c) 2012 Adobe Systems, Inc.\0"
Expand Down
2 changes: 1 addition & 1 deletion appshell/version_linux.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define APP_VERSION "1.14.0.0"
#define APP_VERSION "1.15.0.0"
2 changes: 1 addition & 1 deletion installer/mac/buildInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# config
releaseName="Brackets"
version="1.14"
version="1.15"
dmgName="${releaseName} Release ${version}"
format="bzip2"
encryption="none"
Expand Down
2 changes: 1 addition & 1 deletion installer/win/brackets-win-install-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ default="build.mul">
<!-- See also: product name definitions in Brackets_<locale>.wxl -->
<property name="product.shortname" value="Brackets"/>
<property name="product.release.number.major" value="1"/>
<property name="product.release.number.minor" value="14"/>
<property name="product.release.number.minor" value="15"/>
<property name="product.release.number.build" value="0"/>
<property name="product.version.number" value="${product.release.number.major}.${product.release.number.minor}.${product.release.number.build}"/>
<property name="product.version.name" value="Release ${product.release.number.major}.${product.release.number.minor}"/>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Brackets-Shell",
"version": "1.14.0-0",
"version": "1.15.0-0",
"homepage": "http://brackets.io",
"issues": {
"url": "http://github.com/adobe/brackets-shell/issues"
Expand Down