Previous topicNext topicFirst topicLast topic

Deploying an Application
 
Okay, so now we will deploy our little cooltool.bas project as an application.  To do this, we need to tell Assist where we want it deployed to.  The information is kept in the project's resources.  Let's open the resources dialog now using the File+Project+Resources menu (or press Alt+R).
 
 
Image Image20.GIF
Open the project resources dialog
 
Below is what the resources dialog looks like.
 
 
Image Image21.GIF
Project resources dialog
 
Notice the list of resource files.  These are all defaults.  The first item is the runtime engine which will be renamed to cooltool.exe.  The other support libraries will be copied to our deployment path without renaming.  The cooltool.bas file will be compiled into a cooltool.tkn file and also copied to the deployment path along with the other files.
 
Let's set a deployment path now and deploy our application.  We type c:\cooltool\ into the Deploy Path: field as shown and click OK.
 
Image Image22.GIF
Setting the deployment path
 
 
We must remember to save the project (press Ctrl+S) so that we will not lose the changes we made to resources.
 
Now we use the File+Project+Deploy project menu (or type Alt+D) as shown.
 
Image Image23.GIF
How to deploy
 
 
We see the following deployment popup dialog and check the Open Explorer on Application checkbox so that we can see what files are assembled to make our deployment.  Then we click on Deploy.
 
Image Image24.GIF
Let's open Explorer
 
 
After a progress dialog and assuming the compile goes without error, we get a confirmation popup.
 
Image Image25.GIF
 
We click OK to put this away and Explorer opens on our deployed application's folder.  Here's what that should look like.
 
Image Image26.GIF
Our finished application!
 
 
Now we just double-click on the cooltool.exe file and we see our (very plain) application window open.
 
Image Image27.GIF
 
The world's simplest software program
 
 
Okay, let's add a couple of things to our application to better show how the deployment process works.  We put the Cool Tool window away and go back to the Liberty BASIC editor window.  Open the resources view (Alt+R).
 
Image Image28.GIF
Cooltool resources
 
 
Let's add a resource file.  Clicking on the new button activates the Browse button to the right of the Resource File field so we click on that button now.  Then we navigate up one folder to the Liberty BASIC v4.03 folder and then into the bmp folder and choose the GRPHBTTN.BMP file as shown. 
 
 
Image Image29.GIF
Choose the GRPHBTTN.BMP file
 
 
Now we click on Open and see the new resource file inserted into our Resource File field like so.
 
 
Image Image30.GIF
Our new resource
 
 
Now we'll specify a place where the file will be copied during deployment.  If we don't do this, it will be copied to the same place all the other files go by default, but let's copy it into a new subfolder named bmpWe type .\bmp\ into the Copy to: field and click on Accept.
 
Image Image31.GIF
An alternate destination folder
 
 
Now we see the following as the resource file is added to the list of resources.
 
Image Image32.GIF
Added to the list
 
 
Now we click on okay to accept the changes.
 
Let's add some code to our program to use the new bitmap we've added to our deployment.  We add this line right before the open statement.
 
    bmpbutton #mainview.graph, "bmp\grphbttn.bmp", [clicked], UL, 10, 10
 
And add this little handler code for the button:
 
[clicked]
    notice "The graph button was clicked!"
    wait
 
Here's what it should look like.
 
Image Image33.GIF
With button code added
 
 
Let's save this now by pressing Ctrl+S.  This saves not just the code but also the new resource we added to the project's list of resources.
 
Now we'll deploy by pressing Alt+D.  When deployment is finished we should see the following Explorer folder.
 
Image Image34.GIF
 
Now with a bmp subfolder
 
 
Double-clicking on the cooltool.exe file launches our new application.  A click on the graph button tests it out.
 
Image Image35.GIF
It's alive!
 
 
Now let's version this code by pressing Alt+C and adding the comment Added a graph buttonThen we click OK.
 
 
Image Image36.GIF
Version 3
 
 
Okay, now let's add an icon to our application.  From the Liberty BASIC editor we click on the Setup+Icon Editor menu.
 
Image Image37.GIF
Let's make an icon
 
 
Now we'll draw an icon for our cooltool application.  Here is a crude wrench icon.
 
 
Image Image38.GIF
Good enough for our purposes
 
 
Using the File+Save Icon... menu we save it in the cooltool_project folder as wrench.ico as shown.
 
 
Image Image39.GIF
Saving as wrench.ico
 
 
Now we close the Icon Editor window and open our resources dialog again using Alt+R.  We type wrench.ico into the Icon File: field as shown.  By default it is going to look for the icon in the cooltool_project folder so we don't need to use the Browse button go looking for it.
 
 
Image Image40.GIF
Setting the icon file
 
 
Let's click OK to accept our new change and type Alt+D to deploy this application.  When deployment is completed you should see the following Explorer folder.
 
Image Image41.GIF
Deployed with wrench.ico
 
 
We double-click on the cooltool.exe icon to see what our application window looks like with its new icon.
 
 
Image Image42.GIF
Now with a custom icon
 


Copyright 1992-2009 Shoptalk Systems