FileGetSize(path, &dataSize);
GetLastDirectory(outputFile, fileName);
-
+
((GuiApplication)__thisModule).SignalEvent();
//((GuiApplication)__thisModule).ProcessInput();
//((GuiApplication)__thisModule).UpdateDisplay();
-
+
for(c = 0; c<dataSize && !abortInstall; c += BUFFERSIZE)
{
uint size = (dataSize > c + BUFFERSIZE) ? BUFFERSIZE : (dataSize - c);
char installPath[MAX_LOCATION];
DataRow row;
- void GetFullPath(char * path)
+ void GetFullPath(char * path, bool is32bit)
{
if(this != null && parent)
- parent->GetFullPath(path);
+ parent->GetFullPath(path, is32bit || (arch == bits32 && osIS64bit));
else
- strcpy(path, installDir);
+ strcpy(path, (is32bit || (arch == bits32 && osIS64bit)) ? installDir32 : installDir);
if(this != null)
PathCat(path, installPath);
if(requiredSize)
{
uint p = installProgress.progressBar.progress;
- ExtractFileFromArchive(installProgress.progressBar, source, path);
+ ExtractFileFromArchive(installProgress.progressBar, source, path);
}
}
if(subComponents)
{ "GNU C Compiler", "tdm/gcc/core", "tdm", null, true, true, minGWIncluded, none },
{ "GNU Debugger", "tdm/gdb", "tdm", null, true, true, minGWIncluded, bits64 },
{ "GNU Debugger", "tdm/gdb32", "tdm", null, true, true, minGWIncluded, bits32 },
- { "MinGW Runtime", "tdm/mingwrt", "tdm", null, true, true, minGWIncluded, none },
+ { "MinGW-w64 Runtime", "tdm/mingwrt", "tdm", null, true, true, minGWIncluded, none },
{ "Binary Utils", "tdm/binutils", "tdm", null, true, true, minGWIncluded, none },
{ "GNU Make", "tdm/make", "tdm", null, true, true, minGWIncluded, none },
{ null }
public enum AdditionalID
{
- eda, eda32, vanilla, vanilla32, extras, upx, gnurx, gnurx32, /*pthreads, */cpp, /*w32api, */gcci18n, gdbi18n, makei18n, binutilsi18n, none
+ eda, eda32, vanilla, vanilla32, extras, upx, gnurx, gnurx32, /*pthreads, */cpp, /*w32api, gcci18n, gdbi18n, makei18n, binutilsi18n, */none
};
Component additional[AdditionalID] =
// { "pthreads", "tdm/pthreads", "mingw", null, false, true, minGWIncluded, none },
{ "C++ Compiler", "tdm/gcc/c++", "tdm", null, false, true, minGWIncluded, none },
// { "Win32 APIs", "mingw/w32api", "mingw", null, false, true, minGWIncluded, none },
- { "GCC I18n", "mingw/locale/gcc", "tdm", null, false, false, minGWIncluded, none },
+/* { "GCC I18n", "mingw/locale/gcc", "tdm", null, false, false, minGWIncluded, none },
{ "GDB I18n", "mingw/locale/gdb", "tdm", null, false, false, minGWIncluded, none },
{ "Make I18n", "mingw/locale/make", "tdm", null, false, false, minGWIncluded, none },
{ "Binutils I18n", "mingw/locale/binutils", "tdm", null, false, false, minGWIncluded, none },
+*/
{ null }
};
Button browse
{
master = this, autoCreate = false, inactive = true, text = "...";
-
+
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);
+ component->GetFullPath(fileDialog.filePath, false);
StripLastDirectory(fileDialog.filePath, fileDialog.currentDirectory);
if(fileDialog.Modal() == ok)
CheckListBox componentsBox
{
this, size = { 460, 112 }, position = { 160, 160 }, hasHeader = true;
- fullRowSelect = false, collapseControl = true, treeBranches = true, rootCollapseButton = true,
+ fullRowSelect = false, collapseControl = true, treeBranches = true, rootCollapseButton = true,
noDragging = true;
rowHeight = 18;
selectionColor = { 145, 150, 140 };
char path[MAX_LOCATION], relative[MAX_LOCATION] = "", * newPath;
char fullPath[MAX_LOCATION];
- component->parent->GetFullPath(path);
+ component->parent->GetFullPath(path, false);
strcpy(fullPath, path);
newPath = row.GetData(locationField);
component->requiredSize = 0;
if(component->selected)
{
- component->requiredSize += component->size;
+ component->requiredSize += component->size;
if(component->subComponents)
for(c = 0; component->subComponents[c].name; c++)
component->requiredSize += component->subComponents[c].requiredSize;
}
else
row.UnsetData(reqField);
- if(!component->parent)
+ if(!component->parent)
{
totalSize += component->requiredSize;
{
CheckListBox optionsBox
{
this, size = { 460, 94 }, position = { 160, 284 };
- fullRowSelect = false, collapseControl = true, treeBranches = true, rootCollapseButton = true,
+ fullRowSelect = false, collapseControl = true, treeBranches = true, rootCollapseButton = true,
noDragging = true;
rowHeight = 18;
opacity = 0;
};
EditBox label7
{
- this, opacity = 0, borderStyle = none, inactive = true, size = { 136, 53 }, position = { 14, 280 }, noSelect = true,
+ this, opacity = 0, borderStyle = none, inactive = true, size = { 136, 53 }, position = { 14, 280 }, noSelect = true,
multiLine = true,
contents = $"Select icons to install, file\n"
"associations, and system\n"
if(component.defInstallPath)
PathCat(path, component.defInstallPath);
component.parent = parent;
-
+
row.SetData(null, CheckItem { component.name, component, (component.arch == bits32 && osIS64bit) } );
if(component.defInstallPath)
if(component.mandatory)
{
- if(component.arch != bits32 || !osIS64bit || component == &coreSDK[gdb32])
+ if(component.arch != bits32 || !osIS64bit) // || component == &coreSDK[gdb32])
componentsBox.SetDisabled(row, true);
- else
- component.selected = false;
+ /*else
+ component.selected = false;*/
}
else if(component.arch == bits32 && osIS64bit)
- component.selected = false;
+ ; //component.selected = false;
componentsBox.SetCheck(row, component.selected);
while(!FileExists(path) && path[0])
StripLastDirectory(path, path);
-
+
if(path[0])
GetFreeSpace(path, &avSize);
else
GetEnvironment("APPDATA", appData, sizeof(appData));
GetEnvironment("HOMEDRIVE", homeDrive, sizeof(homeDrive));
GetEnvironment("windir", winDir, sizeof(winDir));
-
+
componentsBox.AddField(componentField);
componentsBox.AddField(locationField);
componentsBox.AddField(reqField);
if(x86)
{
strcpy(installDir32, programFilesDir);
+ PathCat(installDir32, "Ecere SDK");
osIS64bit = true;
*x86 = 0;
- PathCat(installDir, "Ecere SDK");
strcpy(installDir, programFilesDir);
+ PathCat(installDir, "Ecere SDK");
}
else
{
- PathCat(installDir, "Ecere SDK");
strcpy(installDir, programFilesDir);
+ PathCat(installDir, "Ecere SDK");
+ strcpy(installDir32, installDir);
}
}
else if(homeDrive && homeDrive[0])
}
else
strcpy(installDir, "C:\\Ecere SDK");
-
+
if(appData && appData[0])
{
static char defSamplesPath[MAX_LOCATION];
PathCat(defExtrasPath, "Ecere SDK\\extras");
additional[extras].defInstallPath = defExtrasPath;
}
-
+
destBox.path = installDir;
{
if(!found)
{
char * start;
- if(*count)
+ if(*count)
{
strcat(userPath, ";");
start = paths[(*count)-1] + strlen(paths[(*count)-1])+1;
bool found = false;
char path[MAX_LOCATION];
if(!coreSDK[c].selected) continue;
- coreSDK[c].GetFullPath(path);
+ coreSDK[c].GetFullPath(path, false);
if(c != ide && c != runtime && c != ec &&
c != ide32 && c != runtime32 && c != ec32)
{
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);
+ additional[c].GetFullPath(path, false);
if(c != eda && c != eda32 && c != upx)
PathCat(path, "bin");
AddPath(sysPaths, sysCount, paths, &count, oldPath, userPath, path);
sprintf(keyName, "%s\\shell\\%s\\command", name, action);
RegCreateKeyEx(HKEY_CLASSES_ROOT, keyName, 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status);
-
+
sprintf(keyName, path);
strcat(keyName, " \"%L\"");
{
char path[MAX_LOCATION];
if(!coreSDK[c].selected || !coreSDK[c].available) continue;
- coreSDK[c].GetFullPath(path);
+ coreSDK[c].GetFullPath(path, false);
if(c != ide && c != runtime && c != ec &&
c != ide32 && c != runtime32 && c != ec32)
PathCat(path, "bin");
MakeSlashPath(path);
if((c == ide && osIS64bit) || (c == ide32 && !osIS64bit))
{
- coreSDK[c].GetFullPath(idePath);
+ coreSDK[c].GetFullPath(idePath, false);
PathCat(idePath, "ide.exe");
}
{
char path[MAX_LOCATION];
if(c == extras || !additional[c].selected || !additional[c].available) continue;
- additional[c].GetFullPath(path);
+ additional[c].GetFullPath(path, false);
if(c != upx && c != eda && c != vanilla && c != eda32 && c != vanilla32)
PathCat(path, "bin");
MakeSlashPath(path);
char path[MAX_LOCATION] = "";
if(components[samples].selected)
- components[samples].GetFullPath(path);
+ components[samples].GetFullPath(path, false);
else
- components[coreSDK].GetFullPath(path);
+ components[coreSDK].GetFullPath(path, false);
if(!settings.ideProjectFileDialogLocation[0])
settings.ideProjectFileDialogLocation = path;
if(documentation[apiRef].selected)
{
- documentation[apiRef].GetFullPath(path);
+ documentation[apiRef].GetFullPath(path, false);
if(!settings.docDir[0])
settings.docDir = path;
}
}
// Add paths
- if(pathOptions[PathOptions::AddECEREPaths].selected
+ if(pathOptions[PathOptions::AddECEREPaths].selected
#ifndef NOMINGW
|| pathOptions[PathOptions::AddMinGWPaths].selected
#endif
installProgress.installing.text = "Registering paths...";
((GuiApplication)__thisModule).Unlock();
((GuiApplication)__thisModule).SignalEvent();
-
+
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment", 0, KEY_QUERY_VALUE, &systemKey) == ERROR_SUCCESS)
{
size = sizeof(wSystemPath);
RegQueryValueExW(systemKey, L"path", null, null, (byte *)wSystemPath, &size);
UTF16toUTF8Buffer(wSystemPath, systemPath, sizeof(systemPath));
}
-
+
RegCreateKeyEx(HKEY_CURRENT_USER, "Environment", 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &userKey, &status);
if(status == REG_OPENED_EXISTING_KEY)
{
if(components[samples].selected)
{
char samplesPath[MAX_LOCATION] = "";
- components[samples].GetFullPath(samplesPath);
+ components[samples].GetFullPath(samplesPath, false);
strcpy(destPath, startMenuPath);
PathCat(destPath, "Ecere SDK\\Sample Projects.lnk");
if(components[documentation].selected && documentation[ecereBook].selected)
{
char docPath[MAX_LOCATION] = "";
- documentation[ecereBook].GetFullPath(docPath);
+ documentation[ecereBook].GetFullPath(docPath, false);
PathCat(docPath, "Ecere Tao of Programming [work in progress].pdf");
{
char tao[MAX_LOCATION] ;
- documentation[ecereBook].GetFullPath(tao);
+ documentation[ecereBook].GetFullPath(tao, false);
PathCat(tao, "tao.pdf");
RenameFile(tao, docPath);
}
installProgress.installing.text = $"Resgistering File Types...";
((GuiApplication)__thisModule).Unlock();
((GuiApplication)__thisModule).SignalEvent();
-
+
if(associateOptions[AssociateOptions::AssociateEPJ].selected)
{
AssociateExtension(".epj", "Ecere IDE Project", "epj_file", "Open", idePath);