Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jamiecook/f35e726e1178b840446378866ddf1fce to your computer and use it in GitHub Desktop.
Save jamiecook/f35e726e1178b840446378866ddf1fce to your computer and use it in GitHub Desktop.

How to Install No-Install Bedrock

Bedrock now has a shiny new way of installation, that actually isn't an installation at all !!! Follow the steps below to make your way to the brave new world.

Remove the .rba files from Omnitrans

  • OT/plugin/rb
    • Delete 1_bedrock_configure_load_paths.rba
    • Delete zz_bedrock_config.rba

Prepare your project

[Optional] Get your locked BDK patched

The new system is generally very backwards compatible so it should be fine to use if you have previously been locking your bedrock versions, however if your locked BDK is older than November 2016, it will need to be patched to work with the Startup.rb tooling. Contact STEAM or equivalent and we'll do it for you.

Update your scripts

Each script now needs to declare the bedrock version it would like to use.

Add the following to the top of each script.

use_bedrock(915, 'D:/bdk/resources')

When the job is run, if that bedrock hasn't been downloaded yet, it will be downloaded into the project: [ot-project-folder]/bedrocks/[version]

It's possible to just use regular programming tools to avoid repeating the version number in scripts, eg.

jobs/settings.rb

use_bedrock(915, 'D:/bdk/resources')

And then in each job script:

require 'settings'

You could then have multiple Settings files (ZMRSettings vs RegularSettings, for example).

Jamie produced a small script which can apply this convention to all the scripts in a job directory to boot strap the process of converting the job scripts in a project. Make sure to backup your jobs folder before running it though :)

https://gist.github.com/jamiecook/559d49950e71b6586bc5d9b660f7d2f8

[Developers] Point at your development bedrock

There is also a function named use_bedrock_at in etc/Startup.rb, which can be used to load a bedrock at a file path:

use_bedrock_at('d:\bdk\bedrock', 'd:\bdk\resources')

[Developers] Update your rubymine settings

VlcInitialize has moved to bedrock/app/VlcInitialize.rb.

[Developers] Notes on Patching an OLD bedrock

  • Copy in a new init.rb from HEAD bedrock
  • Copy in a new ruby_process_spawner.rb and subby.rb from HEAD bedrock
  • You may need to remove calls to BE.set_resources_dir as that is a new method
  • Remove VlcInitialise.rb from <locked_bedrock>/etc/installer/developer-files/plugin/rb/ and copy the latest from HEAD into <locked_bedrock>/app
@cameronreid
Copy link

cameronreid commented Nov 23, 2016

Can we please have a tool which adds the use_bedrock line at the top of every script in a folder?

JC: Yes https://gist.github.com/jamiecook/559d49950e71b6586bc5d9b660f7d2f8

@ajmcmiddlin
Copy link

  • We should emphasise the settings.rb approach (put it first/remove naive approach), as I believe this should be the default
  • Is there any reason to have bedrock-downloader.exe in each project rather than sitting on PATH. If there's only one copy, there's only one place to update.

@jamiecook
Copy link
Author

@louisa-sorrentino and I worked through converting a 2 year old bedrock to the new system - all up took about an hour and required some changes to bedrock_environment and ruby_process_spawner/subby classes

A full diff of the changes we had to make is here:
https://s3.amazonaws.com/uploads.hipchat.com/77089/551066/wVOd9EHI4tw1Tqt/differences_recursive.txt

@cameronreid
Copy link

Can we change this:

You may need to remove calls to BE.set_resources_dir as that is a new method

to this?

Remove calls to BE.set_resources_dir in the new version of ruby_process_spawner.rb (resources directory will probably go back to being hardcoded in spawned processes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment