Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX/Linux Support #26

Closed
wants to merge 9 commits into from
Closed

OSX/Linux Support #26

wants to merge 9 commits into from

Conversation

mattclements
Copy link
Contributor

Enables OSX & Linux Support, and included a Build Script for both OS's in order to produce:

  • Zip File of .app file for OSX (Standard way to supply an application)
  • Zip File of required files for Linux + .deb file for Ubuntu/Debian (however this I still have to test, and will then look at RPM's for CentOS etc)

@mattclements
Copy link
Contributor Author

Also the Beta Version of OSX can be found here:
http://www.mattclements.co.uk/prepros/Prepros_1.3.0-beta.zip

And I have added a building.md file with details of how to build for OSX/Linux

@TuckerWhitehouse
Copy link

@mattclements Just downloaded, and the application won't launch... (tried rebooting and still nothing :/) OS X 10.8.3

@Subash
Copy link
Owner

Subash commented May 21, 2013

@mattclements thanks for hosting Prepros. I have done some code changes on my local git repo to make it easier to port across platforms but I was unable to push it to github due to heavy raining and unavailablity of electricity and internet at my place so please give me some time.

@kushalpandya
Copy link

@mattclements We already have an open issue for Linux port, and I've already made it to work on Ubuntu. Ya, packaging remains, but there are some issues that we need to fix and make it stable on Windows before we roll out Linux builds. Mac OS X port is in the list but not a priority for now. Also, we bundle ruby binaries within installer (which will also be the case on Linux) but this may not be needed for Mac where ruby is comes pre-installed (only gems installation will be required).

@mattclements
Copy link
Contributor Author

@kushalpandya Thanks for the comments - I agree with regards to the Linux Port, from my initial testing this one that I have rolled should work with Linux without any issues, and I am committed to help fix any issues with the project.

I have rolled the Linux/OSX Port out of "need" for this - at work I currently use a competitor's product on OSX (you know which one), but we have some new staff starting that want to use Windows/Linux - my work on this project is to allow us to all use the same tool.

Using git submodules for the Ruby Gem's allows a common link between our repository, and those of SASS, Compass etc - updating these is as simple as updating the Git Submodules. I have a few ideas to look such as:

  • Auto calculating the Version Numbers on building (as at present these are hard coded in the package.json file)
  • Working out the best way to package for Linux (could roll OSX into this process). I am thinking of either: .deb/.rpm files etc - and then providing these to Ubuntu/CentOS etc for their Repo hosting; or an install SH script that you run a single command across any OS, and this runs the required installation.
  • Changing the updater for Linux/OSX Support

Also bundling ruby is an interesting one... For Windows I totally agree, for OSX it is not needed (1.8.7 comes on OSX as standard and is enough to run the gem's required). For Linux this depends on the installation method we choose - Hosting within apt-get/yum etc could either require a dependancy on ruby (therefore installing will ask you to install this too); an Install Script could run the apt-get/yum on your behalf to install ruby first. I am a little against bundling ruby - as this means that the installation includes a ruby version that we must always maintain/update both the exe file, and the Linux binary before every update.

@kushalpandya Have you got a forked repository of this working on Ubuntu as I can have a look at this and merge those changes into my build.

@TuckerWhitehouse Thanks for the feedback, probably to do with a nasty sh script that I have had to put in to avoid a node-webkit bug. Is Prepros.app copied to your Applications folder? If so could you try running the following in Terminal, and paste the output into a new gist and post back here:

/Applications/Prepros.app/Contents/MacOS/launch-prepros

Then also try:

/Applications/Prepros.app/Contents/MacOS/Prepros --disable-gpu

@mattclements
Copy link
Contributor Author

@sbspk No problem - Drop me an email (matt@mattclements.co.uk) and I will I will set you up with FTP Access so that you can upload new versions there yourself

Also no problem regarding those commit's, if you push them and let me know when they are on the master branch, I will rebase my code

@kushalpandya
Copy link

@mattclements I do have forked repo, but I wasn't messing with code within repo while making it work on Ubuntu (lot of dirty work there) but you can refer to my first comment on the same issue I'm talking about which includes the details of what I did to make it work.

Ya, on Linux we'll have to think of a more viable way to package. Since during my experiment, I had to install lot of dependencies just to install ruby by compiling it from source. Including pre-compiled binaries of ruby within a .deb or .rpm may restrict down the installer support on various architectures itself and will also lead to giant installer size (add around 70 MBs just for ruby). And other case is where developer may not be using RoR-based development at all and still may want to use Prepros.

Regarding your comment on "changing updater for Linux and Mac", I'm not getting what you're pointing too. We have chrome extension already available. I'm already working on Firefox extension from the same code-base (in fact working on that right now ;) ), both of which should work on either of OSs.

@mattclements
Copy link
Contributor Author

@kushalpandya Cool - I think we are on the same page with this! Yeoman once used a really awesome script to install their package as follows: https://github.com/tomlane/Yeoman-scripts/blob/master/scripts/old-installer.sh

You would run as follows:

curl -L get.yeoman.io | bash

I was thinking of a simular thing for OSX/Linux and would allow the detection, and simple installation of Ruby using apt-get/yum etc

The "changing updater for Linux and Mac" is nothing to do with the Chrome/FF Extension, but rather the current check for update which does the following:

  • Calls update.json from About Page
  • Presents user with link to go to website to update

Just need to think this out loud to work out the best way of updating within OSX/Linux.

I think we should provide:

  • .exe file to download for Windows
  • .zip file containing .app for OSX
  • Install Script to curl for Linux (due to this being the most "difficult" in terms of installing with different package managers, distro's etc).

Thoughts?

@Subash
Copy link
Owner

Subash commented May 21, 2013

I have updated main branch with portable code so can you please take a look again ?

@Subash
Copy link
Owner

Subash commented May 21, 2013

@mattclements Please use curly braces because code must pass jsHint tests.

@mattclements
Copy link
Contributor Author

Sorry about that! Do you want me to squash my commit's to one commit?

@mattclements
Copy link
Contributor Author

P.S. Please don't pull this yet - as I would like feedback from @TuckerWhitehouse with regards to the issue before we pull

@Subash
Copy link
Owner

Subash commented May 21, 2013

It's ok. No need to send all commits at once.

@Subash
Copy link
Owner

Subash commented May 21, 2013

@mattclements You have vacation responder turned on.

@mattclements
Copy link
Contributor Author

Ok - I know, sorry about that! I have just corrected the dates on this as I am actually off for another week! Just working on this while i'm off :)

Subash pushed a commit that referenced this pull request May 21, 2013
@Subash
Copy link
Owner

Subash commented May 21, 2013

I have added keyboard shortcuts for OSX.

@mattclements
Copy link
Contributor Author

Awesome thanks! Should be bind both (Windows/Linux are ok, but OSX both Ctrl + Cmd would be bound (I think thats ok...)

Subash pushed a commit that referenced this pull request May 21, 2013
Easier to install dependencies with npm install. #26
@TuckerWhitehouse
Copy link

@mattclements well, this is gonna sound silly, I had a copy of node-webkit I was playing around with, and had named Prepros (in my downloads folder), then downloaded your .zip, and extracted, and Mac renamed the application to "Prepros 2", which caused launch to fail (i'm guessing your script relies on the name of the application being "Prepros") so once I moved it to Applications and renamed it, it appeared to launch successfully :)

@kushalpandya
Copy link

@TuckerWhitehouse This would work without any surprise if you have your fork of Prepros in sync with upstream, since changes in code to make it platform-independent are already done. The only concern here is how app is working actually, especially where ruby is involved.

@TuckerWhitehouse
Copy link

@kushalpandya Thank you, I'll fork later and check it out :)

@mattclements
Copy link
Contributor Author

@sbspk We should be ok to merge this then :)

@Subash
Copy link
Owner

Subash commented May 22, 2013

There have been lots of changes here so I think we should first release version 1.4 then I will merge this.

@Subash
Copy link
Owner

Subash commented May 22, 2013

Can you please merge your repo with upstream so it would be easy for me to pull it. I am sorry because this is my first git project and I am complete n00b.

@mattclements
Copy link
Contributor Author

@sbspk I did sorry, will rebase with Master now

@Subash
Copy link
Owner

Subash commented May 22, 2013

We should use same gems for all platforms.
Also bundle ruby in linux.

@mattclements
Copy link
Contributor Author

@sbspk Agreed, and is it a good idea to bundle Ruby with Linux - will we need 32 and 64 bit versions?

@Subash
Copy link
Owner

Subash commented May 22, 2013

I think bundeling 32 bit is enough because it works in both 32 and 64 bit platforms.

@kushalpandya
Copy link

Or we can have different installers for both platforms, since even node-webkit has different binaries for both.

@Subash
Copy link
Owner

Subash commented May 22, 2013

There is no point adding any overhead if 32 bit works.

@Subash
Copy link
Owner

Subash commented May 22, 2013

@mattclements What about using https://github.com/visionmedia/node-growl for linux and osx.

@kushalpandya
Copy link

@sbspk Looks like node-growls development is not as active as that of node-webkit, even the last pull-request it received is 3 months old.

@Subash
Copy link
Owner

Subash commented May 22, 2013

@kushalpandya I think we can rely on node-growl because the developer behind that is pretty strong.

@kushalpandya
Copy link

@sbspk Agreed, but the projects he has are far more important than that of node-growl, would be great if he joins in for Prepros. I went through the details of project, looks like it has better GNOME integration than nw. 👍

@jadsonlourenco
Copy link

You know the AppJS (http://appjs.org/) he can create the GUI for the three operating systems with ease, and can also add modules of Node and Ruby, so you already have everything you need to run application without the need to install these modules.

Then just pack into AppJS for "EXE, APP and DEB / RPM" for installation.
PS: The systray is still AppJS lagacy for linux.

Just an idea to have Prepos for all operating systems most used in an easy way, in my view.

@sillero
Copy link

sillero commented May 23, 2013

Regarding the suggestion by @jadsonlourenco, I would say TideSDK seems more mature

@kushalpandya
Copy link

@sillero Didn't knew Wunderlist uses it, seems great option. 👍

@Subash
Copy link
Owner

Subash commented May 23, 2013

Tidesdk was the first option that I considered while developing Prepros but I left it because.

  • Tidesdk doesn't support node modules
  • The webkit it uses is premitive.
  • It's slow and laggy.

I tried appjs but many things like child process doesn't work well.

I think node-webkit is the best one and It also supports all the three platforms.

@jadsonlourenco
Copy link

@sbspk:

TideSDK is older but very limited. node-webkit is the best currently.

But what I mean is that using a framework thus facilitate the migration to all platforms. Right now I tried using Linux but I could not, I need to change the paths and adjust some things. But you guys telling me which path will follow to create a version for Linux I can help.

@mattclements
Copy link
Contributor Author

Closing this for now to delete/re-add my repository and rework :)

@mattclements mattclements deleted the osx-support branch May 24, 2013 19:47
@Maxhodges
Copy link

There isn't really any significant merit for everyone to use the "same" pre-processor on different operating systems. Just use LiveReload on Mac. The whole point of pre-processors is that different developers can use whatever languages they want, and it will convert seamlessly to whatever standard was decided for the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants