Browse Source

jsEnable config improvement, filename case sensitivity fix

master
Odilitime 1 year ago
parent
commit
1ca59b8ff1
1 changed files with 13 additions and 9 deletions
  1. 13
    9
      src/main.cpp

+ 13
- 9
src/main.cpp View File

@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include <string.h>

#include "app/browser/Browser.h"
#include "app/browser/browser.h"
#include "environment/Environment.h"
#include "interfaces/components/TabbedComponent.h"
#include "interfaces/components/InputComponent.h"
@@ -66,6 +66,8 @@ int main(int argc, char *argv[]) {
std::ofstream myfile;
assignfile.open ("js_assignments.txt");
execfile.open ("js_execution.txt");

std::cout \
<< "# # ######" << std::endl \
@@ -94,13 +96,9 @@ int main(int argc, char *argv[]) {
}
delete parser;

bool jsConsole = false;
std::cout << "Global Settings contains, in no particular order:\n";
for ( auto it = config->Settings.begin(); it != config->Settings.end(); ++it ){
std::cout << it->first << ":" << it->second << std::endl;
if (it->first == "CONSOLE" && it->second == "TRUE") {
jsConsole = true;
}
}
std::cout << std::endl;

@@ -178,15 +176,21 @@ int main(int argc, char *argv[]) {
// we need to set up OGL before we can setDOM (because component can't be constructed (currently) without OGL)
// but should be after CommandLineParams incase we need to change some type of window config
browser = std::make_unique<Browser>();
for ( auto it = config->Settings.begin(); it != config->Settings.end(); ++it ){
if (it->first == "CONSOLE" && it->second == "TRUE") {
std::cout << "turning on JS console" << std::endl;
browser->addJSDebuggerWindow();
}
if (it->first == "JAVASCRIPT" && it->second == "TRUE") {
std::cout << "turning on JS Javascript" << std::endl;
browser->jsEnable = true;
}
}
browser->addWindow();
if (!browser->windows.front().get()->window) {
std::cout << "main() - unable to add a window" << std::endl;
return 1;
}
if (jsConsole) {
std::cout << "turning on JS console" << std::endl;
browser->addJSDebuggerWindow();
}

//std::cout << "argc " << argc << std::endl;
if (argc > 1) {

Loading…
Cancel
Save