Update on Program Installer

BlitzMax Forums/BlitzMax Beginners Area/Update on Program Installer

jrthom(Posted 2007) [#1]
An earlier post of mine had some great tips and some great advice. I am happy to inform you that I have a working code with UI. This is what I was in need of.

Here is the code if you want to use it:



I have 3 followup questions. When you launch this program, you will see that each button labeled "Install Program" launches NOTEPAD. Simply changing NOTEPAD to the path of your file will be great and it works. Here is where I have my first followup question.

The installer that I am in need of creating will use this code, but will all be on CD/DVD. Since the drive letters of the CD/DVD may differ from one person to another, is there a way to code it to where it keeps the CD/DVD Drive letter or takes the CD Drive letter from the PC itself? "C:\" is the hard drive. Some people have more than one hard drive and it is letter "D:\." This leaves the CD/DVD drives to be another letter.

My second follow up question is using one of the buttons to close the window. I have searched and could not find the code. Can someone show me a good close window command please?

My third followup question is about an ICON file. I found a tutorial 'Adding Icons to BlitzMax Win32 Executables." This is not really a question. This is rather a work in progress.

I will keep you informed. Thanks again for all the advice.


Jake L.(Posted 2007) [#2]
1.) Why do you need the letter of the cd drive? If you're running your app from CD you can use relative paths.

2.) FreeGadget (Logic_Gui)

3.) You've already found the solution. Any particular question?


jsp(Posted 2007) [#3]
1.) As Jake said...
2.) Depends if you need that window later on again? If yes, just hide it with HideGadget( Logic_Gui ) and show it again with ShowGadget( Logic_Gui ). If no, you can free it as Jake mentioned to get rid of it, but that needs complete recreation if you want it back.
Off topic: You probably want a different name for your program, to do so just open the Properties Editor and click on the left side on 'Main Window' and edit the text now visible in the tabber.


jrthom(Posted 2007) [#4]
Thanks again for the replies.

I added this to the code to button 5.


Function Button5_GA( Button:TGadget )
	
FreeGadget Logic_Gui_WC( Logic_Gui:TGadget )	

End Function



This fixes the closing problem. Thanks.


tonyg(Posted 2007) [#5]
The Logic_Gui gadget is out of scope for that function.
You can either make it global or obtain it from the button.parent field (I think).


Jake L.(Posted 2007) [#6]
(...tonyg was faster ;)

May I suggest to forget about LogicGUI for a minute and play with some MaxGUI examples to get "the feel" for Blitzmax/MaxGUI's way of doing things. Don't get me wrong, LogicGUI is a great app (I use it, too), but it's a helper-app to shorten forms development, not an IDE replacement.