Google Gears

563 views
Skip to first unread message

Jordan

unread,
Apr 10, 2012, 6:40:45 AM4/10/12
to Gears Users
Some years ago I developed an application for resizing and uploading
images to my server using
google.gears.factory.create('beta.desktop');
google.gears.factory.create('beta.canvas');

Recently, Google Gears arrived to end of life, stopping new functions
development.
Last week, google geas api stoped publishing, and my app stoped
working too. I had some technical problems for replacing gears.
We use this app in an restricted engine, it doesn't support HTML5 nor
Java, but supported Gears perfectly.

I select files with the input type=file (that is not multifile with
some IE versions, the most used in our offices),
read the contect of the images, but I need to put in a canvas for
resizing and uploading them breaking in chunks
I doesn't found any canvas.decode function to read the Blob file as an
image.

There is any place where to download the old APIs ? I can't access the
code
<script type="text/javascript" src="http://code.google.com/intl/es-ES/
apis/gears/gears_init.js" ></script>
As the main page sais "The code itself will of course remain open
source, and anyone is free to use it."

Željko Mitrović

unread,
Apr 10, 2012, 8:16:37 AM4/10/12
to gears...@googlegroups.com
Check your e-mail. I attached zip with gears JS
---
Željko
http://skitanja.blogspot.com/

"you can't stay young forever...
but you can be immature for the rest of your life"
Unknown

Jordan

unread,
Apr 10, 2012, 11:03:31 AM4/10/12
to Gears Users
Thanks Željko,

but I think that its also dissabled at google api or other libraries
(I also tried downloading gears_init.js last week)

<script type="text/javascript" src="http://www.google.com/jsapi"></
script>
<script type="text/javascript" src="http://www.mydomain.com/js/
gears_init.js" ></script>

var desktop = google.gears.factory.create('beta.desktop');
Uncaught TypeError: Cannot read property 'factory' of undefined

Željko Mitrović

unread,
Apr 11, 2012, 12:17:02 AM4/11/12
to gears...@googlegroups.com
Well you can always host it on your own server....

---
Željko
http://skitanja.blogspot.com/

"you can't stay young forever...
but you can be immature for the rest of your life"
Unknown



Jordan

unread,
Apr 11, 2012, 3:16:04 AM4/11/12
to Gears Users
I would try to host the files is I am abble to found gears source code

Jordan

unread,
Apr 11, 2012, 3:57:33 AM4/11/12
to Gears Users
I have found the source code for gears.

svn checkout http://gears.googlecode.com/svn/trunk/

this command will download the source code, after this, I need to do a
makefile whit any parameter ?
what kind of file I will obtain ?

Željko Mitrović

unread,
Apr 11, 2012, 4:01:14 AM4/11/12
to gears...@googlegroups.com
You lost me there pal. All I ever needed is gears_init.js file and it is pretty easy to put it on your server and address it instead of some external file.

---
Željko
http://skitanja.blogspot.com/

"you can't stay young forever...
but you can be immature for the rest of your life"
Unknown



Kevin Layman

unread,
Apr 11, 2012, 4:09:23 AM4/11/12
to gears...@googlegroups.com
gears_init.js installed the gears plugin from google's servers which
is no longer an option.

You will either have to hire someone to create a similar installer on
your internal system or switch your users to Firefox portable 3x which
can install gears via it's extensions/plugins mechanism.


On Wed, Apr 11, 2012 at 3:01 AM, Željko Mitrović <the.d...@gmail.com> wrote:
> You lost me there pal. All I ever needed is gears_init.js file and it is
> pretty easy to put it on your server and address it instead of some external
> file.
>
> ---
> Željko
> http://skitanja.blogspot.com

Željko Mitrović

unread,
Apr 11, 2012, 4:15:32 AM4/11/12
to gears...@googlegroups.com
AHA! Now I understand you! I'm just sorry that I can't be much of a help to you since I'm only JS developer :(


"you can't stay young forever...
but you can be immature for the rest of your life"
Unknown



Jordan

unread,
Apr 11, 2012, 6:41:49 AM4/11/12
to Gears Users
I tried to replace with the HTML5 objects, I select files from a input
file multiple, and for each I get the blob of the image (I select
images JPG). Process the image, and then upload as chunks to my
server.

The remaining task is the resizing functions.

I can't put the file in a img object as the file is local, not network
file, then I have to create a canvas context to put the image in, but
the canvas object hasn't the canvas.decode from gears. Any workarround
on how to doing these conversion ?

put the blob in a canvas object, and draw the full size canvas to
another canvas with the size required.
then with canvas.toBlob extract the image info and upload as normal to
my server.
Reply all
Reply to author
Forward
0 new messages