Category Archives: Ruby

OSX Merge packaging

Now we are complete. I guess. Maybe. OSX users can build an installer (a dmg) that
packages their script dir with their Shoes. In theory they, don’t need Xcode to do it. Here’s my Ytm demo app installer on OSX. First we have to click through the license.
osx-uela
and then we can drag my app to Applicationsosx-install

If your first reaction is “that is one butt ugly installer!”, then I agree with you. It’s butt ugly. for a purpose. Like exe-shoes and linux-shoes You, not me have to make it pretty because it’s your code and your users. All I did was give you some structure to work with to build your own installers for your own app for your own users.

I’m not going to do much more on Merge packaging for any platform because it’s not something I care deeply about. That’s your task if you accept it.

Take away:
You don’t have to build Shoes from source and install the dev tools to build a ‘Real app’ and an custom native installer for it that hides Shoes. You have been empowered!

Linux Merge Packaging

This is a different project at Github.
Like the one for Windows, this merges your Shoes App into a copy of Shoes, removes things you don’t want users to get to or know about like the manual, or Cobbler or packaging. For linux this means your app will installed in /usr/local/[lib|bin] or /usr/[lib|bin|]. Your choice. Any gems need by your script will be inside the ruby in your app. Because you decided what gems to include. No need to code Shoes.setup and have your users wait for it to download – you’ve included them. If you want a menu entry and and an Icon to match, it’s your choice.

There are implications you may not have thought of and there’s a long list of bewares and much testing for you because you have choices and responsibilities for those choices. Neither I nor Shoes will make those choices for you. There’s no GUI to make it appear simple. Because it’s not simple. It’s not overly hard but it’s not simple.

Currently it only builds .deb and Ubuntu 14.04 likes them but Ubuntu 15.10 whines about something in the maintainer field (and then installs it if you tell it too). That’s a setting you control and obviously you have to test for the platforms you care about. Maybe you need a .ppa and an account with Ubuntu. Every platform and distribution now days has it’s rules. Shoes can’t do that for you. You may have to modify the scripts to do what you want. ‘rpm’ is an easy option. Other formats (arch, suse …) just slightly more difficult once you know the packaging tools and read the script – it’s only 210 lines of ruby.

Shock! Another 3.3.1 Beta

Early release aficionados rejoice! There is a new beta (dated 2016-03-20) here which fixes a crash in some situations in the video handling. (memory pointer free at the wrong place in time)

Speaking of video, we’ve slightly simplified the use. Now, only require 'shoes/videoffi' is required so delete Vlc.load_lib in your scripts after installing the new beta. There are code attempts in there to not do it twice but why tease the Gods?

A problem has been reported for Video on OSX 10.9.5 (Mavericks) but seems to be localized to that OSX version. The audio plays, but no video is shown, just the black box. OSX 10.10 doesn’t have that problem.

LASTLY, as stated before, using 3.3.1 BETA to package is just asking for confusion. I’ll also note that packaging is now 100% ruby code, albeit very confusing code which you can read for yourself to see what’s going on. It’s just scripts included in every Shoes.

Merge Packaging

You might be familiar with Packaging a Shoes script or directory (.shy). You had two choices Should Shoes be included or should Shoes download itself on the users system. I call those repack (include) and dnlif (download if needed). It a way to Install Shoes on the users system and then run your script (or .shy) You could do it from any platform for any platform (a 5x5x2 matrix)

You might notice that is kind of what virus do, only they don’t ask for permission. Windows 10 does not like the repack style and they probably only tolerate dnlif because no one has flagged it (and because the Mozilla/Firefox installer does the same thing). There are voodoo dead chicken dances that users could go through and it might work.

From a slightly different direction, some folks would prefer Shoes would not be shown to their end user (and side installed for all to see). They’d like to to have some control over the Windows installer (images, shortcuts and so on). That was only possible if you built Shoes from source which was never easy for Windows or OSX and full of hidden gotcha’s since Ruby 1.9.3. The old HacketyHack program( aka HH) did a style of packaging where it copied/replaced/modified Shoes source and build a new program but that packaging style disappeared in Shoes 3.2. It had it’s own rakefiles the used arcane entry points in the Shoes rakefiles. It had it’s own NSIS installer script for Windows.

Do you see two vecters pointing into one solution? I did and I call it merge packaging. If you have Shoes installed on your Windows machine and all them gems you want the end user to have then that could be merged with your scripts and your nsis installer scripts. Voolah! . Which only works if use Shoes/Windows 3.3.1 (the beta) or better. It’s not really a part of Shoes because it’s platform specific. It only runs on Windows and only builds for Windows. And it’s not GUI – you’ll have to use the Windows command line. But, It works!! It solves the Win-10 problem and you can exert as much control of the install experience as you’re will to do.

There’s no GUI although you could write one buts its kind of low benefit/high cost to you or me since you’ll be modifying the installer to do what you want. As an example, the exe-shoes project has a copy of my YTM sample code which requires the ‘rubyserial’ native gem installed on the packaging system. Just to demonstrate.

One could imagine an OSX version (mostly creating the dpg/dmg and the plists) and Linux versions (.deb, .rpm …. the fpm gem can do that). Like Windows, those would only be a template for you to start with because if you want to hide Shoes you need to do it your way, not mine. Your name, your webserver, your installer, your credentials at the app stores(s) or linux repo’s. Shoes can’t provide that for you script. That’s on you. I’m happy to work with anyone trying to do those things or fill in the missing pieces (OSX & Linux) but it not really Shoes infrastructure so it not going to happen unless there willing contributers.

Beta or Release 3.3.1

What is the difference? For Shoes, not much. It’s pretty arbitrary. In the case of 3.3.1 there are a few bugs/features that we want to fix before we say done. But there’s some features we think you want to look at so, 3.3.1 is available for beta download.

Features:

  1. Video Widgets. You must have a recent VLC downloaded and installed in it default location, versions 2.1.x or 2.2.x. If Shoes finds it, it enables you to use the new code. Please try the sample/expert-video-play.rb for a great example of what it can do. Since its Shoes/Ruby code you’ll want to study it before you write your own.
  2. Secondary Packaging – This is too odd to describe here so read the wiki
    articles This one and this too.
  3. For Windows, a better way of dealing with Fonts. This needs some more testing so you can help. Aside from a faster install it will be easier/faster to test packaged scripts on the same box. This is a precursor to a way to package apps and pretend to hides Shoes from the user. As always, uninstall older Shoes first before installing 3.3.1
  4. Ruby 2.2.4 – Beware this may require you to update binary gems that you installed into Shoes.

The Changelog is always the last thing to get updated. Or is it the manual? One of them is the last.

There is one gotcha with betas. If you package a Shoes app or script with the beta, it’s going use the older 3.3.0 unless you know how to change it (you can but then have to remember to undo that when you get the real Release.

It happens

I got busy chasing Shiny Things like new bug reports and then went even deeper into some long standing ‘if only you knew’ arcane things and I forgot I’m supposed to release 3.3.1. In my defense, I am becoming more Windows knowledgeable and some of those arcane bugs are really hard. None of which would actually matter to getting Shoes 3.3.1 out of the door, usable for most people.

That’s a personal failing. I was trying to make it perfect and get some other bugs fixed. That and the new features like Video and secondary packaging are not so easy to understand, document or debug. But it is documented in the manual (thanks to passenger94) and at the wiki and I’m always going to get lost chasing shiny things.

With a whimper. Shoes 3.3.0

It’s released. For better or worse. I think better. Look at the changelog

Walkabout – Shoes 3.3

The name reflects back to when Shoes creator why_the_lucky_stiff disappeared
from the internet. He went walkabout! We changed some icons and backgrounds
to reflect that whimsical theme.

Walkabout (3.3) will be less compatible with the unmaintained 3.1 and not really released yet 4.0 (jRuby), We have interesting ideas of we what we do with Shoes that maybe very difficult to implement in Shoes 4.

New with 3.3.0

  • Uses Gtk3 (not gtk2) for Linux and Windows. This will change visuals on both platorms.
  • add font and wrap styles for list_box. A popular request – we are limited to what Gtk3 can do, however. The default behaviour for long strings in the list box is now to
    ellipize … in the middle. THIS could effect your current apps.
    Issue 109 https://github.com/Shoes3/shoes3/issues/109
  • A new Svg widget to display svg images – similar to Image but
    NOT really the same. Has aspect scaling options based on the svg internals. See samples/good-svgview.rb. samples/good-flip.rb and the manual. We also include a svg deck of playing cards. It’s a bit fragile so please file bug reports and ask for feature requests.

    • Very verbose Issue 54 – https://github.com/Shoes3/shoes3/issues/54
    • Pay attention to the OSX workaround #178 https://github.com/Shoes3/shoes3/is
      sues/178
    • Preliminary save and export methods:
      Issue #177 https://github.com/Shoes3/shoes3/issues/177
  • add a refresh slot method
    Issue 152 https://github.com/Shoes3/shoes3/issues/152
  • Uses ruby 2.1.7 or 2.1.8 and rubygems 2.4.7+
    Issue 164 https://github.com/Shoes3/shoes3/issues/164
  • New splash screen (no animation).
  • Added samples/good-image-rotate.rb because it’s fun to watch.
    Issue 157 – https://github.com/Shoes3/shoes3/issues/157

Fixed with 3.3.0

  • OSX – do not use home brew to manage dependecies.
    wiki: https://github.com/Shoes3/shoes3/wiki/OSX-10.9-Dependencies15
    wiki: https://github.com/Shoes3/shoes3/wiki/OSX-10.6-Dependencies
  • Remove pango-querymodules from OSX. Yay!
    Issue 156 – https://github.com/Shoes3/shoes3/issues/156
  • Uninstall Shoes menu item for Linux (for some window managers)
    Issue 31 – https://github.com/Shoes3/shoes3/issues/31
  • repaint after slot remove
    Issue 151 – https://github.com/Shoes3/shoes3/issues/151
  • Windows: 256×256 icons failed when packaging.
    Issue 10 – https://github.com/Shoes3/shoes3/issues/10
  • developer name and RVM and linker info gets embedded in
    binary libraries. No solution worth the effort.
    Issue 66 – https://github.com/Shoes3/shoes3/issues/66
  • Windows: fontconfig problems if you build shoes and download shoes
    Issue 141 – https://github.com/Shoes3/shoes3/issues/141

Yes, we have been busy beavers. Next up is Shoes 3.3.1. It will be Amazing Too! You’ll get tired of how awesome Shoe 3.3 will be. Shoes will be great Again!

Getting closer – Shoes 3.3.0

There’s just a few more things to finish before Shoes 3.3.0 (WalkAbout) is finished. In fact its good enough for folks who like to poke at new things and leave some feedback. So, there are beta downloads.

There are numerous big fixes and a couple of new features. One popular request is to do something that can shrink long strings in list_box. OSX does a wonderful job at this but Linux and Windows don’t. In 3.3.0 you can set the font for a list_box and you can create a two line entry if you specify a wrap: option which shows two lines of the string with some control on wrapping. The default without wrap is show the first part an ellipsis … and the last part of the long string. That effects existing Shoes programs visually. If long strings is a problem for you, try the beta and let us know if it’s good enough or unsatisfactory. Of course you’ll have to read the manual for what the options details are.

The other new feature is the ability to load and display Svg files and keep them in vector format. You also get some Svg unique methods for managing aspect and drawing a (sub)group in an Svg file. This is actually a brand new widget for Shoes 3.3.0 which took us a long time do correctly. It only looks like an Image. We also included two good sample programs and a deck of playing cards so after reading the manual, you can read the sample code and get familiar with what could be done. If you study the samples you’ll notice an OSX work around. It’s only a beta! We know that bug exists.

And the artwork has changed and – that’s enough for now.

Too dumb for my Shoes – 3.2.26 is osx only

No sooner than when I said Shoes was moving to 3.3, I got a complaint that recent OSX builds of 3.2 don’t work on OSX 9. As is often the case, the bug report was correct. 3.2.25, 3.2.24. and probably 3.2.23 don’t work on 10.9 – they do work on 10.10 but not everybody chooses to update and I promised 10.9. I failed and that must be repaired.

If you don’t care about how or why: There is a Shoes-3.2.26 for OSX. It was built on 10.9 and works for 10.9 and above. If you package a script or app for OSX that’s what it’s going to use on the end-users system. You’ll might notice it is 14MB in size instead of the usual 16MB.

I’ve also built the same Shoes on 10.10 (Yosemite) only its called Shoes 3.3.0 and available at the beta download site

The root problem was I’ve been updating my OSX system (now Yosemite) and xcode and more importantly, I did a ‘brew update’ and ‘brew upgrade’ which is when things really broke. By design brew updates to the latest packages and some of the latest don’t work on 10.9 and there is no way to remove an upgraded package by version number in brew. So I did what I do for building Shoes on Windows (and the we don’t talk about snow leopard build): Build my own dependencies. Don’t use brew. Don’t use rvm.

That was not an easy road nor is it the fast road. But I did it. It’s frozen in stone. 10.9 won’t change and those deps won’t change (unless there are bugs in them that matter). While I was at it, I built ruby 2.1.7 from source and stuffed rubygems 2.4.7 in it. It does not use rvm to install or build that Ruby, just like it didn’t use brew. While that was a very long process (2 days times 3 because that’s how many times I had to start and build every thing from scratch). There are benefits.

Shoes 3.3 is about new infrastructure and really pushing forward. For OSX, I cleaned up the rake files although there is always more to do for that task. The download size is 14MB so it’s about the same size as some Linux builds. No unused X11 libraries inside. No brew or rvm hangovers. I learned some things (X 3)