Creating a installer
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Creating a installer
ID-10-T, PEBCAK, I know them all after going on 8 years in that job.
You know, before I worked at that job, I used to get (what I thought were) funny emails from some of my friends that talked about doing tech support. They were always good for a laugh because, I guess, you never think of people being any better or worse than yourself.
After I worked at that job, though, for some reason the emails that *used* to make me laugh the hardest made me wince in commiseration
Shockingly, I did not loose the job over that incident. The gentlemen I was helping actually wound up apologizing to me during the call. My supervisor sure got a laugh out of it
You know, before I worked at that job, I used to get (what I thought were) funny emails from some of my friends that talked about doing tech support. They were always good for a laugh because, I guess, you never think of people being any better or worse than yourself.
After I worked at that job, though, for some reason the emails that *used* to make me laugh the hardest made me wince in commiseration
Shockingly, I did not loose the job over that incident. The gentlemen I was helping actually wound up apologizing to me during the call. My supervisor sure got a laugh out of it
Re: Creating a installer
Too lazy to bump the thread, but anyway....
Onto the License agreement, is there a way to disable the button until a user clicks on the "agree to the license agreement"?
here's the code:
Onto the License agreement, is there a way to disable the button until a user clicks on the "agree to the license agreement"?
here's the code:
Code: Select all
on card
if "I DO NOT agree with the License Agreement" is selected then disable this button "Next"
end card
-
- Posts: 720
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: Creating a installer
You could use a free installer.. or even make it a portable with a portable app installer.
See links under chapter Packaging :
https://portableapps.com/apps/development
or
https://helpdeskgeek.com/free-tools-rev ... -packages/
Regards,
Paul
See links under chapter Packaging :
https://portableapps.com/apps/development
or
https://helpdeskgeek.com/free-tools-rev ... -packages/
Regards,
Paul
Re: Creating a installer
Sorry, but these are only for windows, if I want something cross-platform and at a lower pricing point, this is the only way I go. LiveCode does have a ability of becoming a standalone applicationmrcoollion wrote: ↑Wed Mar 13, 2019 10:28 amYou could use a free installer.. or even make it a portable with a portable app installer.
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Creating a installer
Hi Mickey,
You may use a preopencard handler to do that
You have to consider that a standalone remain the same. Properties of yours controls too, but if you forget to check this then preopencard handler check it for you
Best regards
Jean-Marc
YesOnto the License agreement, is there a way to disable the button until a user clicks on the "agree to the license agreement"?
You may use a preopencard handler to do that
Code: Select all
--checkbox script
on mouseup
doAcceptOrNot
end mouseup
--cd script
on preopencard
doAcceptOrNot
end preopencard
on doAcceptOrNot
set the enabled of btn "bInstall" to the hilite of btn "bAccept"
end doAcceptOrNot
Best regards
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Creating a installer
Well, like we said, Macs don't generally use installers. Linux has its own methods. So almost all the installers you find will be for Windows.Sorry, but these are only for windows, if I want something cross-platform
For the license agreement, just open the card with no radio button selected and the Next button disabled. If the user selects the Agree button, enable Next.
If your reason for writing a Mac installer is to provide the license agreement, you can do this when your app first launches.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Creating a installer
That worked, but apparently, in the start of the installation, because the "Next" button is tied to all other cards, the button will remain disabled until a user clicks accept and the installation goes on. If a user doesn't click on the "accept" checkbox, as the button is disabled, as if a user goes back to the "WelcomePage", then the button is still disabled. Is there a way to ONLY enable the button in the "WelcomePage" by code?jmburnod wrote: ↑Wed Mar 13, 2019 11:49 amHi Mickey,
Yes
You may use a preopencard handler to do that
You have to consider that a standalone remain the same. Properties of yours controls too, but if you forget to check this then preopencard handler check it for youCode: Select all
--checkbox script on mouseup doAcceptOrNot end mouseup --cd script on preopencard doAcceptOrNot end preopencard on doAcceptOrNot set the enabled of btn "bInstall" to the hilite of btn "bAccept" end doAcceptOrNot
Best regards
Jean-Marc
All I did was this:
Code: Select all
on WelcomePage
enable btn "bNext"
end WelcomePage
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Creating a installer
Yes againIs there a way to ONLY enable the button in the "WelcomePage" by code?
on preopencard
if the short name of this cd = "WelcomePage" then enable btn "bNext"
end preopencard
Jean-Marc
https://alternatic.ch
Re: Creating a installer
Thank you. So here's where the next part comes....
Anyway, I have no serial validation servers, instead, I use Gumroad's serial validation. Once if a user enters the key, clicks next, it'll send a HTTP POST data (using 'TsNetPost' to Gumroad's server, and if it comes out a "success", it'll move on with the installation. If not, then it'll pop a error that'll say "Serial Invalid! Try again".
now I did download a sample out of LiveCode's official step-by-step guide "How to use tsNetPost to perform a HTTP POST with callbacks", tried it out and I got a error that says "button "Send POSTs": execution error at line 26 (Function: error in function handler) near "tsNetPost", char 11"
Here's the code from the sample:
Now if you're familiar with this, before you ask "why make a installation with a serial number validation? Is it for commercial use?", this is for testing use only. Once I make the installation and everything else, I will remove the card.Anyway, I have no serial validation servers, instead, I use Gumroad's serial validation. Once if a user enters the key, clicks next, it'll send a HTTP POST data (using 'TsNetPost' to Gumroad's server, and if it comes out a "success", it'll move on with the installation. If not, then it'll pop a error that'll say "Serial Invalid! Try again".
now I did download a sample out of LiveCode's official step-by-step guide "How to use tsNetPost to perform a HTTP POST with callbacks", tried it out and I got a error that says "button "Send POSTs": execution error at line 26 (Function: error in function handler) near "tsNetPost", char 11"
Here's the code from the sample:
Code: Select all
on mouseUp
local tPostData, tHeaders, tError, tUrl
put empty into sRequest
put empty into sResponse
put empty into sError
put 0 into sAsyncCount
put "[WHY NO URL LINK ALLOWED]" into tUrl
put "item=item1" into sRequest[1]
put "item=item2" into sRequest[2]
put "item=item3" into sRequest[3]
put "item=item4" into sRequest[4]
-- Set a counter of how many requests are to be sent
put the number of lines of (the keys of sRequest) into sAsyncCount
-- Loop through each request
repeat for each key tKey in sRequest
-- Build the POST data
put sRequest[tKey] into tPostData
-- Send the request
put tsNetPost(tKey,tUrl,tHeaders,tPostData,"postResponse") into tError
end repeat
end mouseUp
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Creating a installer
It's much simpler than that. Create key-value pairs as a web browser would do: key1=x&key2=y&key3=z
Then:
You won't get both, either the result will be empty (success) and the "it" variable will have the server response, or the other way around.
If you're using the Community edition, POST uses libURL, otherwise it uses TSNet. That's automatic.
Then:
Code: Select all
post tValues to URL tURL
put the result into tErr
put it into tResponse
If you're using the Community edition, POST uses libURL, otherwise it uses TSNet. That's automatic.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Creating a installer
Is there a example code for libURL?jacque wrote: ↑Thu Mar 14, 2019 6:40 pmIt's much simpler than that. Create key-value pairs as a web browser would do: key1=x&key2=y&key3=z
Then:You won't get both, either the result will be empty (success) and the "it" variable will have the server response, or the other way around.Code: Select all
post tValues to URL tURL put the result into tErr put it into tResponse
If you're using the Community edition, POST uses libURL, otherwise it uses TSNet. That's automatic.
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Creating a installer
Klaus is right, that is the example code. Three lines.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Creating a installer
Thank you. I did a test stack using that same example, using RequestBin to see the data posting, and it works even it supports HTTPS, YES!!!! (I didn't know LiveCode Wiki was a thing, I thought it was only the documentation )
So now, once the POST is made, how do I make a response back? So like this, Once if a user enters the key, clicks next, it'll send a HTTP POST data (using 'libURL' to Gumroad's server), and if the result comes out a "success", it'll move on with the installation. If not, then it'll pop a error that'll say "Serial Invalid! Try again".
I made a diagram to give you a idea
So now, once the POST is made, how do I make a response back? So like this, Once if a user enters the key, clicks next, it'll send a HTTP POST data (using 'libURL' to Gumroad's server), and if the result comes out a "success", it'll move on with the installation. If not, then it'll pop a error that'll say "Serial Invalid! Try again".
I made a diagram to give you a idea
Re: Creating a installer
Ok so I managed to look into the Wiki, and tried some experiments, and FINALLY found a solution to this! So now, how do I make the code ONLY work on one card when a user clicks on "next" as, again, the button is tied to all other cards. I use the 'preopencard' varible?
here's the code from the button
here's the code from the button
Code: Select all
on mouseUp
put "[GUMROAD PRODUCT CODE]" into tProductCode
put field "SerialKeyField" into tMessage
get libURLFormData("product_permalink", tProductCode,"license_key", tMessage)
post it to url "[BUNGIE DID THIS URL LINK]"
if URLresponse contains "true" then
go next card
else
answer "INVALID!"
end if
end mouseUp