#include "..\oisapi\oisa.h" int main(void) { text* pMsg = NULL; oisah apiHandle ; apiHandle = oisagh_GetHandle( "ois20api",OISA_WIN32 , "Oracle Install Studio APIs", "A programatic interface to make your product installable", "1.0.0.0", TRUE, "E:\\OisApi\\03July97\\oisapi", NULL,FALSE); if(apiHandle == OISAHNL) { pMsg = oisagle_GetLastError(); if (pMsg != "") printf("%s",pMsg); else printf("Error getting handle"); return -1; } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisOIfc.dll", "Dlls\\OisOIfc.dll", "%ORACLE_HOME%\\bin\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\oiipi.dll", "Dlls\\Oiipi.dll", "%ORACLE_HOME%\\bin\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisBRus.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OisBRus.dll", "%oracle_home%\\bin\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisIifAC.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OisIifAC.dll", "%ORACLE_HOME%\\BIN\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisSAC.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OisSAC.dll", "%ORACLE_HOME%\\BIN\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisIImp.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OisIImp.dll", "%ORACLE_HOME%\\BIN\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisOImp.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OisOImp.dll", "%ORACLE_HOME%\\BIN\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisOMImp.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OisOMImp.dll", "%ORACLE_HOME%\\BIN\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OISSDK.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OISSDK.dll", "%ORACLE_HOME%\\BIN\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisApiC.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OisApiC.dll", "%ORACLE_HOME%\\BIN\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisIIfc.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OisIIfc.dll", "%ORACLE_HOME%\\BIN\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } // mfc dlls if (oisaafp_AddFileToProduct(apiHandle, "c:\\windows\\system32\\mfc42.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\MFC\\mfc42.dll", "%windows_dir%\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "c:\\windows\\system32\\msvcirt.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\MFC\\msvcirt.dll", "%windows_dir%\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "c:\\windows\\system32\\msvcrt.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\MFC\\msvcrt.dll", "%windows_dir%\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "c:\\windows\\system32\\msvcrt40.dll", "E:\\OisApi\\03July97\\oisapi\\Dlls\\MFC\\msvcrt40.dll", "%windows_dir%\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } // libs if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\release\\OisApiC.lib", "E:\\OisApi\\03July97\\oisapi\\Dlls\\OisApiC.lib", "%ORACLE_HOME%\\ois20api\\Lib\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } // templates if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\Templates\\NLS.CAT", "E:\\OisApi\\03July97\\oisapi\\Templates\\NLS.CAT", "%ORACLE_HOME%\\ois20api\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\Templates\\template.dei", "E:\\OisApi\\03July97\\oisapi\\Templates\\template.dei", "%ORACLE_HOME%\\ois20api\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\Templates\\template.ins", "E:\\OisApi\\03July97\\oisapi\\Templates\\template.ins", "%ORACLE_HOME%\\ois20api\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\Templates\\template.vrf", "E:\\OisApi\\03July97\\oisapi\\Templates\\template.vrf", "%ORACLE_HOME%\\ois20api\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\Templates\\toolsois.dei", "E:\\OisApi\\03July97\\oisapi\\Templates\\toolsois.dei", "%ORACLE_HOME%\\ois20api\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\Templates\\toolsois.ins", "E:\\OisApi\\03July97\\oisapi\\Templates\\toolsois.ins", "%ORACLE_HOME%\\ois20api\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\Templates\\toolsois.vrf", "E:\\OisApi\\03July97\\oisapi\\Templates\\toolsois.vrf", "%ORACLE_HOME%\\ois20api\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } //Include Files if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\oisapi\\oisa.h", "E:\\OisApi\\03July97\\oisapi\\Include\\oisa.h", "%ORACLE_HOME%\\ois20api\\Include\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\oisapi\\sx.h", "E:\\OisApi\\03July97\\oisapi\\Include\\sx.h", "%ORACLE_HOME%\\ois20api\\Include\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } //doc files if (oisaafp_AddFileToProduct(apiHandle, "e:\\docs\\oisapis.doc", "E:\\OisApi\\03July97\\oisapi\\docs\\oisapis.doc", "%ORACLE_HOME%\\ois20api\\Doc\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } //sample files if (oisaafp_AddFileToProduct(apiHandle, "e:\\ois20\\TestApi\\testapi.c", "E:\\OisApi\\03July97\\oisapi\\Samples\\testapi.c", "%ORACLE_HOME%\\ois20api\\Sample\\", OISA_NOTYPE,TRUE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } // add the environment variable if (oisaae_AddVariableToProduct(apiHandle,"ois20api","%oracle_home%\\ois20api","ora_config","",FALSE,0,FALSE)) { pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Adding File"); } if (oisapgs_GenerateScripts(apiHandle)) { printf("GenerateScripts error\n"); pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Generating Script"); } if (oisapd_UpdateStagingArea(apiHandle,"E:\\athma\\error.log")) { printf("UpdateStagingArea error\n"); pMsg = oisagle_GetLastError(); if (pMsg != NULL) printf("%s",pMsg); else printf("Error Generating Script"); } oisarh_ReleaseHandle(apiHandle) ; }