MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: TryMeDualPurposePackage-SupportsWinXP.MM[Next]: TryMeExcelAddIn.MM
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->MAKEMSI Installs...->Samples Installed by MAKEMSI->Samples - Build New MSI/MSM->TryMeDutch.MM

TryMeDutch.MM

This is one of the MAKEMSI samples which build a new MSI, it "localizes" the english text to create a dutch language based installer. As there are a number of files involved I have installed them into the "Localisation to Dutch" subdirectory. Thanks to CF vd Berg for this example.

It has these associated files:

  1. "TryMeDutch.ver" is a dutch version of "TryMe.ver".

  2. "TryMeDutch.rtf" is a dutch version of "TryMe.rtf".

  3. "ME_Dutch.mmh" is a dutch version of "ME.MMH".

  4. "ReadMe_Dutch.TXT", not part of the build but explains the process.

  5. The "NLD" subdirectory contains the dutch versions of msi table text in ".idt" format (these are imported with the "TableImportFromIdt" command)..
;----------------------------------------------------------------------------
;    MODULE NAME:   TRYMEDutch.MM
;
;        $Author:   USER "Dennis"  $ (original by CF vd Berg)
;      $Revision:   1.0  $
;          $Date:   26 May 2007 13:58:22  $
;       $Logfile:   C:/DBAREIS/Projects.PVCS/Win32/MakeMsi/TryMeDutch.MM.pvcs  $
;
; DESCRIPTION
; ~~~~~~~~~~~
; This is an example that localizes TryMe.MM for the Dutch language.
; The big effort is of course to translate all the strings in the MSI.
;
; I recommend that you keep translations to MAKEMSI generated text separate
; from others to ensure easy migration to newer versions.
;----------------------------------------------------------------------------



;===========================================
; Set the Dutch language strings and a few other adjustments
;===========================================
#(
    ;--- Define a macro with this specific reserved title: it is automatically called
    ;---    as soon as everything else is done in uisample.mmh, meaning MAKEMSI will
    ;---    not overwrite anything we do here.
    ;--- It has to be defined in the code before the inclusion of the MakeMSI files
    ;---   (here: #include "ME.MMH"), otherwise you'll get a warning that it was defined already.
    #define UISAMPLE_HOOK_FINISHED_UI_UPDATES

    ;--- Set the allowed languages for the MSI
    ;---   The value of ProductLanguage in Property.NLD must be listed in the Value parameter.
    ;---   Values set are: 0 - language neutral, 1033 - english, 1043 - Dutch.
    ;---   Several other language identifiers are listed in the file LanguageIdentifiers.txt.
    <$Summary "TEMPLATE"     Value="Intel;0,1033,1043">

    ;--- Set the CodePage to allow special (language-specific) characters in the dialogs
    ;---   CodePage 1252 is the default, so in this case it doesn't need to be set,
    ;---   but it is added here in case you need a different character set.
    <$CodePage "1252">

    ;--- Direct='N' is necessary to not throw away the previous entries in the table,
    ;---   and only overwrite those needed. (It apparently is slower, though.)
    <$TableImportFromIdt "NLD\MS SDK\*.NLD" DIRECT="N">
    <$TableImportFromIdt "NLD\Mine\*.NLD"   DIRECT="N">

    ;--- adjust the height of the Text field in the Verify Ready dialog, since with
    ;---   the original size, only 2 lines will fit, and our Dutch text needs 3.
    #ifndef UISAMPLE_NEWSIZE_VerifyReadyDlg.Text
        ;--- Must be pre MAKEMSI v07.118 (newer versions already do this) ---
        <$Table "Control">
        #(
            <$Row
                   @Where="Dialog_ = 'VerifyReadyDlg' AND Control = 'Text'"
                   @OK='=1'
                   Height="160"      ;;Previous value = 20
            >
        #)
        <$/Table>
    #endif
#)



;===========================================
; Set the Title and Description of the 'Main' Feature: the 'root' of the feature tree in the Custom Install window.
;===========================================
#define COMPANY_COMPLETE_FEATURE_TITLE          De Software
#define COMPANY_COMPLETE_FEATURE_DESCRIPTION    De complete software van het pakket



;===========================================
; Below here is the relatively unchanged code of the TryMe.MM example
;===========================================


;--- Include MAKEMSI support (with my dutch customisations and MSI branding) ---
#include "ME_Dutch.MMH"         ;;My variation of "ME.MMH" (all of the above could go into this header)

;--- Define default location where file should install and add files --------
<$DirectoryTree Key="INSTALLDIR" Dir="c:\program files\TryMe (makemsi sample)\<$MAKEMSI_MM_BASENAME>" CHANGE="\" PrimaryFolder="Y">
<$Files "TryMe*.*" DestDir="INSTALLDIR">

TryMeDutch.VER

;----------------------------------------------------------------------------
;
;    MODULE NAME:   TrymeDutch.VER
;
;        $Author:   USER "Dennis"  $
;      $Revision:   1.2  $
;          $Date:   04 Jun 2007 17:40:56  $
;       $Logfile:   C:/DBAREIS/Projects.PVCS/Win32/MakeMsi/TryMeDutch.ver.pvcs  $
;
;    DESCRIPTION:   Simple sample/test MSI using the Dutch language.
;
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; ProductName = TryMe Dutch (simpel MAKEMSI test MSI)
; DESCRIPTION = Een eenvoudige test voor een Nederlandse versie van TryMe.MM
; Licence     = TryMeDutch.rtf
; Installed   = WINDOWS_ALL
; MsiName     = TryMe_Dutch
; Guid.UpgradeCode = {7EF333CB-3BB9-457D-831E-8482E50F2997}
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



;############################################################################
VERSION : 3.076.0001
DATE    : 24 May 2007
CHANGES : De eerste Nederlandse versie van TryMe


;############################################################################
VERSION : 3.074.0000
DATE    : 25 Feb 2003
CHANGES : First cut.

ME_Dutch.mmh

;----------------------------------------------------------------------------
;
;    MODULE NAME:   ME_Dutch.MMH
;
;        $Author:   USER "Dennis"  $
;      $Revision:   1.0  $
;          $Date:   26 May 2007 10:03:14  $
;       $Logfile:   C:/DBAREIS/Projects.PVCS/Win32/MakeMsi/ME_Dutch.mmh.pvcs  $
;
; Very simplistic example of a MAKEMSI customisation/branding file, see
; "DENNIS.MMH" for a more complex variation (please don't use it though...).
;
; Adapted for the Dutch Language: DEPT_ en COMPANY_ defines and UISAMPLE_LEFTSIDE_TEXT.
;----------------------------------------------------------------------------



;----------------------------------------------------------------------------
;--- Set up some options specific to my requirements ------------------------
;----------------------------------------------------------------------------
#define? DEPT_ARP_URL_PUBLISHER           http://www.MyUrl.com/See/ME_Dutch.MMH/
#define? DEPT_ARP_URL_TECHNICAL_SUPPORT   http://www.MyUrl.com/See/ME_Dutch.MMH/Support
#define? DEPT_NAME                        Mijn Naam
#define? DEPT_ADDRESS                     Mijn Adres (zie "ME.MMH")
#define? COMPANY_CONTACT_NAME             <$DEPT_NAME>
#define? COMPANY_CONTACT_NAME_PHONE                          ;;No phone



;----------------------------------------------------------------------------
;--- Override/set some standard defaults ------------------------------------
;----------------------------------------------------------------------------
#define? DBG_ALL                                   Y         ;;Add MAKEMSI debugging to "console file"
#define? COMMONFRAMEWORK_ZIP_SOURCE_FOR_BACKUP     N         ;;No "insurance" until I bother to install "info zip"...
#define? DEFAULT_SERVICE_CONTROL_UNINSTALL_EVENTS            ;;I think this option is safer than the MAKEMSI default
#define? DEFAULT_SERVICE_CONTROL_INSTALL_EVENTS              ;;I think this option is better
#define? DEFAULT_FILE_WANT_FILEHASH                Y         ;;My box can generate MD5 hashes!
#define? COMPANY_PREPROCESS_LICENCE_FILE           Y         ;;Default is to preprocess licence files
#define? MAKEMSI_HTML_EXTENSION                    hta       ;;Default extension (HTML Application - gets around WINXP SP2 issue)
#define? UISAMPLE_LEFTSIDE_TEXT_FONT_COLOR         &H7F0000  ;;Medium Blue in BGR (believe it or not...)
#(
    #define? UISAMPLE_LEFTSIDE_TEXT
    Ontwikkeld door <$DEPT_NAME> - <$DEPT_ADDRESS>.
    Hier kan je van alles neerzetten en vervangen met eigen plaatjes etc.
    Deze tekst is gedefinieerd in "ME_Dutch.MMH"!
#)
#(
    #define? @VALIDATE_TEXT_FOR_MISSINGDATA                   ;;Example only as now duplicates exact text as new default value
    This column is not mentioned in the _Validation table.
    Either add the validation data or use the "@validate" parameter
    on the "row" command (or alter its default).
#)



;----------------------------------------------------------------------------
;--- Include MAKEMSI support ------------------------------------------------
;----------------------------------------------------------------------------
#include "DEPT.MMH"


;----------------------------------------------------------------------------
;--- I want to compress any DLL based custom actions generated by MAKEMSI ---
;----------------------------------------------------------------------------
<$GetFullBuildTimeFileName RcVar="@@FullUpxExeName" Macro="DENNIS_UPX.EXE" File="upx.exe" MustExist="N">
#if [@@FullUpxExeName = '']
    ;--- If UPX.EXE doesn't exist report an error ---------------------------
   ;#error "DLL not being compressed (UPX.EXE not found)"       ;;This is also a sample, can't expect users to have "UPX.EXE"...
    #info  "DLL custom action code will not be compressed (UPX.EXE not found)"
#else
    ;--- "UPX.EXE" was found ------------------------------------------------
    #(
        ;--- Define the macro that MAKEMSI will use as required -------------
        #define+ DLLCA-C_COMPRESS_DLL_COMMAND_LINE      ;;Need to OVERRIDE value (we couldn't do it earler or "GetFullBuildTimeFileName" wouldn't exist!)

        ;--- I expect "upx.exe" to be in the "PATH" environment variable ----
        "<??@@FullUpxExeName>"                          ;;Full name of UPX.EXE (get from "http://upx.sourceforge.net/")

        ;--- I want highest compression -------------------------------------
        --best

        ;--- Backup the DLL as a debugging aid... ---------------------------
        -k
    #)
#endif

TryMeDutch.RTF

{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\colortbl ;\red0\green0\blue255;}
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\lang1033\f0\fs18 Dit is een nederlandse versie van de licentie-overeenkomst.\par
Zie verder de engelse TryMe.rtf.\cf1\fs16\par
}


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: TryMeDualPurposePackage-SupportsWinXP.MM[Next]: TryMeExcelAddIn.MM


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday February 28 2016 at 3:45pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.