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

Conversation

@nethip
Copy link
Contributor

@nethip nethip commented May 25, 2015

Brackets opens as a new instance, instead of using the existing running instance, if launched from command line without any arguments.

…e existing running instance, if launched from command line without any arguments.
@nethip
Copy link
Contributor Author

nethip commented May 25, 2015

@abose @petetnt Would you mind reviewing this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would happen to the unit test windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abose It still works even with the test window open. But that is not related to this PR as this PR just takes of not launching another version of Brackets instance, when launched from command line, but rather use the same version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it! 👍

@abose
Copy link
Contributor

abose commented May 25, 2015

Doesn't mac also behave the same way when launched from the commadline iwth args?

@petetnt
Copy link
Collaborator

petetnt commented May 25, 2015

First time trying to build the shell, followed this but grunt didn't throw any errors (but didn't build Brackets.exe) and Visual Studio Express (12.0) is giving me about 200 LNK2038 errors (Release target, Win32). Any ideas what's going wrong?

@nethip
Copy link
Contributor Author

nethip commented May 25, 2015

@petetnt Could you post what kind of linker errors you are running into? Also please make sure you have setup the system to build, as per the instructions mentioned here

@nethip
Copy link
Contributor Author

nethip commented May 25, 2015

@abose On Mac we use callbacks from apple script to do the command line parsing. Code wise, we do not use argv passed into main for parsing the command line arguments, instead we use the openFile and openFiles callbacks to pass the file names to Brackets.

@petetnt
Copy link
Collaborator

petetnt commented May 25, 2015

@nethip the errors look like this:

image

I did all the steps exactly as on the guide, except the Linker-step one as the service pack isn't (of course...) compatible with Visual Studio Express 2013. If I switch to target to Debug, this happens:

2>------ Build started: Project: Brackets, Configuration: Debug Win32 ------
2>  copy_resources
2>  Invalid number of parameters
2>  0 File(s) copied
2>  Copying appshell/node-core/ to Debug\
...
2>  Brackets.vcxproj -> D:\Koodaus\brackets-shell\Debug\Brackets.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 1 skipped ==========

For brevity, here's what grunt setup does:

Initializing
Command-line options: --verbose, --no-color

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK

Registering "tasks" tasks.
Loading "build.js" tasks...OK
+ build, build-installer, build-installer-linux, build-installer-mac, build-installer-win, build-linux, build-linux-archive, build-mac, build-win, build-www, full-build, git, installer, package, stage, stage-linux, stage-mac, stage-win
Loading "common.js" tasks...OK
>> No tasks were registered or unregistered.
Loading "set-release.js" tasks...OK
+ set-release
Loading "setup.js" tasks...OK
+ cef, cef-clean, cef-download, cef-extract, cef-symbols, cef-symbols-download, cef-symbols-extract, cef-symlinks, create-project, node, node-clean, node-linux, node-mac, node-win, setup

Registering "grunt-contrib-jshint" local Npm module tasks.
Reading d:\Koodaus\brackets-shell\node_modules\grunt-contrib-jshint\package.json...OK
Parsing d:\Koodaus\brackets-shell\node_modules\grunt-contrib-jshint\package.json...OK
Loading "jshint.js" tasks...OK
+ jshint

Registering "grunt-contrib-copy" local Npm module tasks.
Reading d:\Koodaus\brackets-shell\node_modules\grunt-contrib-copy\package.json...OK
Parsing d:\Koodaus\brackets-shell\node_modules\grunt-contrib-copy\package.json...OK
Loading "copy.js" tasks...OK
+ copy

Registering "grunt-contrib-clean" local Npm module tasks.
Reading d:\Koodaus\brackets-shell\node_modules\grunt-contrib-clean\package.json...OK
Parsing d:\Koodaus\brackets-shell\node_modules\grunt-contrib-clean\package.json...OK
Loading "clean.js" tasks...OK
+ clean

Registering "grunt-curl" local Npm module tasks.
Reading d:\Koodaus\brackets-shell\node_modules\grunt-curl\package.json...OK
Parsing d:\Koodaus\brackets-shell\node_modules\grunt-curl\package.json...OK
Loading "curl.js" tasks...OK
+ curl, curl-dir
Loading "Gruntfile.js" tasks...OK
+ default

Running tasks: setup

Running "setup" task

Running "cef" task
Skipping CEF download. Found deps/cef/cef_binary_3.2171.1902_windows32.txt

Running "node" task
Skipping Node.js download. Found deps/node/version-0.10.24.txt

Running "create-project" task
Building project files

Done, without errors.

@nethip
Copy link
Contributor Author

nethip commented May 25, 2015

@petetnt Thanks for posting all of the logs. I think we have not tasted the waters with Visual Studio 2013 yet 😄 as we are mostly using 2010. I will try to build this tomorrow in the office and see what I can do fix this issue.

@petetnt
Copy link
Collaborator

petetnt commented May 25, 2015

Thanks 👍 I'll see if I can get it to build myself too

edit: Tried Community Edition instead of Express (for Desktop) and results were the same

abose added a commit that referenced this pull request May 26, 2015
Fix for #11112: Command line: "brackets" without arguments always opens a new instance of Brackets
@abose abose merged commit bdc2d3a into master May 26, 2015
@nethip nethip deleted the fix-11112 branch May 26, 2015 08:49
abose added a commit that referenced this pull request Dec 8, 2015
Fix for #11112: Command line: "brackets" without arguments always opens a new instance of Brackets
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants