--- /dev/null
+{
+ "Version" : 0.2,
+ "ModuleName" : "emEar",
+ "Options" : {
+ "Warnings" : "All",
+ "TargetType" : "Executable",
+ "TargetFileName" : "emear",
+ "Libraries" : [
+ "ecere"
+ ],
+ "Console" : true
+ },
+ "Configurations" : [
+ {
+ "Name" : "Debug",
+ "Options" : {
+ "Debug" : true,
+ "Optimization" : "None",
+ "PreprocessorDefinitions" : [
+ "_DEBUG"
+ ],
+ "FastMath" : false
+ }
+ },
+ {
+ "Name" : "Release",
+ "Options" : {
+ "Debug" : false,
+ "Optimization" : "Speed",
+ "FastMath" : true
+ }
+ }
+ ],
+ "Files" : [
+ "emear.ec"
+ ],
+ "ResourcesPath" : "",
+ "Resources" : [
+
+ ]
+}
--- /dev/null
+import "ecere"
+
+class EarApp : Application
+{
+ void Main()
+ {
+ if(argc > 2)
+ {
+ const String s = argv[2];
+ if(SearchString(s, 0, ".html", false, true))
+ {
+ char f[MAX_LOCATION];
+ char command[16384];
+ int i;
+ // ChangeExtension(s, "earres", f);
+ StripLastDirectory(s, f);
+ PathCat(f, "resources.ear");
+
+ sprintf(command, "ear aw %s", f);
+ for(i = 3; i < argc; i++)
+ {
+ bool quote = false;
+ strcat(command, " ");
+ if(!argv[i][0] || strchr(argv[i], ' '))
+ quote = true;
+ if(quote) strcat(command, "\"");
+ strcat(command, argv[i]);
+ if(quote) strcat(command, "\"");
+ }
+ {
+ DualPipe p = DualPipeOpen(0, command);
+ p.Wait();
+ }
+ }
+ }
+ }
+}