rzwierz
Posts: 43
Joined: Thu Apr 19, 2007 5:23 pm

Problems with installer using LZMA

Dear All,

We've recently come across a problem which prevents our installer from succeeding to install on PCs on which there are some wide characters in paths to temp directory.

To reproduce:
  1. Create a default Enterprise project with AI 6.1 (in my case project language was set to English(UK))
  2. Configure it to add any file to Application Directory
  3. In Builds->Configuration select LZMA compression
  4. Make sure that in Bootstrapper tab Create EXE setup file and Include install files in EXE are selected and that Extract Location points to a directory which path will contain wide characters on target OS
  5. Build project.
  6. Try to install the sample project on a non-English Windows XP (I've tried on a Japanese Windows XP)
Effect:
  • The installer will hang with message saying 'Extracting files from archive...'. A quick look on the installer with a debugger shows that it is stuck somewhere in decoder.dll.
I know that a workaround for that is to set Extract Location to a place which surely won't contain wide chars, but this is not very neat solution, as ideal location for extracting temp files is in TEMP directory and path to it may often contain wide chars.

The other workaround is to switch LZMA off, but this is not an option for us as our installer needs to fit onto a flash memory of very small size.

I was wondering whether it would be possible for you to fix this issue in releases to come? This would make installers a lot nicer.

Thank you so much,
Rafal
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

You are encountering this behavior because currently that field (like all fields in the Advanced Installer bootstrapper) doesn't support Unicode format (wide characters). However, we have this feature on our TODO list and it will be available in a future version of Advanced Installer.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rzwierz
Posts: 43
Joined: Thu Apr 19, 2007 5:23 pm

Hi Cosmin,

Thanks for your reply. Can you give any ETA on when bootstrapper will be Unicode compliant? This is really important to my company as we have lots of customers around the world.

Thanks so much,
Rafal
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I'm afraid that I cannot give you an ETA for now. However, I have increased it's priority.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rzwierz
Posts: 43
Joined: Thu Apr 19, 2007 5:23 pm

Hi Cosmin,

Thank you so much. We'll be waiting for the fix.

I've got one more question, however. When we switch LZMA off the installer works fine even though TEMP folder has some wide characters in its path. Is that expected, or are we just lucky/missing something.

I other words. Do you think that switching off LZMA is enough to have installer (using bootstrapper) working with wide characters in path to TEMP directory and, in general, with wide characters in Windows user name?

Thanks so much for your continuing support.

Rafal
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
When we switch LZMA off the installer works fine even though TEMP folder has some wide characters in its path. Is that expected, or are we just lucky/missing something.
Please note that this is not a normal behavior and most likely you will encounter problems on other machines. Usually, this happens if the codepage of the installation package is the same as the codepage used by the operating system (for example japanese characters on Windows XP in japanese).

You can test if this actually works as expected by running the installation package on machines with different codepages (languages).
Do you think that switching off LZMA is enough to have installer (using bootstrapper) working with wide characters in path to TEMP directory and, in general, with wide characters in Windows user name?
Like I said in my previous post, Unicode is not supported. Therefore, excepting some special cases (like the one you encountered), you cannot use wide characters in the bootstrapper.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rzwierz
Posts: 43
Joined: Thu Apr 19, 2007 5:23 pm

Hi Cosmin,

Thanks for your engagement, but I still don't quite understand:
Usually, this happens if the codepage of the installation package is the same as the codepage used by the operating system (for example japanese characters on Windows XP in japanese).
In the example from the first post the installer was only configured to use English language and the installer still worked (with LZMA switched off).
Like I said in my previous post, Unicode is not supported. Therefore, excepting some special cases (like the one you encountered), you cannot use wide characters in the bootstrapper.
So how can I ensure that my bootstrapper will work on all PCs?

Best wishes,
Rafal
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
In the example from the first post the installer was only configured to use English language and the installer still worked (with LZMA switched off).
If you use wide characters for the Extract Location it is not guaranteed that the installation package will work. Sometimes it may work (if the codepage of the MSI is the same as the codepage of the OS) and most of the times it will not work (like you explained in your first post).
So how can I ensure that my bootstrapper will work on all PCs?
Note that your installation package will work on all PCs as long as you do not use wide characters for the Bootstrapper (for now they are not supported).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rzwierz
Posts: 43
Joined: Thu Apr 19, 2007 5:23 pm

Hi Cosmin,

Thanks for all your replies.

That unfortunately means that we need to invent a way of creating unique writeable directory, which doesn't have any wide chars in name and use it as Extract Location :-(. Do you have any suggestions on how we could do that? Is there any directory in the system which we could safely use (apart from TEMP which may have Unicode chars in the path)? Or should we create a custom action which will try to create such a directory?

Any suggestions are most welcome.

Anyway, I hope you'll manage to release Unicode compliant bootstrapper soon as possible as the above solution is far from being ideal :-(.

Best wishes,
Rafal
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

In order to avoid the wide characters you can set the "Extract Location" field to [WindowsVolume]myfolder.

This way when the user runs the installation, the folder "myfolder" will be created on the partition which contains the Windows folder. After the installation is completed this folder is removed automatically.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rzwierz
Posts: 43
Joined: Thu Apr 19, 2007 5:23 pm

Thanks a lot,

We'll try that.

Regards,

Rafal
rzwierz
Posts: 43
Joined: Thu Apr 19, 2007 5:23 pm

Hi Cosmin,

A thought has just stroke me. If I remove Extract Location entirely then a temp path will be assumed. If you're using GetTempPath API function to get path to TEMP directory, then you get short path, which doesn't contain any wide chars in which case the bootstrapper is in a way Unicode resistant.

Am I right?

Regards,
Rafal
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Yes, you are right. This is a good solution for your problem.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”