Skip to content

Commit

Permalink
Added bootstrap rake task and improved CLI usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Jan 19, 2011
1 parent 5830b97 commit fb448be
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 43 deletions.
4 changes: 4 additions & 0 deletions .gems
@@ -0,0 +1,4 @@
rake -v0.8.7
rubyzip2 -v2.0.1
POpen4 -v0.1.4
rails -v3.0.3
33 changes: 15 additions & 18 deletions README.md
Expand Up @@ -10,37 +10,33 @@ required prerequisites on a Windows system.

## How to Contribute

TODO - update README to contain - How to develop RailsInstaller using RailsInstaller. Push the specifics to the Wiki.
RailsInstaller is bootstrapped, built and packaged via rake tasks.

The entry point to the system is via Rake.
1. Download and install the latest RailsInstaller from
http://railsinstaller.org/

1. Download and install Install the Development Kit [DevKit]

2. Download and Install Ruby 1.8.7
2. Bootstrap the project, from the project root run

(1.8.7 recommended for maximum compatibility at this time)
> rake bootstrap
3. Install latest Inno Setup Quick Start Pack, ensure iscc.exe is in your PATH

2 3/16. [[ hackety hack... ]]


3. Use DevKit to build all components on the stage

> rake railsinstaller:build
http://www.jrsoftware.org/isdl.php#qsp

4. Install require gems:
4. [[ hackety hack... ]]

> gem install rubyzip2 rake rails

5. Install latest Inno Setup Quick Start Pack, ensure iscc.exe is in your PATH
5. Download and build all components on the stage

http://www.jrsoftware.org/isdl.php#qsp
> rake build
6. Use Inno Setup to package RailsInstaller

> rake railsinstaller:package
> rake package
7. Use the generated RailsInstaller.exe and be happy!
7. Use the generated RailsInstaller.exe, be happy and prosperous! Be
sure to share it with all of your friends!

### Development Kit (DevKit)

Expand All @@ -57,4 +53,5 @@ information.

### Packaging/Installer

We are using [Inno Setup](http://www.jrsoftware.org/isinfo.php "Inno Setup"), a free installer for Windows programs.
We are using [Inno Setup](http://www.jrsoftware.org/isinfo.php "Inno Setup"),
a free installer for Windows programs.
10 changes: 0 additions & 10 deletions rake/build.rake

This file was deleted.

3 changes: 0 additions & 3 deletions rake/default.rake

This file was deleted.

8 changes: 0 additions & 8 deletions rake/package.rake

This file was deleted.

52 changes: 52 additions & 0 deletions rake/railsinsatller.rake
@@ -0,0 +1,52 @@
task :default do
printf "\nRailsInstaller Rake Tasks:
{bootstrap, build, package}
See README for more details.\n\n"
end

task :require_railsinstaller do

require "railsinstaller"

end

desc "Bootstrap RailsInstaller development environment (gems)"
task :bootstrap do

require "rubygems/dependency_installer"

gems = File.read(File.join(ProjectRoot, ".gems")).gsub(" -v", ' ').split("\n")

gems.each do |gem|

printf "Ensuring #{gem} is installed...\n"

name, version, options = gem.split(/\s+/)

installer = Gem::DependencyInstaller.new(
{ :generate_rdoc => false, :generate_ri => false }
)

version ? installer.install(name, version) : installer.install(name)

end

printf "Bootstrapped.\nDo not forget to download and install InnoSetup: kj\n"

end

desc "Download and build all components and dependencies into stage/."
task :build => [ :require_railsinstaller ] do

RailsInstaller.build!

end

desc "Package all components into a single executable installer into pkg/."
task :package => [ :require_railsinstaller ] do

RailsInstaller.package!

end
8 changes: 4 additions & 4 deletions rakefile.rb
Expand Up @@ -6,16 +6,16 @@
# Ensure project root is in the LOAD_PATH
$LOAD_PATH.unshift(File.join(File.expand_path(File.dirname(__FILE__)),"lib"))

ProjectRoot = File.dirname(File.expand_path(__FILE__))

# Set Flags
$Flags = {} if $Flags.nil?
if Rake.application.options.trace
$Flags[:verbose] = true
end

# Load RailsInstaller
require "railsinstaller"

# Load all Rake Task definitions
Dir["#{RailsInstaller::Root}/rake/*.rake"].each do |rakefile|
Dir["#{ProjectRoot}/rake/*.rake"].each do |rakefile|
load rakefile
end

0 comments on commit fb448be

Please sign in to comment.