Skip to content

Instantly share code, notes, and snippets.

@strathmeyer
Created January 28, 2012 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strathmeyer/1695639 to your computer and use it in GitHub Desktop.
Save strathmeyer/1695639 to your computer and use it in GitHub Desktop.
Mulberry on Win7
install RailsInstaller from http://railsinstaller.org/
clone mulberry from github. run install.sh
run bundle install
gem install evergreen
(may not be necessary. I did it to try to get the tests working, but rake kept complaining about not finding it)
install chromedriver.exe, add to path
create a .bat in /cli/bin that contains something like:
@"ruby.exe" "C:/Dev/mulberry/cli/bin/mulberry" %1 %2 %3 %4 %5 %6 %7 %8 %9
(works on win7.. you’ll need more voodoo to work on NT. check the bat files in C:\RailsInstaller\Ruby1.9.2\bin)
modify guid.rb per http://stackoverflow.com/questions/6579787/guid-causes-cant-find-random-device
I changed /[^r]win/i to /i386-mingw/i because that’s what RUBY_PLATFORM showed for me
/**** BEGIN ******/
/* installing curl.exe and libarchive probably isn’t necessary, because I install dojo manually below */
install curl.exe for windows, add to path
http://www.paehl.com/open_source/?download=curl_723_1.zip
install libarchive (bsdtar), add to path, copy the bsdtar.exe and rename to tar.exe
http://sourceforge.net/projects/gnuwin32/files/libarchive/2.4.12-1/libarchive-2.4.12-1-setup.exe/download
/***** END *****/
***************************************************************************************
THIS WILL GET mulberry scaffold WORKING
***************************************************************************************
go ahead and create a scaffolded app
Now we need to get DOJO installed. You should probably skip to the “SHORT WAY” instructions.
INSTALL DOJO LONG WAY:
mulberry\build\js.rb edit line 113 to echo the URL for dojo:
@build.log("Downloading and extracting Dojo from #{dojo}. JavaScript goodness is a few minutes away.", 'info')
run: mulberry serve
it will try to download dojo and fail, but it will create a (mostly empty) directory at mulberry\app\dojo-release-x.y.z-src
however, in the output you can see the file it was trying to download (for me it was http://download.dojotoolkit.org/release-1.6.0/dojo-release-1.6.0-src.tar.gz)
download http://download.dojotoolkit.org/release-1.6.0/dojo-release-1.6.0-src.tar.gz unzip it and install the result in mulberry\app\dojo-rele....etcetcetc
INSTALL DOJO SHORT WAY:
download http://download.dojotoolkit.org/release-1.6.0/dojo-release-1.6.0-src.tar.gz unzip it and install the result in mulberry\app\dojo-release-1.6.0-src\
This will work until Mulberry updates their dojo dependency. In that case, use the long instructions to get the correct URL and local path.
END DOJO INSTALL
Now we need to hack the build script. You can probably skip down and use the “GITHUB WAY”..
HACK BUILD SCRIPT MANUAL WAY:
edit mulberry\cli\env.rb line 5 to be:
when /mswin|windows|mingw/i
edit mulberry\builder\js.rb lines 202-213 to:
if Mulberry::Env.host_os == :windows
build_script = 'build.bat'
location = Pathname.new(@location).relative_path_from(Pathname.new(Dir.pwd)).to_s
prefix = ''
else
build_script = 'build.sh'
location = @location
prefix = './'
end
system %{#{prefix}#{build_script} profileFile=#{PROFILE_FILE} releaseDir=#{location} #{'> /dev/null' if !@build.settings[:verbose]}}
GITHUB WAY:
grab https://github.com/strathmeyer/mulberry/tree/mingw
***************************************************************************************
THIS WILL GET mulberry serve AND scaffold WORKING. FOR mulberry test AND deploy READ ON
***************************************************************************************
install the android sdk
direct link: http://dl.google.com/android/installer_r16-windows.exe
general link: http://developer.android.com/sdk/index.html
it will require you to install the JDK if you don’t have one yet:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Probably not necessary, but why not make sure ‘adb’ is on your path: http://www.addictivetips.com/mobile/what-is-adb-and-how-to-install-it-android/
comment out line 220 of mulberry\builder\project.rb
#adb = %x{which adb}.chomp
and replace it with a direct link to adb.exe (path on my system shown for reference. your path may be different):
adb = 'C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe'
***************************************************************************************
THIS SHOULD GET mulberry test AND mulberry deploy TO WORK
***************************************************************************************
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment