Category Archives: Shoes

Eventually

I know it seems like a long time since the last release – it has been a long time. Here is the deal, we were mucking around with command line stuff which is not cross platform by definition and is difficult to debug and test. A lot of that difficulty went away with the new cshoes launch scripts for OSX – I think I told you how great fix is?

Pretending to be a xterm console will get you into some dark places. Digging new tunnels in dark places is usually not a successful strategy for finding daylight. Dig I did.

Byebug was never well tested or used and with the old clunky osx launcher not all that usable. Shoes 3.3.2 is going to fix that. From the cshoes command line, `-d` will put you in byebug, pointing to some Shoes startup Ruby code. Set breakpoints in whatever file you intend to debug. ‘c’ and continue to it. Any args after -d are subject to normal shoes handling – so -d knows nothing about those extra args. You can debug the Ruby code of Shoes startup and processing this way or set a breakpoint on the file you want and let Shoes load it normally.

I’ve already mentioned the Shoes.terminal and it’s documented in the Shoes Manual now in case you need to change some appearance settings. Beta Time!

Yes, there are some known bugs. It’s a beta. You might find it useful.

Shoes 3.3.2: a pre-beta

I’ve uploaded the Shoes 3.3.2 binaries.

What’s new – damn near nothing. A font loading fix on Windows. If you happen to be a command line commando however, you might see some things that matter: A new Shoes.terminal to replace that brain dead Shoes.console. Many man hours (lot of many) were put into that creature. Which caused a long overdue rewrite of OSX terminal launch scripts. If you are an OSX command line person you’ll say “Thank you, Jesus!” But my name is Cecil and I have a lot of work to before 3.3.2 gets beyond this early beta. We also added a Fun but rudimentary profiler (caution: may not work on Windows).

With the new terminal code, you can run test/unit tests of your non-gui code without the command line if your willing to do some Shoes/Ruby level of work. I call it pre-beta because it is not complete enough to be a beta. If you’re using Shoes from the OSX command line – you want this not completely baked version of Shoes – you really do. It also fixes the multiple script open bug on OSX.

For OSX, it is not perfect but it is So Much better. You just get to the Cobbler (Maintain Shoes or -c) and create the cshoes script. If you’re driving Shoes from a textmate or applescript, you’ll need to update it to use cshoes instead of open’

Busy Busy

Never fear. There is work going on for Shoes 3.3.2 – but it’s edge case things, and bug fixes for stuff most people don’t care about. Yet, it has to be done.

There are so many OSX issues to fix. Since I don’t know what I’m doing in Cocoa and Objective-C, it’s taking a lot time. That said, I have made progress. Presumably, I’ve learned a lot about OSX. It is better on OSX.

What Bridge?

You might be wondering about whether any thing is happening with Shoes 3.3. Is there going to be a 3.3.2? What’s in it? Is anyone awake?

We don’t have a list of what’s in the next Shoes (3.3.2). As always, when developers don’t get feature requests then they work on their own pet peeves and the recently introduced Shoes Console was pretty lame when developers look at. A hack. A Useful hack but it could be much more useful. One developer wants to use it output results from Shoes tests and wrote a nice Shoes app to run test scripts on the internals of Shoes but the output was no where close to what a real terminal would display.

The code was particularly poor – I can say that, I wrote it! Clever but ugly. Developers care about ugly code. The first ugly is the Window was titled “Shoes Console” and we already had a “Shoes Console” – they are not the same. This one will be called Shoes Terminal. Arguably, the other Shoes Console, the one you alt-/ to, could have been renamed “Shoes Log”. On the gripping hand, The Shoes Terminal will actually do terminal things.

Inside Shoes, in the C code we had repurchased some dead and forgotten C from another project and as things often do, it might not have been the best choice. But after examining other projects to borrow from – it was not completely bad. So we fixed it to do better on Linux and possibly work better on Windows and be less offensive to the sensibilities of future C developers. That took time, a lot of time and it’s still not what I’d like although Linux is usable for many escape sequence emitting code that expects an xterm. Even works on Windows if you run cshoes.exe from the Windows dos console or msys.

And then we have OSX. At first glance, you’d think it would be like any other Unix, an assumption I mad when I hacked the current Objective->C implementation. Turns out, that wasn’t a good assumption. Shoes and OSX have always had some special “doesn’t fit the mold” problems. Shoes Terminal really highlights that special OSX experience.

There’s are deep OS river gorges Shoes has been crossing over with just a rope bridge over the rivers, swaying in the turbulent wind anchored to some wooden posts in the shifting banks. We can’t fix the gorge but we might be able to run a steel cable and put the pylons in concrete anchors. Not as easy as Xena runs across rope bridges.

So, we have been busy, working on things you may never see or use. Until you do. If you’re developer looking for a challenging bridge to cross, Shoes will provide that. Consider adding your skills. Embedded C Ruby in GUI of, Gtk, Cocoa, C, Objective C, Linux, OSX, Windows – we’ll never run out of fun.

Shoes 3.3.1 (finally)

There’s only minor changes since the last beta. Let’s set this puppy loose and see what doesn’t happen! Download from here

Windows Users – you must uninstall earlier versions of Shoes before installing 3.3.1.

Changelog:
New with 3.3.1

  1. Video widget. If you have VLC installed, Shoes will find it (and
    you can tell Shoes where your VLC is). Once found, you can use it.
    You can not package VLC with you script however.
    Issue 133
    Caution: may not work on OSX < 10.10
  2. Secondary packaging. Use a Shoes installer script to install your app. Not
    for the casual. Too damn clever so there’s likely to
    be bugs and confusion.
    What it is
    Also read
    Issue 188
  3. Uses Ruby 2.2.4. If you have native Gems that were built by earlier
    versions, they may not work. – Uninstall and reinstall the gem.
  4. Windows: Shoes comes with win32-shortcut gem. Undocumented and the
    online docs you do find are not always up to date.

Fixed with 3.3.1

  1. start {} blocks on stacks and flows work much better.
  2. Windows: does not use FONTCONFIG_FILE env var.
    Issue 216
    Benefits: Faster install, multiple installs, enables merge packaging
  3. Linux: fixed edit_box bug with Gtk >= 3.16
    issue 217
  4. OSX: don’t duplicate Shoes.app windows. Nasty if it happens to you.
    Cshoes suffered from this bug too. That works better now for OSX.
    Issue 190
    Issue 175
  5. Windows: ask_color crashes.
    Issue 209
  6. updated wiki article on building Shoes with Linux.
  7. remote debugger issue with newer byebug versions
    Issue 231

Developer issues for 3.3.1

  1. deleted gtk2 code. Video code is included.
    Some rakefiles were modified and are slightly less confusing.
  2. Windows: dependencies have changed – using Gtk 3.10.9
    Read more.
    Download from here if you need them – it’s a huge file!

Shoes runs on feedback and good intentions. Without feedback, we’ll do what we think is fun for us. Register your bugs or requests.

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.