-
Notifications
You must be signed in to change notification settings - Fork 19
Building Shoes on Linux
- You should not use the Ruby that comes with your Linux distro except for the next step.
- You should install rvm or a similar ruby manager.
- You will read the rvm instructions and setup your bashrc or bash profile.
- If you intend to create a Shoes that you can redistribute or embed (aka Tight Shoes) You must build Ruby from source or have rvm do it. Ruby must be built with the
--enable-load-relative setting
. It's not that difficult to build Ruby although you may have install other dependencies to get Ruby setup your way so that's kind of annoying. - You should build Shoes 3.2 with Ruby 2.1.x although Shoes 3.2 will work with 1.9.3 and up.
- Dependencies
- Building Loose Shoes
- Building Tight Shoes
- Building Ruby
- Outdated info that might be useful
There's no way to sugar coat this. It's annoying. It's very annoying and you'll probably fail a time or two and you have old instructions from here. That's just going to happen but You can work through it.
This pretty easy but tedious.
For example I've got a Ubuntu 15.10 Virtual Machine which doesn't have a lot of development stuff installed. Doesn't even have ruby.
sudo apt-get install ruby
That gets us ruby 2.1.5 which we can use to install rvm these instructions
sudo apt-get install gnupg2
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --without-gems="rvm rubygems-bundler"
source /home/ccoupe/.rvm/scripts/rvm
rvm list
Which tell us we don't any Rubies in rvm. We want 2.4 with some options.
rvm install 2.3.7 -C --enable-load-relative
That asks for your sudo password and then apt-get installs all kinds of dependent libraries and then it compiles Ruby - takes 10 minutes to so but it informs you of progress. Lets see what we have
$ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-linux]
$ gem list -l
*** LOCAL GEMS ***
bigdecimal (1.2.6)
bundler-unload (1.0.2)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
io-console (0.4.3)
json (1.8.1)
minitest (5.4.3)
power_assert (0.2.2)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
test-unit (3.0.8)
Now we need to get the Shoes dependencies - Gtk3 and cairo and ..... I'm using apt-get so it's going to be different if you are using yum/yast/pacman/... I also installed synaptic sudo apt-get install synaptic
but thats optional.
On Ubuntu, most of what you need can be isntalled with a sudo apt-get install libgtk-3-dev
which drags in Cairo and Pango and many other thing we need. We also need
sudo apt-get install libxml2-dev
sudo apt-get install libxslt1-dev
sudo apt-get install libcroco3-dev
sudo apt-get install librsvg2-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libgif-dev
We might need some more if Shoes fails to compile and link. Speaking of Shoes. Let's try it and see what happens. First a place for Shoes. I created a ~/Projects and cd into it, installed git and cloned Shoes
mkdir ~/Projects; cd ~/Projects
sudo apt-get install git
git clone https://github.com/Shoes3/shoes3.git
cd shoes3
Shoes uses a two step build, similar to './configure' and 'make' in spirit. rake -T
lists the tasks. We want
rake setup:minlin
or rake setup
for the minlin target.
Then shoes can be (re)built with a simple rake
.
Invoke shoes with
minlin/shoes
because that's where Loose Shoes lives Until you do rake install
it and you probably don't want to install this one.
Since Loose Shoes only uses the gems installed in the rvm Ruby you'll probably want to add some gems to that ruby
gem install ffi --no-doc
gem install sqlite3 --no-doc
gem install nokogiri --no-doc
gem install chipmunk --no-doc
gem install byebug --no-doc
gem install yajl-ruby --no-doc
gem install picky --no-doc
Yes nokogiri does take some time to build. Test with a simple minlin/shoes
and you should get the splash screen. It it's and empty screen, try alt-/ to get the Shoes console/log which should have some helpful error messages.
Quit and test with a minlin/shoes samples/good-cardflip.rb
` We do get a message on the terminal that 'vlc not at standard location' which is Shoes 3.3.1 beta saying you don't have VLC installed. It's optional unless you want Video/Audio widgets in Shoes.
sudo apt-get install vlc
That's the end of that lesson. You can even use gdb minlin/shoes
and set breakpoints because Loose Shoes has the symbols.
This is a Shoes (Linux) that you can package up and distribute to someone else. It's not as easy as a loose Shoes.
Have I told you to install rvm and get it working and then rebuild Ruby from source with -C --enable-load-relative
? It's essential. Check the rvm build logs to see what's been compiled into your Ruby.
You need to. Debian's (like Ubuntu) have schroot. You want it.
Shoes 3.2 uses the Ruby 'dbm' gem to maintain the downloaded image cache. Linux systems usually have something that Ruby can use. If not, you'll have to install gdbm and rebuild Ruby to find it.
One should note that in the following, ${SHOES_DIR}
is just wherever you want to install your shoes installation to. If you are unsure what to use, just use ~/shoes
here. You can make this file hidden (to keep your filesystem navigator from getting cluttered) by using "~/.shoes" instead.
Linux users should install dependencies through the distro’s package manager (these are the yum, apt-get and so on commands you will see below).
The following has been tested on Fedora 29. Also note when looking/searching for development libraries on Fedora usually and almost always the library package will be suffixed with devel
. For example ruby-devel
, vlc-devel
etc.
- Setup and install RVM visit: https://rvm.io/
After installing RVM
rvm --version # this should return the version number, we run this to verify rvm is working.
-
Now you can choose the ruby version you want to install, and wait for it to compile:
rvm install ruby-2.3.7 -C -enable-load-relative
-
Install C development dependencies:
sudo dnf install -y giflib-devel cairo-devel pixman-devel pango-devel libjpeg-turbo-devel gtk2-devel libcurl-devel librsvg2-devel giflib-devel ruby-devel
-
Setup environment:
$ git clone git://github.com/shoes3/shoes.git ${SHOES_DIR}
$ cd $SHOES_DIR
$ rake setup # defaults to minlin on linux.
$ rake
Also if you want to install VLC player and its development libraries you have 2 choices:
- you can either compile from source
- Or you can enable RPMFusion: https://rpmfusion.org/ (it's really simple its just enabling a new repo then you do a
sudo dnf install vlc vlc-devel
)
git clone git://github.com/shoes3/shoes.git ${SHOES_DIR}
cd ${SHOES_DIR}
gem install bundler
sudo apt-get install libcairo2-dev libpixman-1-dev libpango1.0-dev libungif4-dev libjpeg62-dev libgtk2.0-dev libsqlite3-dev libcurl4-openssl-dev portaudio19-dev ruby1.9.1-full rake
bundle install
rake
# Install dependencies
sudo apt-get install git-core libcairo2-dev libpixman-1-dev libpango1.0-dev libgif-dev libjpeg-dev libgtk2.0-dev libsqlite3-dev libxslt1-dev makeself libxslt-dev libxml2-dev
# Install RVM (see https://rvm.beginrescueend.com/rvm/install/ for detailed instruction)
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
source ~/.bash_profile
# Test RVM install (should output 'rvm is a function')
type rvm | head -1
# Install ruby and required gems
rvm install 2.1.5
rvm use 1.9.2
gem install bundler
# Clone Shoes source and build
git clone git://github.com/shoes3/shoes.git ${SHOES_DIR}
cd ${SHOES_DIR}
rvm use 1.9.2
bundle install
rake
- Older Ubuntus may get apt-get errors with portaudio19-dev, which was previously known as libportaudio19-dev.
git clone git://github.com/shoes/shoes.git
cd shoes
gem install bundler
bundle install
rake
There is a package available in AUR. If you have yaourt
installed, just
$ yaourt -S shoes-git
Otherwise, build it like any other package from the AUR.
Once installed (wherever you set #{SHOES_DIR}
to), you can run shoes by entering the command #{SHOES_DIR}/dist/shoes
.
If you would prefer a desktop link that will start shoes for you, you can create a custom application launcher which points to this command. In Ubuntu, you can do this by right clicking on the desktop and selecting "Create Launcher" from the drop-down. Enter in "Shoes" for the name and the command #{SHOES_DIR}/dist/shoes
into the "command" section. Note though that if you use a ~
in #{SHOES_DIR}
, you must replace that with the actual location of your home folder. If your username is bob
on the computer, then you would replace ~
with /home/bob/
in the command you enter into this field. Once you click "OK" you should be able to run shoes straight from your desktop. (You can also go through a similar process in order to make the application launchable from you Applications Menu).
Menu
In This Section:
- Shoes Rakefiles
- Rake files
- App.yaml secrets
- Custom.yaml
- Gems for Shoes
- Build with Vagrant
- Building Shoes on Linux
- Building Shoes on Pi2
- Mingw Dependencies
- Building Shoes on Windows
- Cross compile mingw
- OSX 10.10 Dependencies
- OSX 10.9 Dependencies
- OSX 10.6 Dependencies
- Caution Using brew 10.6
- Build-MinGW-with-OSX
- NSIS Installer for Windows
- MSYS2 cross compiling
- Cross-compile-for-arm-(raspberry)
- MXE-Dependencies
- FreeBSD and Shoes