2009년 8월 17일 월요일

InstallAware - Unicode 사용하기

출처 : InstallAware 도움말, http://www.installaware.com/blog/?p=19

InstallAware를 사용하면서, 문자열에대한 기본적인 속성이 ANSI로 되어있다. ==> File명및 Folder명중 한글이나 기타 Unicode가 들어가

면 , Install시 설치가 안된다.

이것을 Unicode를 지원하게 하는 방법이 있는데..

1. Pre-Defined Compiler Variables중에서

  • CODEPAGE: If unspecified, the recommended English codepage of 1252 is used. Other suggested values are 65000 for UTF-7 unicode and 65001 for UTF-8 unicode, or 0 for codepage neutral. Change this value if your setup installs or otherwise makes use of files with accented or non-ASCII locale-specific characters in their names. Ensure this codepage matches the codepage of your current host system to prevent data corruption in your MSI databases and to ensure the correct codepage is used on target systems, thus preventing issues with incorrectly interpreted file names leading to failures when finding files at install-time. Using unicode codepages will render your setups unworkable on Windows 9X operating systems (Windows 95, Windows 98, and Windows ME); however it will ensure the broadest compatibility on Windows NT operating systems (Windows NT 4, Windows 2000, Windows XP, Server 2003, Windows Vista, Server 2008, and Windows 7).
  • CodePage에 관련된 부분을 변경하면 된다.

    2. Pre-Define값을 바꾸는 방법은

    Hello everyone, I hope you’ve all been well!

    This post’s topic: How to customize your setup at build time. This could be used for different products, when only very few things change between them, and having a unique setup project for each one turns into a major copy and clone nightmare. It’s really a quite common scenario to have similar products using similar setup routines. At InstallAware, we actually ship a single installer that contains all four of our product editions - allowing users to choose at runtime which version they want to install. We might cover that in a later post; for now we’ll look at how to customize your installations at build time - emitting multiple “flavors” of a setup, if you will. This is where Compiler Variables come into play.

    Compiler Variables are defined inside the Project Options window. To bring up this window, click the Project Settings button, found inside the Manage group of the Design tab.

    Choose the Compiler Variables section and you’ll see three buttons, Add, Edit and Delete. This is where you define and set the initial values of your Compiler Variables. These variables are accessed using the #COMPILER_VARIABLE_NAME# format inside your MSIcode script. You may use these variables anywhere inside your script. Even MSIcode command fields which do not ordinarily accept variables will take compiler variables, since compiler variable values are “burnt-in” at build-time, and do not change at runtime.

    In addition to replacing literals with values injected at build time, another use of compiler variables is to conditionally include/exclude parts of your MSIcode script. Use the Compiler Variable If, Compiler Variable Else and Compiler Variable End MSIcode commands to include/exclude parts of your setup project at build time. This adds a lot of flexibility to how you can build setups at runtime - you can take out whole blocks of MSIcode script, completely changing your setup logic and files - all at build time, and without needing to use complex automation.

    Here’s a short list of what you can customize with compiler variables, among other things:

    1. Product name
    2. Product version
    3. Product code
    4. Files being installed
    5. Features being built

    Take look at the code below to see what I mean:

    As you can see, one of my compiler variables is “MYPRODUCT” and its defined/initialized on the Compiler Variables section of the Project Options window. The above code builds some files and features if the compiler variable “PRODVERSION” is equal to “Enterprise” but excludes one file if the compiler variable “SUBVERSION” is not equal to “Full”.

    You might also want to take a look at the pre-defined compiler variables that already exist in InstallAware. There are two kinds of pre-defined variables - pre-defined compiler variables and pre-defined script/runtime variables - so don’t get confused between the two. Both of these pre-defined variable kinds come in real handy for lots of things, like figuring out the execution path of your setup. I’d definitely encourage you to take a look at them. Just search for pre-defined variables and pre-defined compiler variablesin the help index.

    My favorite compiler variables are the following:

    1. LOADOLDDATA: Instructs the setup engine to migrate feature selections from older versions.
    2. PROJDIR: Resolves to the project directory on your system.
    3. LOADOLDDATA: Instructs setup to change the way in which localizations are applied at runtime (see the help file for details).
    4. BUILDMODE: Resolves to CD, SFX, WEB, or PATCH based on your setup build mode.
    5. TITLE: Resolves to the name of the setup project.

    Thank you,

    Panagiotis Kefalidis
    Software Design Team Lead
    InstallAware Software Corporation

    댓글 없음:

    댓글 쓰기