mirror of https://gitlab.com/nakst/essence
make-installer-root command; improved window colors
This commit is contained in:
parent
3c22769e70
commit
851133b0fc
|
@ -784,11 +784,11 @@ EsError Install() {
|
|||
}
|
||||
|
||||
size_t mbrBytes, stage1Bytes, stage2Bytes, uefi1Bytes, uefi2Bytes, kernelBytes;
|
||||
void *mbr = EsFileReadAll(EsLiteral("0:/mbr.dat"), &mbrBytes);
|
||||
void *stage1 = EsFileReadAll(EsLiteral("0:/stage1.dat"), &stage1Bytes);
|
||||
void *stage2 = EsFileReadAll(EsLiteral("0:/stage2.dat"), &stage2Bytes);
|
||||
void *uefi1 = EsFileReadAll(EsLiteral("0:/uefi1.dat"), &uefi1Bytes);
|
||||
void *uefi2 = EsFileReadAll(EsLiteral("0:/uefi2.dat"), &uefi2Bytes);
|
||||
void *mbr = EsFileReadAll(EsLiteral("0:/Installer Data/mbr.dat"), &mbrBytes);
|
||||
void *stage1 = EsFileReadAll(EsLiteral("0:/Installer Data/stage1.dat"), &stage1Bytes);
|
||||
void *stage2 = EsFileReadAll(EsLiteral("0:/Installer Data/stage2.dat"), &stage2Bytes);
|
||||
void *uefi1 = EsFileReadAll(EsLiteral("0:/Installer Data/uefi1.dat"), &uefi1Bytes);
|
||||
void *uefi2 = EsFileReadAll(EsLiteral("0:/Installer Data/uefi2.dat"), &uefi2Bytes);
|
||||
|
||||
if (!mbr || !stage1 || !stage2 || !uefi1 || !uefi2) {
|
||||
return ES_ERROR_FILE_DOES_NOT_EXIST;
|
||||
|
@ -866,7 +866,7 @@ EsError Install() {
|
|||
return ES_ERROR_TIMEOUT_REACHED;
|
||||
}
|
||||
|
||||
error = Extract(EsLiteral("0:/installer_archive.dat"), newFileSystemMountPoint.prefix, newFileSystemMountPoint.prefixBytes);
|
||||
error = Extract(EsLiteral("0:/Installer Data/archive.dat"), newFileSystemMountPoint.prefix, newFileSystemMountPoint.prefixBytes);
|
||||
|
||||
if (error == ES_ERROR_CORRUPT_DATA) {
|
||||
archiveCRCError = true;
|
||||
|
@ -1047,7 +1047,7 @@ int UserNameTextboxMessage(EsElement *, EsMessage *message) {
|
|||
void _start() {
|
||||
_init();
|
||||
|
||||
metadata = (InstallerMetadata *) EsFileReadAll(EsLiteral("0:/installer_metadata.dat"), nullptr);
|
||||
metadata = (InstallerMetadata *) EsFileReadAll(EsLiteral("0:/Installer Data/metadata.dat"), nullptr);
|
||||
EsAssert(metadata);
|
||||
|
||||
mountNewFileSystemEvent = EsEventCreate(true);
|
||||
|
@ -1098,7 +1098,7 @@ void _start() {
|
|||
EsTextbox *textbox = EsTextboxCreate(panelLicenses, ES_CELL_FILL | ES_TEXTBOX_MULTILINE);
|
||||
EsElementSetDisabled(textbox);
|
||||
size_t bytes;
|
||||
char *data = (char *) EsFileReadAll(EsLiteral("0:/installer_licenses.txt"), &bytes);
|
||||
char *data = (char *) EsFileReadAll(EsLiteral("0:/Installer Data/licenses.txt"), &bytes);
|
||||
EsTextboxInsert(textbox, data, bytes);
|
||||
EsHeapFree(data);
|
||||
EsButtonOnCommand(EsButtonCreate(panelLicenses, ES_CELL_H_LEFT, 0, INTERFACE_STRING(InstallerGoBack)), ButtonInstallOptions);
|
||||
|
|
|
@ -2942,6 +2942,10 @@ void EmbeddedWindowDestroyed(EsObjectID id) {
|
|||
}
|
||||
|
||||
void DesktopMessage(EsMessage *message) {
|
||||
if (!desktop.clockReady) {
|
||||
desktop.clockReady = EsEventCreate(false);
|
||||
}
|
||||
|
||||
if (message->type == ES_MSG_POWER_BUTTON_PRESSED) {
|
||||
ShutdownModalCreate();
|
||||
} else if (message->type == ES_MSG_EMBEDDED_WINDOW_DESTROYED) {
|
||||
|
@ -3041,8 +3045,6 @@ void DesktopMessage(EsMessage *message) {
|
|||
void DesktopEntry() {
|
||||
ConfigurationLoadApplications();
|
||||
|
||||
desktop.clockReady = EsEventCreate(false);
|
||||
|
||||
EsMessage m = { MSG_SETUP_DESKTOP_UI };
|
||||
EsMessagePost(nullptr, &m);
|
||||
|
||||
|
|
|
@ -4579,10 +4579,10 @@ void ColorPickerCreate(EsElement *parent, ColorPickerHost host, uint32_t initial
|
|||
m.colorChanged.newColor = picker->GetColorForHost();
|
||||
m.colorChanged.pickerClosed = true;
|
||||
EsMessageSend(picker->host.well, &m);
|
||||
}
|
||||
|
||||
if (picker->host.well->messageClass == ProcessColorWellMessage) {
|
||||
((EsColorWell *) picker->host.well)->picker = nullptr;
|
||||
}
|
||||
if (picker->host.well && picker->host.well->messageClass == ProcessColorWellMessage) {
|
||||
((EsColorWell *) picker->host.well)->picker = nullptr;
|
||||
}
|
||||
|
||||
EsHeapFree(picker);
|
||||
|
|
|
@ -54,26 +54,16 @@ const EsStyle styleSettingsGroupContainer2 = {
|
|||
};
|
||||
|
||||
const uint32_t windowColors[][7] = {
|
||||
// TODO Improve these!
|
||||
|
||||
// Preview Active 1 Active 2 Active 3 Inactive 1 Inactive 2 Inactive 3
|
||||
#if 0
|
||||
{ 0xFFE7E2EA, 0xFFE7E2EA, 0xFFD2CBD5, 0xFFAFA4B9, 0xFFD2D0F2, 0xFFCDCCFA, 0xFFB5BEDF },
|
||||
{ 0xFF83B8F7, 0xFF83B8F7, 0xFF6D9CDF, 0xFF4166B5, 0xFFD2D0F2, 0xFFCDCCFA, 0xFFB5BEDF },
|
||||
{ 0xFFE0E0E0, 0xFFE4E5E7, 0xFFCCCDCF, 0xFF909193, 0xFFD2D0F2, 0xFFCDCCFA, 0xFFB5BEDF },
|
||||
#else
|
||||
{ 0xFFFF0032, 0xFFF78399, 0xFFDF6D83, 0xFFB54157, 0xFFF2D0D6, 0xFFFACCD5, 0xFFDFB5BD },
|
||||
{ 0xFFFF6042, 0xFFF7AEA1, 0xFFDF978A, 0xFFB56C5F, 0xFFF2DCD8, 0xFFFADDD7, 0xFFDFC4BF },
|
||||
{ 0xFFFF7F24, 0xFFF7BC93, 0xFFDFA57D, 0xFFB57A51, 0xFFF2E0D4, 0xFFFAE2D2, 0xFFDFC9BA },
|
||||
{ 0xFFFFFF24, 0xFFF7F793, 0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||||
{ 0xFFE8ECF9, 0xFFE9EBF1, 0xFFD2D3D9, 0xFFA9AAB0, 0xFFEAEAEC, 0xFFF1F1F4, 0xFFD6D7D9 },
|
||||
{ 0xFFB7BBC5, 0xFFB8BABE, 0xFFA6A7AC, 0xFF85878B, 0xFFB9B9BA, 0xFFBEBFC1, 0xFFA9AAAC },
|
||||
#endif
|
||||
{ 0xFFB7BBC5, 0xFFB8BABE, 0xFF9A9BA0, 0xFF85878B, 0xFFE9E9EA, 0xFFDEDFE1, 0xFFB9BABC },
|
||||
};
|
||||
|
||||
const EsStyle styleSettingsGroupContainer3 = {
|
||||
|
@ -191,7 +181,7 @@ void SettingsLoadDefaults() {
|
|||
SettingsPutValue("general", "show_cursor_shadow", EsLiteral("1"), nullptr, nullptr, true, false);
|
||||
SettingsPutValue("general", "scroll_lines_per_notch", EsLiteral("3"), nullptr, nullptr, true, false);
|
||||
SettingsPutValue("general", "ui_scale", EsLiteral("100"), nullptr, nullptr, true, false);
|
||||
SettingsPutValue("general", "window_color", EsLiteral("6"), nullptr, nullptr, true, false);
|
||||
SettingsPutValue("general", "window_color", EsLiteral("5"), nullptr, nullptr, true, false);
|
||||
SettingsPutValue("general", "use_smart_quotes", EsLiteral("1"), nullptr, nullptr, true, false);
|
||||
SettingsPutValue("general", "enable_hover_state", EsLiteral("1"), nullptr, nullptr, true, false);
|
||||
SettingsPutValue("general", "enable_animations", EsLiteral("1"), nullptr, nullptr, true, false);
|
||||
|
|
18
util/build.c
18
util/build.c
|
@ -1120,16 +1120,18 @@ void DoCommand(const char *l) {
|
|||
fwrite(&crc64, 1, sizeof(crc64), f);
|
||||
fclose(f);
|
||||
} else if (0 == strcmp(l, "make-installer-root")) {
|
||||
CallSystem("rm -r root/Installer\\ Data");
|
||||
DoCommand("make-installer-archive");
|
||||
CallSystem("util/uefi_compile.sh");
|
||||
CallSystem("cp bin/mbr root/mbr.dat");
|
||||
CallSystem("cp bin/stage1 root/stage1.dat");
|
||||
CallSystem("cp bin/stage2 root/stage2.dat");
|
||||
CallSystem("cp bin/uefi root/uefi1.dat");
|
||||
CallSystem("cp bin/uefi_loader root/uefi2.dat");
|
||||
CallSystem("cp LICENSE.md root/installer_licenses.txt");
|
||||
CallSystem("mv bin/installer_archive.dat root");
|
||||
CallSystem("mv bin/installer_metadata.dat root");
|
||||
CallSystem("mkdir root/Installer\\ Data");
|
||||
CallSystem("cp bin/mbr root/Installer\\ Data/mbr.dat");
|
||||
CallSystem("cp bin/stage1 root/Installer\\ Data/stage1.dat");
|
||||
CallSystem("cp bin/stage2 root/Installer\\ Data/stage2.dat");
|
||||
CallSystem("cp bin/uefi root/Installer\\ Data/uefi1.dat");
|
||||
CallSystem("cp bin/uefi_loader root/Installer\\ Data/uefi2.dat");
|
||||
CallSystem("cp LICENSE.md root/Installer\\ Data/licenses.txt");
|
||||
CallSystem("mv bin/installer_archive.dat root/Installer\\ Data/archive.dat");
|
||||
CallSystem("mv bin/installer_metadata.dat root/Installer\\ Data/metadata.dat");
|
||||
} else if (0 == strcmp(l, "config")) {
|
||||
BuildUtilities();
|
||||
CallSystem("bin/config_editor");
|
||||
|
|
Loading…
Reference in New Issue