One click publishing
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
One click publishing
HI
Wonder if someone can help me.
I have developed an application which is updated very frequently, so when customers open the standalone app I have sent them it downloads the stack file everytime they double click my app which sits on their desktop.
Its just one line of code:
go url "http://mydomain/mystacks/portal.rev"
This works fine however, my stack is 18 MB so my customers are having to wait around 1-2 minutes before my applicaition opens therefore i'm uploading my stack compressed:
put compress(tPathToMyStackFile) into tCompressedStackData
put tCompressedStackData into url \
"ftp://user:password@ftp.mydomain.com/my ... tal.rev.gz"
I have checked my web portal and the stack.gz file is there but it isnt opening when using the following script:
get url "http://mydomain/mystacks/portal.rev.gz"
go decompress(it)
Does anyone know what I am doing wrong?
Thanks
Daniel
Wonder if someone can help me.
I have developed an application which is updated very frequently, so when customers open the standalone app I have sent them it downloads the stack file everytime they double click my app which sits on their desktop.
Its just one line of code:
go url "http://mydomain/mystacks/portal.rev"
This works fine however, my stack is 18 MB so my customers are having to wait around 1-2 minutes before my applicaition opens therefore i'm uploading my stack compressed:
put compress(tPathToMyStackFile) into tCompressedStackData
put tCompressedStackData into url \
"ftp://user:password@ftp.mydomain.com/my ... tal.rev.gz"
I have checked my web portal and the stack.gz file is there but it isnt opening when using the following script:
get url "http://mydomain/mystacks/portal.rev.gz"
go decompress(it)
Does anyone know what I am doing wrong?
Thanks
Daniel
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: One click publishing
Hello Daniel -
I'm a bit overdue getting back to you on your post to the improve-rev list, but I've been working on a library to help your work along so the time has been well spent. This week is a bit impacted with some client deadlines, but with any luck I should have some scripts for you early next week. Feel free to call me in the meantime if you like: 323-225-3717.
In the meantime, to diagnose what's happening in your scripts you may want to check "the result" after your commands. The result will be empty after successful calls, but usually contains error info for those that have trouble.
E.g.:
I'm a bit overdue getting back to you on your post to the improve-rev list, but I've been working on a library to help your work along so the time has been well spent. This week is a bit impacted with some client deadlines, but with any luck I should have some scripts for you early next week. Feel free to call me in the meantime if you like: 323-225-3717.
In the meantime, to diagnose what's happening in your scripts you may want to check "the result" after your commands. The result will be empty after successful calls, but usually contains error info for those that have trouble.
E.g.:
Code: Select all
put compress(tPathToMyStackFile) into tCompressedStackData
put tCompressedStackData into url \
"ftp://user:password@ftp.mydomain.com/mystacks/portal.rev.gz"
if the result is not empty then answer the result
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: One click publishing
Hi Richard
Thank you very much for your help it really is most appreciated.
The error message I am getting when geting the url and decompressing it is 'no such card'
Not sure why it comes back saying this?
Thank you very much for your help it really is most appreciated.
The error message I am getting when geting the url and decompressing it is 'no such card'
Not sure why it comes back saying this?
Re: One click publishing
Hi Daniel,
looks like you only compress the string in the variable "tPathToMyStackFile"
and upload that to your server!
You need to use "binfile":
So no valid stack file is in the compressed archieve ergo: no such card!
Best
Klaus
looks like you only compress the string in the variable "tPathToMyStackFile"
and upload that to your server!
You need to use "binfile":
Code: Select all
...
put compress(url"binfile:" & tPathToMyStackFile) into tCompressedStackData
put tCompressedStackData into url \
"ftp://user:password@ftp.mydomain.com/mystacks/portal.rev.gz"
...
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: One click publishing
I'm assuming you're getting no error with the decompress function, which would normally throw an execution error if the data being passed to it is not complete compressed data. That much is good. But now we have to figure out how the seemingly-successfully-compressed data is not recognized as a stack file.
Instead of using "go", perhaps you could replace that with:
put it into url ("binfile:"&specialFolderPath("desktop")&"/TestStack.rev")
...and then see if you can open it in Rev. That would at least let us know if the file is good stack data.
If that doesn't work out, perhaps there was an issue uploading (though I'd suspect that a problem on that end would throw an error when you try to decompress it). Maybe adding a check on the result after the upload statement as I showed above might tell us something useful.
Instead of using "go", perhaps you could replace that with:
put it into url ("binfile:"&specialFolderPath("desktop")&"/TestStack.rev")
...and then see if you can open it in Rev. That would at least let us know if the file is good stack data.
If that doesn't work out, perhaps there was an issue uploading (though I'd suspect that a problem on that end would throw an error when you try to decompress it). Maybe adding a check on the result after the upload statement as I showed above might tell us something useful.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: One click publishing
Looks like Klaus caught it. My bad, since you were using the example I posted pre-coffee to the improve-rev list. 
Thanks, Klaus.

Thanks, Klaus.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: One click publishing
Thanks Klaud but unfortunately still getting same problem. Coming back saying 'No such card'
Richard - I have tried what you suggested:
'Instead of using "go", perhaps you could replace that with:
put it into url ("binfile:"&specialFolderPath("desktop")&"/TestStack.rev")'
This saves the stack to my desktop, however when I try to open it, a message appears saying 'This is not a stack file'. Very strange.
When i upload to my server using the 'if the result is not empty then answer the result' script, no errors appear so I am completely bamboozled!
Richard - I have tried what you suggested:
'Instead of using "go", perhaps you could replace that with:
put it into url ("binfile:"&specialFolderPath("desktop")&"/TestStack.rev")'
This saves the stack to my desktop, however when I try to open it, a message appears saying 'This is not a stack file'. Very strange.
When i upload to my server using the 'if the result is not empty then answer the result' script, no errors appear so I am completely bamboozled!
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: One click publishing
See Klaus' post above. He caught an error in my original script which failed to use the "binfile" directive for specifying that you're after a file and not the variable itself.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: One click publishing
Hey Richard
Yes I tried that but hasnt made any difference. Still saying no such card
Yes I tried that but hasnt made any difference. Still saying no such card
Re: One click publishing
Though what I do know is that it isnt compressing and uploading correctly as the 'compressed stacl' thats uploading to my server is always the same size: 38KB regardless of how big the stack actually is
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: One click publishing
Right. Klaus' post explains it all. Really. Make the change he suggests and I suspect your code will work well.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: One click publishing
Sorry Richard but I have tried this and still the same problem.
The stack is clearly not compressing and uploading even after Klaus' changes. The stack on my server is always the same size at 38KB regardless of the size of the stack.
I have looked hard at the script:
Looks fine to me - i'm hoping it has nothing to do with me using Windows 7!
The stack is clearly not compressing and uploading even after Klaus' changes. The stack on my server is always the same size at 38KB regardless of the size of the stack.
I have looked hard at the script:
Code: Select all
put compress(url"binfile:" & tPathToMyStackFile) into tCompressedStackData
put tCompressedStackData into url \
"ftp://qgloginc:manutd07@ftp.qglogin.co.uk/public_html/boo1.rev.gz"
Re: One click publishing
Hi Daniel,
hmmm, try this one (see the additional parenthesis around "binfile:"!):
...
Best
Klaus
hmmm, try this one (see the additional parenthesis around "binfile:"!):
...
Code: Select all
put compress(url("binfile:" & tPathToMyStackFile)) into tCompressedStackData
answer the result
## is empty if everythings worked out fine and
## might give a hint what might have been wrong otherwise?
...
Klaus
Re: One click publishing
Thanks for your help Klaus but still the same probem.
When adding the extra parenthesis the problem still persists. Now I have:
The result is empty so no errors are showing.
Do you think its worther reporting the problem to RunRev?
When adding the extra parenthesis the problem still persists. Now I have:
Code: Select all
put compress(url("binfile:" & tPathToMyStackFile)) into tCompressedStackData
put tCompressedStackData into url \
"ftp://qgloginc:manutd07@ftp.qglogin.co.uk/public_html/boo.rev.gz"
answer the result
Do you think its worther reporting the problem to RunRev?
Re: One click publishing
Hi Daniel,
well, I wrote and meant to check the result right after the COMPRESSING,
since the uiploading obviously works!
...
put compress(url("binfile:" & tPathToMyStackFile)) into tCompressedStackData
answer the result ## !!!
put tCompressedStackData into url "ftp://qgloginc:manutd07@ftp.qglogin.co. ... boo.rev.gz"
...
I do not think this is a Rev error, I have been using this technique for yearts and never had problems!
There is something going wrong on your side, I'm afraid.
Best
Klaus
P.S.
Try to do everything on your HD first, I mean:
1. compress your stack
2. save the compressed data to a file
3. decompress the resulting file from 2. and
4. save the decrompressed file to your HD and check if you
5. can open that file with Rev
well, I wrote and meant to check the result right after the COMPRESSING,
since the uiploading obviously works!
...
put compress(url("binfile:" & tPathToMyStackFile)) into tCompressedStackData
answer the result ## !!!
put tCompressedStackData into url "ftp://qgloginc:manutd07@ftp.qglogin.co. ... boo.rev.gz"
...
I do not think this is a Rev error, I have been using this technique for yearts and never had problems!
There is something going wrong on your side, I'm afraid.
Best
Klaus
P.S.
Try to do everything on your HD first, I mean:
1. compress your stack
2. save the compressed data to a file
3. decompress the resulting file from 2. and
4. save the decrompressed file to your HD and check if you
5. can open that file with Rev