Click here to Skip to main content
15,895,011 members
Articles / Desktop Programming / MFC

Little Install Builder

Rate me:
Please Sign up or sign in to vote.
4.84/5 (23 votes)
30 Jul 20023 min read 100.1K   1.1K   47  
Building setup programs using Microsoft's setup scripts.
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif //_WIN32\r\n"
    "#include ""res\\Setup.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON    DISCARDABLE     "res\\Setup.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//

IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE 
BEGIN
    "C",            ID_EDIT_COPY,           VIRTKEY, CONTROL, NOINVERT
    "V",            ID_EDIT_PASTE,          VIRTKEY, CONTROL, NOINVERT
    VK_BACK,        ID_EDIT_UNDO,           VIRTKEY, ALT, NOINVERT
    VK_DELETE,      ID_EDIT_CUT,            VIRTKEY, SHIFT, NOINVERT
    VK_F6,          ID_NEXT_PANE,           VIRTKEY, NOINVERT
    VK_F6,          ID_PREV_PANE,           VIRTKEY, SHIFT, NOINVERT
    VK_INSERT,      ID_EDIT_COPY,           VIRTKEY, CONTROL, NOINVERT
    VK_INSERT,      ID_EDIT_PASTE,          VIRTKEY, SHIFT, NOINVERT
    "X",            ID_EDIT_CUT,            VIRTKEY, CONTROL, NOINVERT
    "Z",            ID_EDIT_UNDO,           VIRTKEY, CONTROL, NOINVERT
END


/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_PROPPAGE1 DIALOG DISCARDABLE  0, 0, 300, 159
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Welcome"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         134,IDC_STATIC,"Static",SS_BITMAP,0,0,80,160
    LTEXT           "Welcome to the %s Setup program. This program will install %s on your computer.",
                    IDC_TEXT1,87,0,205,26
    LTEXT           "It is strongly recommanded that you exit all Windows programs before running this Setup program.",
                    IDC_STATIC,87,32,205,26
    LTEXT           "Click Cancel to quit Setup and then close any programs you have running. Click Next to continue with the Setup program.",
                    IDC_STATIC,87,64,205,36
    LTEXT           "WARNING: This program is protected by copyright law and international treaties.",
                    IDC_STATIC,87,106,205,52
END

IDD_PROPPAGE2 DIALOG DISCARDABLE  0, 0, 300, 159
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Choose Destination Location"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         134,IDC_STATIC,"Static",SS_BITMAP,0,0,80,160
    LTEXT           "Setup will install %s in the following folder.",
                    IDC_TEXT1,87,0,205,26
    LTEXT           "To install to this folder click Next.",IDC_STATIC,87,28,
                    205,26
    LTEXT           "To install to a different folder, click Browse and select another folder.",
                    IDC_STATIC,87,56,205,26
    LTEXT           "You can choose not to install %s by clicking Cancel to exit Setup.",
                    IDC_TEXT2,87,82,205,25
    PUSHBUTTON      "&Browse",IDC_BROWSE,238,135,56,14
    EDITTEXT        IDC_DESTINATION_PATH,87,118,207,12,ES_AUTOHSCROLL
    LTEXT           "Space Required:",IDC_STATIC,87,135,54,8
    LTEXT           "Text6",IDC_SPACE_REQUIRED,179,135,52,10
    LTEXT           "Space Available:",IDC_STATIC,87,147,54,8
    LTEXT           "Text8",IDC_SPACE_AVAILABLE,179,149,50,10
END

IDD_PROPPAGE3 DIALOG DISCARDABLE  0, 0, 300, 159
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Select Program Folder"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         134,IDC_STATIC,"Static",SS_BITMAP,0,0,80,160
    LTEXT           "Setup will add program icons to the Program Folder listed below. You may type a new folder name, or select one from the existing Folders list. Click Next to continue.",
                    IDC_STATIC,87,0,205,34
    LTEXT           "&Program Folder",IDC_STATIC,87,40,200,10
    EDITTEXT        IDC_PROGRAMFOLDER,87,51,205,12,ES_AUTOHSCROLL
    LTEXT           "E&xisting Folders",IDC_STATIC,87,74,200,8
    LISTBOX         IDC_EXISTINGFOLDERS,87,84,205,75,LBS_SORT | 
                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END

IDD_PROPPAGE4 DIALOG DISCARDABLE  0, 0, 300, 159
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Start Copying Files"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         134,IDC_STATIC,"Static",SS_BITMAP,0,0,80,160
    LTEXT           "Setup has enough information to start copying the program files. If you want to review or change any settings, click Back. If you are satisfied with the settings, click Next to begin copying files.",
                    IDC_STATIC,87,0,205,41
    LTEXT           "Current Settings",IDC_STATIC,87,45,205,9
    EDITTEXT        IDC_CURRENT_SETTINGS,87,55,205,104,ES_MULTILINE | 
                    ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
END

IDD_PROPPAGE5 DIALOG DISCARDABLE  0, 0, 300, 159
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Setup Complete"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         134,IDC_STATIC,"Static",SS_BITMAP,0,0,80,160
    LTEXT           "Setup has finished installing %s on your computer.",
                    IDC_TEXT1,87,0,205,44
    CONTROL         "&Run the installed application now",IDC_RUN_NOW,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,87,52,205,12
END

CG_IDD_PROGRESS DIALOG DISCARDABLE  0, 0, 186, 47
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         "Progress1",CG_IDC_PROGDLG_PROGRESS,"msctls_progress32",
                    WS_BORDER,16,21,154,13
    LTEXT           "",CG_IDC_PROGDLG_STATUS,13,7,158,8
END


#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "Programmed by Pablo van der Meer\0"
            VALUE "CompanyName", "Pablo Software Solutions\0"
            VALUE "FileDescription", "Setup MFC Application\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "Setup\0"
            VALUE "LegalCopyright", "Copyright (C) 2002\0"
            VALUE "LegalTrademarks", "\0"
            VALUE "OriginalFilename", "stub.exe\0"
            VALUE "PrivateBuild", "\0"
            VALUE "ProductName", "Setup Application\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
            VALUE "SpecialBuild", "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // !_MAC


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_PROPPAGE1, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 293
        TOPMARGIN, 7
        BOTTOMMARGIN, 151
    END

    IDD_PROPPAGE2, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 293
        TOPMARGIN, 7
        BOTTOMMARGIN, 151
    END

    IDD_PROPPAGE3, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 293
        TOPMARGIN, 7
        BOTTOMMARGIN, 151
    END

    IDD_PROPPAGE4, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 293
        TOPMARGIN, 7
        BOTTOMMARGIN, 151
    END

    IDD_PROPPAGE5, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 293
        TOPMARGIN, 7
        BOTTOMMARGIN, 151
    END

    CG_IDD_PROGRESS, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 179
        TOPMARGIN, 7
        BOTTOMMARGIN, 40
    END
END
#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Menu
//

IDR_MAINFRAME MENU DISCARDABLE 
BEGIN
    MENUITEM "Hide Me",                     65535
END


/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//

IDB_SETUP               BITMAP  FIXED IMPURE    "res\\setup.bmp"

/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE PRELOAD DISCARDABLE 
BEGIN
    IDR_MAINFRAME           "Setup"
END

STRINGTABLE PRELOAD DISCARDABLE 
BEGIN
    AFX_IDS_APP_TITLE       "Setup"
    AFX_IDS_IDLEMESSAGE     "Ready"
END

STRINGTABLE DISCARDABLE 
BEGIN
    ID_INDICATOR_EXT        "EXT"
    ID_INDICATOR_CAPS       "CAP"
    ID_INDICATOR_NUM        "NUM"
    ID_INDICATOR_SCRL       "SCRL"
    ID_INDICATOR_OVR        "OVR"
    ID_INDICATOR_REC        "REC"
END

STRINGTABLE DISCARDABLE 
BEGIN
    ID_APP_ABOUT            "Display program information, version number and copyright\nAbout"
    ID_APP_EXIT             "Quit the application; prompts to save documents\nExit"
END

STRINGTABLE DISCARDABLE 
BEGIN
    ID_NEXT_PANE            "Switch to the next window pane\nNext Pane"
    ID_PREV_PANE            "Switch back to the previous window pane\nPrevious Pane"
END

STRINGTABLE DISCARDABLE 
BEGIN
    ID_WINDOW_SPLIT         "Split the active window into panes\nSplit"
END

STRINGTABLE DISCARDABLE 
BEGIN
    ID_EDIT_CLEAR           "Erase the selection\nErase"
    ID_EDIT_CLEAR_ALL       "Erase everything\nErase All"
    ID_EDIT_COPY            "Copy the selection and put it on the Clipboard\nCopy"
    ID_EDIT_CUT             "Cut the selection and put it on the Clipboard\nCut"
    ID_EDIT_FIND            "Find the specified text\nFind"
    ID_EDIT_PASTE           "Insert Clipboard contents\nPaste"
    ID_EDIT_REPEAT          "Repeat the last action\nRepeat"
    ID_EDIT_REPLACE         "Replace specific text with different text\nReplace"
    ID_EDIT_SELECT_ALL      "Select the entire document\nSelect All"
    ID_EDIT_UNDO            "Undo the last action\nUndo"
    ID_EDIT_REDO            "Redo the previously undone action\nRedo"
END

STRINGTABLE DISCARDABLE 
BEGIN
    AFX_IDS_SCSIZE          "Change the window size"
    AFX_IDS_SCMOVE          "Change the window position"
    AFX_IDS_SCMINIMIZE      "Reduce the window to an icon"
    AFX_IDS_SCMAXIMIZE      "Enlarge the window to full size"
    AFX_IDS_SCNEXTWINDOW    "Switch to the next document window"
    AFX_IDS_SCPREVWINDOW    "Switch to the previous document window"
    AFX_IDS_SCCLOSE         "Close the active window and prompts to save the documents"
END

STRINGTABLE DISCARDABLE 
BEGIN
    AFX_IDS_SCRESTORE       "Restore the window to normal size"
    AFX_IDS_SCTASKLIST      "Activate Task List"
END

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_PROPSHT_CAPTION     "Wizard"
    CG_IDS_PROGRESS_CAPTION "Extracting Files"
END

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\Setup.rc2"  // non-Microsoft Visual C++ edited resources
#include "afxres.rc"         // Standard components
#endif

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions