File: BuildMp3Diags.hta

package info (click to toggle)
mp3diags 1.5.01-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 21,120 kB
  • sloc: cpp: 34,487; sh: 316; makefile: 101; xml: 97; python: 14
file content (708 lines) | stat: -rwxr-xr-x 25,978 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
<head>
<title>MP3 Diags build configuration</title>
<HTA:APPLICATION
    APPLICATIONNAME="MP3 Diags build configuration"
    SCROLL="yes"
    SINGLEINSTANCE="yes"
>
</head>



<script type="text/javascript">

    var EDIT_COUNT = 6;
    var CONF_FILE_VER = 1;
    var editControls = new Array(EDIT_COUNT);

    var DIR_COUNT;
    var MAX_DIR_COUNT;
    var MIN_MAX_DIR_COUNT = 4;
    var MAX_MAX_DIR_COUNT = 100;
    var DEF_MAX_DIR_COUNT = 10;

    var TOOLCHAIN_MSVC = "MSVC";
    var TOOLCHAIN_MINGW_QMAKE = "MinGW_QMake";

    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
    var crtFolderSettings; // first elem in folderSettings

    var SETTINGS_FILE;

    var wsShell = new ActiveXObject("WScript.Shell");
    var fsObj = new ActiveXObject("Scripting.FileSystemObject");

    function printSett(title)
    {
        /*title += "\r\n";
        for (i = 0; i < ARRAY_SIZE; ++i)
        {
            title += settings[i] + "\r\n";
        }
        alert(title);*/
    }

    function preload()
    {
        SETTINGS_FILE = wsShell.SpecialFolders("MyDocuments") + "\\mp3diagsSetup.conf";
    }

    function checkSettings()
    {
        var res = "";

        var isGcc = TOOLCHAIN_MINGW_QMAKE == crtFolderSettings[1];

        var compChk = crtFolderSettings[2] + (isGcc ? "\\g++.exe" : "\\vcvarsall.bat");
        if (!fsObj.FileExists(compChk))
        {
            res += "Cannot open file " + compChk + "\r\n";
        }

        var qtChk = crtFolderSettings[3] + "\\bin\\qmake.exe";
        if (!fsObj.FileExists(qtChk))
        {
            res += "Cannot open file " + qtChk + "\r\n";
        }

        var boostRootChk = crtFolderSettings[4] + "\\boost\\serialization\\serialization.hpp";
        if (!fsObj.FileExists(boostRootChk))
        {
            res += "Cannot open file " + boostRootChk + "\r\n";
        }

        var boostLibChk = crtFolderSettings[5];
        if (!fsObj.FileExists(boostLibChk))
        {
            res += "Cannot open file " + boostLibChk + "\r\n";
        }

        var zlibInclChk = crtFolderSettings[6] + "\\zlib.h";
        if (!fsObj.FileExists(zlibInclChk))
        {
            res += "Cannot open file " + zlibInclChk + "\r\n";
        }

        var zlibLibChk = crtFolderSettings[7];
        if (!fsObj.FileExists(zlibLibChk))
        {
            res += "Cannot open file " + zlibLibChk + "\r\n";
        }

        return res;
    }



    function settingsToForm()
    {
        document.getElementById("compilerId").selectedIndex = (TOOLCHAIN_MINGW_QMAKE == crtFolderSettings[1] ? 0 : 1);

        for (i = 0; i < EDIT_COUNT; i++)
        {
            document.getElementById(editControls[i]).value = crtFolderSettings[i + 2];
        }

        document.getElementById("maxFolders").value = MAX_DIR_COUNT;
    }

    function formToSettings()
    {
        crtFolderSettings[1] = (0 == document.getElementById("compilerId").selectedIndex ? TOOLCHAIN_MINGW_QMAKE : TOOLCHAIN_MSVC);
        for (i = 0; i < EDIT_COUNT; i++)
        {
            crtFolderSettings[i + 2] = document.getElementById(editControls[i]).value;
        }

        MAX_DIR_COUNT = parseInt(document.getElementById("maxFolders").value);
        if (MAX_DIR_COUNT > MAX_MAX_DIR_COUNT || MAX_DIR_COUNT < MIN_MAX_DIR_COUNT || isNaN(MAX_DIR_COUNT))
        {
            alert("Invalid maximum number of folders. Value reset to default.");
            MAX_DIR_COUNT = DEF_MAX_DIR_COUNT;
        }
        document.getElementById("maxFolders").value = MAX_DIR_COUNT; // to take care of float values
    }


    function saveSettings()
    {
        formToSettings();
        var out = fsObj.CreateTextFile(SETTINGS_FILE, true);

        out.writeLine(CONF_FILE_VER);
        out.writeLine(MAX_DIR_COUNT);
        out.writeLine(DIR_COUNT);

        for (i = 0; i < DIR_COUNT; ++i)
        {
            for (j = 0; j < EDIT_COUNT + 2; ++j)
            {
                out.writeLine(folderSettings[i][j]);
            }
        }

        out.close();

        var err = checkSettings();
        if ("" != err)
        {
            alert(err);
            return false;
        }
        return true;
    }

    function trimFolders()
    {
        if (folderSettings.length > MAX_DIR_COUNT)
        {
            folderSettings.splice(MAX_DIR_COUNT, MAX_MAX_DIR_COUNT);
        }

        DIR_COUNT = folderSettings.length;
    }


    function getSettingsFrom(k)
    {
        for (i = 1; i < EDIT_COUNT + 2; ++i)
        {
            crtFolderSettings[i] = folderSettings[k][i];
        }
    }

    function setDefaults()
    {
        if (TOOLCHAIN_MINGW_QMAKE == crtFolderSettings[1])
        {
            crtFolderSettings[2] = "? C:\\Qt\\Tools\\mingw730_64\\bin"; // C:\\QtSDK\\mingw\\bin
            crtFolderSettings[3] = "? C:\\QtSDK\\Desktop\\Qt\\4.7.3\\mingw";
            crtFolderSettings[4] = "? C:\\boost_1_46_1";
            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";
            crtFolderSettings[6] = "? C:\\zlib125-dll\\include";
            crtFolderSettings[7] = "? C:\\zlib125-dll\\lib\\zdll.lib";
        }
        else if (TOOLCHAIN_MSVC == crtFolderSettings[1])
        {
            crtFolderSettings[2] = "? C:\\Program Files\\Microsoft Visual Studio 9.0";
            crtFolderSettings[3] = "? C:\\Qt-4.5.2-VS";
            crtFolderSettings[4] = "? C:\\boost_1_39_0";
            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";
            crtFolderSettings[6] = "? C:\\zlib125-dll\\include";
            crtFolderSettings[7] = "? C:\\zlib125-dll\\lib\\zdll.lib";
        }
        else
        {
            throw new Error(1000, "Invalid toolchain");
        }
    }


    function initializeFirstFolder()
    {
        crtFolderSettings[0] = wsShell.CurrentDirectory;
        crtFolderSettings[1] = TOOLCHAIN_MINGW_QMAKE;
        setDefaults();
    }


    function switchCompiler()
    {
        formToSettings(); // just to set the toolchain
        if (fsObj.FileExists("build.bat"))
        {
            fsObj.DeleteFile("build.bat");
        }
        setDefaults();
        settingsToForm();
    }

    function loadSettings()
    {
        var crtDir = wsShell.CurrentDirectory;

        try
        {
            var fIn = fsObj.OpenTextFile(SETTINGS_FILE, 1);
            var i = 0;

            var x = Number(fIn.ReadLine());
            if (x != 1)
            {
                throw new Error(1000, "Invalid configuration file version"); // ttt1 perhaps close fIn
            }

            x = Number(fIn.ReadLine());
            if (x > MAX_MAX_DIR_COUNT || x < MIN_MAX_DIR_COUNT)
            {
                throw new Error(1000, "Invalid maximum folder count");
            }
            MAX_DIR_COUNT = x;

            x = Number(fIn.ReadLine());
            if (x > MAX_DIR_COUNT || x < 0)
            {
                throw new Error(1000, "Invalid folder count");
            }
            DIR_COUNT = x;

            var foundAt = -1;
            folderSettings = new Array(DIR_COUNT);
            for (i = 0; i < DIR_COUNT; ++i)
            {
                folderSettings[i] = new Array(EDIT_COUNT + 2);
                for (j = 0; j < EDIT_COUNT + 2; ++j)
                {
                    folderSettings[i][j] = fIn.ReadLine();
                }
                if (folderSettings[i][0] == wsShell.CurrentDirectory)
                {
                    foundAt = i;
                }
            }

            fIn.close();

            if (-1 == foundAt)
            {
                folderSettings.splice(0, 0, new Array(EDIT_COUNT + 2));
            }
            else
            {
                var v = folderSettings[foundAt];
                folderSettings.splice(foundAt, 1);
                folderSettings.splice(0, 0, v);
            }
        }
        catch (err)
        {
            if ("File not found" != err.message)
            {
                alert(err.message);
            }

            DIR_COUNT = 1;
            folderSettings = new Array(1);
            folderSettings[0] = new Array(EDIT_COUNT + 2);
            MAX_DIR_COUNT = DEF_MAX_DIR_COUNT;
        }

        crtFolderSettings = folderSettings[0];
        if (undefined == crtFolderSettings[0])
        {
            initializeFirstFolder();
        }

        trimFolders();
    }

    function copySettings()
    {
        var k = document.getElementById("copyFrom").selectedIndex + 1;
        for (i = 1; i < EDIT_COUNT + 2; ++i)
        {
            folderSettings[0][i] = folderSettings[k][i];
        }
        settingsToForm();
    }

    function onLoad()
    {
        editControls[0] = 'compBinary';
        editControls[1] = 'qtRoot';
        editControls[2] = 'boostRoot';
        editControls[3] = 'boostLib';
        editControls[4] = 'zlibInclude';
        editControls[5] = 'zlibLib';

        settingsToForm();
    }


    function setUpSrcPro()
    {
        if (!fsObj.FileExists("package\\src.pro1"))
        {
            fsObj.CopyFile("src\\src.pro", "package\\src.pro1");
        }

        var fIn = fsObj.OpenTextFile("package\\src.pro1", 1);
        var fOut = fsObj.CreateTextFile("src\\src.pro", true);
        var line;

        while (!fIn.AtEndOfStream)
        {
            line = fIn.ReadLine();
            if (-1 == line.indexOf("boost_serialization") && -1 == line.indexOf("boost_program_options") && -1 == line.indexOf("lz"))
            {
                if (0 == line.indexOf("TARGET = MP3Diags") && 0 != line.indexOf("TARGET = MP3DiagsWindows"))
                {
                    fOut.writeLine("TARGET = MP3DiagsWindows"); // !!! to have consistent naming
                }
                else
                {
                    fOut.writeLine(line);
                }
            }
        }

        fOut.writeLine(); fOut.writeLine();
        fOut.writeLine("INCLUDEPATH += " + crtFolderSettings[4].replace(/\\/g, "\\\\"));
        fOut.writeLine("INCLUDEPATH += " + crtFolderSettings[6].replace(/\\/g, "\\\\"));
        fOut.writeLine(); fOut.writeLine();
        fOut.writeLine("LIBS += " + crtFolderSettings[5].replace(/\\/g, "\\\\"));
        fOut.writeLine("LIBS += " + crtFolderSettings[5].replace(/serialization/g, "program_options").replace(/\\/g, "\\\\"));
        fOut.writeLine("LIBS += " + crtFolderSettings[7].replace(/\\/g, "\\\\"));
        fOut.writeLine("LIBS += -lpsapi");

        fOut.close();
        fIn.close();
    }

    function setUpProjGcc()
    {
        setUpSrcPro();

        var fOut = fsObj.CreateTextFile("build.bat", true);
        fOut.writeLine("PATH=" + crtFolderSettings[3] + "\\bin;" + crtFolderSettings[2]);
        fOut.writeLine();
        fOut.writeLine("del /Q src\\Makefile*");
        fOut.writeLine("del /Q src\\object_script*");
        fOut.writeLine();
        fOut.writeLine("qmake mp3diags.pro");
        fOut.writeLine("mingw32-make.exe -w release");
        fOut.writeLine();
        fOut.writeLine("lrelease src\\src.pro");
        fOut.writeLine("copy /y src\\translations\\*.qm bin");
        fOut.writeLine();
        fOut.writeLine("copy /y changelog.txt bin\\changelog.txt");
        fOut.writeLine();
        fOut.writeLine("pause");

        fOut.close();
    }


    function setUpProjMsvc()
    {
        setUpSrcPro();

        var fInOut = fsObj.OpenTextFile("src\\src.pro", 8/*FileSystemObject.ForAppending*/);
        fInOut.writeLine();
        fInOut.writeLine("DEFINES += BOOST_ALL_DYN_LINK");
        fInOut.writeLine("DEFINES += _CRT_SECURE_NO_WARNINGS");
        fInOut.writeLine("DEFINES += _SCL_SECURE_NO_WARNINGS");
        fInOut.writeLine("DEFINES += MSVC_QMAKE");
        fInOut.writeLine();

        fInOut.close();

        var msVer = "";

        {
            var fOut = fsObj.CreateTextFile("findVer.bat", true);
            fOut.writeLine("call \"" + crtFolderSettings[2] + "\\vcvarsall.bat\" x86");
            fOut.writeLine("cl 2> ver.txt");
            fOut.close();

            wsShell.run("findVer.bat", 1, true);
            var fIn = fsObj.OpenTextFile("ver.txt", 1);
            var regExp2002 = new RegExp("13\\.00");
            var regExp2003 = new RegExp("13\\.10");
            var regExp2005 = new RegExp("14\\.00");
            var regExp2008 = new RegExp("15\\.00");
            line = fIn.ReadLine();
            fIn.close();

            if (-1 != line.search(regExp2002))
            {
                msVer = "2002";
            }
            else if (-1 != line.search(regExp2003))
            {
                msVer = "2003";
            }
            else if (-1 != line.search(regExp2005))
            {
                msVer = "2005";
            }
            else if (-1 != line.search(regExp2008))
            {
                msVer = "2008";
            }
            else
            {
                msVer = "2010"; // ttt2 not quite right
            }

            fsObj.DeleteFile("findVer.bat");
            fsObj.DeleteFile("ver.txt");
        }

        {
            var fOut = fsObj.CreateTextFile("generateVsProject.bat", true);
            fOut.writeLine("call \"" + crtFolderSettings[2] + "\\vcvarsall.bat\" x86");
            fOut.writeLine("PATH=\"" + crtFolderSettings[3] + "\\bin\";%PATH%");
            fOut.writeLine();

            //fOut.writeLine("set QMAKESPEC=\"" + crtFolderSettings[3] + "\\mkspecs\\win32-msvc" + msVer + "\""); // commented out, because the "mkspecs/default" should be OK
            fOut.writeLine("set QTDIR=\"" + crtFolderSettings[3] + "\"");
            fOut.writeLine();
            fOut.writeLine("qmake -tp vc -r mp3diags.pro");

            fOut.close();
        }

        var ext = "vcproj";

        {
            wsShell.run("generateVsProject.bat", 1, true);

            if (fsObj.FileExists("src\\MP3DiagsWindows.vcxproj"))
            {
                ext = "vcxproj";
            }

            fsObj.MoveFile("src\\MP3DiagsWindows." + ext, "src\\MP3DiagsWindows." + ext + "1");
            var fOut = fsObj.CreateTextFile("src\\MP3DiagsWindows." + ext, true);
            var fIn = fsObj.OpenTextFile("src\\MP3DiagsWindows." + ext + "1", 1);
            var regExp1 = new RegExp("release\\\\threading-multi");
            var regExp2 = new RegExp("-mt-1");
            var regExp3 = new RegExp("QtGuid4");
            var line;

            while (!fIn.AtEndOfStream)
            {
                line = fIn.ReadLine();
                //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
                if (-1 != line.search(regExp2) && -1 != line.search(regExp3))
                {
                    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
                    line = line.replace(regExp2, "-mt-gd-1").replace(regExp2, "-mt-gd-1");
                }
                fOut.writeLine(line);
            }

            fIn.close();
            fOut.close();
            fsObj.DeleteFile("src\\MP3DiagsWindows." + ext + "1");
        }

        {
            var fOut = fsObj.CreateTextFile("build.bat", true);
            fOut.writeLine("call \"" + crtFolderSettings[2] + "\\vcvarsall.bat\" x86");
            fOut.writeLine("PATH=\"" + crtFolderSettings[3] + "\\bin\";%PATH%");
            fOut.writeLine("");
            //fOut.writeLine("devenv /build release mp3diags.sln");
            fOut.writeLine("msbuild src\\MP3DiagsWindows." + ext + " /p:Configuration=Release");
            fOut.writeLine("");
            fOut.writeLine("lrelease src\\src.pro");
            fOut.writeLine("copy /y src\\translations\\*.qm bin");
            fOut.writeLine();
            fOut.writeLine("copy /y changelog.txt bin\\changelog.txt");
            fOut.writeLine("");
            fOut.writeLine("pause");

            fOut.close();
        }

        //var regExp4 = new RegExp("msvc-9.0express"); //ttt0 handle other versions
        //var regExp4 = new RegExp("msvc-9.0"); //ttt0 handle other versions
        //if (-1 != crtFolderSettings[5].search(regExp4))
        { // VS Express; add a comment to allow the file to be opened by double-clicking
            fsObj.MoveFile("mp3diags.sln", "mp3diags.sln1");
            var fOut = fsObj.CreateTextFile("mp3diags.sln", true);
            var fIn = fsObj.OpenTextFile("mp3diags.sln1", 1);
            var line;
            var nCrt = 0;

            while (!fIn.AtEndOfStream)
            {
                line = fIn.ReadLine();
                ++nCrt;
                if (2 == nCrt)
                {
                    //fOut.writeLine("# Visual C++ Express 2008");
                    fOut.writeLine("# Visual Studio " + msVer);
                }
                fOut.writeLine(line);
            }

            fIn.close();
            fOut.close();
            fsObj.DeleteFile("mp3diags.sln1");
        }
    }


    function setUpProj()
    {
        if (!saveSettings()) { return false; }
        if (crtFolderSettings[1] == TOOLCHAIN_MINGW_QMAKE)
        {
            setUpProjGcc();
        }
        else
        {
            setUpProjMsvc();
        }
        return true;
    }


    function buildProj()
    {
        if (!setUpProj()) { return; }

        wsShell.run("build.bat", 1, true);
    }


</script>



<style type="text/css">
<!--

.largeFnt { font-size: 20px; font-weight: bold; font-family: Arial; }
.normalFnt { font-size: 14px; font-weight: normal; font-family: Arial; }
.smallFnt { font-size: 13px; font-weight: normal; font-family: Arial; }
.medLargeFnt { font-size: 16px; font-weight: normal; font-family: Arial; }

.vertSpc1  { padding-top: 20px; }
.vertSpc2  { padding-top: 10px; }
.vertSpc3  { padding-top: 4px; }

#Test
{
    position: absolute;
    visibility: hidden;
    font-family: Arial;
    height: auto;
    width: auto;
}

-->
</style>

<body onload="onLoad()">

    <div id="Test">
        Boost Serialization .lib file - release
    </div>

    <script type="text/javascript">
        // from http://stackoverflow.com/questions/118241/calculate-text-width-with-javascript
        var test = document.getElementById("Test");
        test.style.fontSize = "14px";
        //var height = (test.clientHeight + 1) + "px";
        var firstColWidth = (test.clientWidth + 10) + "px";
        var firstColTag = "<td style=\"width: " + firstColWidth +"\">";
        //document.write("h=" + height + ", w=" + width);
    </script>

    <div class="largeFnt vertSpc2">
        <script type="text/javascript">
            preload();
            loadSettings();
            document.write("MP3 Diags build configuration for folder " + wsShell.CurrentDirectory);
        </script>
    </div>

    <div class="normalFnt vertSpc1">
        <table border="0" cellpadding="2" cellspacing="0" width="100%" class="normalFnt">
            <tr>
                <script type="text/javascript">document.write(firstColTag);</script>Toolchain / IDE</td>
                <td>
                    <select name="compilerId" id="compilerId" onchange="switchCompiler()">
                        <option>MinGW + QMake / Qt Creator</option>
                        <option>Visual C++ (Express)</option>
                    </select>
                </td>
            </tr>
            <tr>
                <script type="text/javascript">document.write(firstColTag);</script>Compiler folder (location of g++.exe or vcvarsall.bat)</td>
                <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 -->
            </tr>
            <tr>
                <script type="text/javascript">document.write(firstColTag);</script>Qt root folder</td>
                <td><input type="text" style="width: 100%" name="qtRoot" id="qtRoot"></td>
            </tr>
            <tr>
                <script type="text/javascript">document.write(firstColTag);</script>Boost root folder</td>
                <td><input type="text" style="width: 100%" name="boostRoot" id="boostRoot"/></td>
            </tr>
            <tr>
                <script type="text/javascript">document.write(firstColTag);</script>Boost Serialization .lib or .a file - release</td>
                <td><input type="text" style="width: 100%" name="boostLib" id="boostLib"/></td>
            </tr>
            <tr>
                <script type="text/javascript">document.write(firstColTag);</script>Zlib include folder</td>
                <td><input type="text" style="width: 100%" name="zlibInclude" id="zlibInclude"/></td>
            </tr>
            <tr>
                <script type="text/javascript">document.write(firstColTag);</script>Zlib .lib file</td>
                <td><input type="text" style="width: 100%" name="zlibLib" id="zlibLib"/></td>
            </tr>
        </table>

    </div>

    <div class="normalFnt vertSpc1">
        <input type="button" onclick="copySettings()" value="Copy settings from" />
        <select name="copyFrom" id="copyFrom">
            <script type="text/javascript">
                for (i = 1; i < DIR_COUNT; ++i)
                {
                    document.write("<option>" + folderSettings[i][0] + "</option>");
                }
            </script>
        </select>
    </div>

    <div class="normalFnt vertSpc1">
        Maximum number of folders remembered: <input type="text" size="10" name="maxFolders" id="maxFolders"/>
    </div>

    <div class="normalFnt vertSpc1">
        <input type="button" value="Save settings" onclick="saveSettings()"/>
        <input type="button" value="Set up project" onclick="setUpProj()"/>
        <input type="button" value="Build MP3 Diags" onclick="buildProj()"/>
    </div>

    <div class="smallFnt vertSpc1">
        <hr/><br/>
        <span class="medLargeFnt"><b>Notes:</b></span>
        <ol>
            <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>
            <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>
            <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>
            <li class="vertSpc3">Note that the Qt root folder is for the Qt library, not for Qt Creator..</li>
            <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>
            <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>
            <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.vcproj</b> will probably work, as well as opening either <b>src\MP3DiagsWindows.vcproj</b> or <b>mp3diags.sln</b> from the IDE; however, these haven't been tested.</li>
            <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>
            <!--
                the .obj files contain boost_serialization-vc90-mt-gd-1_39.lib, and this "gd" is what's different from release
                http://stackoverflow.com/questions/1175505/is-it-possible-to-instruct-msvc-to-use-release-version-of-boost-when-compiling-de
                boost/config/auto_link.hpp  - forces some .lib files to be linked
                Access violation reading location 0xabababeb
            -->

            <li class="vertSpc3">
                The settings are stored in the file
                <script type="text/javascript">
                    document.write("\"" + SETTINGS_FILE + "\".");
                </script>
                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.
            </li>
            <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>
        </ol>
    </div>


<!--
ttt0 perhaps get qt and vs location from registry
-->
</body>