summaryrefslogtreecommitdiffabout
path: root/install/install.cpp
Unidiff
Diffstat (limited to 'install/install.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--install/install.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/install/install.cpp b/install/install.cpp
index 0ab8fa9..12b20f7 100644
--- a/install/install.cpp
+++ b/install/install.cpp
@@ -4,14 +4,14 @@
4#define KINSHORT "BigBro" 4#define KINSHORT "BigBro"
5#define KINNAME "Big Brother" 5#define KINNAME "Big Brother"
6#define VERSION "1.5" 6#define VERSION "1.5"
7 7
8BOOL Install(void) 8BOOL Install(void)
9{ 9{
10STRING dPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group, Inc.",KINSHORT "Path"); 10STRING dPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",KINSHORT "Path");
11STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group, Inc.","KINPath"); 11STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath");
12LPCSTR qPath = ((LPCSTR)dPath)?(LPCSTR)dPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings"); 12LPCSTR qPath = ((LPCSTR)dPath)?(LPCSTR)dPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings");
13STRING path = REQUESTPATH(" " KINNAME " " VERSION,"\nEnter destination path:",qPath); 13STRING path = REQUESTPATH(" " KINNAME " " VERSION,"\nEnter destination path:",qPath);
14 if(!path) 14 if(!path)
15 return NULL; 15 return NULL;
16 16
17 #ifdefK_ANNED 17 #ifdefK_ANNED
@@ -32,16 +32,16 @@ STRING shortPath = GET_SHORT_PATH(path);
32 INSTALLFILE("bigbro.hl_",path,"bigbro.hlp") && 32 INSTALLFILE("bigbro.hl_",path,"bigbro.hlp") &&
33 INSTALLFILE("bigbro.cn_",path,"bigbro.cnt") 33 INSTALLFILE("bigbro.cn_",path,"bigbro.cnt")
34 )){ 34 )){
35 MessageBox(NULL,"Failed to install " KINNAME " " VERSION " in specified directory",NULL,MB_ICONERROR|MB_OK); 35 MessageBox(NULL,"Failed to install " KINNAME " " VERSION " in specified directory",NULL,MB_ICONERROR|MB_OK);
36 return FALSE; 36 return FALSE;
37 } 37 }
38 ADDMENU("Accessories\\Klever Co.",KINNAME,path,"bigbro.exe"); 38 ADDMENU("Klever Group",KINNAME,path,"bigbro.exe");
39 39
40 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group, Inc.",KINSHORT "Path",path); 40 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",KINSHORT "Path",path);
41 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group, Inc.","KINPath",path); 41 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath",path);
42 42
43FILE* inf=CREATE_INF_FILE(path,KINSHORT ".INF"); 43FILE* inf=CREATE_INF_FILE(path,KINSHORT ".INF");
44 if(!inf){ 44 if(!inf){
45 MessageBox(NULL,"Failed to install " KINNAME " " VERSION,NULL,MB_ICONERROR|MB_OK); 45 MessageBox(NULL,"Failed to install " KINNAME " " VERSION,NULL,MB_ICONERROR|MB_OK);
46 return FALSE; 46 return FALSE;
47 } 47 }
@@ -53,16 +53,16 @@ FILE* inf=CREATE_INF_FILE(path,KINSHORT ".INF");
53 INF_REMOVE_FILE(inf,KINSHORT "Files","bigbro.exe"); 53 INF_REMOVE_FILE(inf,KINSHORT "Files","bigbro.exe");
54 INF_REMOVE_HELP_FILE(inf,KINSHORT "Files","bigbro"); 54 INF_REMOVE_HELP_FILE(inf,KINSHORT "Files","bigbro");
55 INF_REMOVE_FILE(inf,KINSHORT "Files","bigbro.inf"); 55 INF_REMOVE_FILE(inf,KINSHORT "Files","bigbro.inf");
56 INF_FILE_SECTION(inf,"kReg"); 56 INF_FILE_SECTION(inf,"kReg");
57 INF_UNINSTALL_REG(inf,KINSHORT); 57 INF_UNINSTALL_REG(inf,KINSHORT);
58 INF_FILE_SECTION(inf,"kMenu"); 58 INF_FILE_SECTION(inf,"kMenu");
59 INF_MENU_GROUP(inf,1,"Accessories\\Klever Co."); 59 INF_MENU_GROUP(inf,1,"Klever Group");
60 INF_MENU_ITEM(inf,1,KINNAME); 60 INF_MENU_ITEM(inf,1,KINNAME);
61 fclose(inf); 61 fclose(inf);
62 62
63 REG_UNINSTALL_COMMAND(KINSHORT,"Klever " KINNAME " " VERSION,shortPath,KINSHORT".INF","Uninstall"); 63 REG_UNINSTALL_COMMAND(KINSHORT,"Klever " KINNAME " " VERSION,shortPath,KINSHORT".INF","Uninstall");
64 64
65 MessageBox(NULL,KINNAME" " VERSION " installed successfully, you may now run it from Programs/Accessories/Klever Co. menu or remove it using Control Panel Add/Remove Programs applet."," Rejoice!",MB_ICONINFORMATION|MB_OK); 65 MessageBox(NULL,KINNAME" " VERSION " installed successfully, you may now run it from 'Programs/Klever Group' menu or remove it using Control Panel Add/Remove Programs applet."," Rejoice!",MB_ICONINFORMATION|MB_OK);
66 66
67 return TRUE; 67 return TRUE;
68} 68}