-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
project-generator.html
2249 lines (2138 loc) · 160 KB
/
project-generator.html
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
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<meta charset="utf-8">
<title>ZillaLib - Project Generator</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="cleartype" content="on">
<style type='text/css'>
html, body { background-color: #AAA; color: #212121; font-family: sans-serif; }
h1 { font-size: 2.0em; text-align: center; }
h1, hr { width: 850px; margin: 20px auto; }
table.tabheader { border-collapse: collapse; font-size: 1em; width: 800px; margin: 0 auto; }
table.tabheader td { text-align: center; border: 2px solid black; cursor: pointer; padding: 3px; }
td.activetab { border-bottom: 2px solid #ddd !important; background-color: #ddd; }
td.inactivetab { background-color: #888; }
form#zip { width: 780px; margin: 0 auto; background: #DDD; padding: 8px; margin-bottom: 20px; border: 2px solid black; border-top-width: 0; font-size: 1em; }
form#zip a { color: #666; }
form#zip h2 { font-size: 14pt; text-align: center; background: #333; color: #FFF; margin: 15px 0 5px }
form#zip div { clear: both; margin: 3px 0; }
form#zip label { float: left; width: 180px; margin-right: 10px; }
form#zip span.txt { display: block; padding-left: 190px; font-size: 80%; color: #666; }
form#zip span.chk { padding-left: 10px; }
form#zip label.ta { float: none; width: auto; display: block; margin-right: 0; }
form#zip textarea { width: 99%; }
form#zip .submit { margin: 0 0 10px 0; padding: 3px 10px; font-size: 150%; }
form#zip sub { display: block; color: #666; text-align: center; }
</style>
</head>
<body>
<h1>Project Generator</h1>
<hr>
<table cellspacing="0" class="tabheader"><tbody><tr>
<td width="50%" class="activetab" id="ziptabnew" onclick="document.getElementById('ziptabnew').className = 'tab activetab'; document.getElementById('ziptabexi').className = 'tab inactivetab'; document.getElementById('zipnew1').style.display = ''; document.getElementById('zipexi1').style.display = document.getElementById('zipexi2').style.display = 'none'; document.getElementById('zipmode').value = 'NEW';">CREATE NEW PROJECT</td>
<td width="50%" class="inactivetab" id="ziptabexi" onclick="document.getElementById('ziptabexi').className = 'tab activetab'; document.getElementById('ziptabnew').className = 'tab inactivetab'; document.getElementById('zipexi1').style.display = document.getElementById('zipexi2').style.display = ''; document.getElementById('zipnew1').style.display = 'none'; document.getElementById('zipmode').value = 'EXI';">UPDATE EXISTING PROJECT</td>
</tr></tbody></table>
<form id="zip" action="#" onsubmit="try{generate_project_zip(this)}catch(e){alert('Browser not supported')}return false;">
<input type="hidden" id="zipmode" name="zipmode" value="NEW">
<input type="hidden" id="vcprojguid" name="vcprojguid" value="">
<div id="zipexi1" style="display:none;margin-bottom:10px">
<h2 style="margin-top:0">Update from existing project file</h2>
<div>
<label for="add_oldprojfile" class="ta">Optional: Upload old project file to rebuild (.vcxproj or .pbxproj file):</label>
<input type="file" name="add_oldprojfile" id="add_oldprojfile" onchange="try{parse_project_zip(this)}catch(e){alert('Browser not supported')}">
</div>
</div>
<h2 style="margin-top:0">Basic Settings</h2>
<div>
<label for="proj">Project Name:</label>
<input name="proj" id="proj" size="40" onchange="document.getElementById('package_dom').innerHTML = '.'+this.value.toLowerCase()" onkeyup="this.onchange()">
<span class="txt">(No spaces, no special characters)</span>
</div>
<div>
<label for="zillalibbase">Path to ZillaLib:</label>
<input name="zillalibbase" id="zillalibbase" size="60">
<span class="txt">(Relative path from project root preferred, should not contain spaces, default is ../ZillaLib)</span>
</div>
<div>
<label for="appname">Title:</label>
<input name="appname" id="appname" size="50">
<span class="txt">(Used for window and icon title, can have spaces and special characters, if empty will use project name)</span>
</div>
<div>
<label for="package_identifier_base">App Package<br>Identifier Base:</label>
<input name="package_identifier_base" id="package_identifier_base" size="40" style="text-align:right"><span id="package_dom">.</span>
<span class="txt">(For smartphone app releases, will add .projectname to the end)</span>
</div>
<h2>Target Projects</h2>
<table width="100%"><tbody><tr valign="top"><td>
<div><label for="for_vs">Visual Studio:</label><input type="checkbox" name="for_vs" id="for_vs" value="1" checked><span class="chk">(2012 - 2019)</span></div>
<div><label for="for_vc9">Visual Studio 2010:</label><input type="checkbox" name="for_vc9" id="for_vc9" value="1"><span class="chk">(VC9)</span></div>
<div><label for="for_vc6">Visual Studio 6.0:</label><input type="checkbox" name="for_vc6" id="for_vc6" value="1"><span class="chk">(VC6)</span></div>
<div><label for="for_wasm">WebAssembly:</label><input type="checkbox" name="for_wasm" id="for_wasm" value="1" checked><span class="chk">(LLVM)</span></div>
</td><td style="padding-left:20px;border-left:1px dotted #888">
<div><label for="for_linux">Linux:</label><input type="checkbox" name="for_linux" id="for_linux" value="1" checked><span class="chk">(Makefile)</span></div>
<div><label for="for_osx">Mac OS X:</label><input type="checkbox" name="for_osx" id="for_osx" value="1" checked><span class="chk">(Xcode)</span></div>
<div><label for="for_android">Android:</label><input type="checkbox" name="for_android" id="for_android" value="1" checked><span class="chk">(Android SDK)</span></div>
<div><label for="for_ios">iOS:</label><input type="checkbox" name="for_ios" id="for_ios" value="1" checked><span class="chk">(Xcode)</span></div>
</td></tr></tbody></table>
<br>
<div>
<label for="assets_embed">Generate Makefile:</label>
<input type="checkbox" name="gen_makefile" id="gen_makefile" value="1">
<span class="chk">Always on for Linux, but can also be used for all non-Windows builds</span>
</div>
<div>
<label for="sc_gitignore">.gitignore Files:</label>
<input type="checkbox" name="sc_gitignore" id="sc_gitignore" value="1">
<span class="chk">For storing the project in a git repository</span>
</div>
<h2>Assets</h2>
<div>
<label for="assets_mode">Binary Assets:</label>
<select name="assets_mode" id="assets_mode">
<option value="NONE">Without any binary asset folders
<option value="DATA" selected>All binary assets in a folder named 'Data'
<option value="SOUNDTEX">Use two folders 'Sounds' and 'Textures'
</select>
<div>
<label for="assets_embed">Embed Assets in Binary:</label>
<input type="checkbox" name="assets_embed" id="assets_embed" value="1" checked>
<span class="chk">For PC & Web release builds, embed assets into executable file</span>
</div>
</div>
<h2>Android</h2>
<div>
<label for="android_targetsdk">Use Target SDK:</label>
<select name="android_targetsdk" id="android_targetsdk">
<option value="29" selected>API level 29: Q (Android 10)
<option value="28">API level 28: Pie (Android 9)
<option value="27">API level 27: Oreo (Android 8.1.0)
<option value="26">API level 26: Oreo (Android 8.0.0)
<option value="25">API level 25: Nougat (Android 7.1)
<option value="24">API level 24: Nougat (Android 7.0)
<option value="23">API level 23: Marshmallow (Android 6.0)
<option value="22">API level 22: Lollipop (Android 5.1)
<option value="21">API level 21: Lollipop (Android 5.0)
<option value="19">API level 19: KitKat (Android 4.4.x)
<option value="18">API level 18: Jelly Bean (Android 4.3.x)
<option value="17">API level 17: Jelly Bean (Android 4.2.x)
<option value="16">API level 16: Jelly Bean (Android 4.1.x)
</select>
<div>
<label for="android_abis">Build for ABIs:</label>
<select name="android_abis" id="android_abis">
<option value="armeabi-v7a arm64-v8a" selected>ARM 32bit | ARM 64 bit (most common devices)
<option value="armeabi-v7a arm64-v8a x86 x86_64">ARM 32bit | ARM 64 bit | x86 32bit | x86 64bit (all)
<option value="armeabi-v7a">ARM 32bit only (most common devices)
<option value="arm64-v8a">ARM 64 bit only (newer devices)
<option value="x86">x86 32bit (for 32bit Emulator)
<option value="x86_64">x86 64bit (for 64bit Emulator)
</select>
</div>
<div>
<label for="smp_internet">Internet Permission:</label>
<input type="checkbox" name="smp_internet" id="smp_internet" value="1">
<span class="chk">If planning to use network sockets on Android</span>
</div>
<div>
<label for="android_vibrate">Vibrate Permission:</label>
<input type="checkbox" name="android_vibrate" id="android_vibrate" value="1">
<span class="chk">If planning to use the smartphone vibration on Android</span>
</div>
</div>
<h2>Add Optional Library<div style="font-size:75%">(Optional libraries are included as single source code file and have no dependencies)</div></h2>
<div>
<label for="with_chipmunk"><a href="https://chipmunk-physics.net/" target="_blank">Chipmunk Physics</a>:</label>
<input type="checkbox" name="with_chipmunk" id="with_chipmunk" value="1">
<span class="chk">(License: <a href="https://chipmunk-physics.net/legal.php" target="_blank">MIT</a>)</span>
</div>
<div>
<label for="with_spine"><a href="http://esotericsoftware.com/spine-in-depth" target="_blank">Spine</a> C Runtime:</label>
<input type="checkbox" name="with_spine" id="with_spine" value="1">
<span class="chk">(2013 Version, License: <a href="https://opensource.org/licenses/BSD-2-Clause" target="_blank">BSD</a>)</span>
</div>
<div>
<label for="with_fluidsynth"><a href="http://www.fluidsynth.org/" target="_blank">Fluidsynth</a> Soundfont:</label>
<input type="checkbox" name="with_fluidsynth" id="with_fluidsynth" value="1">
<span class="chk">(License: <a href="https://opensource.org/licenses/LGPL-2.1" target="_blank">LGPL</a>)</span>
</div>
<div>
<label for="with_midi">C++ MIDI Parser:</label>
<input type="checkbox" name="with_midi" id="with_midi" value="1">
<span class="chk">(Based on Fluidsynth, License: <a href="https://opensource.org/licenses/LGPL-2.1" target="_blank">LGPL</a>)</span>
</div>
<div>
<label for="with_touchinput">Touch Input:</label>
<input type="checkbox" name="with_touchinput" id="with_touchinput" value="1">
<span class="chk">(handles touch scrolling, dragging and multi touch zoom)</span>
</div>
<div>
<label for="with_model">Ragdoll Model:</label>
<input type="checkbox" name="with_model" id="with_model" value="1">
<span class="chk">(simple 2D ragdoll model animation system)</span>
</div>
<div id="zipnew1">
<h2>Included Sample Features</h2>
<table width="100%"><tr><td>
<div><label for="with_scene">With Sample Scene:</label><input type="checkbox" name="with_scene" id="with_scene" value="1" checked></div>
<div><label for="with_font">With Sample Font File:</label><input type="checkbox" name="with_font" id="with_font" value="1"></div>
</td><td style="padding-left:20px;border-left:1px dotted #888">
<div><label for="with_world">With World Class:</label><input type="checkbox" name="with_world" id="with_world" value="1"></div>
<div><label for="with_todo">With ToDo File:</label><input type="checkbox" name="with_todo" id="with_todo" value="1"></div>
</td></tr></table>
</div>
<div id="zipexi2" style="display: none">
<h2>Additional Files and Directories</h2>
<div>
<label for="add_assets" class="ta">Additional Binary Asset Directories and Files:</label>
<textarea rows="4" cols="60" name="add_assets" id="add_assets"></textarea>
</div>
<div>
<label for="add_srcfiles" class="ta">Additional Source Files:</label>
<textarea rows="4" cols="60" name="add_srcfiles" id="add_srcfiles"></textarea>
</div>
</div>
<h2>Generate</h2>
<div align="center"><input type="submit" class="submit" value=" Generate and Save Project Archive (ZIP) "></div>
<sub>This generator runs locally in pure JavaScript, it does not upload to any server.</sub>
</form>
<script type="text/javascript">
window.addEventListener('DOMContentLoaded',function()
{
if (document.getElementById('zipmode').value == 'EXI') document.getElementById('ziptabexi').click();
document.getElementById('proj').onchange();
});
</script>
<script type="text/javascript">
/*
ZillaLib
Copyright (C) 2010-2019 Bernhard Schelling
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/**
* @license
* zlib.js
* JavaScript Zlib Library
* https://github.com/imaya/zlib.js
*
* The MIT License
*
* Copyright (c) 2012 imaya
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
function parse_project_zip(field, oldprojfile_contents)
{
var isValid = false;
if (!oldprojfile_contents)
{
var file = (field && field.files && field.files.length > 0 ? field.files[0] : undefined)
if (file && file.size > 0 && file.size < 30000)
{
var reader = new FileReader();
reader.onloadend = function(evt) { parse_project_zip(field, evt.target.result); };
reader.readAsText(file);
return;
}
}
else
{
var form = field.form, matches;
if (matches = oldprojfile_contents.match(new RegExp(
'<ProjectName>([^<]+)</ProjectName>'+ //vcxproj
'|Project File - Name="([^"]+)" - Package Owner'+ //dsp
'|PRODUCT_NAME = ([^;]+);', //pbxproj
'i'))) { isValid = true; form['proj'].value = matches.filter(function(n){return !!n}).slice(-1)[0].replace(/[^a-zA-Z0-9_]/g, ''); form['proj'].onchange(); }
if (form['appname'].value == '') form['appname'].value = form['proj'].value;
if (matches = oldprojfile_contents.match(new RegExp(
'<ZillaLibDir>([^<]+)</ZillaLibDir>'+ //vcxproj
'|ADD LINK32 "(.+?)/Debug-vc6/ZillaLib.lib"'+ //dsp
'|path = "(.+?)/ZillaLib-iOS.xcodeproj"'+ //pbxproj
'|path = "(.+?)/ZillaLib-OSX.xcodeproj"', //pbxproj
'i'))) form['zillalibbase'].value = matches.filter(function(n){return !!n}).slice(-1)[0].replace(/[\"\']/g, '').replace(/\\/g, '/').replace(/[ \/]+$/, '').replace(/^ +/, '');
if (matches = oldprojfile_contents.match(new RegExp('<ProjectGuid>{([^}]+)}</ProjectGuid>', 'i')))
form['vcprojguid'].value = matches.filter(function(n){return !!n}).slice(-1)[0];
form['with_chipmunk'].checked = false;
form['with_spine'].checked = false;
form['with_fluidsynth'].checked = false;
form['with_midi'].checked = false;
var add_srcfiles = [];
var re = new RegExp(
'<(?:ClCompile|ClInclude|Text|None) Include=["\']([^"\']+)'+ //vcxproj
'|[\\r\\n]SOURCE=([^\\s\\n\\r]+)'+ //dsp
'|lastKnownFileType\\s*=\\s*sourcecode\\.[hcpobjm\\.]+;[^}]*?path\\s*=\\s*["\']([^"\']+)'+ //pbxproj
'|path\\s*=\\s*["\']([^"\']+)[^}]*?lastKnownFileType\\s*=\\s*sourcecode\\.[hcpobjm\\.]+;', //pbxproj
'ig');
while (matches = re.exec(oldprojfile_contents))
{
var add_srcfile = matches.filter(function(n){return !!n}).slice(-1)[0];
add_srcfile = add_srcfile.replace(/\\/g, '/').replace(/^\.\//, '');
if (!add_srcfile || add_srcfile.match(/\.rc$/i)) continue;
if (add_srcfile.match(/\/Opt\/chipmunk\/chipmunk\./) ) { form['with_chipmunk'].checked = true; continue; }
if (add_srcfile.match(/\/Opt\/spine\/spine\./) ) { form['with_spine'].checked = true; continue; }
if (add_srcfile.match(/\/Opt\/fluidsynth\/ZL_FluidSynth\./)) { form['with_fluidsynth'].checked = true; continue; }
if (add_srcfile.match(/\/Opt\/model\/ZL_Model\./) ) { form['with_model'].checked = true; continue; }
if (add_srcfiles.indexOf(add_srcfile) < 0) add_srcfiles.push(add_srcfile);
}
form['add_srcfiles'].value = add_srcfiles.join('\n');
var add_assets = [];
var re = new RegExp(
'<DataAssets(>[^<]+)'+ //vcxproj
'|lastKnownFileType\\s*=\\s*(?:folder|file);[^}]*?path\\s*=\\s*["\']([^"\']+)'+ //pbxproj
'|path\\s*=\\s*["\']([^"\']+)[^}]*?lastKnownFileType\\s*=\\s*(?:folder|file);', //pbxproj
'ig');
while (matches = re.exec(oldprojfile_contents))
{
var assets = matches.filter(function(n){return !!n}).slice(-1)[0];
assets = (assets.charAt(0) == '>' ? assets.substr(1).split(/ +/) : [assets]);
for (var asset in assets)
{
asset = assets[asset].replace(/\\/g, '/').replace(/^\.\//, '');
if (!asset) continue;
add_assets.push(asset);
}
}
form['add_assets'].value = add_assets.join('\n');
}
if (!isValid) alert('Invalid project file selected - Make sure it is a ZillaLib project file (with file extension .vcxproj, .pbxproj or .dsp).');
}
function generate_project_zip(form)
{
var proj = form['proj'].value.replace(/[^a-zA-Z0-9_]/g, '');
if (!proj) proj = 'ZillaApp';
var zillalibbase = form['zillalibbase'].value.replace(/[\"\']/g, '').replace(/\\/g, '/').replace(/[ \/]+$/, '').replace(/^ +/, '');
if (!zillalibbase) zillalibbase = '../ZillaLib';
var zillalibbase_is_relative = (zillalibbase.substr(0,2) == '..' || zillalibbase.substr(0,1) == '/' || zillalibbase.substr(1,1) == ':');
var appname = form['appname'].value.replace(/[\"\']/g, '')
if (!appname) appname = proj;
var package_identifier_base = form['package_identifier_base'].value.replace(/[^a-zA-Z0-9_\.]/g, '').replace(/^[\. ]+|[\. ]+$/g, '');
if (!package_identifier_base) package_identifier_base = 'org.zillalib';
var assets_embed = form['assets_embed'].checked;
var assets_mode = (form['assets_mode'].value ? form['assets_mode'].value : 'NONE');
var with_scene = form['with_scene'].checked;
var with_font = form['with_font'].checked;
var with_world = form['with_world'].checked;
var with_todo = form['with_todo'].checked;
var for_vc6 = form['for_vc6'].checked;
var for_vc9 = form['for_vc9'].checked;
var for_vs = form['for_vs'].checked;
var for_linux = form['for_linux'].checked;
var for_osx = form['for_osx'].checked;
var for_android = form['for_android'].checked;
var for_androideclipse = false; //form['for_androideclipse'].checked;
var for_ios = form['for_ios'].checked;
var for_wp8 = false; //form['for_wp8'].checked;
var for_wasm = form['for_wasm'].checked;
var for_emscripten = false; //form['for_emscripten'].checked;
var for_nacl = false; //form['for_nacl'].checked;
var gen_makefile = form['gen_makefile'].checked;
var package_identifier = (package_identifier_base+'.'+proj.toLowerCase());
var android_targetsdk = (form['android_targetsdk'] && form['android_targetsdk'].value && (form['android_targetsdk'].value|0) ? (form['android_targetsdk'].value|0) : 29);
var android_abis = (form['android_abis'] && form['android_abis'].value ? form['android_abis'].value : 'armeabi-v7a arm64-v8a');
var smp_internet = form['smp_internet'].checked;
var android_vibrate = form['android_vibrate'].checked;
var android_ads = false;
var sc_gitignore = form['sc_gitignore'].checked;
var with_chipmunk = form['with_chipmunk'].checked;
var with_spine = form['with_spine'].checked;
var with_fluidsynth = form['with_fluidsynth'].checked;
var with_midi = form['with_midi'].checked;
var with_touchinput = form['with_touchinput'].checked;
var with_model = form['with_model'].checked;
var srcfiles = [ 'include.h', 'main.cpp' ];
if (with_scene) srcfiles.push('SceneGame.cpp');
if (with_world) srcfiles.push('world.h', 'world.cpp');
if (with_todo) srcfiles.push('ToDo.txt');
if (with_chipmunk) srcfiles.push(zillalibbase+'/Opt/chipmunk/chipmunk.cpp');
if (with_spine) srcfiles.push(zillalibbase+'/Opt/spine/spine.cpp');
if (with_fluidsynth) srcfiles.push(zillalibbase+'/Opt/fluidsynth/ZL_FluidSynth.cpp');
if (with_model) srcfiles.push(zillalibbase+'/Opt/model/ZL_Model.cpp');
var font_file = 'fntMain.png';
var assetdirs = [], assetfiles = [];
if (assets_mode == 'DATA') assetdirs = ['Data'];
else if (assets_mode == 'SOUNDTEX') assetdirs = ['Textures', 'Sounds'];
if (!assetdirs) assetfiles.push(font_file);
var font_dir = (assetdirs ? assetdirs[0]+'/' : '');
var is_update_existing = (form['zipmode'] && form['zipmode'].value == 'EXI');
var vcprojguid;
if (is_update_existing)
{
vcprojguid = form['vcprojguid'].value;
if (form['add_assets'].value)
{
var add_assets = form['add_assets'].value.replace(/^[ \t\r\n]+|[ \t\r\n]+$/g, '').split(/[ \t\r\n]+/)
for (var add_asset in add_assets)
{
add_asset = add_assets[add_asset];
var is_file = !!add_asset.match(/\..{1,4}$/);
if (is_file && assetfiles.indexOf(add_asset) < 0) assetfiles.push(add_asset);
if (!is_file && assetdirs.indexOf(add_asset) < 0) assetdirs.push(add_asset);
}
}
if (form['add_srcfiles'].value)
{
srcfiles = form['add_srcfiles'].value.replace(/^[ \t\r\n]+|[ \t\r\n]+$/g, '').split(/[ \t\r\n]+/);
}
}
var zip = new Zlib.Zip();
var ziproot = proj+'/';
var nl = ((for_vc6 || for_vc9 || for_vs) ? "\r\n" : "\n");
var zipAddTextFile = function(text, filename, addbom)
{
zip.addFile(StringUTF8ToUint8(text, addbom), { filename: StringAsciiToUint8(filename) });
};
var zipAddBase64File = function(base64data, filename)
{
zip.addFile(Base64ToUint8(base64data), { filename: StringAsciiToUint8(filename) });
};
var makeRandomGuid = function()
{
var hex = '';
while (hex.length < 32) hex += (Math.random()*0xFFFFFFF|0).toString(16);
return hex.toUpperCase().replace(/^(.{8})(.{4})(.{4})(.{4})(.{12}).*$/g, '$1-$2-$3-$4-$5')
};
if (!is_update_existing)
{
var generated_srcfiles = [];
/**********************************************************************************************************************
* include.h
**********************************************************************************************************************/
zipAddTextFile(
'#ifndef _'+proj.toUpperCase()+'_INCLUDE_'+nl+
'#define _'+proj.toUpperCase()+'_INCLUDE_'+nl+
nl+
'#include <ZL_Application.h>'+nl+
'#include <ZL_Display.h>'+nl+
'#include <ZL_Surface.h>'+nl+
'#include <ZL_Signal.h>'+nl+
'#include <ZL_Audio.h>'+nl+
'#include <ZL_Font.h>'+nl+
'#include <ZL_Scene.h>'+nl+
'//#include <ZL_Display3D.h>'+nl+
'//#include <ZL_Timer.h>'+nl+
'//#include <ZL_Network.h>'+nl+
'//#include <ZL_Input.h>'+nl+
'//#include <ZL_Particles.h>'+nl+
'//#include <ZL_SynthImc.h>'+nl+
(with_midi ? '#include <../Opt/ZL_Midi.h>'+nl : '')+
(with_touchinput ? '#include <../Opt/ZL_TouchInput.h>'+nl : '')+
(with_chipmunk ? '#include <../Opt/chipmunk/chipmunk.h>'+nl : '')+
(with_spine ? '#include <../Opt/spine/spine.h>'+nl : '')+
(with_fluidsynth ? '#include <../Opt/fluidsynth/ZL_FluidSynth.h>'+nl : '')+
(with_model ? '#include <../Opt/model/ZL_Model.h>'+nl : '')+
nl+
'#include <iostream>'+nl+
'#include <map>'+nl+
'#include <vector>'+nl+
'#include <list>'+nl+
'#include <algorithm>'+nl+
'using namespace std;'+nl+
nl+
(!with_font ? '' :
'extern ZL_Font fntMain;'+nl+
nl)+
(!with_scene ? '' :
'#define SCENE_GAME 5'+nl+
nl)+
'#endif //_'+proj.toUpperCase()+'_INCLUDE_'+nl
, ziproot+'include.h');
generated_srcfiles.push('include.h');
/**********************************************************************************************************************
* main.cpp
**********************************************************************************************************************/
zipAddTextFile(
'#include "include.h"'+nl+
(!with_world ? '' :
'#include "world.h"'+nl)+
nl+
(!with_font ? '' :
'ZL_Font fntMain;'+nl+
nl)+
(!with_midi && !with_touchinput ? '' :
'#define ZL_OPT_DO_IMPLEMENTATION'+nl+
(with_midi ? '#include <../Opt/ZL_Midi.h>'+nl : '')+
(with_touchinput ? '#include <../Opt/ZL_TouchInput.h>'+nl : '')+
nl)+
'static struct s'+proj+' : public ZL_Application'+nl+
'{'+nl+
' s'+proj+'() : ZL_Application(60) { }'+nl+
''+nl+
' virtual void Load(int argc, char *argv[])'+nl+
' {'+nl+
(assets_embed ?
' if (!ZL_Application::LoadReleaseDesktopDataBundle()) return;'+nl :
' //if (!ZL_Application::LoadReleaseDesktopDataBundle("'+proj+'.dat")) return;'+nl)+
' if (!ZL_Display::Init("'+appname+'", 1280, 720, ZL_DISPLAY_ALLOWRESIZEHORIZONTAL)) return;'+nl+
' ZL_Display::ClearFill(ZL_Color::White);'+nl+
' ZL_Display::SetAA(true);'+nl+
' ZL_Audio::Init();'+nl+
' ZL_Application::SettingsInit("'+proj+'");'+nl+
(!with_font ? '' :
' '+nl+
' fntMain = ZL_Font("'+font_dir+font_file+'");'+nl+
'')+ //' ZL_UI::Init(fntMain);'+nl)+
(with_scene ? '' :
' '+nl+
' ZL_Display::sigKeyDown.connect(this, &s'+proj+'::OnKeyDown);'+nl)+
(!with_world ? '' :
' '+nl+
' World.InitGlobal();'+nl)+
(!with_scene ? '' :
' '+nl+
' ZL_SceneManager::Init(SCENE_GAME);'+nl)+
' }'+nl+
(with_scene ? '' :
''+nl+
' void OnKeyDown(ZL_KeyboardEvent& e)'+nl+
' {'+nl+
' if (e.key == ZLK_ESCAPE) Quit();'+nl+
' }'+nl)+
(with_scene ? '' :
''+nl+
' virtual void AfterFrame()'+nl+
' {'+nl+
' ZL_Display::FillGradient(0, 0, ZLWIDTH, ZLHEIGHT, ZLRGB(0,0,.3), ZLRGB(0,0,.3), ZLRGB(.4,.4,.4), ZLRGB(.4,.4,.4));'+nl+
(!with_world ? '' :
' World.Draw();'+nl)+
(!with_font ? '' :
' fntMain.Draw(ZLFROMW(50), ZLFROMH(30), ZL_String::format("%d", FPS));'+nl)+
' }'+nl)+
(!with_scene || !with_font ? '' :
''+nl+
' //display fps'+nl+
' //virtual void AfterFrame() { fntMain.Draw(ZLFROMW(50), ZLFROMH(30), ZL_String::format("%d", FPS)); }'+nl)+
'} '+proj+';'+nl
, ziproot+'main.cpp');
generated_srcfiles.push('main.cpp');
if (with_scene)
{
/**********************************************************************************************************************
* SceneGame.cpp
**********************************************************************************************************************/
zipAddTextFile(
'#include "include.h"'+nl+
(!with_world ? '' :
'#include "world.h"'+nl)+
''+nl+
'static struct sSceneGame : public ZL_Scene'+nl+
'{'+nl+
' sSceneGame() : ZL_Scene(SCENE_GAME) { }'+nl+
''+nl+
' void InitGlobal()'+nl+
' {'+nl+
' }'+nl+
''+nl+
' void StartGame()'+nl+
' {'+nl+
(!with_world ? '' :
' World.Init();'+nl)+
' }'+nl+
''+nl+
' void InitAfterTransition()'+nl+
' {'+nl+
' ZL_Display::sigPointerDown.connect(this, &sSceneGame::OnPointerDown);'+nl+
' ZL_Display::sigPointerUp.connect(this, &sSceneGame::OnPointerUp);'+nl+
' ZL_Display::sigPointerMove.connect(this, &sSceneGame::OnPointerMove);'+nl+
' ZL_Display::sigKeyDown.connect(this, &sSceneGame::OnKeyDown);'+nl+
' ZL_Display::sigKeyUp.connect(this, &sSceneGame::OnKeyUp);'+nl+
' ZL_Display::sigActivated.connect(this, &sSceneGame::OnActivated);'+nl+
' StartGame();'+nl+
' }'+nl+
''+nl+
' void DeInitLeave(ZL_SceneType SceneTypeTo)'+nl+
' {'+nl+
' ZL_Display::AllSigDisconnect(this);'+nl+
' }'+nl+
''+nl+
' void OnPointerDown(ZL_PointerPressEvent& e)'+nl+
' {'+nl+
' }'+nl+
''+nl+
' void OnPointerUp(ZL_PointerPressEvent& e)'+nl+
' {'+nl+
' }'+nl+
''+nl+
' void OnPointerMove(ZL_PointerMoveEvent& e)'+nl+
' {'+nl+
' }'+nl+
''+nl+
' void OnKeyDown(ZL_KeyboardEvent& e)'+nl+
' {'+nl+
' if (e.key == ZLK_ESCAPE) ZL_Application::Quit();'+nl+
' }'+nl+
''+nl+
' void OnKeyUp(ZL_KeyboardEvent& e)'+nl+
' {'+nl+
' }'+nl+
''+nl+
' void OnActivated(ZL_WindowActivateEvent& e)'+nl+
' {'+nl+
' }'+nl+
''+nl+
' void Calculate()'+nl+
' {'+nl+
(!with_world ? '' :
' World.Calculate();'+nl)+
' }'+nl+
''+nl+
' void Draw()'+nl+
' {'+nl+
' ZL_Display::FillGradient(0, 0, ZLWIDTH, ZLHEIGHT, ZLRGB(0,0,.3), ZLRGB(0,0,.3), ZLRGB(.4,.4,.4), ZLRGB(.4,.4,.4));'+nl+
(!with_world ? '' :
' World.Draw();'+nl)+
(!with_font ? '' :
' fntMain.Draw(ZLFROMW(170), ZLFROMH(45), "Game Scene");'+nl)+
' }'+nl+
'} SceneGame;'+nl
, ziproot+'SceneGame.cpp');
generated_srcfiles.push('SceneGame.cpp');
}
if (with_world)
{
/**********************************************************************************************************************
* world.h
**********************************************************************************************************************/
zipAddTextFile(
'#ifndef _'+proj.toUpperCase()+'_WORLD_'+nl+
'#define _'+proj.toUpperCase()+'_WORLD_'+nl+
nl+
'#include "include.h"'+nl+
nl+
'struct sWorld'+nl+
'{'+nl+
' void InitGlobal();'+nl+
' void Init();'+nl+
' void Calculate();'+nl+
' void Draw();'+nl+
'};'+nl+
nl+
'extern sWorld World;'+nl+
nl+
'#endif //_'+proj.toUpperCase()+'_WORLD_'+nl
, ziproot+'world.h');
generated_srcfiles.push('world.h');
/**********************************************************************************************************************
* world.cpp
**********************************************************************************************************************/
zipAddTextFile(
'#include "world.h"'+nl+
nl+
'sWorld World;'+nl+
nl+
'void sWorld::InitGlobal()'+nl+
'{'+nl+
'}'+nl+
nl+
'void sWorld::Init()'+nl+
'{'+nl+
'}'+nl+
nl+
'void sWorld::Calculate()'+nl+
'{'+nl+
'}'+nl+
nl+
'void sWorld::Draw()'+nl+
'{'+nl+
' ZL_Display::DrawRect(s(100), s(100), s(200), s(200), ZL_Color::Yellow, ZL_Color::Green);'+nl+
'}'+nl
, ziproot+'world.cpp');
generated_srcfiles.push('world.cpp');
}
if (with_todo)
{
/**********************************************************************************************************************
* ToDo.txt
**********************************************************************************************************************/
zipAddTextFile(appname+' Todo:'+nl+nl, ziproot+'ToDo.txt');
generated_srcfiles.push('ToDo.txt');
}
/**********************************************************************************************************************
* Additional Source Files To be Included in Projects
**********************************************************************************************************************/
for (var srcfile in srcfiles)
{
srcfile = srcfiles[srcfile];
if (generated_srcfiles.indexOf(srcfile) >= 0) continue;
if (srcfile.indexOf('..') != 0) zipAddTextFile('', ziproot+srcfile);
}
generated_srcfiles = undefined;
if (with_font)
{
/**********************************************************************************************************************
* Font File: fntMain.png
**********************************************************************************************************************/
var fnt_data = 'iVBORw0KGgoAAAANSUhEUgAAATQAAAB4CAMAAABLsv4OAAABg1BMVEUAAAD'+
'///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////'+
'+AgID///+o5cZcAAAAgHRSTlMAcgL9v/Pv9wrHuz6HWvtCBgTT+a8MfvUIMuPxm8vPFHbDLucmEBgOtxynSm6zOBIs1+lOgyCXKDBQGmYk5du13RZUIpOrdGoq60bhekA0TGAezZE2Ot9Wn1zV2am5xUSjrVLtXkiPydFkpWJYgWw8cIWZsaGNnb14fGiViYvBBJW8OiQAACExSURBVHhe7ZyHU9vc2m+XJTeasTHGBtMNGNNM77333gm9l0ACoYSUs//0iyVr9hjHLyGcd3K/OayZ2I+2pC1nhU2YR+iHiMJv886/Ie1d2giJeZc2biJkKpnRJN1O0/kFUD4V2XoOwTe52g/Q/4jO9nXzIkCTaQBo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Umq'+
'tcXIL0n0LnOFrBl6XJEc+fvIxncCacpGpNvatUF8lNBvV/KXTr/apnFuiMOXpMlcISOuSI78fZCN719LS9F2j4hQfJTQb1fyl04zdqD5W93OS9JkrpARVyRH/j7IxvevpZ0Lu2b2Kj5K6LcrwNenAFgeWDt27f58SZrMFTLiiuTI3ya2GZ5YGlNiMT5K6LcroENfV/7G0YkQPclGvFCid5krZMQVyZG/D7Lx/WtpNSIdyHJ74qOEfrsCsrP6ALaS1rdxjt0a8UKJ3mWukBFXJEf+PrLxza+lkbTewqFlgfgood+uJP0i2Rk+83Ya8UKJ3o1cIRlXJEf+PrLxnUhaQY/qdnxzER8l9NuVpOpkTBXdUxjxQoneZa6QdShHiyuSI3+b32t899UG46OEXlNJ2sJKSRPIeKEE7zJXyFqotJTKkXdeyhXSpcWMvPNirpCUJkfeeTlXqLZAjvB/mHf+H2k3M8bfh0woAAAAAElFTkSuQmCC';
zipAddBase64File(fnt_data, ziproot+font_dir+font_file);
fnt_data = undefined;
}
/**********************************************************************************************************************
* Asset Dirs: Data / Textures / Sounds
**********************************************************************************************************************/
for (var assetdir in assetdirs)
{
assetdir = assetdirs[assetdir];
if (with_font && font_dir == assetdir+'/') continue;
zipAddTextFile('store binary resources in this directory', ziproot+assetdir+'/'+assetdir+'.txt');
}
}
else
{
/**********************************************************************************************************************
* Additional Source Files To be Included in Projects
**********************************************************************************************************************/
if (with_midi || with_touchinput || with_chipmunk || with_spine || with_fluidsynth || with_model)
zipAddTextFile(''+
(with_midi ? '#include <../Opt/ZL_Midi.h>'+nl : '')+
(with_touchinput ? '#include <../Opt/ZL_TouchInput.h>'+nl : '')+
(with_chipmunk ? '#include <../Opt/chipmunk/chipmunk.h>'+nl : '')+
(with_spine ? '#include <../Opt/spine/spine.h>'+nl : '')+
(with_fluidsynth ? '#include <../Opt/fluidsynth/ZL_FluidSynth.h>'+nl : '')+
(with_model ? '#include <../Opt/model/ZL_Model.h>'+nl : '')+
'', ziproot+'include_UPDATE.h');
if (with_midi || with_touchinput)
zipAddTextFile('#define ZL_OPT_DO_IMPLEMENTATION'+nl+
(with_midi ? '#include <../Opt/ZL_Midi.h>'+nl : '')+
(with_touchinput ? '#include <../Opt/ZL_TouchInput.h>'+nl : '')+
'', ziproot+'main_UPDATE.cpp');
}
if (for_vc6)
{
nl = "\r\n";
/**********************************************************************************************************************
* <PROJ>-vc6.dsp
**********************************************************************************************************************/
var dsp = '# Microsoft Developer Studio Project File - Name="'+proj+'" - Package Owner=<4>'+nl;
dsp += '# Microsoft Developer Studio Generated Build File, Format Version 6.00'+nl;
dsp += '# ** DO EDIT **'+nl;
dsp += '# TARGTYPE "Win32 (x86) Console Application" 0x0103'+nl;
if (for_wasm || for_emscripten || for_nacl || for_android)
dsp += '# TARGTYPE "Win32 (x86) External Target" 0x0106'+nl;
dsp += 'CFG='+proj+' - Win32 Debug'+nl;
dsp += '!MESSAGE NMAKE /f "'+proj+'.mak".'+nl;
dsp += '!MESSAGE NMAKE /f "'+proj+'.mak" CFG="'+proj+' - Win32 Debug"'+nl;
dsp += '!MESSAGE "'+proj+' - Win32 Release" (based on "Win32 (x86) Console Application")'+nl;
dsp += '!MESSAGE "'+proj+' - Win32 Debug" (based on "Win32 (x86) Console Application")'+nl;
if (for_wasm)
{
dsp += '!MESSAGE "'+proj+' - WebAssembly Release" (based on "Win32 (x86) External Target")'+nl;
dsp += '!MESSAGE "'+proj+' - WebAssembly Debug" (based on "Win32 (x86) External Target")'+nl;
}
if (for_emscripten)
{
dsp += '!MESSAGE "'+proj+' - Emscripten Release" (based on "Win32 (x86) External Target")'+nl;
dsp += '!MESSAGE "'+proj+' - Emscripten Debug" (based on "Win32 (x86) External Target")'+nl;
}
if (for_nacl)
{
dsp += '!MESSAGE "'+proj+' - NACL Release" (based on "Win32 (x86) External Target")'+nl;
dsp += '!MESSAGE "'+proj+' - NACL Debug" (based on "Win32 (x86) External Target")'+nl;
}
if (for_android)
{
dsp += '!MESSAGE "'+proj+' - Android Release" (based on "Win32 (x86) External Target")'+nl;
dsp += '!MESSAGE "'+proj+' - Android Debug" (based on "Win32 (x86) External Target")'+nl;
}
dsp += '# Begin Project'+nl;
dsp += '# PROP AllowPerConfigDependencies 0'+nl;
dsp += '# PROP Scc_ProjName ""'+nl;
dsp += '# PROP Scc_LocalPath ""'+nl;
dsp += 'CPP=cl.exe'+nl;
dsp += 'RSC=rc.exe'+nl;
dsp += nl+'!IF "$(CFG)" == "'+proj+' - Win32 Release"'+nl+nl;
dsp += '# PROP BASE Use_MFC 0'+nl;
dsp += '# PROP BASE Use_Debug_Libraries 0'+nl;
dsp += '# PROP BASE Output_Dir "Release"'+nl;
dsp += '# PROP BASE Intermediate_Dir "Release"'+nl;
dsp += '# PROP BASE Target_Dir ""'+nl;
dsp += '# PROP Use_MFC 0'+nl;
dsp += '# PROP Use_Debug_Libraries 0'+nl;
dsp += '# PROP Output_Dir "Release-vc6"'+nl;
dsp += '# PROP Intermediate_Dir "Release-vc6"'+nl;
dsp += '# PROP Ignore_Export_Lib 0'+nl;
dsp += '# PROP Target_Dir ""'+nl;
dsp += '# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c'+nl;
dsp += '# ADD CPP /nologo /MT /W3 /O2 /I "'+zillalibbase+'/Include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /FD /c'+nl;
dsp += '# SUBTRACT CPP /YX'+nl;
dsp += '# ADD BASE RSC /l 0x807 /d "NDEBUG"'+nl;
dsp += '# ADD RSC /l 0x807 /d "NDEBUG"'+nl;
dsp += 'BSC32=bscmake.exe'+nl;
dsp += '# ADD BASE BSC32 /nologo'+nl;
dsp += '# ADD BSC32 /nologo'+nl;
dsp += 'LINK32=link.exe'+nl;
dsp += '# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386'+nl;
dsp += '# ADD LINK32 "'+zillalibbase+'/Release-vc6/ZillaLib.lib" /nologo /subsystem:windows /pdb:"Release-vc6/'+proj+'.pdb" /map:"Release-vc6/'+proj+'.map" /machine:I386 /out:"Release-vc6/'+proj+'.exe" /opt:ref /opt:nowin98'+nl;
dsp += '# SUBTRACT LINK32 /pdb:none'+nl;
dsp += nl+'!ELSEIF "$(CFG)" == "'+proj+' - Win32 Debug"'+nl+nl;
dsp += '# PROP BASE Use_MFC 0'+nl;
dsp += '# PROP BASE Use_Debug_Libraries 1'+nl;
dsp += '# PROP BASE Output_Dir "Debug"'+nl;
dsp += '# PROP BASE Intermediate_Dir "Debug"'+nl;
dsp += '# PROP BASE Target_Dir ""'+nl;
dsp += '# PROP Use_MFC 0'+nl;
dsp += '# PROP Use_Debug_Libraries 1'+nl;
dsp += '# PROP Output_Dir "Debug-vc6"'+nl;
dsp += '# PROP Intermediate_Dir "Debug-vc6"'+nl;
dsp += '# PROP Ignore_Export_Lib 0'+nl;
dsp += '# PROP Target_Dir ""'+nl;
dsp += '# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c'+nl;
dsp += '# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "'+zillalibbase+'/Include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "ZILLALOG" /FD /GZ /c'+nl;
dsp += '# SUBTRACT CPP /YX'+nl;
dsp += '# ADD BASE RSC /l 0x807 /d "_DEBUG"'+nl;
dsp += '# ADD RSC /l 0x807 /d "_DEBUG"'+nl;
dsp += 'BSC32=bscmake.exe'+nl;
dsp += '# ADD BASE BSC32 /nologo'+nl;
dsp += '# ADD BSC32 /nologo'+nl;
dsp += 'LINK32=link.exe'+nl;
dsp += '# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept'+nl;
dsp += '# ADD LINK32 "'+zillalibbase+'/Debug-vc6/ZillaLib.lib" /nologo /subsystem:console /incremental:yes /pdb:"Debug-vc6/'+proj+'.pdb" /debug /machine:I386 /out:"Debug-vc6/'+proj+'.exe" /pdbtype:sept'+nl;
if (for_wasm)
{
dsp += nl+'!ELSEIF "$(CFG)" == "'+proj+' - WebAssembly Release"'+nl+nl;
dsp += '# PROP Output_Dir "Release-wasm"'+nl;
dsp += '# PROP Intermediate_Dir "Release-wasm"'+nl;
dsp += '# PROP Cmd_Line "python '+zillalibbase+'/WebAssembly/ZillaLibWasm.py build -rel -vc '+proj+'"'+nl;
dsp += '# PROP Rebuild_Opt "-clean"'+nl;
dsp += '# PROP Target_File "Release-wasm/'+proj+'.js.exe"'+nl;
dsp += nl+'!ELSEIF "$(CFG)" == "'+proj+' - WebAssembly Debug"'+nl+nl;
dsp += '# PROP Output_Dir "Debug-wasm"'+nl;
dsp += '# PROP Intermediate_Dir "Debug-wasm"'+nl;
dsp += '# PROP Cmd_Line "python '+zillalibbase+'/WebAssembly/ZillaLibWasm.py build -vc '+proj+'"'+nl;
dsp += '# PROP Rebuild_Opt "-clean"'+nl;
dsp += '# PROP Target_File "Debug-wasm/'+proj+'.js.exe"'+nl;
}
if (for_emscripten)
{
dsp += nl+'!ELSEIF "$(CFG)" == "'+proj+' - Emscripten Release"'+nl+nl;
dsp += '# PROP Output_Dir "Release-emscripten"'+nl;
dsp += '# PROP Intermediate_Dir "Release-emscripten"'+nl;
dsp += '# PROP Cmd_Line "python '+zillalibbase+'/Emscripten/ZillaLibEmscripten.py build -rel -vc '+proj+'"'+nl;
dsp += '# PROP Rebuild_Opt "-clean"'+nl;
dsp += '# PROP Target_File "Release-emscripten/'+proj+'.js.exe"'+nl;
dsp += nl+'!ELSEIF "$(CFG)" == "'+proj+' - Emscripten Debug"'+nl+nl;
dsp += '# PROP Output_Dir "Debug-emscripten"'+nl;
dsp += '# PROP Intermediate_Dir "Debug-emscripten"'+nl;
dsp += '# PROP Cmd_Line "python '+zillalibbase+'/Emscripten/ZillaLibEmscripten.py build -vc '+proj+'"'+nl;
dsp += '# PROP Rebuild_Opt "-clean"'+nl;
dsp += '# PROP Target_File "Debug-emscripten/'+proj+'.js.exe"'+nl;
}
if (for_nacl)
{
dsp += nl+'!ELSEIF "$(CFG)" == "'+proj+' - NACL Release"'+nl+nl;
dsp += '# PROP Output_Dir "Release-nacl"'+nl;
dsp += '# PROP Intermediate_Dir "Release-nacl"'+nl;
dsp += '# PROP Cmd_Line "python '+zillalibbase+'/NACL/ZillaLibNACL.py build -rel -vc '+proj+'"'+nl;
dsp += '# PROP Rebuild_Opt "-clean"'+nl;
dsp += '# PROP Target_File "Release-nacl/'+proj+'_x86_64.nexe.gz.exe"'+nl;
dsp += nl+'!ELSEIF "$(CFG)" == "'+proj+' - NACL Debug"'+nl+nl;
dsp += '# PROP Output_Dir "Debug-nacl"'+nl;
dsp += '# PROP Intermediate_Dir "Debug-nacl"'+nl;
dsp += '# PROP Cmd_Line "python '+zillalibbase+'/NACL/ZillaLibNACL.py build -vc '+proj+'"'+nl;
dsp += '# PROP Rebuild_Opt "-clean"'+nl;
dsp += '# PROP Target_File "Debug-nacl/'+proj+'_x86_64.nexe.gz.exe"'+nl;
}
if (for_android)
{
dsp += nl+'!ELSEIF "$(CFG)" == "'+proj+' - Android Release"'+nl+nl;
dsp += '# PROP Output_Dir "Android/bin"'+nl;
dsp += '# PROP Intermediate_Dir "Android/obj"'+nl;
dsp += '# PROP Cmd_Line "'+zillalibbase+'/Tools/make.exe -f ../'+zillalibbase+'/Android/ZillaApp.mk ZLDEBUG=0 ZillaApp='+proj+'"'+nl;
dsp += '# PROP Rebuild_Opt "-B"'+nl;
dsp += '# PROP Target_File "Android/bin/'+proj+'.apk"'+nl;
dsp += nl+'!ELSEIF "$(CFG)" == "'+proj+' - Android Debug"'+nl+nl;
dsp += '# PROP Output_Dir "Android/bin"'+nl;
dsp += '# PROP Intermediate_Dir "Android/obj"'+nl;
dsp += '# PROP Cmd_Line "'+zillalibbase+'/Tools/make.exe -f ../'+zillalibbase+'/Android/ZillaApp.mk ZLDEBUG=1 ZillaApp='+proj+'"'+nl;
dsp += '# PROP Rebuild_Opt "-B"'+nl;
dsp += '# PROP Target_File "Android/bin/'+proj+'.apk"'+nl;
}
dsp += nl+'!ENDIF'+nl+nl;
dsp += '# Begin Target'+nl;
dsp += '# Name "'+proj+' - Win32 Release"'+nl;
dsp += '# Name "'+proj+' - Win32 Debug"'+nl;
if (for_wasm)
{
dsp += '# Name "'+proj+' - WebAssembly Release"'+nl;
dsp += '# Name "'+proj+' - WebAssembly Debug"'+nl;
}
if (for_emscripten)
{
dsp += '# Name "'+proj+' - Emscripten Release"'+nl;
dsp += '# Name "'+proj+' - Emscripten Debug"'+nl;
}
if (for_nacl)
{
dsp += '# Name "'+proj+' - NACL Release"'+nl;
dsp += '# Name "'+proj+' - NACL Debug"'+nl;
}
if (for_android)
{
dsp += '# Name "'+proj+' - Android Release"'+nl;
dsp += '# Name "'+proj+' - Android Debug"'+nl;
}
for (var srcfile in srcfiles)
dsp += '# Begin Source File'+nl+'SOURCE=./'+srcfiles[srcfile]+nl+'# End Source File'+nl;
dsp += '# Begin Source File'+nl+'SOURCE=./'+proj+'.rc'+nl+'# End Source File'+nl;
dsp += '# End Target'+nl;
dsp += '# End Project'+nl;
zipAddTextFile(dsp, ziproot+proj+'-vc6.dsp');
dsp = undefined;
/**********************************************************************************************************************
* <PROJ>-vc6.dsw
**********************************************************************************************************************/
var dsw = 'Microsoft Developer Studio Workspace File, Format Version 6.00'+nl;
dsw += 'Project: "'+proj+'"='+proj+'-vc6.dsp - Package Owner=<4>'+nl;
dsw += 'Package=<5>'+nl+'{{{'+nl+'}}}'+nl;
dsw += 'Package=<4>'+nl+'{{{'+nl+'Begin Project Dependency'+nl+'Project_Dep_Name ZillaLib'+nl+'End Project Dependency'+nl+'}}}'+nl;
dsw += 'Project: "ZillaLib"='+zillalibbase+'/ZillaLib-vc6.dsp - Package Owner=<4>'+nl;
dsw += 'Package=<5>'+nl+'{{{'+nl+'}}}'+nl+'Package=<4>'+nl+'{{{'+nl+'}}}'+nl;
dsw += 'Global:'+nl+'Package=<5>'+nl+'{{{'+nl+'}}}'+nl+'Package=<3>'+nl+'{{{'+nl+'}}}'+nl;
zipAddTextFile(dsw, ziproot+proj+'-vc6.dsw');