⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup.rul

📁 关系型数据库 Postgresql 6.5.2
💻 RUL
📖 第 1 页 / 共 2 页
字号:
/*#	Insight Distribution Systems - System V - Apr 1998#ident	"@(#)setup.rul	1.13 :/sccs/sql/odbc/s.setup.rul 1/6/99 14:47:48"*//*----------------------------------------------------------------------------*\ * *   PostgreSQL ODBC Driver Installation Script for InstallShield *\*----------------------------------------------------------------------------*/#define APP_NAME                "PostgreSQL ODBC Driver"#define DRIVER_NAME             "PostgreSQL"#define DRIVER_FILE             "PSQLODBC.DLL"#define OLD_DRIVER_FILE			"PODBC32.DLL"#define OLD_DRIVER_FILE_RENAMED	"podbc32_sav.dll"#define COMPANY_NAME            "Insight"#define PRODUCT_NAME            "PostgreSQL ODBC Driver"#define PRODUCT_VERSION         "6.3"#define PRODUCT_KEY             "PSQLODBC.DLL"#define UNINSTALL_KEY           "PSQLODBCv6.3"#define ODBC_DM_KEY      "\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\SharedDLLs"#define ODBC_COMP_KEY    "\\SOFTWARE\\ODBC\\ODBCINST.INI"#define ODBC_CORE_KEY    "\\SOFTWARE\\ODBC\\ODBCINST.INI\\ODBC Core"#define ODBC_DRIVERS_KEY "\\SOFTWARE\\ODBC\\ODBCINST.INI\\ODBC Drivers"declare        // functions        prototype SetupScreen();        prototype FileCompare(STRING, STRING, STRING, STRING);        // variables        STRING svMainDirectory [_MAX_STRING], svGrp, svUninstLogFile, svPath;        STRING svValue, szName, szKey, szMessage;        STRING szMsg, szTmp, szTmp2, szFileSet, szProgram;        NUMBER nResult, pos, nvType, nvSize, nStartup, ComponentUsageCount;        NUMBER nvDoNot, nvVersion, nvInstall, nCore, nDM;        STRING dm, core, szFileName, svFileName;                NUMBER options, nvInfo, nvResult;        LONG lResult;        STRING svCompVersion, svFileVersion, svCompDate, svCompTime, svFileDate, svFileTime;programStartHere:        Disable( BACKGROUND );        // Set up the installation screen.        SetupScreen();        InstallationInfo(COMPANY_NAME, PRODUCT_NAME, PRODUCT_VERSION, PRODUCT_KEY);        RegDBSetAppInfo("Location", REGDB_STRING, WINSYSDIR ^ DRIVER_FILE, -1);// Create a Welcome dialog.WelcomeDlg:        Disable( BACKBUTTON );        Welcome( "Welcome to the PostgreSQL Odbc Driver Installation", 0 );        Enable( BACKBUTTON );        Enable( NEXTBUTTON );        GetTargetDirectory:        svMainDirectory = WINSYSDIR;OptionsDlg:        RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);        szKey = ODBC_DM_KEY;        nCore = RegDBKeyExist(szKey);        szName = WINSYSDIR ^ "ODBC32.DLL";        nDM = RegDBGetKeyValueEx(szKey, szName, nvType, svValue, nvSize);        szMessage = "Select options for installing the ODBC Driver Manager.\n" +                "Analysis of your system suggests that the ODBC Driver Manager\n";        nvDoNot = FALSE;        nvInstall = FALSE;        nvVersion = FALSE;        if (nCore >= 0 && nDM >= 0) then                nvDoNot = TRUE;                szMessage = szMessage + "is already installed.  Therefore, you may choose not to install it.";        else                nvInstall = TRUE;                szMessage = szMessage + "is not installed.  Therefore, you should install it now.";        endif;        Enable(FINISHBUTTON);        nResult = AskOptions(EXCLUSIVE, szMessage,                 "Do not install Driver Manager", nvDoNot,                 "Install Driver Manager ", nvInstall,                 "Install Driver Manager (with version checking)", nvVersion);        if (nResult = BACK) then                Disable(FINISHBUTTON);                goto WelcomeDlg;        endif;Version:        CompressInfo("driver.z", DRIVER_FILE, COMP_INFO_VERSIONMS|COMP_INFO_VERSIONLS, nvInfo, svCompVersion);        szFileName = WINSYSDIR ^ DRIVER_FILE;        nResult = VerGetFileVersion(szFileName, svFileVersion);        // MessageBox("System file PSQLODBC.dll version is " + svFileVersion, INFORMATION);        lResult = VerCompare(svCompVersion, svFileVersion, VERSION);        if (lResult = EQUALS) then                //date                CompressInfo("driver.z", DRIVER_FILE, COMP_INFO_DATE, nvInfo, svCompDate);                GetFileInfo(szFileName, FILE_DATE, nvResult, svFileDate);                //time                CompressInfo("driver.z", DRIVER_FILE, COMP_INFO_TIME, nvInfo, svCompTime);                GetFileInfo(szFileName, FILE_TIME, nvResult, svFileTime);                // If compressed file date/time is earlier than system file date/time                // then                 nResult = FileCompare(svCompDate, svCompTime, svFileDate, svFileTime);                if (nResult < 0) then                        lResult = LESS_THAN;                endif;                NumToStr(szTmp, nResult);                // MessageBox("File Compare = " + szTmp, INFORMATION);        endif;                        if (lResult = LESS_THAN) then                MessageBeep(0);                nResult = AskYesNo("The " + PRODUCT_NAME + " is already installed on your system \nand is a newer version than the one that is about to be installed.\n\n" +                        "Would you like to continue the installation anyway (not recommended)?", NO);                if (nResult = NO) then                        MessageBeep(0);                        MessageBox("Installation has been aborted.\nNo changes have been made to your system.", WARNING);                        exit;                endif;        else        /*                nResult = AskYesNo("Ready to install " + PRODUCT_NAME + ".\n\nPress Yes to proceed with the installation.\nPress No to abort the installation.", YES);                if (nResult = NO) then                        MessageBeep(0);                        MessageBox("Installation has been aborted.\nNo changes have been made to your system.", WARNING);                        exit;                endif;        */        endif;CheckRegistry:        Enable(STATUSDLG);        SetStatusWindow(5, "Checking registry entries...");        Delay(1);        RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);        szKey = ODBC_DM_KEY;        nResult = RegDBKeyExist(szKey);        if (nResult < 0 && nvDoNot = TRUE) then                MessageBeep(0);                MessageBox("ODBC Core Components are not installed!", SEVERE);                Disable(STATUSDLG);                MessageBeep(0);                MessageBox("Please install the ODBC Core Components\nand rerun this setup program.", INFORMATION);                exit;        endif;        szName = WINSYSDIR ^ "ODBC32.DLL";        nResult = RegDBGetKeyValueEx(szKey, szName, nvType, svValue, nvSize);        if (nResult < 0 && nvDoNot = TRUE) then                MessageBeep(0);                MessageBox("ODBC Driver Manager (ODBC32.DLL) is not installed!", SEVERE);                Disable(STATUSDLG);                MessageBeep(0);                MessageBox("Please install the ODBC Driver Manager\nand rerun this setup program.", INFORMATION);                exit;        endif;FileSetup:        SetStatusWindow( 10, "Copying program files...");        StatusUpdate(ON, 90);        DeinstallStart(svMainDirectory, svUninstLogFile, UNINSTALL_KEY, 0);        //      Show the uninstall under Add/Remove Programs in Control Panel        RegDBSetItem(REGDB_UNINSTALL_NAME, PRODUCT_NAME);        szFileSet = "psqlodbc";        TARGETDIR = svMainDirectory;    // winsys        FileSetBeginDefine(szFileSet);        nResult = CompressGet("driver.z", "*.*", COMP_NORMAL);        if (nResult < 0) then                NumToStr(szTmp, nResult);                MessageBox("Compress Get Error on driver.z files.\n\nError # " + szTmp, SEVERE);                exit;        endif;        TARGETDIR = svMainDirectory;    // winsys        //      Driver Manager stuff        if (! nvDoNot) then                if (nvVersion) then                        options = COMP_UPDATE_VERSION;                else                        options = COMP_NORMAL;                endif;        //      The File usage count increments are handled by CompressGet        //      with the SHAREDFILE option.                nResult = CompressGet("redist.z", "*.*", options|SHAREDFILE);                if (nResult < 0) then                        NumToStr(szTmp, nResult);                        MessageBox("Compress Get Error on redist.z files.\n\nError # " + szTmp, SEVERE);                        exit;                endif;        endif;        FileSetEndDefine(szFileSet);FileTransfer:        nResult = FileSetPerformEz(szFileSet, 0);        switch(nResult)        case FS_DONE:        case FS_CREATEDIR:                MessageBeep(0);                MessageBox("Unable to create a required subdirectory under " + TARGETDIR + "."                + "\nPlease check write access to this directory.", SEVERE);                abort;        default:                NumToStr(szTmp, nResult);                MessageBeep(0);                MessageBox("Error copying files to " + TARGETDIR + "."                + "\nPlease check this location and try again."                + "\n\nError Number:"+szTmp, SEVERE);                abort;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -