shoes / furoshiki

Distribute Ruby GUI apps easily.
https://github.com/shoes/furoshiki
Do What The F*ck You Want To Public License
36 stars 6 forks source link

Update to Furoshiki template #17

Closed tlemburg closed 9 years ago

tlemburg commented 9 years ago

After the issues being had in #16, as well as the issue I was having over in #1071, I looked at updating the shoes app template for packaging for Mac. Since it seemed that the JDK used in the template was causing the problem that @justahero and I were running into, I updated to the newest JDK, 1.8.0u40, and used @justahero 's instructions in #16 to fix it. I also was able to pare down the template to just use the JRE instead of the whole JDK, as justified by this article which uses the AppBundler. If you look, it says

By default, only the contents of the jre/ directory will be included with the bundled application. All executable content (i.e. bin/, jre/bin/) is excluded. Additional content can be included or excluded using nested and elements, respectively.

So I have a new template uploaded to my dropbox at https://www.dropbox.com/s/dy4egm5itccfubm/shoes-app-template-0.0.2.zip?dl=0, which has just the JRE portion of that JDK included. I tested packaging apps with it by unzipping it and placing that template into my cache directory, which since I wasn't using ENV['FUROSHIKI_HOME'], was ~/.furoshiki/cache/. Then furoshiki thinks it doesn't need to download it. The packaged app worked on machines that did and did not have the JDK/JRE installed (and it worked every time).

I think to merge this in we should put the new template into @wasnotrice 's S3 bucket. Unfortunately, with the new JDK version, it seems to be a bit bigger than the old template, even though I pared it down to just the JRE. The zip is over 100 MB. :( I know package size is still a concern as referenced in #9, but I'm not sure what to do in this case as the previously bundled JDK was causing problems.

Thanks @PragTob for pointing me in the right direction to work on this.

PragTob commented 9 years ago

Hi @tlemburg ! Thanks for the work! :)

So yeah, Travis fails as this isn't on the S3 yet and therefore we can't access it. Is it okay for you to upload or should we look for another solution?

wasnotrice commented 9 years ago

I can get this new file squared away with S3. Thanks!!!

tlemburg commented 9 years ago

@wasnotrice , I think the file is saying Access Denied on S3. Once we get that fixed I can add some comments and commit to restart the Travis build.

PragTob commented 9 years ago

@tlemburg you don't have to commit, Eric and I should be able to restart the build once this is sorted out :)

wasnotrice commented 9 years ago

Digging into this today. First thing I noticed was that the new template seems to have 2 JREs, which explains why it's so much bigger. When I unzip the shoes-app-template-0.0.2.zip, I get a shoes-app-template.app and also a Contents, which seems to be a copy of what's contained in the .app

dingo:temp eric$ du -hd1 .
155M    ./Contents
155M    ./shoes-app-template-0.0.2.app
311M    .

I totally get how this could happen, because I've done it myself with this very task :)

So, the good news is that new packages shouldn't be quite as big as they seemed. Working through a few issues getting this new version set up with furoshiki, but wanted to post back on progress :)

Thanks again!!!

PragTob commented 9 years ago

Thanks for the update @wasnotrice ! :)

PragTob commented 9 years ago

Hey, can I help somehow with the progress of this? :)

jasonrclark commented 9 years ago

Hey all! In the interest of getting pre4 together, did a quick try locally myself to slim the zip down as @wasnotrice mentioned to tighten things up. Although the template is still larger than before (58MB), as he noted it's about half what it was.

File is at https://www.dropbox.com/s/l8c8jw3xwz7xpge/shoes-app-template-0.0.2-jason.zip?dl=0

@tlemburg any chance you could test with this file and confirm it works for you?

@wasnotrice were there other things you were seeing that needed fixing here? If that zip looks okay, could we get it uploaded to the bucket? On that note, are you happy to keep hosting it, or would you rather we find somewhere else to put things?

wasnotrice commented 9 years ago

@jasonrclark @PragTob sorry for the inactivity here. As I worked with the new template, I started to get into some related issues of how/where we create intermediate files and got bogged down :)

Happy to host the file. It's at https://s3.amazonaws.com/net.wasnotrice.shoes/wrappers/shoes-app-template-0.0.2.zip. I think the shoes core team should have r/w access to this bucket, so lets connect about that out of band.

@tlemburg thanks for kickstarting this. I cherry picked your commits into #18