public String getWServerFromConfig()
		{
			// set a fixed hostname via environment parameters.
			String epHostName = System.Environment.GetEnvironmentVariable("ep6HostName");
			if (epHostName != null) {
				return epHostName;
			}
			String epConfDir = System.Environment.GetEnvironmentVariable("EPAGES_CONFIG");
			INIFile epConf = new INIFile(epConfDir + "\\epages.conf");
			String Server = epConf.GetValue("DE_EPAGES::Object", "SystemDomainName", "localhost");
			return Server;
		}
Beispiel #2
0
 private bool DetectRunningPortable()
 {
     PGEEditorPath = Environment.CurrentDirectory + System.IO.Path.DirectorySeparatorChar;
     PGEEnginePath = Environment.CurrentDirectory + System.IO.Path.DirectorySeparatorChar;
     if (Internals.CurrentOS == InternalOperatingSystem.Windows)
     {
         PGEEditorPath += "pge_editor.exe";
         PGEEnginePath += "pge_engine.exe";
     }
     else if (Internals.CurrentOS == InternalOperatingSystem.Linux)
     {
         PGEEditorPath += "pge_editor";
         PGEEnginePath += "pge_engine";
     }
     if (File.Exists(PGEEditorPath) && File.Exists(PGEEnginePath))
     {
         if (File.Exists(Environment.CurrentDirectory + System.IO.Path.DirectorySeparatorChar + "pge_editor.ini"))
         {
             INIFile editorConfig = new INIFile(Environment.CurrentDirectory + System.IO.Path.DirectorySeparatorChar + "pge_editor.ini");
             if(editorConfig.GetValue("Main", "force-portable", "false").ToString().ToLower() == "true")
                 return true;
             else
                 return false;
         }
         else
             return false;
     }
     return false;
 }