summaryrefslogtreecommitdiffabout
path: root/install/install.cpp
Unidiff
Diffstat (limited to 'install/install.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--install/install.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/install/install.cpp b/install/install.cpp
index aa474d5..bbc2b3b 100644
--- a/install/install.cpp
+++ b/install/install.cpp
@@ -1,16 +1,17 @@
1#include "resource.h" 1#include "resource.h"
2#include "../shared-code/install.h" 2#include "../shared-code/install.h"
3 3
4 #define KINAME"KINSole 1.1" 4#define VERSION "1.1.1"
5 #define KINAME"KINSole " VERSION
5 #define SKINAME"KINSole" 6 #define SKINAME"KINSole"
6 7
7BOOL Install(void) 8BOOL Install(void)
8{ 9{
9STRING tPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",SKINAME "Path"); 10STRING tPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",SKINAME "Path");
10STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath"); 11STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath");
11LPCSTR qPath = ((LPCSTR)tPath)?(LPCSTR)tPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings"); 12LPCSTR qPath = ((LPCSTR)tPath)?(LPCSTR)tPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings");
12STRING path = REQUESTPATH(" " KINAME,"Note: KINSole program file will be installed into your windows directory so that you can rely on it's presence in your search path\nEnter destination path:",qPath); 13STRING path = REQUESTPATH(" " KINAME,"Note: KINSole program file will be installed into your windows directory so that you can rely on it's presence in your search path\nEnter destination path:",qPath);
13 if(!path) 14 if(!path)
14 return NULL; 15 return NULL;
15STRING winDir(_MAX_PATH); 16STRING winDir(_MAX_PATH);
16 17
@@ -49,17 +50,24 @@ FILE* inf=CREATE_INF_FILE(path, SKINAME ".INF");
49 INF_REMOVE_ROOT(inf,SKINAME "WFiles",winDir); 50 INF_REMOVE_ROOT(inf,SKINAME "WFiles",winDir);
50 INF_REMOVE_FILE(inf,SKINAME "WFiles",SKINAME ".exe"); 51 INF_REMOVE_FILE(inf,SKINAME "WFiles",SKINAME ".exe");
51 52
52 INF_FILE_SECTION(inf,"kReg"); 53 INF_FILE_SECTION(inf,"kReg");
53 INF_UNINSTALL_REG(inf,SKINAME); 54 INF_UNINSTALL_REG(inf,SKINAME);
54 55
55 INF_FILE_SECTION(inf,"kMenu"); 56 INF_FILE_SECTION(inf,"kMenu");
56 INF_MENU_GROUP(inf,1,"Klever Group"); 57 INF_MENU_GROUP(inf,1,"Klever Group");
57 INF_MENU_ITEM(inf,1,"KINSole Help"); 58 INF_MENU_ITEM(inf,1,"KINSole Help");
58 fclose(inf); 59 fclose(inf);
59 60
60 REG_UNINSTALL_COMMAND(SKINAME,"Klever " KINAME,shortPath,SKINAME ".INF","Uninstall"); 61 REG_UNINSTALL_COMMAND(SKINAME,"Klever " KINAME,shortPath,SKINAME ".INF","Uninstall");
62 REG_UNINSTALL_ICON(SKINAME,path,SKINAME ".exe",0);
63 REG_UNINSTALL_COMMENT(SKINAME,"Klever " KINAME);
64 REG_UNINSTALL_VERSION(SKINAME,VERSION);
65 REG_UNINSTALL_LOCATION(SKINAME,path);
66 REG_UNINSTALL_PUBLISHER(SKINAME,"Klever Group");
67 REG_UNINSTALL_URLS(SKINAME,"http://www.klever.net/","http://kin.klever.net/kinsole/");
68
61 69
62 MessageBox(NULL,KINAME " installed successfully, you may now run it from command line, read documentation in 'Programs/Klever Group' menu or simply remove it using Control Panel Add/Remove Programs applet."," Rejoice!",MB_ICONINFORMATION|MB_OK); 70 MessageBox(NULL,KINAME " installed successfully, you may now run it from command line, read documentation in 'Programs/Klever Group' menu or simply remove it using Control Panel Add/Remove Programs applet."," Rejoice!",MB_ICONINFORMATION|MB_OK);
63 71
64 return TRUE; 72 return TRUE;
65} 73}