-
Notifications
You must be signed in to change notification settings - Fork 618
Implement Brackets Portable Build on Mac and Windows #333
base: master
Are you sure you want to change the base?
Conversation
@JeffryBooher Thanks for your help in getting the Linux-side of this feature implemented. Basically, all that's needed is to implement the code similarly implemented in Specifically, we need a Linux implementation of ClientApp::IsPortableInstall(), which effectively just checks for the existence of a 'makePortable' trigger file, and updating ClientApp::AppGetSupportDirectory() to point to the application executable folder, rather than a machine-based settings folder, for a portable install. |
@bchintx @JeffryBooher Any progress on this PR? |
@ingorichter sorry. I haven't had time to look at it. @bchintx the Linux implementation of AppGetSupportDirectory is that thing that neither of us could remember last week :) It should be implemented now on Linux so you should give it a whirl. Let me know if you need help with the Linux implementation -- I'll review it once that is finished. |
@bchintx @JeffryBooher This a great PR and feature addition to Brackets. What is the current status of this, other than Linux support and file associations? I am a web design student and use Brackets for my work, and as I'm taking web animation using HTML, CSS, and JS starting in January, I'd love to have a portable installation of Brackets on my flash drive for use at school (since I won't have my laptop with me). 😃 |
I could really do with this also, @bchintx any news on the linux version as that seems to be blocking this from being merged? |
@bchintx @JeffryBooher I'd just like to say that this would be a really nice feature. What's left to do on this? |
@bchintx what's the plan for this? It seems that it can not be merged and I haven't heard any details about what we want to do with this. |
@JeffryBooher I've updated my branch with the latest changes from master, so it's mergeable again. This change is ready for review and testing on Mac and Windows. If we're ok with splitting off the Linux implementation separately, then this pull request could be merged sooner rather than later. Besides this code change, we'd probably also want to update the build machines to produce a portable .zip archive on Mac and Win and then update brackets.io to allow users to download the resulting archive. |
@bchintx You have no idea how glad I am to hear this news. :D |
} | ||
|
||
// Initialization helper -- | ||
// Loads the Restores data and positions the window in its previously saved state | ||
void cef_main_window::RestoreWindowPlacement(int showCmd) | ||
void cef_main_window::RestoreWindowPlacement(const int showCmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason to make this param const? ints are passed by value so even if the function modified it -- it would have no impact on the rest of the app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Practically speaking, yeah, it really doesn't make much difference -- mostly just one of those "Poh-TAY-toe", "Poh-TAH-toe" things. From the perspective of an API consumer, the const
modifier helps define the contract of how the parm is used. I'll remove it if it helps though -- ie. didn't really need to change it.
@bchintx done with first pass. let me know what your thoughts are on the comments and I'll start testing. |
@JeffryBooher thanks for the review. I'll make the requested changes when I return to my office next week and push a new commit for review. |
@JeffryBooher Done w/ code review changes. Should be working on both Mac and Windows again. The "trigger" file is now called |
std::wstring& filename | ||
#else | ||
std::string& filename | ||
#endif //OS_WIN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment here is probably a tad redundant, as each clause only contains a single statement and the condition for the clause is a mere four lines above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove.
I am really looking forward to this landing soon after 1.0 for multiple reasons, but also because this could help out with the auto-update user story. :D |
Updated branch with requested changes and with latest |
FYI- I think we could go ahead and merge this now. That would allow users to create their own portable build installations. Ideally, we'd distribute the portable build as an archive available off of http://brackets.io. However, at this point, we probably shouldn't hold up this PR for any upcoming build machine or website changes. |
Is anyone working on this?? |
I agree. The schematics can be worked out after it is merged, it's not like the code here depends on how it is packaged and released. @bchintx Quick thought, is there a reason Linux is not supported in this PR, or is the Linux version already "portable" in the sense it requires no installation? |
@le717 Good point. These changes would need to be made in the Linux shell as well. However, I don't have a Linux dev environment in which I could easily port these changes. Without these changes, then, yes, the Linux build is just "portable" as the app is already today. However, these changes allow the preference settings to be transportable with the install onto different machines. |
+1. FYI, per the trello card, this workaround does the trick until an official solution is implemented (replace with your own values): msiexec /a Brackets.Release.1.2.msi /qb TARGETDIR=C:\App\Brackets |
I guess we are still waiting on a official solution? Is @avindra solution the best way? |
Soooo... what is happening here? Obviously Linux support has never been added, but then again Linux is historically behind Windows and Mac (see: CEF 2127). I do not think Linux-only code is imperative to finally land this code, and as @bchintx said, the exact release schematics are not required before this is eventually landed. An official portable Brackets build would still be a very nice thing to have. |
Will this change allow installation without admin rights? |
Allows Brackets to be run (eg. from removable media, such as a thumb drive) on any Mac or Windows computer without having to first be installed on that computer. Implements "Portable build" user story.
To set up a portable build onto a removable media storage device, follow these steps:
That's it! You can now run Brackets from that removable media on any other Mac or Windows machine.
Note: you can copy both a Mac and Windows portable build onto the same removable media. However, please be sure to create two different folders into which you copy each platform's build.
When launched, Brackets will check for the existence of the 'makePortable' file, alongside either the .app or .exe. If it exists, then the following will occur during program execution: