senny / cabbage

get the maximum out of emacs
http://senny.github.com/cabbage/
156 stars 21 forks source link

Simple windows install batch file #144

Closed my8bird closed 12 years ago

my8bird commented 12 years ago

Here is a simple batch file which follows the steps I needed when I installed cabbage on my machine. It asks where to install at then does it work.

Additionally, it will backup the old .emacs.d and can be run again to update an installation of cabbage.

senny commented 12 years ago

thanks for the contribution! @lord-executor also submitted an installation Script for windows. Could you please discuss, which one we should bring into cabbage?

@my8bird, @lord-executor: I don't use windows, so I have no Idea which PR is more polished. I hope you find the time to look over both contributions and give me feedback which one to use.

The other is #145

Thanks.

my8bird commented 12 years ago

I don't think it would fair to make arguments about which is easier to read as I don't know power shell and I obviously understand what I wrote. However, here is a bullet list of what I see as factors. The two key ones IMO are legacy support and backing up the users old emacs configuration.

144 Batch File

Pros:

Cons:

145 PowerShell

Pros:

Cons:

lord-executor commented 12 years ago

My opinion of that matter is certainly warped by my personal experience. I've always found batch scripts cryptic and hard to understand - most of the code is usually used to work around some fundamental missing feature. That's why I jumped on to the PowerShell train as soon as I became aware of it and I try to push every Windows developer in that same direction. (If you don't know PowerShell yet, I really recommend you take a look at it. It takes some getting used to, but there's a lot of cool things in there ;)

The main drawback of PowerShell is just as you pointed out: you have to install it first. However, if you use VisualStudio or other M$ tools, chances are that it's already been installed as part of your developer tools.

As for the rest, the two scripts are mostly equivalent. The PowerShell script also creates a backup of the config, but it is missing update functionality right now which I plan on delivering as soon as I find the time. The last point to mention is that as I wrote in the updated documentation it is possible to run the PowerShell script directly without having to first download the script manually analogous to the 'curl' approach:

> (new-object Net.WebClient).DownloadString("https://raw.github.com/senny/cabbage/master/scripts/install.ps1") | iex

Personally I don't think this is necessarily an either/or situation. There's enough reasons in my opinion to have them both in the repository and let the user decide which one to use.

senny commented 12 years ago

@lord-executor sure we could add both scripts but cabbage is an oppinionated project. We deliver a configuration, that we think works very well. I think we should have an opinion, how to install the package on windows. I also think, that it will be hard enough to keep the unix and windows version in sync and I don't really want to maintain a third version.

lord-executor commented 12 years ago

@senny That's perfectly understandable. And as you can see from the wording of my readme changes, my opinion on that matter is fairly obvious - if you're a developer on Windows and you don't have PowerShell, you're doing it wrong. The problem with opinions is that they're just that; a personal view on the facts. Therefore it is very hard (next to impossible) to agree on an opinion. Just like the OS "wars" (which OS is best - Linux) or the shell "wars" (bash, of course ;) once you've picked a side, it is fairly unlikely that this is going to change.

So, the real question is: Whose opinion is better in your opinion? I think we both presented all the relevant facts, so you can either form your own opinion and pick that, or you can solve it with your meta-opinion - which one of the two pull requesters (@my8bird or me) you prefer. :)

senny commented 12 years ago

@jone thoughts on this one?

jone commented 12 years ago

@senny not sure about this one, since I'm not really a windows user. But I try to express my thoughts ;)

The batch script has the advantage that its running on older windows versions too (if I'd ever need to do something with windows it would be clearly good old XP), but I see that PowerShell is the modern way.

So I have some questions with the aim to help approach a good decision:

  1. As cabbage user, do I care in which language the script is written? I mean it could be written in Brainfuck as long as it works ;) (sorry if I'm too harsh, it's not meant offensive)
  2. How bad is it to require the user to install power shell first? Do we gain benefits (as git is installed or unix-like executables)? Is power shell availale standalone and free and can we point a link to the download page?
  3. How will the install script be maintained? I'd like to not be personally responsible for maintainig the windows installation in lack of testing options ;)
  4. How is the script call for the batch script? The readme is not updated in this pull request. Is a single line command possible without manually checking out the git repo first, as it is possible with both the bash and the power shell script?

hope it helps ;)

cheers

quickstar commented 12 years ago

Hi

I would definitely recommend using the powershell implementation. It’s a lot more powerful than the old classical batch way, easier to read and maintain. If you are a windows developer and familiar with C# and the .NET framework, then it’s relatively easy to understand the powershell scripting syntax and off course you can use every class from the .NET framework for free.

lord-executor commented 12 years ago

@jone

  1. I completely agree (and I am not offended at all)
  2. PowerShell is a standalone and free application that just happens to come bundled with VisualStudio and other M$ tools. I can add the download liks to the readme.
  3. Of course, the maintenance of the install script should be done by somebody who understands it and has the necessary setup to actually test it. I of course volunteer for that job.
  4. I've wondered that myself. I've never seen an approach like that for batch scripts due to the lack of useful system tools (curl, wget or similar), but that doesn't mean that it's not possible, just that I don't know how.
my8bird commented 12 years ago

@jone @quickstar @senny @lord-executor I have updated the readme with the steps as I had thought it could work in the batch case. To the maintenance of the script I more than willing to work on it as needed.

Sorry for the delayed response, we had a new baby yesterday.

jone commented 12 years ago

@my8bird congratulations! I whish your baby and your family all the best!

I think the batch installation is not too complicated either. Best would be if you ( @my8bird and @lord-executor ) could agree on one way it should be done and maintain it together, although I see the technological difficulties. :/

I don't know how to proceed. @senny what do you think?

I'll be probably offline for the next few days in lack of Internet connection and time ;)

lord-executor commented 12 years ago

@my8bird congratulations indeed!

That's like trying to agree on what the best team in sport X is (where X is any sport you happen to care about). Developers tend to identify very strongly with the tools they're using, and I'm not about to start, or try to resolve a religious war. Nuff said.

senny commented 12 years ago

@my8bird congratulations!

This discussion has been ongoing for far too long without any progress. I've made up my mind and I'm going to merge the PowerShell version. Cabbage is opinionated and I feel Windows users using PowerShell are too. You can still install everything manually if you don't like the script or PSH.

@my8bird thanks for your contribution. Can you please post your batch file to a gist? I will then link to it in the README. If people complain about not being able to use the batch-script from within the repository we reconsider.