Bytessence Install Maker 5.40 - (09Jan2013) - new release

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Re: Bytessence InstallMaker 5.2 - (29oct2011) - updated!

Post by Inf0Byt3 »

Hello Little John,
So I thought that in the dialog, I had to specify the verb with which the given command should be associated. Now you explained that the field actually is for the description. I think this implies, that Bytessence InstallMaker automatically uses open as verb in this context, doesn't it? If this is true, maybe it could be mentioned somewhere in the documentation?
After having a look at the association code (see below for a part of it), the verb is actually the 'CommandDescription' field. I'll mention this in the documentation. Maybe it would be a good idea to create a new field just for the used verb but I don't know how this would influence the execution of the files in any way. Will have to read more on this.

Code: Select all

Procedure.i Reg_AssociateFile(Extension.s,ExtensionDescription.s,ExePath.s,IconPath.s,ProgramKey.s,CommandDescription.s,Parameters.s)
  
  ;{ Prepare data
  Extension = Trim(Extension)
  ExtensionDescription = Trim(ExtensionDescription)
  ExePath = Trim(ExePath)
  IconPath = Trim(IconPath)
  ProgramKey = Trim(ProgramKey)
  CommandDescription = Trim(CommandDescription)
  Parameters = Trim(Parameters)
  If Left(Extension,1) = "."
    Extension = Mid(Extension,2,Len(Extension)-1)
  EndIf
  AutoFileKey.s = Extension+"_auto_file"
  If Left(Extension,1) <> "."
    Extension = "."+Extension
  EndIf
  If Left(ExePath,1) <> Chr(34)
    ExePath = Chr(34)+ExePath
  EndIf
  If Right(ExePath,1) <> Chr(34)
    ExePath = ExePath+Chr(34)
  EndIf
  If Parameters = ""
    Parameters = Chr(34)+"%1"+Chr(34)
  EndIf
  If Left(Parameters,1) <> Chr(34)
    Parameters = Chr(34)+Parameters
  EndIf
  If Right(Parameters,1) <> Chr(34)
    Parameters = Parameters+Chr(34)
  EndIf
  FinalCommandKey.s = ExePath+" "+Parameters
  ;}

  ;{ Add the data in registry
  Select OSVersion()

    Case #PB_OS_Windows_NT_4, #PB_OS_Windows_2000, #PB_OS_Windows_XP, #PB_OS_Windows_Server_2003, #PB_OS_Windows_Vista, #PB_OS_Windows_Server_2008, #PB_OS_Windows_7 ;{
      Reg_CreateKey(#HKEY_CLASSES_ROOT,AutoFileKey)
      If Reg_CreateKey(#HKEY_CLASSES_ROOT,Extension)
        Reg_SetValue(#HKEY_CLASSES_ROOT,Extension,"",AutoFileKey,#REG_SZ)
        If ExtensionDescription <> ""
          Reg_SetValue(#HKEY_CLASSES_ROOT,AutoFileKey,"",ExtensionDescription,#REG_SZ)
        EndIf
      EndIf
      If IconPath <> ""
        If Reg_CreateKey(#HKEY_CLASSES_ROOT,AutoFileKey+"\"+"DefaultIcon") = 1
          Reg_SetValue(#HKEY_CLASSES_ROOT,AutoFileKey+"\"+"DefaultIcon","",IconPath,#REG_SZ)
        EndIf
      EndIf
      Reg_CreateKey(#HKEY_CLASSES_ROOT,AutoFileKey+"\"+"shell")
      Reg_CreateKey(#HKEY_CLASSES_ROOT,AutoFileKey+"\"+"shell"+"\"+CommandDescription)
      If Reg_CreateKey(#HKEY_CLASSES_ROOT,AutoFileKey+"\"+"shell"+"\"+CommandDescription+"\"+"command") = 1
        Reg_SetValue(#HKEY_CLASSES_ROOT,AutoFileKey+"\"+"shell"+"\"+CommandDescription+"\"+"command","",FinalCommandKey,#REG_SZ)
      EndIf
      ;}

    Case #PB_OS_Windows_95, #PB_OS_Windows_98, #PB_OS_Windows_ME ;{
      If Reg_CreateKey(#HKEY_LOCAL_MACHINE,"Software\Classes\"+Extension) = 1
        Reg_SetValue(#HKEY_LOCAL_MACHINE,"Software\Classes\"+Extension,"",ProgramKey,#REG_SZ)
      EndIf
      Reg_CreateKey(#HKEY_LOCAL_MACHINE,"Software\Classes\"+ProgramKey)
      If Reg_CreateKey(#HKEY_LOCAL_MACHINE,"Software\Classes\"+ProgramKey+"\"+"DefaultIcon") = 1
        Reg_SetValue(#HKEY_LOCAL_MACHINE,"Software\Classes\"+ProgramKey+"\"+"DefaultIcon","",IconPath,#REG_SZ)
      EndIf
      Reg_CreateKey(#HKEY_LOCAL_MACHINE,"Software\Classes\"+ProgramKey+"\"+"shell")
      Reg_CreateKey(#HKEY_LOCAL_MACHINE,"Software\Classes\"+ProgramKey+"\"+"shell"+"\"+CommandDescription)
      If Reg_CreateKey(#HKEY_LOCAL_MACHINE,"Software\Classes\"+ProgramKey+"\"+"shell"+"\"+CommandDescription+"\"+"command") = 1
        Reg_SetValue(#HKEY_LOCAL_MACHINE,"Software\Classes\"+ProgramKey+"\"+"shell"+"\"+CommandDescription+"\"+"command","",FinalCommandKey,#REG_SZ)
      EndIf
      ;}
  
  EndSelect
  ;}

  ;{ Return
  ProcedureReturn 1
  ;}

EndProcedure
[Edit]
I the above code you can also see the problem you mentioned earlier regarding the quotes. My code behaves like developers will only pass one parameter to the executable, that's why it checks for quotes before and after the parameter string :oops:.
under Installer -> Advanced tasks I added several items to the list.
When I move items up or down in the list, the content of the moved items changes! :(
I observed this with items of the task type "Add registry key".
Yes you're right... I'll have a look at this. Thanks for the heads up :mrgreen:.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Bytessence InstallMaker 5.2 - (29oct2011) - updated!

Post by Little John »

Hello Inf0Byt3,

thanks for your further explanations.
Inf0Byt3 wrote:After having a look at the association code (see below for a part of it), the verb is actually the 'CommandDescription' field. I'll mention this in the documentation. Maybe it would be a good idea to create a new field just for the used verb but I don't know how this would influence the execution of the files in any way.
I think my knowledge was wrong in this respect. :oops:
I was thinking, that we can only use certain verbs (such as open, print) that are predefined by Microsoft. So I wondered which of these verbs my associated extension would use. Now I see, that we can use an arbitrary verb, and that Windows will use this verb also as description in the context menu (if no different explicit description is given). So I think everything is fine with this dialog, if someone doesn't begin with a false assumption (like I did).

Thanks again, Little John
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Bytessence InstallMaker 5.2 - (29oct2011) - updated!

Post by Little John »

Hello Inf0Byt3,

I've got another question/suggestion.

In the "General -> General Information" section of the program, I can open a popup window for entering "Installer executable version information", and in the "Uninstaller -> Settings" section of the program, I can open a popup window for entering "Uninstaller executable version information".

Bytessence InstallMaker will not create any uninstaller, but exactly the uninstaller which suits the given installer, won't it? So shouldn't the executable version information for the installer and the uninstaller always be the same? If so, then the program can do without the second popup window, and use the installer executable version information for the uninstaller as well. This would save a little work for me :-) and, more importantly, would reduce the risk of inconsistency between the version information of both executables (since when releasing a new version of a program, I probably will often forget to update the uninstaller version information).

Regards, Little John
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Bytessence InstallMaker 5.2 - (29oct2011) - updated!

Post by Little John »

Hello Inf0Byt3,

I'd like to create a multi-language installer with Bytessence InstallMaker 5.2.

In some places, the program obviously is prepared for this task: E.g. in the section "Installer - Look annd feel", I can choose several languages, and I can specify a particular information file and license agreement file for each language.

What about making other tasks language dependent? In the section "Installer - Advanced tasks" I want to add some registry keys and values (for creating an entry in the context menu of files and folders). I would like the installer to create the registry keys and values dependent on the language that the user has chosen at the beginning of the installation process. How can I create such an installer?

Regards, Little John
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Re: Bytessence InstallMaker 5.2 - (29oct2011) - updated!

Post by Inf0Byt3 »

Hello Little John,

Regarding the executable (installer and uninstaller) version information, I made 2 separate dialogs because in the beginning this info could only be set for the installer, then after someone suggested it I've added this possibility for the uninstaller as well. At the time, I thought that adding 2 different dialogs will make the whole process a bit more customizable (as some of the developers might want different information between the installer and uninstaller).
Little John wrote:What about making other tasks language dependent? In the section "Installer - Advanced tasks" I want to add some registry keys and values (for creating an entry in the context menu of files and folders). I would like the installer to create the registry keys and values dependent on the language that the user has chosen at the beginning of the installation process. How can I create such an installer?
At the moment, this is not possible unfortunately. I could add a dialog where you can have "variables" assigned to different languages. So you could have say "myvar" that points to "File path" in English or if the user selects German it will point to "Dateipfad". I am ready to release a new version soon though and I am not sure if this improvement will make it in, but I'll try my best :).

Thanks for the suggestions.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Bytessence InstallMaker 5.2 - (29oct2011) - updated!

Post by Little John »

Inf0Byt3 wrote:At the time, I thought that adding 2 different dialogs will make the whole process a bit more customizable (as some of the developers might want different information between the installer and uninstaller).
Installer and uninstaller are not two different products, but two parts of the same product. So IMHO they always should have exactly the same version information. However, it's no big probem for me if this is not going to be changed.
Inf0Byt3 wrote:
Little John wrote:What about making other tasks language dependent? In the section "Installer - Advanced tasks" I want to add some registry keys and values (for creating an entry in the context menu of files and folders). I would like the installer to create the registry keys and values dependent on the language that the user has chosen at the beginning of the installation process. How can I create such an installer?
At the moment, this is not possible unfortunately. I could add a dialog where you can have "variables" assigned to different languages. So you could have say "myvar" that points to "File path" in English or if the user selects German it will point to "Dateipfad". I am ready to release a new version soon though and I am not sure if this improvement will make it in, but I'll try my best :).
Thanks for considering the suggestion.

In order to make creation of 100% multi-language installers possible, even more changes will be necessary (e.g. different names for shortcuts in the start menu). Keeping the GUI of your program clean and easy to use while implementing this might not be easy, so please take your time. :-)

IMHO one of the main advantages of Bytessence InstallMaker is, that it's rather powerful and flexible, and easy to use at the same time. So please don't put the user-friendliness of the program at risk. There are already more than enough cluttered and unnecessarily complicated installers. :-)

Thanks again for this good program,
Little John
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Re: Bytessence InstallMaker 5.2 - (29oct2011) - updated!

Post by Inf0Byt3 »

Installer and uninstaller are not two different products, but two parts of the same product. So IMHO they always should have exactly the same version information. However, it's no big probem for me if this is not going to be changed.
The best way to solve this issue would be to add some macro values that you can use from the uninstaller version info dialog. I'll add this for the upcoming version.
In order to make creation of 100% multi-language installers possible, even more changes will be necessary (e.g. different names for shortcuts in the start menu). Keeping the GUI of your program clean and easy to use while implementing this might not be easy, so please take your time. :-)
Indeed, I'll try to make it in such way that the constants are global and can be used for any task, including for the StartMenu shortcuts, etc. Due to the fact that this needs in-depth testing, I'll implement it in one of the future versions.
IMHO one of the main advantages of Bytessence InstallMaker is, that it's rather powerful and flexible, and easy to use at the same time. So please don't put the user-friendliness of the program at risk. There are already more than enough cluttered and unnecessarily complicated installers. :-)
I'm glad you find it that way. No worries, will try my best to keep it user friendly :D.

Best regards.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Re: Bytessence InstallMaker 5.3 - (25dec2011) - bugfix relea

Post by Inf0Byt3 »

Version 5.3 is now ready. Here's the list of changes in this version:
-Added version checking for the translation files to prevent corrupted installers from being created
-Added possibility to save the compilation log to a file (right-click)
-Added possibility to check for extra space on the computer's drives
-Added updated translation for Simplified/Traditional Chinese, German, Hebrew and French languages
-Added a set of macros to be used in the uninstaller version info dialog
-Fixed an issue with adding new tasks after moving existing ones
-Fixed the 'Associate extension' task appending extra quotes to the launch parameters
-Fixed a vulnerability related to the way the help file was launched
-Categories will be shown on the 'Review settings' page if at least one of their components is marked
I wanted to release it yesterday as a Christmas present but I ran out of time :P. Please let me know if you spot any problems with it.

@Little John:
To learn about the macros for installer/uninstaller exe version info, press F1 after opening the Version info dialog.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Re: Bytessence InstallMaker 5.3 - (25dec2011) - bugfix relea

Post by yrreti »

Thank you very much Inf0Byt3.
I think we all appreciate the hard work and effort that you have put into this installer program.
I won't be able to test it out for a while yet, as I've been too busy with honey-do-list projects lately. :(
But one other point I'd like to comment on is your web site. You do a good job on it!
But it really cracked me up this time, when it started snowing on the first page. :lol:
I don't know how you did that, but it's pretty cool - and the timing is right.
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Bytessence InstallMaker 5.3 - (25dec2011) - bugfix relea

Post by Little John »

Hi,

thank you for the new version!
Inf0Byt3 wrote:@Little John:
To learn about the macros for installer/uninstaller exe version info, press F1 after opening the Version info dialog.
Adding a set of macros to be used in the uninstaller version info dialog is a wise solution. Thank you!

-----------------------------------------------------------------------------------------

I encountered a problem with version 5.2, and also with version 5.3.

When creating an installer, I used

Code: Select all

<ProgramFiles>\<ProgramName>\
as installation path of the main component:

[Picture removed]


Running the installer on my German Windows XP then looks like this:


[Picture removed]


If I just click [ Next > ], everything works fine.

However, choosing not the default destination directory but a different one, leads to problems.
All files will be copied to the directory which I chose, but all shortcuts that are created in the start menu have wrong targets, which still have as path C:\Programme\FlexLink\ in this case, rather than the directory that I chose. So all shortcuts in the start menu are broken. Also, if in BIM I checked e.g. the option Show the 'View readme' checkbox on the finish page, this will not work because the installer can't find the Readme file as well.

Are

Code: Select all

<ProgramFiles>\<ProgramName>\
not the proper variables for the installation path of the main component?
Or perhaps this is a bug in Bytessence InstallMaker?

Best regards, Little John
Last edited by Little John on Sun Jan 01, 2012 9:31 am, edited 1 time in total.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Re: Bytessence InstallMaker 5.3 - (25dec2011) - bugfix relea

Post by Inf0Byt3 »

Hi!

Thanks for the detailed report, I can confirm this as a bug. The problem arises from the fact that BIM "fixes" (replaces the variables with the real data) the path (for start menu shortcuts, etc.) just before the main component path gets in its final form (e.g. before the user has the ability to change them when browsing for a new folder) thus the files point to the wrong location. I will fix this ASAP.

Best regards.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Re: Bytessence InstallMaker 5.3 - (25dec2011) - bugfix relea

Post by Inf0Byt3 »

yrreti wrote:Thank you very much Inf0Byt3.
I think we all appreciate the hard work and effort that you have put into this installer program.
I won't be able to test it out for a while yet, as I've been too busy with honey-do-list projects lately. :(
But one other point I'd like to comment on is your web site. You do a good job on it!
But it really cracked me up this time, when it started snowing on the first page. :lol:
I don't know how you did that, but it's pretty cool - and the timing is right.
Hehe thanks... At least virtual snow if not the real thing. As a New Year present, version 5.31 of BIM has been released:
-Fixed some strings in the English and German translations
-Fixed the path tokenizer replacing variables too early for some tasks
-Fixed registry variables not defaulting if the selected registry value has no data inside
-Fixed a possible deadlock when setting env vars (SendMessage replaced by SendMessageTimeout)
-Made other minor internal changes to the task removal procedures
Happy New Year!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Bytessence InstallMaker 5.31 - (31Dec2011) - bugfix rele

Post by Little John »

With BIM 5.31, the new year actually starts good for me. :-)

Thank you very much!
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Bytessence InstallMaker 5.31 - (31Dec2011) - bugfix rele

Post by Little John »

Version 5.31 works like a charm! :)
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Re: Bytessence InstallMaker 5.31 - (31Dec2011) - bugfix rele

Post by Inf0Byt3 »

Little John wrote:Version 5.31 works like a charm! :)
I'm glad to hear that. Please let me know if you find any more problems :D.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Post Reply