librelist archives

« back to archive

[shoes] Problem with win7 x64 package cache

[shoes] Problem with win7 x64 package cache

From:
Christian K.
Date:
2010-11-09 @ 20:34
Hi,

I'm using the latest shoes. When i try to package a new app (in a
single file), it works well. When I then change something (e.g. a line
of code, or a label of a button) and try to package it, the changes
are not there. It uses still the first version of the file.

It works as  I rename the file.

The problem wont be solved by deleting the .shoes folder. So there
must be another cache folder. I looked through the shoes source but
theres no incident.

Any ideas?

thanks.

Christian

Re: [shoes] Problem with win7 x64 package cache

From:
Steve Klabnik
Date:
2010-11-10 @ 04:24
Hey Christian-

I poked around, but I couldn't find anything either. I'm not super up on the
packager, and I only have a Mac, so I can't quite test it...

Cecil, thoughts? I've never heard of this being a problem before.

-Steve

Re: [shoes] Problem with win7 x64 package cache

From:
Cecil Coupe
Date:
2010-11-10 @ 04:44
IMO, it's a Windows cache problem (as Christian suspects).  I had/have
the same problem on XP. Windows caches the myscript.exe in some place I
never remember. Use the file search thing to find it. Wastebox, empty
and if needed, reboot. Maybe ashbb knows? 

There's another cache issue that you can run into on Windows, Linux and
probably OSX where the downloaded script believes you have already have
Shoes installed so it doesn't install over the older Shoes. 

Those are two different problems, all platform specific.

On Tue, 2010-11-09 at 23:24 -0500, Steve Klabnik wrote:
> Hey Christian-
> 
> 
> I poked around, but I couldn't find anything either. I'm not super up
> on the packager, and I only have a Mac, so I can't quite test it...
> 
> 
> Cecil, thoughts? I've never heard of this being a problem before.
> 
> 
> -Steve

Re: [shoes] Problem with win7 x64 package cache

From:
Steve Klabnik
Date:
2010-11-10 @ 05:20
Hm. Okay. I'll see if I can reproduce this on OSX while I'm fixing
https://github.com/shoes/shoes/issues#issue/62

Re: [shoes] Problem with win7 x64 package cache

From:
Cecil Coupe
Date:
2010-11-11 @ 04:40
On Wed, 2010-11-10 at 00:20 -0500, Steve Klabnik wrote:
> Hm. Okay. I'll see if I can reproduce this on OSX while I'm fixing
> https://github.com/shoes/shoes/issues#issue/62

That should have been fixed with the merge of ashbb's branch a day or
two ago.

Re: [shoes] Problem with win7 x64 package cache

From:
Cecil Coupe
Date:
2010-11-10 @ 05:42
On Wed, 2010-11-10 at 00:20 -0500, Steve Klabnik wrote:
> Hm. Okay. I'll see if I can reproduce this on OSX while I'm fixing
> https://github.com/shoes/shoes/issues#issue/62

I'm guessing $ shoes -p has a different context than the menu. That's
why I left it for Ashbb to debug. Try the command line. pack.rb has
three or more entry points - yes it's ugly.

Re: [shoes] Problem with win7 x64 package cache

From:
ashbb
Date:
2010-11-10 @ 14:28
Hi Christian, Cecil, Steve and folks,

I think this Christian's problem is a known behavior. I'm not sure this is a
bug or restriction, but Shoes 2 and 3 are the same on Windows.

Once you create your app.exe file with Shoes packager you launched by `shoes
-p`, then change your app source code, and again create new app.exe. Shoes
creates new app.exe correctly.

But when you run the app.exe file,
- if there is no app.rb file under the TEMP directory, Shoes takes out
app.rb from app.exe file.
- if there is already app.rb file under the TEMP directory, Shoes just run
the file, not take out app.rb again from app.exe file.

I guess the code is shoes/platform/msw/base.nsi. But sorry, I can't read.
Looks like shell script???

So, there is no need to delete .shoes directory, but need to delete app.rb
file under the TEMP directory.

ashbb

ps. TEMP is a environment variable. app.rb is your app file name.

Re: [shoes] Problem with win7 x64 package cache

From:
Christian K.
Date:
2010-11-10 @ 21:29
Hi Cecil, ashbb, and Steve

thanks for your help.

ashbb:
I found the ruby files within %temp%. I deleted them and tried again
and it worked. :)

This habit seems really unpretty. Are there any attemps to fix it?
Wrote a little Cleanup Script App Workaround.


Christian



2010/11/10 ashbb <ashbbb@gmail.com>:
> Hi Christian, Cecil, Steve and folks,
>
> I think this Christian's problem is a known behavior. I'm not sure this is a
> bug or restriction, but Shoes 2 and 3 are the same on Windows.
>
> Once you create your app.exe file with Shoes packager you launched by `shoes
> -p`, then change your app source code, and again create new app.exe. Shoes
> creates new app.exe correctly.
>
> But when you run the app.exe file,
> - if there is no app.rb file under the TEMP directory, Shoes takes out
> app.rb from app.exe file.
> - if there is already app.rb file under the TEMP directory, Shoes just run
> the file, not take out app.rb again from app.exe file.
>
> I guess the code is shoes/platform/msw/base.nsi. But sorry, I can't read.
> Looks like shell script???
>
> So, there is no need to delete .shoes directory, but need to delete app.rb
> file under the TEMP directory.
>
> ashbb
>
> ps. TEMP is a environment variable. app.rb is your app file name.
>
>
>
>

Re: [shoes] Problem with win7 x64 package cache

From:
ashbb
Date:
2010-11-10 @ 22:17
> Are there any attemps to fix it?
Not yet.
As I mentioned in the previous post, I can't read
shoes/platform/msw/base.nsi :
https://github.com/shoes/shoes/blob/develop/platform/msw/base.nsi

ashbb

Re: [shoes] Problem with win7 x64 package cache

From:
Cecil Coupe
Date:
2010-11-10 @ 22:43
You can enjoy more confusion if you have a Shoes2 cached in there from
long ago and download a Shoes3 packaged script. Or vice versa.  

On Thu, 2010-11-11 at 07:17 +0900, ashbb wrote:
> > Are there any attemps to fix it?
> Not yet.
> As I mentioned in the previous post, I can't read
> shoes/platform/msw/base.nsi :
> https://github.com/shoes/shoes/blob/develop/platform/msw/base.nsi
> 
> ashbb

Re: [shoes] Problem with win7 x64 package cache

From:
Christian K.
Date:
2010-11-10 @ 23:01
There are two possible solutions, if my suggestion is right:
1. Delete the file before the creation code (would be the shortest
solution, but doesnt seem to be clean)
2. Add code to check whether that ShellExecute at the bottom of
WinMain has finished and to delete the file if that has happend (would
be the clean version i guess, but this could require more code)

2010/11/10 Cecil Coupe <ccoupe@cableone.net>:
> You can enjoy more confusion if you have a Shoes2 cached in there from
> long ago and download a Shoes3 packaged script. Or vice versa.
>
> On Thu, 2010-11-11 at 07:17 +0900, ashbb wrote:
>> > Are there any attemps to fix it?
>> Not yet.
>> As I mentioned in the previous post, I can't read
>> shoes/platform/msw/base.nsi :
>> https://github.com/shoes/shoes/blob/develop/platform/msw/base.nsi
>>
>> ashbb
>
>
>

Re: [shoes] Problem with win7 x64 package cache

From:
Cecil Coupe
Date:
2010-11-11 @ 04:17
What would be nice would be some kind of versioning - script length or
MD5 and GMT date of the script's packaging compared to what's on the
users system to guide the choice of replace the script or reinstall the
Shoes and the script. Or maybe there is? or could be a check to see if
the shift key was held down on the double click which causes the script
to be deleted from %temp% and replaced with the new download.

There are a lot of things that need to be done or rethought in that
Windows code to keep Shoes working. Won't be me because I don't know
Windows API's and I'm not going to learn them. 

On Thu, 2010-11-11 at 00:01 +0100, Christian K. wrote:
> There are two possible solutions, if my suggestion is right:
> 1. Delete the file before the creation code (would be the shortest
> solution, but doesnt seem to be clean)
> 2. Add code to check whether that ShellExecute at the bottom of
> WinMain has finished and to delete the file if that has happend (would
> be the clean version i guess, but this could require more code)
> 
> 2010/11/10 Cecil Coupe <ccoupe@cableone.net>:
> > You can enjoy more confusion if you have a Shoes2 cached in there from
> > long ago and download a Shoes3 packaged script. Or vice versa.
> >
> > On Thu, 2010-11-11 at 07:17 +0900, ashbb wrote:
> >> > Are there any attemps to fix it?
> >> Not yet.
> >> As I mentioned in the previous post, I can't read
> >> shoes/platform/msw/base.nsi :
> >> https://github.com/shoes/shoes/blob/develop/platform/msw/base.nsi
> >>
> >> ashbb
> >
> >
> >

Re: [shoes] Problem with win7 x64 package cache

From:
Christian K.
Date:
2010-11-10 @ 22:35
I dont think that this is the correct file. This file only installs
the included shoes and the app if not already done.

I think I found it:
stub.c:248

    GetTempPath(BUFSIZE, buf);
    data = LoadResource(inst, nameres);
    len = SizeofResource(inst, nameres);
    strncat(buf, (LPTSTR)data, len);

    payload = CreateFile(buf, GENERIC_READ | GENERIC_WRITE,
      FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_NEW,
FILE_ATTRIBUTE_NORMAL, NULL);


There are two other usages of the temp dir within this file, but these
are just for the shoes install.

2010/11/10 ashbb <ashbbb@gmail.com>:
>> Are there any attemps to fix it?
> Not yet.
> As I mentioned in the previous post, I can't read
> shoes/platform/msw/base.nsi :
> https://github.com/shoes/shoes/blob/develop/platform/msw/base.nsi
>
> ashbb
>

Re: [shoes] .nsi

From:
Cecil Coupe
Date:
2010-11-11 @ 06:18
I suspect that the base.nsi file is part of the scripting language at
http://nsis.sourceforge.net/Main_Page mixed in with some Shoes/rakefile
parameter passing/macro subs. If I'm correct, Shoes probably has a very
old version. When I did some research a few months back on how to
replace/update the installer/packager, it was the only OSS windows
installer. Perhaps, _why got there first? (thats a rhetorical question -
you know he did).

If so, we have a lot of power available for fixing Windows install and
pack issues. How it gets invoked from the Rakefile(s) and where the nsis
script engine is, that I don't know.

On Thu, 2010-11-11 at 07:17 +0900, ashbb wrote:
> > Are there any attemps to fix it?
> Not yet.
> As I mentioned in the previous post, I can't read
> shoes/platform/msw/base.nsi :
> https://github.com/shoes/shoes/blob/develop/platform/msw/base.nsi
> 
> ashbb

Re: [shoes] .nsi

From:
Devyn Cairns
Date:
2010-11-12 @ 02:30
On Wed, Nov 10, 2010 at 10:18 PM, Cecil Coupe <ccoupe@cableone.net> wrote:

> I suspect that the base.nsi file is part of the scripting language at
> http://nsis.sourceforge.net/Main_Page mixed in with some Shoes/rakefile
> parameter passing/macro subs.


It's definitely NSIS.


> If I'm correct, Shoes probably has a very
> old version. When I did some research a few months back on how to
> replace/update the installer/packager, it was the only OSS windows
> installer. Perhaps, _why got there first? (thats a rhetorical question -
> you know he did).
>

NSIS is also extremely common; it gets used for a lot of things.


>
> If so, we have a lot of power available for fixing Windows install and
> pack issues. How it gets invoked from the Rakefile(s) and where the nsis
> script engine is, that I don't know.
>
> On Thu, 2010-11-11 at 07:17 +0900, ashbb wrote:
> > > Are there any attemps to fix it?
> > Not yet.
> > As I mentioned in the previous post, I can't read
> > shoes/platform/msw/base.nsi :
> > https://github.com/shoes/shoes/blob/develop/platform/msw/base.nsi
> >
> > ashbb
>
>
>


-- 
    ~devyn

Re: [shoes] .nsi

From:
Steve Klabnik
Date:
2010-11-11 @ 15:31
Sweet, good research. Wilkie and I talked last night, and we're going to
start trying to iron out all of the remaining Red Shoes issues, especially
on Windows... so this is helpful.

Re: [shoes] Problem with win7 x64 package cache

From:
Cecil Coupe
Date:
2010-11-10 @ 05:23
Also, and more likely, Windows/Firefox won't download an exe you already
have installed. Probably a IE compatibility thing. Oh, it acts like its
downloading except it is super fast (its in the browser's download
cache). Clear the browser
cache (ick) or reboot (ick) or both (double ick).

On Tue, 2010-11-09 at 23:24 -0500, Steve Klabnik wrote:
> Hey Christian-
> 
> 
> I poked around, but I couldn't find anything either. I'm not super up
> on the packager, and I only have a Mac, so I can't quite test it...
> 
> 
> Cecil, thoughts? I've never heard of this being a problem before.
> 
> 
> -Steve