How can I change the cache location on Windows?

2 views
Skip to first unread message

hiddentrak

unread,
Dec 3, 2009, 10:44:16 AM12/3/09
to ProjectSprouts
I am evaluating sprouts on a work machine running Windows XP. I don't
have admin rights. I was able to successfully install ruby/gems/
sprouts using cygwin but when trying to run the test project I get a
Permission denied error when trying to access mxmlc.exe in the sprouts
cache. Is there a way to place the cache in a different location
outside of Documents and Settings on Windows? If I could put it at
say, c:\sprouts\cache I would be able to circumvent the lack of
privileges as windows will allow me to access it there.

Thanks for your help,

Myles

hiddentrak

unread,
Dec 3, 2009, 12:27:41 PM12/3/09
to ProjectSprouts
It looks like the User class is where these locations are defined and
i suppose I could modify the source and rerun but I'm hoping there is
a sprout command to change the cache location.

Luke Bayes

unread,
Dec 3, 2009, 12:33:45 PM12/3/09
to project...@googlegroups.com
First off, that's pretty surprising, I thought machines that were
locked down gave you more access to your own home path than the C:\
partition...

I'm suspicious that there may be a different problem here.

Can you manually copy these files out of the cache to another location
and execute them directly?

Assuming that does work - you can modify the sprout_cache near the top
of your rakefile - but after the "require 'sprout'" line with:

Sprout::Sprout.sprout_cache = "c:\foo\bar"


Thanks!

Luke Bayes

hiddentrak

unread,
Dec 3, 2009, 1:58:38 PM12/3/09
to ProjectSprouts
Interestingly, I can copy the cache to a new location and execute
them. And placing the equivlant of this Sprout::Sprout.sprout_cache =
"c:\foo\bar" worked. But now I have a separate issue :). When I run
the rake build script I can't launch the flash player executable. I'm
sure this will be an issue no matter where it exists. Since I have
the flash debug player on my machine (from my IT dept) is there
anyway to use the one I have installed already? Thanks for you help!

Luke Bayes

unread,
Dec 3, 2009, 2:41:35 PM12/3/09
to project...@googlegroups.com
That's a little confusing - so you have the ability to execute the
compilers from the cache directory but not the Flash Player?

You can try adding this hackery to your Rakefile:

class Sprout::User
def User.clean_path(path)
path = User.new().clean_path(path)
puts "path: #{path}"
return (path =~ /flashplayer.exe/) ? 'c:\yourpath\to\player' : path
end
end

It's the easiest place I could find to duck-punch the path into place...

Let us know how it goes,

lb.

hiddentrak

unread,
Dec 3, 2009, 2:52:13 PM12/3/09
to ProjectSprouts
When i add that I get the following

rake aborted!
Sprout is not missing constant User!

To be clear I am trying to use a custom cache location
(Sprout::Sprout.sprout_cache =
"c:\foo\bar") as well as use my existing flash_player install. The
swf is compiling fine, just not opening up in the flash player. I can
go into the directory it was create in and manually run it. Thanks
again.

Luke Bayes

unread,
Dec 3, 2009, 4:13:57 PM12/3/09
to project...@googlegroups.com
Sorry - try this one:

module Sprout
class User
def self.clean_path(path)
path = User.new().clean_path(path)
puts "path: #{path}"
return (path =~ /flashplayer.exe/) ? 'c:\yourpath\to\player' : path
end
end
end


Thanks,

lb.
> --
> You received this message because you are subscribed to the Google Groups "ProjectSprouts" group.
> To post to this group, send email to project...@googlegroups.com
> To unsubscribe from this group, send email to projectsprout...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/projectsprouts?hl=en
>
> For other info you can visit our project at: http://projectsprouts.org, or on Github at: http://github.com/lukebayes/project-sprouts
>
Reply all
Reply to author
Forward
0 new messages