-rw-r--r-- | install/install.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/install/install.cpp b/install/install.cpp index 6fa4ae4..d11de03 100644 --- a/install/install.cpp +++ b/install/install.cpp | |||
@@ -1,20 +1,21 @@ | |||
1 | #include "resource.h" | 1 | #include "resource.h" |
2 | #include "../shared-code/install.h" | 2 | #include "../shared-code/install.h" |
3 | 3 | ||
4 | #defineKINAME "PumpKIN 2.5.1-trunk" | 4 | #define VERSION "2.6" |
5 | #defineKINAME "PumpKIN " VERSION | ||
5 | #define SKINAME "PumpKIN" | 6 | #define SKINAME "PumpKIN" |
6 | 7 | ||
7 | BOOL Install(void) | 8 | BOOL Install(void) |
8 | { | 9 | { |
9 | STRING dPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",SKINAME "Path"); | 10 | STRING dPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",SKINAME "Path"); |
10 | STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath"); | 11 | STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath"); |
11 | LPCSTR qPath = ((LPCSTR)dPath)?(LPCSTR)dPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings"); | 12 | LPCSTR qPath = ((LPCSTR)dPath)?(LPCSTR)dPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings"); |
12 | STRING path = REQUESTPATH(" " KINAME,"\nEnter destination path:",qPath); | 13 | STRING path = REQUESTPATH(" " KINAME,"\nEnter destination path:",qPath); |
13 | if(!path) | 14 | if(!path) |
14 | return NULL; | 15 | return NULL; |
15 | 16 | ||
16 | #ifdefK_ANNED | 17 | #ifdefK_ANNED |
17 | STRING sysDir(_MAX_PATH); | 18 | STRING sysDir(_MAX_PATH); |
18 | GetSystemDirectory(sysDir,_MAX_PATH); | 19 | GetSystemDirectory(sysDir,_MAX_PATH); |
19 | INSTALLFILE("mfc42.dl_",sysDir,"mfc42.dll"); | 20 | INSTALLFILE("mfc42.dl_",sysDir,"mfc42.dll"); |
20 | #endif | 21 | #endif |
@@ -47,21 +48,27 @@ FILE* inf=CREATE_INF_FILE(path,SKINAME ".INF"); | |||
47 | INF_FILE_HEADER(inf); | 48 | INF_FILE_HEADER(inf); |
48 | INF_FILE_SECTION(inf,"Uninstall"); | 49 | INF_FILE_SECTION(inf,"Uninstall"); |
49 | fprintf(inf,"AddReg=kFiles\nDelReg=kReg\nUpdateInis=kMenu\n"); | 50 | fprintf(inf,"AddReg=kFiles\nDelReg=kReg\nUpdateInis=kMenu\n"); |
50 | INF_FILE_SECTION(inf,"kFiles"); | 51 | INF_FILE_SECTION(inf,"kFiles"); |
51 | INF_REMOVE_ROOT(inf,SKINAME "Files",shortPath); | 52 | INF_REMOVE_ROOT(inf,SKINAME "Files",shortPath); |
52 | INF_REMOVE_FILE(inf,SKINAME "Files",SKINAME ".exe"); | 53 | INF_REMOVE_FILE(inf,SKINAME "Files",SKINAME ".exe"); |
53 | INF_REMOVE_HELP_FILE(inf,SKINAME "Files",SKINAME); | 54 | INF_REMOVE_HELP_FILE(inf,SKINAME "Files",SKINAME); |
54 | INF_REMOVE_FILE(inf,SKINAME "Files",SKINAME ".inf"); | 55 | INF_REMOVE_FILE(inf,SKINAME "Files",SKINAME ".inf"); |
55 | INF_FILE_SECTION(inf,"kReg"); | 56 | INF_FILE_SECTION(inf,"kReg"); |
56 | INF_UNINSTALL_REG(inf,SKINAME); | 57 | INF_UNINSTALL_REG(inf,SKINAME); |
57 | INF_FILE_SECTION(inf,"kMenu"); | 58 | INF_FILE_SECTION(inf,"kMenu"); |
58 | INF_MENU_GROUP(inf,1,"Klever Group"); | 59 | INF_MENU_GROUP(inf,1,"Klever Group"); |
59 | INF_MENU_ITEM(inf,1,SKINAME); | 60 | INF_MENU_ITEM(inf,1,SKINAME); |
60 | fclose(inf); | 61 | fclose(inf); |
61 | 62 | ||
62 | REG_UNINSTALL_COMMAND(SKINAME,"Klever " KINAME,shortPath,SKINAME ".INF","Uninstall"); | 63 | REG_UNINSTALL_COMMAND(SKINAME,"Klever " KINAME,shortPath,SKINAME ".INF","Uninstall"); |
64 | REG_UNINSTALL_ICON(SKINAME,path,SKINAME ".exe",0); | ||
65 | REG_UNINSTALL_COMMENT(SKINAME,"Klever PumpKIN"); | ||
66 | REG_UNINSTALL_VERSION(SKINAME,VERSION); | ||
67 | REG_UNINSTALL_LOCATION(SKINAME,path); | ||
68 | REG_UNINSTALL_PUBLISHER(SKINAME,"Klever Group"); | ||
69 | REG_UNINSTALL_URLS(SKINAME,"http://www.klever.net/","http://kin.klever.net/pumpkin/"); | ||
63 | 70 | ||
64 | MessageBox(NULL,KINAME " 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); | 71 | MessageBox(NULL,KINAME " 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); |
65 | 72 | ||
66 | return TRUE; | 73 | return TRUE; |
67 | } | 74 | } |