Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added bootstrap rake task and improved CLI usage.

  • Loading branch information...
commit fb448be023acafe4a7f4d6d7142796a9e58653db 1 parent 5830b97
@wayneeseguin wayneeseguin authored
View
4 .gems
@@ -0,0 +1,4 @@
+rake -v0.8.7
+rubyzip2 -v2.0.1
+POpen4 -v0.1.4
+rails -v3.0.3
View
33 README.md
@@ -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)
@@ -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.
View
10 rake/build.rake
@@ -1,10 +0,0 @@
-namespace :railsinstaller do
-
- desc "Build all RailsInstaller components and dependencies."
- task :build do
-
- RailsInstaller.build!
-
- end
-
-end
View
3  rake/default.rake
@@ -1,3 +0,0 @@
-task :default do
- puts "Help:"
-end
View
8 rake/package.rake
@@ -1,8 +0,0 @@
-namespace :railsinstaller do
-
- desc "Package all RailsInstaller components into a single executable installer."
- task :package do
- RailsInstaller.package!
- end
-
-end
View
52 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
View
8 rakefile.rb
@@ -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
+
Please sign in to comment.
Something went wrong with that request. Please try again.