"Fossies" - the Fresh Open Source Software Archive

Member "MP3Diags-unstable-1.5.01/BuildMp3Diags.hta" (7 Apr 2019, 26077 Bytes) of package /linux/privat/MP3Diags-unstable-1.5.01.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <head>
    2 <title>MP3 Diags build configuration</title>
    3 <HTA:APPLICATION
    4     APPLICATIONNAME="MP3 Diags build configuration"
    5     SCROLL="yes"
    6     SINGLEINSTANCE="yes"
    7 >
    8 </head>
    9 
   10 
   11 
   12 <script type="text/javascript">
   13 
   14     var EDIT_COUNT = 6;
   15     var CONF_FILE_VER = 1;
   16     var editControls = new Array(EDIT_COUNT);
   17 
   18     var DIR_COUNT;
   19     var MAX_DIR_COUNT;
   20     var MIN_MAX_DIR_COUNT = 4;
   21     var MAX_MAX_DIR_COUNT = 100;
   22     var DEF_MAX_DIR_COUNT = 10;
   23 
   24     var TOOLCHAIN_MSVC = "MSVC";
   25     var TOOLCHAIN_MINGW_QMAKE = "MinGW_QMake";
   26 
   27     var folderSettings; // array; each element is an array with EDIT_COUNT+2 elements; first element is the folder, second is the compiler, and the others are the values of the edit boxes
   28     var crtFolderSettings; // first elem in folderSettings
   29 
   30     var SETTINGS_FILE;
   31 
   32     var wsShell = new ActiveXObject("WScript.Shell");
   33     var fsObj = new ActiveXObject("Scripting.FileSystemObject");
   34 
   35     function printSett(title)
   36     {
   37         /*title += "\r\n";
   38         for (i = 0; i < ARRAY_SIZE; ++i)
   39         {
   40             title += settings[i] + "\r\n";
   41         }
   42         alert(title);*/
   43     }
   44 
   45     function preload()
   46     {
   47         SETTINGS_FILE = wsShell.SpecialFolders("MyDocuments") + "\\mp3diagsSetup.conf";
   48     }
   49 
   50     function checkSettings()
   51     {
   52         var res = "";
   53 
   54         var isGcc = TOOLCHAIN_MINGW_QMAKE == crtFolderSettings[1];
   55 
   56         var compChk = crtFolderSettings[2] + (isGcc ? "\\g++.exe" : "\\vcvarsall.bat");
   57         if (!fsObj.FileExists(compChk))
   58         {
   59             res += "Cannot open file " + compChk + "\r\n";
   60         }
   61 
   62         var qtChk = crtFolderSettings[3] + "\\bin\\qmake.exe";
   63         if (!fsObj.FileExists(qtChk))
   64         {
   65             res += "Cannot open file " + qtChk + "\r\n";
   66         }
   67 
   68         var boostRootChk = crtFolderSettings[4] + "\\boost\\serialization\\serialization.hpp";
   69         if (!fsObj.FileExists(boostRootChk))
   70         {
   71             res += "Cannot open file " + boostRootChk + "\r\n";
   72         }
   73 
   74         var boostLibChk = crtFolderSettings[5];
   75         if (!fsObj.FileExists(boostLibChk))
   76         {
   77             res += "Cannot open file " + boostLibChk + "\r\n";
   78         }
   79 
   80         var zlibInclChk = crtFolderSettings[6] + "\\zlib.h";
   81         if (!fsObj.FileExists(zlibInclChk))
   82         {
   83             res += "Cannot open file " + zlibInclChk + "\r\n";
   84         }
   85 
   86         var zlibLibChk = crtFolderSettings[7];
   87         if (!fsObj.FileExists(zlibLibChk))
   88         {
   89             res += "Cannot open file " + zlibLibChk + "\r\n";
   90         }
   91 
   92         return res;
   93     }
   94 
   95 
   96 
   97     function settingsToForm()
   98     {
   99         document.getElementById("compilerId").selectedIndex = (TOOLCHAIN_MINGW_QMAKE == crtFolderSettings[1] ? 0 : 1);
  100 
  101         for (i = 0; i < EDIT_COUNT; i++)
  102         {
  103             document.getElementById(editControls[i]).value = crtFolderSettings[i + 2];
  104         }
  105 
  106         document.getElementById("maxFolders").value = MAX_DIR_COUNT;
  107     }
  108 
  109     function formToSettings()
  110     {
  111         crtFolderSettings[1] = (0 == document.getElementById("compilerId").selectedIndex ? TOOLCHAIN_MINGW_QMAKE : TOOLCHAIN_MSVC);
  112         for (i = 0; i < EDIT_COUNT; i++)
  113         {
  114             crtFolderSettings[i + 2] = document.getElementById(editControls[i]).value;
  115         }
  116 
  117         MAX_DIR_COUNT = parseInt(document.getElementById("maxFolders").value);
  118         if (MAX_DIR_COUNT > MAX_MAX_DIR_COUNT || MAX_DIR_COUNT < MIN_MAX_DIR_COUNT || isNaN(MAX_DIR_COUNT))
  119         {
  120             alert("Invalid maximum number of folders. Value reset to default.");
  121             MAX_DIR_COUNT = DEF_MAX_DIR_COUNT;
  122         }
  123         document.getElementById("maxFolders").value = MAX_DIR_COUNT; // to take care of float values
  124     }
  125 
  126 
  127     function saveSettings()
  128     {
  129         formToSettings();
  130         var out = fsObj.CreateTextFile(SETTINGS_FILE, true);
  131 
  132         out.writeLine(CONF_FILE_VER);
  133         out.writeLine(MAX_DIR_COUNT);
  134         out.writeLine(DIR_COUNT);
  135 
  136         for (i = 0; i < DIR_COUNT; ++i)
  137         {
  138             for (j = 0; j < EDIT_COUNT + 2; ++j)
  139             {
  140                 out.writeLine(folderSettings[i][j]);
  141             }
  142         }
  143 
  144         out.close();
  145 
  146         var err = checkSettings();
  147         if ("" != err)
  148         {
  149             alert(err);
  150             return false;
  151         }
  152         return true;
  153     }
  154 
  155     function trimFolders()
  156     {
  157         if (folderSettings.length > MAX_DIR_COUNT)
  158         {
  159             folderSettings.splice(MAX_DIR_COUNT, MAX_MAX_DIR_COUNT);
  160         }
  161 
  162         DIR_COUNT = folderSettings.length;
  163     }
  164 
  165 
  166     function getSettingsFrom(k)
  167     {
  168         for (i = 1; i < EDIT_COUNT + 2; ++i)
  169         {
  170             crtFolderSettings[i] = folderSettings[k][i];
  171         }
  172     }
  173 
  174     function setDefaults()
  175     {
  176         if (TOOLCHAIN_MINGW_QMAKE == crtFolderSettings[1])
  177         {
  178             crtFolderSettings[2] = "? C:\\Qt\\Tools\\mingw730_64\\bin"; // C:\\QtSDK\\mingw\\bin
  179             crtFolderSettings[3] = "? C:\\QtSDK\\Desktop\\Qt\\4.7.3\\mingw";
  180             crtFolderSettings[4] = "? C:\\boost_1_46_1";
  181             crtFolderSettings[5] = "? C:\\boost_1_46_1\\bin.v2\\libs\\serialization\\build\\gcc-mingw-4.4.0\\release\\threading-multi\\libboost_serialization-mgw44-mt-1_46_1.dll.a";
  182             crtFolderSettings[6] = "? C:\\zlib125-dll\\include";
  183             crtFolderSettings[7] = "? C:\\zlib125-dll\\lib\\zdll.lib";
  184         }
  185         else if (TOOLCHAIN_MSVC == crtFolderSettings[1])
  186         {
  187             crtFolderSettings[2] = "? C:\\Program Files\\Microsoft Visual Studio 9.0";
  188             crtFolderSettings[3] = "? C:\\Qt-4.5.2-VS";
  189             crtFolderSettings[4] = "? C:\\boost_1_39_0";
  190             crtFolderSettings[5] = "? C:\\boost_1_39_0\\bin.v2\\libs\\serialization\\build\\msvc-9.0express\\release\\threading-multi\\boost_serialization-vc90-mt-1_39.lib";
  191             crtFolderSettings[6] = "? C:\\zlib125-dll\\include";
  192             crtFolderSettings[7] = "? C:\\zlib125-dll\\lib\\zdll.lib";
  193         }
  194         else
  195         {
  196             throw new Error(1000, "Invalid toolchain");
  197         }
  198     }
  199 
  200 
  201     function initializeFirstFolder()
  202     {
  203         crtFolderSettings[0] = wsShell.CurrentDirectory;
  204         crtFolderSettings[1] = TOOLCHAIN_MINGW_QMAKE;
  205         setDefaults();
  206     }
  207 
  208 
  209     function switchCompiler()
  210     {
  211         formToSettings(); // just to set the toolchain
  212         if (fsObj.FileExists("build.bat"))
  213         {
  214             fsObj.DeleteFile("build.bat");
  215         }
  216         setDefaults();
  217         settingsToForm();
  218     }
  219 
  220     function loadSettings()
  221     {
  222         var crtDir = wsShell.CurrentDirectory;
  223 
  224         try
  225         {
  226             var fIn = fsObj.OpenTextFile(SETTINGS_FILE, 1);
  227             var i = 0;
  228 
  229             var x = Number(fIn.ReadLine());
  230             if (x != 1)
  231             {
  232                 throw new Error(1000, "Invalid configuration file version"); // ttt1 perhaps close fIn
  233             }
  234 
  235             x = Number(fIn.ReadLine());
  236             if (x > MAX_MAX_DIR_COUNT || x < MIN_MAX_DIR_COUNT)
  237             {
  238                 throw new Error(1000, "Invalid maximum folder count");
  239             }
  240             MAX_DIR_COUNT = x;
  241 
  242             x = Number(fIn.ReadLine());
  243             if (x > MAX_DIR_COUNT || x < 0)
  244             {
  245                 throw new Error(1000, "Invalid folder count");
  246             }
  247             DIR_COUNT = x;
  248 
  249             var foundAt = -1;
  250             folderSettings = new Array(DIR_COUNT);
  251             for (i = 0; i < DIR_COUNT; ++i)
  252             {
  253                 folderSettings[i] = new Array(EDIT_COUNT + 2);
  254                 for (j = 0; j < EDIT_COUNT + 2; ++j)
  255                 {
  256                     folderSettings[i][j] = fIn.ReadLine();
  257                 }
  258                 if (folderSettings[i][0] == wsShell.CurrentDirectory)
  259                 {
  260                     foundAt = i;
  261                 }
  262             }
  263 
  264             fIn.close();
  265 
  266             if (-1 == foundAt)
  267             {
  268                 folderSettings.splice(0, 0, new Array(EDIT_COUNT + 2));
  269             }
  270             else
  271             {
  272                 var v = folderSettings[foundAt];
  273                 folderSettings.splice(foundAt, 1);
  274                 folderSettings.splice(0, 0, v);
  275             }
  276         }
  277         catch (err)
  278         {
  279             if ("File not found" != err.message)
  280             {
  281                 alert(err.message);
  282             }
  283 
  284             DIR_COUNT = 1;
  285             folderSettings = new Array(1);
  286             folderSettings[0] = new Array(EDIT_COUNT + 2);
  287             MAX_DIR_COUNT = DEF_MAX_DIR_COUNT;
  288         }
  289 
  290         crtFolderSettings = folderSettings[0];
  291         if (undefined == crtFolderSettings[0])
  292         {
  293             initializeFirstFolder();
  294         }
  295 
  296         trimFolders();
  297     }
  298 
  299     function copySettings()
  300     {
  301         var k = document.getElementById("copyFrom").selectedIndex + 1;
  302         for (i = 1; i < EDIT_COUNT + 2; ++i)
  303         {
  304             folderSettings[0][i] = folderSettings[k][i];
  305         }
  306         settingsToForm();
  307     }
  308 
  309     function onLoad()
  310     {
  311         editControls[0] = 'compBinary';
  312         editControls[1] = 'qtRoot';
  313         editControls[2] = 'boostRoot';
  314         editControls[3] = 'boostLib';
  315         editControls[4] = 'zlibInclude';
  316         editControls[5] = 'zlibLib';
  317 
  318         settingsToForm();
  319     }
  320 
  321 
  322     function setUpSrcPro()
  323     {
  324         if (!fsObj.FileExists("package\\src.pro1"))
  325         {
  326             fsObj.CopyFile("src\\src.pro", "package\\src.pro1");
  327         }
  328 
  329         var fIn = fsObj.OpenTextFile("package\\src.pro1", 1);
  330         var fOut = fsObj.CreateTextFile("src\\src.pro", true);
  331         var line;
  332 
  333         while (!fIn.AtEndOfStream)
  334         {
  335             line = fIn.ReadLine();
  336             if (-1 == line.indexOf("boost_serialization") && -1 == line.indexOf("boost_program_options") && -1 == line.indexOf("lz"))
  337             {
  338                 if (0 == line.indexOf("TARGET = MP3Diags") && 0 != line.indexOf("TARGET = MP3DiagsWindows-unstable"))
  339                 {
  340                     fOut.writeLine("TARGET = MP3DiagsWindows-unstable"); // !!! to have consistent naming
  341                 }
  342                 else
  343                 {
  344                     fOut.writeLine(line);
  345                 }
  346             }
  347         }
  348 
  349         fOut.writeLine(); fOut.writeLine();
  350         fOut.writeLine("INCLUDEPATH += " + crtFolderSettings[4].replace(/\\/g, "\\\\"));
  351         fOut.writeLine("INCLUDEPATH += " + crtFolderSettings[6].replace(/\\/g, "\\\\"));
  352         fOut.writeLine(); fOut.writeLine();
  353         fOut.writeLine("LIBS += " + crtFolderSettings[5].replace(/\\/g, "\\\\"));
  354         fOut.writeLine("LIBS += " + crtFolderSettings[5].replace(/serialization/g, "program_options").replace(/\\/g, "\\\\"));
  355         fOut.writeLine("LIBS += " + crtFolderSettings[7].replace(/\\/g, "\\\\"));
  356         fOut.writeLine("LIBS += -lpsapi");
  357 
  358         fOut.close();
  359         fIn.close();
  360     }
  361 
  362     function setUpProjGcc()
  363     {
  364         setUpSrcPro();
  365 
  366         var fOut = fsObj.CreateTextFile("build.bat", true);
  367         fOut.writeLine("PATH=" + crtFolderSettings[3] + "\\bin;" + crtFolderSettings[2]);
  368         fOut.writeLine();
  369         fOut.writeLine("del /Q src\\Makefile*");
  370         fOut.writeLine("del /Q src\\object_script*");
  371         fOut.writeLine();
  372         fOut.writeLine("qmake mp3diags.pro");
  373         fOut.writeLine("mingw32-make.exe -w release");
  374         fOut.writeLine();
  375         fOut.writeLine("lrelease src\\src.pro");
  376         fOut.writeLine("copy /y src\\translations\\*.qm bin");
  377         fOut.writeLine();
  378         fOut.writeLine("copy /y changelog.txt bin\\changelog.txt");
  379         fOut.writeLine();
  380         fOut.writeLine("pause");
  381 
  382         fOut.close();
  383     }
  384 
  385 
  386     function setUpProjMsvc()
  387     {
  388         setUpSrcPro();
  389 
  390         var fInOut = fsObj.OpenTextFile("src\\src.pro", 8/*FileSystemObject.ForAppending*/);
  391         fInOut.writeLine();
  392         fInOut.writeLine("DEFINES += BOOST_ALL_DYN_LINK");
  393         fInOut.writeLine("DEFINES += _CRT_SECURE_NO_WARNINGS");
  394         fInOut.writeLine("DEFINES += _SCL_SECURE_NO_WARNINGS");
  395         fInOut.writeLine("DEFINES += MSVC_QMAKE");
  396         fInOut.writeLine();
  397 
  398         fInOut.close();
  399 
  400         var msVer = "";
  401 
  402         {
  403             var fOut = fsObj.CreateTextFile("findVer.bat", true);
  404             fOut.writeLine("call \"" + crtFolderSettings[2] + "\\vcvarsall.bat\" x86");
  405             fOut.writeLine("cl 2> ver.txt");
  406             fOut.close();
  407 
  408             wsShell.run("findVer.bat", 1, true);
  409             var fIn = fsObj.OpenTextFile("ver.txt", 1);
  410             var regExp2002 = new RegExp("13\\.00");
  411             var regExp2003 = new RegExp("13\\.10");
  412             var regExp2005 = new RegExp("14\\.00");
  413             var regExp2008 = new RegExp("15\\.00");
  414             line = fIn.ReadLine();
  415             fIn.close();
  416 
  417             if (-1 != line.search(regExp2002))
  418             {
  419                 msVer = "2002";
  420             }
  421             else if (-1 != line.search(regExp2003))
  422             {
  423                 msVer = "2003";
  424             }
  425             else if (-1 != line.search(regExp2005))
  426             {
  427                 msVer = "2005";
  428             }
  429             else if (-1 != line.search(regExp2008))
  430             {
  431                 msVer = "2008";
  432             }
  433             else
  434             {
  435                 msVer = "2010"; // ttt2 not quite right
  436             }
  437 
  438             fsObj.DeleteFile("findVer.bat");
  439             fsObj.DeleteFile("ver.txt");
  440         }
  441 
  442         {
  443             var fOut = fsObj.CreateTextFile("generateVsProject.bat", true);
  444             fOut.writeLine("call \"" + crtFolderSettings[2] + "\\vcvarsall.bat\" x86");
  445             fOut.writeLine("PATH=\"" + crtFolderSettings[3] + "\\bin\";%PATH%");
  446             fOut.writeLine();
  447 
  448             //fOut.writeLine("set QMAKESPEC=\"" + crtFolderSettings[3] + "\\mkspecs\\win32-msvc" + msVer + "\""); // commented out, because the "mkspecs/default" should be OK
  449             fOut.writeLine("set QTDIR=\"" + crtFolderSettings[3] + "\"");
  450             fOut.writeLine();
  451             fOut.writeLine("qmake -tp vc -r mp3diags.pro");
  452 
  453             fOut.close();
  454         }
  455 
  456         var ext = "vcproj";
  457 
  458         {
  459             wsShell.run("generateVsProject.bat", 1, true);
  460 
  461             if (fsObj.FileExists("src\\MP3DiagsWindows-unstable.vcxproj"))
  462             {
  463                 ext = "vcxproj";
  464             }
  465 
  466             fsObj.MoveFile("src\\MP3DiagsWindows-unstable." + ext, "src\\MP3DiagsWindows-unstable." + ext + "1");
  467             var fOut = fsObj.CreateTextFile("src\\MP3DiagsWindows-unstable." + ext, true);
  468             var fIn = fsObj.OpenTextFile("src\\MP3DiagsWindows-unstable." + ext + "1", 1);
  469             var regExp1 = new RegExp("release\\\\threading-multi");
  470             var regExp2 = new RegExp("-mt-1");
  471             var regExp3 = new RegExp("QtGuid4");
  472             var line;
  473 
  474             while (!fIn.AtEndOfStream)
  475             {
  476                 line = fIn.ReadLine();
  477                 //if (-1 != line.search(regExp1) && -1 != line.search(regExp2) && -1 != line.search(regExp3)) 2014.10.15 - depending on how Boost was built (fully or just some libs), checking for regExp1 might fail
  478                 if (-1 != line.search(regExp2) && -1 != line.search(regExp3))
  479                 {
  480                     line = line.replace(regExp1, "debug\\threading-multi").replace(regExp1, "debug\\threading-multi");  // 2014.10.15 - this won't do anything when all libs are in the same dir, (e.g. for Boost 1.47 and above installed as binaries or fully built), but that's fine, as this case doesn't need changes
  481                     line = line.replace(regExp2, "-mt-gd-1").replace(regExp2, "-mt-gd-1");
  482                 }
  483                 fOut.writeLine(line);
  484             }
  485 
  486             fIn.close();
  487             fOut.close();
  488             fsObj.DeleteFile("src\\MP3DiagsWindows-unstable." + ext + "1");
  489         }
  490 
  491         {
  492             var fOut = fsObj.CreateTextFile("build.bat", true);
  493             fOut.writeLine("call \"" + crtFolderSettings[2] + "\\vcvarsall.bat\" x86");
  494             fOut.writeLine("PATH=\"" + crtFolderSettings[3] + "\\bin\";%PATH%");
  495             fOut.writeLine("");
  496             //fOut.writeLine("devenv /build release mp3diags.sln");
  497             fOut.writeLine("msbuild src\\MP3DiagsWindows-unstable." + ext + " /p:Configuration=Release");
  498             fOut.writeLine("");
  499             fOut.writeLine("lrelease src\\src.pro");
  500             fOut.writeLine("copy /y src\\translations\\*.qm bin");
  501             fOut.writeLine();
  502             fOut.writeLine("copy /y changelog.txt bin\\changelog.txt");
  503             fOut.writeLine("");
  504             fOut.writeLine("pause");
  505 
  506             fOut.close();
  507         }
  508 
  509         //var regExp4 = new RegExp("msvc-9.0express"); //ttt0 handle other versions
  510         //var regExp4 = new RegExp("msvc-9.0"); //ttt0 handle other versions
  511         //if (-1 != crtFolderSettings[5].search(regExp4))
  512         { // VS Express; add a comment to allow the file to be opened by double-clicking
  513             fsObj.MoveFile("mp3diags.sln", "mp3diags.sln1");
  514             var fOut = fsObj.CreateTextFile("mp3diags.sln", true);
  515             var fIn = fsObj.OpenTextFile("mp3diags.sln1", 1);
  516             var line;
  517             var nCrt = 0;
  518 
  519             while (!fIn.AtEndOfStream)
  520             {
  521                 line = fIn.ReadLine();
  522                 ++nCrt;
  523                 if (2 == nCrt)
  524                 {
  525                     //fOut.writeLine("# Visual C++ Express 2008");
  526                     fOut.writeLine("# Visual Studio " + msVer);
  527                 }
  528                 fOut.writeLine(line);
  529             }
  530 
  531             fIn.close();
  532             fOut.close();
  533             fsObj.DeleteFile("mp3diags.sln1");
  534         }
  535     }
  536 
  537 
  538     function setUpProj()
  539     {
  540         if (!saveSettings()) { return false; }
  541         if (crtFolderSettings[1] == TOOLCHAIN_MINGW_QMAKE)
  542         {
  543             setUpProjGcc();
  544         }
  545         else
  546         {
  547             setUpProjMsvc();
  548         }
  549         return true;
  550     }
  551 
  552 
  553     function buildProj()
  554     {
  555         if (!setUpProj()) { return; }
  556 
  557         wsShell.run("build.bat", 1, true);
  558     }
  559 
  560 
  561 </script>
  562 
  563 
  564 
  565 <style type="text/css">
  566 <!--
  567 
  568 .largeFnt { font-size: 20px; font-weight: bold; font-family: Arial; }
  569 .normalFnt { font-size: 14px; font-weight: normal; font-family: Arial; }
  570 .smallFnt { font-size: 13px; font-weight: normal; font-family: Arial; }
  571 .medLargeFnt { font-size: 16px; font-weight: normal; font-family: Arial; }
  572 
  573 .vertSpc1  { padding-top: 20px; }
  574 .vertSpc2  { padding-top: 10px; }
  575 .vertSpc3  { padding-top: 4px; }
  576 
  577 #Test
  578 {
  579     position: absolute;
  580     visibility: hidden;
  581     font-family: Arial;
  582     height: auto;
  583     width: auto;
  584 }
  585 
  586 -->
  587 </style>
  588 
  589 <body onload="onLoad()">
  590 
  591     <div id="Test">
  592         Boost Serialization .lib file - release
  593     </div>
  594 
  595     <script type="text/javascript">
  596         // from http://stackoverflow.com/questions/118241/calculate-text-width-with-javascript
  597         var test = document.getElementById("Test");
  598         test.style.fontSize = "14px";
  599         //var height = (test.clientHeight + 1) + "px";
  600         var firstColWidth = (test.clientWidth + 10) + "px";
  601         var firstColTag = "<td style=\"width: " + firstColWidth +"\">";
  602         //document.write("h=" + height + ", w=" + width);
  603     </script>
  604 
  605     <div class="largeFnt vertSpc2">
  606         <script type="text/javascript">
  607             preload();
  608             loadSettings();
  609             document.write("MP3 Diags build configuration for folder " + wsShell.CurrentDirectory);
  610         </script>
  611     </div>
  612 
  613     <div class="normalFnt vertSpc1">
  614         <table border="0" cellpadding="2" cellspacing="0" width="100%" class="normalFnt">
  615             <tr>
  616                 <script type="text/javascript">document.write(firstColTag);</script>Toolchain / IDE</td>
  617                 <td>
  618                     <select name="compilerId" id="compilerId" onchange="switchCompiler()">
  619                         <option>MinGW + QMake / Qt Creator</option>
  620                         <option>Visual C++ (Express)</option>
  621                     </select>
  622                 </td>
  623             </tr>
  624             <tr>
  625                 <script type="text/javascript">document.write(firstColTag);</script>Compiler folder (location of g++.exe or vcvarsall.bat)</td>
  626                 <td><input type="text" style="width: 100%" name="compBinary" id="compBinary"/></td> <!-- apparently both name and id must be used; see http://www.w3.org/TR/html401/interact/forms.html#h-17.3 for use of name -->
  627             </tr>
  628             <tr>
  629                 <script type="text/javascript">document.write(firstColTag);</script>Qt root folder</td>
  630                 <td><input type="text" style="width: 100%" name="qtRoot" id="qtRoot"></td>
  631             </tr>
  632             <tr>
  633                 <script type="text/javascript">document.write(firstColTag);</script>Boost root folder</td>
  634                 <td><input type="text" style="width: 100%" name="boostRoot" id="boostRoot"/></td>
  635             </tr>
  636             <tr>
  637                 <script type="text/javascript">document.write(firstColTag);</script>Boost Serialization .lib or .a file - release</td>
  638                 <td><input type="text" style="width: 100%" name="boostLib" id="boostLib"/></td>
  639             </tr>
  640             <tr>
  641                 <script type="text/javascript">document.write(firstColTag);</script>Zlib include folder</td>
  642                 <td><input type="text" style="width: 100%" name="zlibInclude" id="zlibInclude"/></td>
  643             </tr>
  644             <tr>
  645                 <script type="text/javascript">document.write(firstColTag);</script>Zlib .lib file</td>
  646                 <td><input type="text" style="width: 100%" name="zlibLib" id="zlibLib"/></td>
  647             </tr>
  648         </table>
  649 
  650     </div>
  651 
  652     <div class="normalFnt vertSpc1">
  653         <input type="button" onclick="copySettings()" value="Copy settings from" />
  654         <select name="copyFrom" id="copyFrom">
  655             <script type="text/javascript">
  656                 for (i = 1; i < DIR_COUNT; ++i)
  657                 {
  658                     document.write("<option>" + folderSettings[i][0] + "</option>");
  659                 }
  660             </script>
  661         </select>
  662     </div>
  663 
  664     <div class="normalFnt vertSpc1">
  665         Maximum number of folders remembered: <input type="text" size="10" name="maxFolders" id="maxFolders"/>
  666     </div>
  667 
  668     <div class="normalFnt vertSpc1">
  669         <input type="button" value="Save settings" onclick="saveSettings()"/>
  670         <input type="button" value="Set up project" onclick="setUpProj()"/>
  671         <input type="button" value="Build MP3 Diags" onclick="buildProj()"/>
  672     </div>
  673 
  674     <div class="smallFnt vertSpc1">
  675         <hr/><br/>
  676         <span class="medLargeFnt"><b>Notes:</b></span>
  677         <ol>
  678             <li>The purpose of this utility is to allow builds to be made easily for various combinations of compiler and libraries, as well as generate project files that can be used from IDEs.</li>
  679             <li class="vertSpc3">First you need to choose your compiler / IDE and configure the folders and libraries. For a given folder there is a toolchain and a set of libraries that can be configured. Others should be set up in another folder.</li>
  680             <li class="vertSpc3">Folders are populated with invalid values by default. Usually it should be easy to correct them, provided that you have installed the required libraries (Qt, Boost Serialization, and zlib.) If you already configured a folder for the same toolchain, you can copy the settings to the current folder.</li>
  681             <li class="vertSpc3">Note that the Qt root folder is for the Qt library, not for Qt Creator..</li>
  682             <li class="vertSpc3">After configuring the folders you need to "set up" the project. Then you can either build it, by clicking on the corresponding button, or open it in an IDE.</li>
  683             <li class="vertSpc3">To open MP3 Diags with Qt Creator: set up the project, start Qt Creator and open <b>mp3diags.pro</b>. If it offers to import existing build settings, you should decline; otherwise you'll only be able to build the debug version.</li>
  684             <li class="vertSpc3">To open MP3 Diags with Visual C++ (Express): first set up the project. Then, if you have a 2008 or 2010 version, you can double-click on <b>mp3diags.sln</b> in Windows Explorer. If you have something else, double-clicking on <b>src\MP3DiagsWindows-unstable.vcproj</b> will probably work, as well as opening either <b>src\MP3DiagsWindows-unstable.vcproj</b> or <b>mp3diags.sln</b> from the IDE; however, these haven't been tested.</li>
  685             <li class="vertSpc3">MinGW uses the "release" Boost serialization in both debug and and release version, while the Visual C++ debug version uses the "debug" serialization. There is little reason to debug the serialization code, but by design that's how Boost works under Visual C++. (Note that you should specify the release library in "Boost .lib file" regardless of what you want to build. The generated .vcproj file will have correct settings for both "debug" and "release" configurations.)</li>
  686             <!--
  687                 the .obj files contain boost_serialization-vc90-mt-gd-1_39.lib, and this "gd" is what's different from release
  688                 http://stackoverflow.com/questions/1175505/is-it-possible-to-instruct-msvc-to-use-release-version-of-boost-when-compiling-de
  689                 boost/config/auto_link.hpp  - forces some .lib files to be linked
  690                 Access violation reading location 0xabababeb
  691             -->
  692 
  693             <li class="vertSpc3">
  694                 The settings are stored in the file
  695                 <script type="text/javascript">
  696                     document.write("\"" + SETTINGS_FILE + "\".");
  697                 </script>
  698                 Up to 10 folders are remembered by default (the maximum is 100.) You can use them to keep several versions of the project, perhaps including some local changes or different libraries.
  699             </li>
  700             <li class="vertSpc3">The settings are saved automatically only if you set up or build the project. Otherwise you need to save them explicitely.</li>
  701         </ol>
  702     </div>
  703 
  704 
  705 <!--
  706 ttt0 perhaps get qt and vs location from registry
  707 -->
  708 </body>