X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=installer%2Fsrc%2Finstaller.ec;h=5da1a82035be41427ea134ef1567565593ad105d;hb=a5e9fe141ccca04d9c83c20f71d20e0663b62802;hp=9c40bc57a4da391ae3753fcfc4ce8f614b9113cf;hpb=fc602af6d81100b71946436c8185420ba719debb;p=sdk diff --git a/installer/src/installer.ec b/installer/src/installer.ec index 9c40bc5..5da1a82 100644 --- a/installer/src/installer.ec +++ b/installer/src/installer.ec @@ -1,8 +1,7 @@ -#ifdef NOMINGW -static define buildString = $"Ecere SDK v0.44.10 (Without MinGW) -- built on March 9th, 2014 "; -#else -static define buildString = $"Ecere SDK v0.44.10 -- built on March 9th, 2014 "; -#endif +static define versionString = "Ecere SDK v0.44.10 (pr2)"; +static define dateString = $"August 7th, 2014"; +static define builtOnString = $"built on "; +static define withoutMinGW = $" (Without MinGW)"; #define WIN32_LEAN_AND_MEAN #define GetFreeSpace _GetFreeSpace @@ -19,11 +18,23 @@ import "createLink" import "licensing" import "CheckListBox" -static LanguageOption dummy; // TOFIX +static void SetBuildString(Label label) +{ + static const String addMinGW = ""; + String s; + +#ifdef NOMINGW + addMinGW = withoutMinGW; +#endif + + s = PrintString(versionString, addMinGW, " -- ", builtOnString, dateString); + label.caption = s; + delete s; +} static bool IsAdministrator() { - bool b; + BOOL b; SID_IDENTIFIER_AUTHORITY NtAuthority = { SECURITY_NT_AUTHORITY }; PSID AdministratorsGroup; b = AllocateAndInitializeSid(&NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdministratorsGroup); @@ -33,15 +44,15 @@ static bool IsAdministrator() b = FALSE; FreeSid(AdministratorsGroup); } - return b; + return b == TRUE; } struct CheckItem { - char * name; + const char * name; void * data; bool add32Bit; - char * OnGetString(char * tempString, void * fieldData, bool * needClass) + const char * OnGetString(char * tempString, void * fieldData, bool * needClass) { if(add32Bit) { @@ -63,7 +74,7 @@ struct CheckItem #define BUFFERSIZE 0x1000 bool abortInstall = false; -void ExtractFileFromArchive(ProgressBar progressBar, char * path, char * outputFile) +void ExtractFileFromArchive(ProgressBar progressBar, const char * path, const char * outputFile) { char fileName[MAX_LOCATION]; FileAttribs exists = FileExists(path); @@ -171,9 +182,9 @@ public enum BitArch { none, bits32, bits64 }; struct Component { - char * name; - char * dataPath; - char * defInstallPath; + const char * name; + const char * dataPath; + const char * defInstallPath; Component * subComponents; bool mandatory; bool selected; @@ -233,10 +244,7 @@ struct Component PathCat(path, name); } if(requiredSize) - { - uint p = installProgress.progressBar.progress; ExtractFileFromArchive(installProgress.progressBar, source, path); - } } if(subComponents) { @@ -294,13 +302,15 @@ Array coreSDK public enum AdditionalID { - eda, eda32, vanilla, vanilla32, extras, upx, gnurx, gnurx32, /*pthreads, */cpp, /*w32api, gcci18n, gdbi18n, makei18n, binutilsi18n, */none + eda, eda32, audio, audio32, vanilla, vanilla32, extras, upx, gnurx, gnurx32, /*pthreads, */cpp, /*w32api, gcci18n, gdbi18n, makei18n, binutilsi18n, */none }; Array additional { [ { $"Data Access", "ecere-sdk/eda", "bin", null, false, true, true, bits64 }, { $"Data Access", "ecere-sdk32/eda", "bin", null, false, true, true, bits32 }, + { $"Ecere Audio", "ecere-sdk/EcereAudio.dll", "bin", null, false, true, true, bits64 }, + { $"Ecere Audio", "ecere-sdk32/EcereAudio.dll", "bin", null, false, true, true, bits32 }, { $"Ecere Vanilla", "ecere-sdk/libecereVanilla.a", "lib", null, false, true, true, bits64 }, { $"Ecere Vanilla", "ecere-sdk32/libecereVanilla.a", "lib", null, false, true, true, bits32 }, { $"Ecere Extras", "extras", "extras", null, false, true, true, none }, @@ -362,7 +372,7 @@ FileSize totalInstalled; struct InstallOption { - char * name; + const char * name; InstallOption * subOptions; bool selected; bool available; @@ -436,7 +446,7 @@ class Installer : Window tabCycle = true; clientSize = { 636, 476 }; icon = { ":icon.png" }; - text = $"Ecere Software Development Kit Setup - v0.44.10 \"Ryōan-ji\" 64 Bit Edition"; + caption = $"Ecere Software Development Kit Setup - v0.44.10 \"Ryōan-ji\" 64 Bit Edition"; // clientSize = { 796, 576 }; bool loaded; @@ -445,18 +455,21 @@ class Installer : Window FileDialog fileDialog { master = this, type = selectDir, - text = $"Select a new location" + caption = $"Select a new location" }; Button browse { - master = this, autoCreate = false, inactive = true, text = "..."; + master = this, autoCreate = false, inactive = true, caption = "..."; bool NotifyClicked(Button button, int x, int y, Modifiers mods) { DataRow row = componentsBox.currentRow; Component * component = ((CheckItem *)row.GetData(componentField))->data; - component->GetFullPath(fileDialog.filePath, false); - StripLastDirectory(fileDialog.filePath, fileDialog.currentDirectory); + char filePath[MAX_LOCATION]; + component->GetFullPath(filePath, false); + fileDialog.filePath = filePath; + StripLastDirectory(filePath, filePath); + fileDialog.currentDirectory = filePath; if(fileDialog.Modal() == ok) { @@ -572,17 +585,17 @@ class Installer : Window { char sizeString[100]; PrintSize(sizeString, totalSize, 2); - totalSpaceValue.text = sizeString; + totalSpaceValue.caption = sizeString; } } } }; - Label agreementLbl { parent = this, text = $"By installing the Ecere SDK, you agree to the", font = { "Tahoma", 8.25f }, anchor = Anchor { right = 399, top = 448 } }; + Label agreementLbl { parent = this, caption = $"By installing the Ecere SDK, you agree to the", font = { "Tahoma", 8.25f }, anchor = Anchor { right = 399, top = 448 } }; Button licenseButton { this, inactive = true, offset = false, bevel = false, foreground = blue, font = { "Tahoma", 8.25f, underline = true, bold = true }, - // text = $"terms and conditions", anchor = Anchor { left = 241, top = 421 }; - text = $"terms and conditions", anchor = Anchor { left = 235, top = 445 }; + // caption = $"terms and conditions", anchor = Anchor { left = 241, top = 421 }; + caption = $"terms and conditions", anchor = Anchor { left = 235, top = 445 }; cursor = ((GuiApplication)__thisModule).GetCursor(hand); bool NotifyClicked(Button button, int x, int y, Modifiers mods) @@ -592,7 +605,7 @@ class Installer : Window return true; } }; - Label dotLbl { parent = this, text = ".", font = { "Tahoma", 8.25f }, anchor = Anchor { left = 372, top = 448 } }; + Label dotLbl { parent = this, caption = ".", font = { "Tahoma", 8.25f }, anchor = Anchor { left = 372, top = 448 } }; CheckListBox optionsBox { this, size = { 460, 114 }, position = { 160, 284 }; @@ -624,11 +637,10 @@ class Installer : Window ((CheckItem *)pathOptions[PathOptions::AddMinGWPaths].row.GetData(optionField))->name = pathOptions[PathOptions::AddMinGWPaths].name; GetEnvironment(options[0].selected ? "ALLUSERSPROFILE" : "APPDATA", appData, sizeof(appData)); - if(appData && appData[0]) + if(appData[0]) { char defPath[MAX_LOCATION]; - char * s = components[ComponentID::samples].installPath; strcpy(defPath, installDir); PathCat(defPath, components[ComponentID::samples].defInstallPath); ChangeCh(defPath, '/', DIR_SEP); @@ -659,12 +671,13 @@ class Installer : Window additional[AdditionalID::extras].row.SetData(locationField, additional[AdditionalID::extras].installPath); } } + listBox.Update(null); } } }; Button install { - parent = this, text = $"Install", isDefault = true, size = { 75, 23 }, position = { 432, 440 }; + parent = this, caption = $"Install", isDefault = true, size = { 75, 23 }, position = { 432, 440 }; bool NotifyClicked(Button button, int x, int y, Modifiers mods) { @@ -675,7 +688,7 @@ class Installer : Window return true; } }; - Button button3 { parent = this, text = $"Cancel", hotKey = altX, size = Size { 75, 23 }, anchor = Anchor { left = 544, top = 440 }, NotifyClicked = ButtonCloseDialog }; + Button button3 { parent = this, caption = $"Cancel", hotKey = altX, size = Size { 75, 23 }, anchor = Anchor { left = 544, top = 440 }, NotifyClicked = ButtonCloseDialog }; DropBox languageBox { this, position = { 14, 374 }, size = { 142, 0 }, caption = "Language:"; @@ -711,7 +724,7 @@ class Installer : Window Label label1 { labeledWindow = destBox, tabCycle = true, isGroupBox = true, parent = this, inactive = false, size = Size { 458, 50 }, anchor = Anchor { left = 160, top = 96 } }; PathBox destBox { - parent = label1, master = this, text = $" Destination Folder", size = Size { 336, 22 }, anchor = Anchor { left = 12, top = 20, right = 12 }; + parent = label1, master = this, caption = $" Destination Folder", size = Size { 336, 22 }, anchor = Anchor { left = 12, top = 20, right = 12 }; typeExpected = directory; browseDialog = fileDialog; opacity = 0; @@ -777,21 +790,21 @@ class Installer : Window }; Label totalSpaceLabel { - this, anchor = { right = 72, top = 404 }, text = $"Space Required: " + this, anchor = { right = 72, top = 404 }, caption = $"Space Required: " }; Label totalSpaceValue { - this, anchor = { right = 14, top = 404 }, text = "0 mb" + this, anchor = { right = 14, top = 404 }, caption = "0 mb" }; EditBox editBox1 { label3, caption = "editBox1", opacity = 0, borderStyle = none, inactive = true, size = { 350, 35 }, position = { 256, 40 }, multiLine = true, noSelect = true, contents = $"Choose in which folder to install the Ecere SDK, which features\n" "of the SDK to install, as well as where to install program icons." }; - Label label2 { parent = this, text = buildString, position = { 16, 422 }, font = { "Tahoma", 10, true }, disabled = true, opacity = 0, background = activeBorder }; + Label label2 { parent = this, position = { 16, 422 }, font = { "Tahoma", 10, true }, disabled = true, opacity = 0, background = activeBorder }; Picture picture1 { - image = BitmapResource { ":ecere.png", alphaBlend = true }, filter = true, parent = label3, text = "picture1", anchor = Anchor { left = 16, top = 4 }; + image = BitmapResource { ":ecere.png", alphaBlend = true }, filter = true, parent = label3, caption = "picture1", anchor = Anchor { left = 16, top = 4 }; cursor = ((GuiApplication)__thisModule).GetCursor(hand); bool OnLeftButtonDown(int x, int y, Modifiers mods) @@ -800,7 +813,7 @@ class Installer : Window return true; } }; - Label label4 { label3, font = { "Tahoma", 8.25f, bold = true }, /*size = { 326, 16 }, */position = { 248, 24 }, text = $"Choose Components, Locations and Install Options" }; + Label label4 { label3, font = { "Tahoma", 8.25f, bold = true }, /*size = { 326, 16 }, */position = { 248, 24 }, caption = $"Choose Components, Locations and Install Options" }; DataField componentField { "CheckItem", width = 160, header = $"Component" }; DataField locationField { "char *", width = 108, header = $"Destination Folder", editable = true }; DataField reqField { "FileSize", width = 70, header = $"Req. Space", alignment = right }; @@ -809,7 +822,7 @@ class Installer : Window DataField languageField { class(LanguageOption) }; - void SetAvailableSpace(Component component, char * parentPath) + void SetAvailableSpace(Component component, const char * parentPath) { char path[MAX_LOCATION]; int c; @@ -831,7 +844,7 @@ class Installer : Window if(!size) install.disabled = true; } - FileSize ComputeSize(char * path) + FileSize ComputeSize(const char * path) { FileSize size = 0; FileAttribs attribs = FileExists(path); @@ -851,7 +864,7 @@ class Installer : Window return size; } - void AddComponent(Component component, Component parent, char * parentPath) + void AddComponent(Component component, Component parent, const char * parentPath) { DataRow row = (parent != null) ? parent.row.AddRow() : componentsBox.AddRow(); FileSize size = 0; @@ -950,6 +963,8 @@ class Installer : Window bool isAdministrator = IsAdministrator(); + SetBuildString(label2); + if(!isAdministrator) { options[0].available = false; @@ -971,7 +986,7 @@ class Installer : Window if(settings.language) { - String language = GetLanguageString(); + const String language = GetLanguageString(); if(settings.language.OnCompare(language)) { // Relaunch the installer with previously selected language @@ -1022,14 +1037,14 @@ class Installer : Window strcpy(installDir32, installDir); } } - else if(homeDrive && homeDrive[0]) + else if(homeDrive[0]) { strcpy(installDir, homeDrive); PathCat(installDir, "Ecere SDK"); strcpy(installDir32, installDir); strcat(installDir32, " (32)"); } - else if(winDir && winDir[0]) + else if(winDir[0]) { strcpy(installDir, winDir); PathCat(installDir, "..\\Ecere SDK"); @@ -1043,7 +1058,7 @@ class Installer : Window strcat(installDir32, " (32)"); } - if(appData && appData[0]) + if(appData[0]) { static char defSamplesPath[MAX_LOCATION]; static char defExtrasPath[MAX_LOCATION]; @@ -1074,7 +1089,7 @@ class Installer : Window { char sizeString[100]; PrintSize(sizeString, totalSize, 2); - totalSpaceValue.text = sizeString; + totalSpaceValue.caption = sizeString; } for(c = 0; options[c].name; c++) { @@ -1106,7 +1121,7 @@ class Installer : Window if(!loaded) { - String language = GetLanguageString(); + const String language = GetLanguageString(); bool found = false; DataRow row; @@ -1179,7 +1194,7 @@ class Installer : Window class InstallProgress : Window { - text = $"Ecere Software Development Kit Setup - v0.44.10 \"Ryōan-ji\" 64 Bit Edition"; + caption = $"Ecere Software Development Kit Setup - v0.44.10 \"Ryōan-ji\" 64 Bit Edition"; background = activeBorder; borderStyle = fixed; hasMinimize = true; @@ -1190,18 +1205,23 @@ class InstallProgress : Window //clientSize = { 796, 576 }; icon = { ":icon.png" }; + InstallProgress() + { + SetBuildString(label2); + } + Picture back { image = BitmapResource { ":ryoanji-progress.png" }, parent = this, position = { 0, 0 } }; Label installing { this, position = { 32, 160 } }; ProgressBar progressBar { parent = this, size = Size { 588, 24 }, anchor = Anchor { left = 24, top = 184 } }; Button finish { - parent = this, text = $"Install", disabled = true, isDefault = true, size = Size { 75, 23 }, anchor = Anchor { left = 432, top = 440 }; + parent = this, caption = $"Install", disabled = true, isDefault = true, size = Size { 75, 23 }, anchor = Anchor { left = 432, top = 440 }; NotifyClicked = ButtonCloseDialog }; Button cancel { - this, text = $"Cancel", hotKey = altX, size = Size { 75, 23 }, anchor = Anchor { left = 544, top = 440 }; + this, caption = $"Cancel", hotKey = altX, size = Size { 75, 23 }, anchor = Anchor { left = 544, top = 440 }; bool NotifyClicked(Button button, int x, int y, Modifiers mods) { @@ -1215,7 +1235,7 @@ class InstallProgress : Window multiLine = true, parent = label3, opacity = 0, borderStyle = none, size = Size { 350, 35 }, anchor = Anchor { horz = 111, vert = 13 }, contents = $"Please wait while the Ecere Software Development Kit is being installed." }; - Label label2 { parent = this, text = buildString, position = { 16, 422 }, font = { "Tahoma", 10, true }, disabled = true, opacity = 0, background = activeBorder }; + Label label2 { parent = this, position = { 16, 422 }, font = { "Tahoma", 10, true }, disabled = true, opacity = 0, background = activeBorder }; Picture picture1 { image = BitmapResource { ":ecere.png", alphaBlend = true }, filter = true, parent = label3, anchor = Anchor { left = 16, top = 4 }; @@ -1227,7 +1247,7 @@ class InstallProgress : Window return true; } }; - Label title { parent = label3, text = $"Installing the Ecere SDK", font = FontResource { "Tahoma", 8.25f, bold = true }, size = Size { 326, 16 }, anchor = Anchor { horz = 91, vert = -12 } }; + Label title { parent = label3, caption = $"Installing the Ecere SDK", font = FontResource { "Tahoma", 8.25f, bold = true }, size = Size { 326, 16 }, anchor = Anchor { horz = 91, vert = -12 } }; void OnDrawOverChildren(Surface surface) { @@ -1308,7 +1328,6 @@ void ModifyPath(char * systemPath, char * userPath) CoreSDKID c; for(c = 0; coreSDK[c].name; c++) { - bool found = false; char path[MAX_LOCATION]; if(!coreSDK[c].selected) continue; coreSDK[c].GetFullPath(path, false); @@ -1329,44 +1348,43 @@ void ModifyPath(char * systemPath, char * userPath) // Up to C++ for(c = 0; c <= cpp; c++) { - bool found = false; char path[MAX_LOCATION]; if(!additional[c].selected || c == vanilla || c == vanilla32 || c == extras) continue; if((c != eda && c != eda32 && c != upx) && (!pathOptions[PathOptions::AddMinGWPaths].available || !pathOptions[PathOptions::AddMinGWPaths].selected)) continue; additional[c].GetFullPath(path, false); - if(c != eda && c != eda32 && c != upx) + if(c != eda && c != eda32 && c != upx && c != audio && c != audio32) PathCat(path, "bin"); AddPath(sysPaths, sysCount, paths, &count, oldPath, userPath ? userPath : systemPath, path); } } } -void AssociateExtension(char * extension, char * description, char *name, char * action, char * path) +void AssociateExtension(const char * extension, const char * description, const char *name, const char * action, const char * path) { HKEY key; - uint status, size; + DWORD status; char keyName[1024]; - RegCreateKeyEx(HKEY_CLASSES_ROOT, extension, 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); - RegSetValueEx(key, null, 0, REG_SZ, name, (uint)strlen(name)+1); + RegCreateKeyEx(HKEY_CLASSES_ROOT, extension, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); + RegSetValueEx(key, null, 0, REG_SZ, (byte *)name, (uint)strlen(name)+1); RegCloseKey(key); - RegCreateKeyEx(HKEY_CLASSES_ROOT, name, 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); - RegSetValueEx(key, null, 0, REG_SZ, description, (uint)strlen(description)+1); + RegCreateKeyEx(HKEY_CLASSES_ROOT, name, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); + RegSetValueEx(key, null, 0, REG_SZ, (byte *)description, (uint)strlen(description)+1); RegCloseKey(key); sprintf(keyName, "%s\\shell", extension); - RegCreateKeyEx(HKEY_CLASSES_ROOT, keyName, 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); - RegSetValueEx(key, null, 0, REG_SZ, action, (uint)strlen(action)+1); + RegCreateKeyEx(HKEY_CLASSES_ROOT, keyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); + RegSetValueEx(key, null, 0, REG_SZ, (byte *)action, (uint)strlen(action)+1); RegCloseKey(key); sprintf(keyName, "%s\\shell\\%s", name, action); - RegCreateKeyEx(HKEY_CLASSES_ROOT, keyName, 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); + RegCreateKeyEx(HKEY_CLASSES_ROOT, keyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); RegCloseKey(key); sprintf(keyName, "%s\\shell\\%s\\command", name, action); - RegCreateKeyEx(HKEY_CLASSES_ROOT, keyName, 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); + RegCreateKeyEx(HKEY_CLASSES_ROOT, keyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); sprintf(keyName, path); strcat(keyName, " \"%L\""); @@ -1395,12 +1413,12 @@ class InstallThread : Thread { installProgress.progressBar.range = 0; installProgress.finish.Destroy(0); - installProgress.cancel.text = $"Close"; + installProgress.cancel.caption = $"Close"; installProgress.cancel.isDefault = true; installProgress.cancel.disabled = false; installProgress.cancel.NotifyClicked = Window::ButtonCloseDialog; - installProgress.installing.text = $"Installation Cancelled."; - installProgress.title.text = $"Installation Cancelled"; + installProgress.installing.caption = $"Installation Cancelled."; + installProgress.title.caption = $"Installation Cancelled"; installProgress.titleInfo.contents = $"The installation was not completed."; } else @@ -1419,7 +1437,7 @@ class InstallThread : Thread allUsers = options[0].selected; }; CompilerConfig compiler; - installProgress.installing.text = $"Configuring Ecere IDE..."; + installProgress.installing.caption = $"Configuring Ecere IDE..."; ((GuiApplication)__thisModule).Unlock(); ((GuiApplication)__thisModule).SignalEvent(); @@ -1503,13 +1521,13 @@ class InstallThread : Thread { HKEY key = null; uint16 wLanguage[256]; - HRESULT status; + DWORD status; wLanguage[0] = 0; if(options[0].selected) RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment", 0, KEY_ALL_ACCESS, &key); else - RegCreateKeyEx(HKEY_CURRENT_USER, "Environment", 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); + RegCreateKeyEx(HKEY_CURRENT_USER, "Environment", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); if(key) { UTF8toUTF16Buffer(settings.language, wLanguage, sizeof(wLanguage) / sizeof(uint16)); @@ -1524,25 +1542,25 @@ class InstallThread : Thread // Set up Uninstaller ((GuiApplication)__thisModule).Lock(); - installProgress.installing.text = $"Registering uninstaller..."; + installProgress.installing.caption = $"Registering uninstaller..."; ((GuiApplication)__thisModule).Unlock(); ((GuiApplication)__thisModule).SignalEvent(); { HKEY key; - uint status, size; - char * displayName = "Ecere SDK 0.44"; + DWORD status; + const char * displayName = "Ecere SDK 0.44"; char uninstaller[MAX_LOCATION]; - bool nomodify = true; + //bool nomodify = true; strcpy(uninstaller, installDir); PathCat(uninstaller, "uninstall_ecere.exe"); - RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Ecere SDK", 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); + RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Ecere SDK", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status); - RegSetValueEx(key, "DisplayName", 0, REG_SZ, displayName, (uint)strlen(displayName)+1); - RegSetValueEx(key, "UninstallString", 0, REG_SZ, uninstaller, (uint)strlen(uninstaller)+1); - RegSetValueEx(key, "DisplayIcon", 0, REG_SZ, idePath, (uint)strlen(idePath)+1); + RegSetValueEx(key, "DisplayName", 0, REG_SZ, (byte *)displayName, (uint)strlen(displayName)+1); + RegSetValueEx(key, "UninstallString", 0, REG_SZ, (byte *)uninstaller, (uint)strlen(uninstaller)+1); + RegSetValueEx(key, "DisplayIcon", 0, REG_SZ, (byte *)idePath, (uint)strlen(idePath)+1); //RegSetValueEx(key, "NoModify", 0, REG_DWORD, (byte *)&nomodify, sizeof(nomodify)); //RegSetValueEx(key, "NoRepair", 0, REG_DWORD, (byte *)&nomodify, sizeof(nomodify)); RegCloseKey(key); @@ -1556,7 +1574,7 @@ class InstallThread : Thread ) { HKEY userKey = null, systemKey = null; - uint status, size; + DWORD status, size; char userPath[8192] = ""; char systemPath[8192] = ""; uint16 wUserPath[8192]; @@ -1566,7 +1584,7 @@ class InstallThread : Thread wSystemPath[0] = 0; ((GuiApplication)__thisModule).Lock(); - installProgress.installing.text = "Registering paths..."; + installProgress.installing.caption = "Registering paths..."; ((GuiApplication)__thisModule).Unlock(); ((GuiApplication)__thisModule).SignalEvent(); @@ -1594,7 +1612,7 @@ class InstallThread : Thread RegCloseKey(systemKey); } - RegCreateKeyEx(HKEY_CURRENT_USER, "Environment", 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &userKey, &status); + RegCreateKeyEx(HKEY_CURRENT_USER, "Environment", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &userKey, &status); if(status == REG_OPENED_EXISTING_KEY) { size = sizeof(wUserPath); @@ -1619,7 +1637,7 @@ class InstallThread : Thread HKEY key; ((GuiApplication)__thisModule).Lock(); - installProgress.installing.text = $"Installing Start Menu Icons..."; + installProgress.installing.caption = $"Installing Start Menu Icons..."; ((GuiApplication)__thisModule).Unlock(); ((GuiApplication)__thisModule).SignalEvent(); @@ -1629,7 +1647,7 @@ class InstallThread : Thread "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", 0, KEY_QUERY_VALUE, &key) == ERROR_SUCCESS) { uint16 wStartMenuPath[2048]; - uint size = sizeof(wStartMenuPath); + DWORD size = sizeof(wStartMenuPath); // RegQueryValueEx(key, "Start Menu", null, null, startMenuPath, &size); RegQueryValueExW(key, options[0].selected ? L"Common Programs" : L"Programs", null, null, (byte *)wStartMenuPath, &size); UTF16toUTF8Buffer(wStartMenuPath, startMenuPath, sizeof(startMenuPath)); @@ -1689,7 +1707,7 @@ class InstallThread : Thread "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", 0, KEY_QUERY_VALUE, &key) == ERROR_SUCCESS) { uint16 wDesktopPath[MAX_LOCATION]; - uint size = sizeof(wDesktopPath); + DWORD size = sizeof(wDesktopPath); RegQueryValueExW(key, options[0].selected ? L"Common Desktop" : L"Desktop", null, null, (byte *)wDesktopPath, &size); UTF16toUTF8Buffer(wDesktopPath, desktopPath, sizeof(desktopPath)); RegCloseKey(key); @@ -1705,7 +1723,7 @@ class InstallThread : Thread PathCat(desktopPath, "Ecere IDE.lnk"); ((GuiApplication)__thisModule).Lock(); - installProgress.installing.text = $"Installing Desktop Icon..."; + installProgress.installing.caption = $"Installing Desktop Icon..."; ((GuiApplication)__thisModule).Unlock(); ((GuiApplication)__thisModule).SignalEvent(); @@ -1735,7 +1753,7 @@ class InstallThread : Thread } ((GuiApplication)__thisModule).Lock(); - installProgress.installing.text = $"Installing Quicklaunch Icon..."; + installProgress.installing.caption = $"Installing Quicklaunch Icon..."; ((GuiApplication)__thisModule).Unlock(); ((GuiApplication)__thisModule).SignalEvent(); @@ -1764,7 +1782,7 @@ class InstallThread : Thread associateOptions[AssociateOptions::AssociateIMG].selected) { ((GuiApplication)__thisModule).Lock(); - installProgress.installing.text = $"Resgistering File Types..."; + installProgress.installing.caption = $"Registering File Types..."; ((GuiApplication)__thisModule).Unlock(); ((GuiApplication)__thisModule).SignalEvent(); @@ -1812,11 +1830,11 @@ class InstallThread : Thread ((GuiApplication)__thisModule).Lock(); installProgress.cancel.Destroy(0); - installProgress.finish.text = $"Finish"; + installProgress.finish.caption = $"Finish"; installProgress.finish.disabled = false; installProgress.finish.Activate(); - installProgress.installing.text = $"Installation Complete."; - installProgress.title.text = $"Installation Complete"; + installProgress.installing.caption = $"Installation Complete."; + installProgress.title.caption = $"Installation Complete"; installProgress.titleInfo.contents = $"Thank you for using the Ecere SDK."; } ((GuiApplication)__thisModule).Unlock();