-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdistribute_ring2exe.html
778 lines (656 loc) · 48.9 KB
/
distribute_ring2exe.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
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Distributing Ring Applications using Ring2EXE — Ring 1.14 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="The Ring Package Manager (RingPM)" href="ringpm.html" />
<link rel="prev" title="Distributing Ring Applications (Manual)" href="distribute.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html">
<img src="_static/ringdoclogo.jpg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="ringapps.html">Applications developed in a few hours</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringnotepad.html">Using Ring Notepad</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started - First Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started2.html">Getting Started - Second Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started3.html">Getting Started - Third Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="variables.html">Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="operators.html">Operators</a></li>
<li class="toctree-l1"><a class="reference internal" href="controlstructures.html">Control Structures - First Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="controlstructures2.html">Control Structures - Second Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="controlstructures3.html">Control Structures - Third Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="getinput.html">Getting Input</a></li>
<li class="toctree-l1"><a class="reference internal" href="functions.html">Functions - First Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="functions2.html">Functions - Second Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="functions3.html">Functions - Third Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="programstructure.html">Program Structure</a></li>
<li class="toctree-l1"><a class="reference internal" href="lists.html">Lists</a></li>
<li class="toctree-l1"><a class="reference internal" href="strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="dateandtime.html">Date and Time</a></li>
<li class="toctree-l1"><a class="reference internal" href="checkandconvert.html">Check Data Type and Conversion</a></li>
<li class="toctree-l1"><a class="reference internal" href="mathfunc.html">Mathematical Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="files.html">Files</a></li>
<li class="toctree-l1"><a class="reference internal" href="systemfunc.html">System Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="evaldebug.html">Eval() and Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="demo.html">Demo Programs</a></li>
<li class="toctree-l1"><a class="reference internal" href="odbc.html">ODBC Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="mysql.html">MySQL Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="sqlite.html">SQLite Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="postgresql.html">PostgreSQL Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="secfunc.html">Security and Internet Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="oop.html">Object Oriented Programming (OOP)</a></li>
<li class="toctree-l1"><a class="reference internal" href="fp.html">Functional Programming (FP)</a></li>
<li class="toctree-l1"><a class="reference internal" href="metaprog.html">Reflection and Meta-programming</a></li>
<li class="toctree-l1"><a class="reference internal" href="declarative.html">Declarative Programming using Nested Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="natural.html">Natural language programming</a></li>
<li class="toctree-l1"><a class="reference internal" href="naturallibrary.html">Using the Natural Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="scope.html">Scope Rules for Variables and Attributes</a></li>
<li class="toctree-l1"><a class="reference internal" href="scope2.html">Scope Rules for Functions and Methods</a></li>
<li class="toctree-l1"><a class="reference internal" href="syntaxflexibility.html">Syntax Flexibility</a></li>
<li class="toctree-l1"><a class="reference internal" href="typehints.html">The Type Hints Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="debug.html">The Trace Library and the Interactive Debugger</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringemb.html">Embedding Ring Language in Ring Programs</a></li>
<li class="toctree-l1"><a class="reference internal" href="stdlib.html">Stdlib Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="stdlibclasses.html">Stdlib Classes</a></li>
<li class="toctree-l1"><a class="reference internal" href="qt.html">Desktop, WebAssembly and Mobile development using RingQt</a></li>
<li class="toctree-l1"><a class="reference internal" href="formdesigner.html">Using the Form Designer</a></li>
<li class="toctree-l1"><a class="reference internal" href="qt3d.html">Graphics Programming using RingQt3D</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringqtobjects.html">Objects Library for RingQt Application</a></li>
<li class="toctree-l1"><a class="reference internal" href="multilanguage.html">Multi-language Applications</a></li>
<li class="toctree-l1"><a class="reference internal" href="qtmobile.html">Building RingQt Applications for Mobile</a></li>
<li class="toctree-l1"><a class="reference internal" href="qtwebassembly.html">Building RingQt Applications for WebAssembly</a></li>
<li class="toctree-l1"><a class="reference internal" href="web.html">Web Development (CGI Library)</a></li>
<li class="toctree-l1"><a class="reference internal" href="deployincloud.html">Deploying Web Applications in the Cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="allegro.html">Graphics and 2D Games programming using RingAllegro</a></li>
<li class="toctree-l1"><a class="reference internal" href="gameengine.html">Demo Project - Game Engine for 2D Games</a></li>
<li class="toctree-l1"><a class="reference internal" href="gameengineandorid.html">Building Games For Android</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringraylib.html">Developing Games using RingRayLib</a></li>
<li class="toctree-l1"><a class="reference internal" href="usingopengl.html">Using RingOpenGL and RingFreeGLUT for 3D Graphics</a></li>
<li class="toctree-l1"><a class="reference internal" href="usingopengl2.html">Using RingOpenGL and RingAllegro for 3D Graphics</a></li>
<li class="toctree-l1"><a class="reference internal" href="goldmagic800.html">Demo Project - The Gold Magic 800 Game</a></li>
<li class="toctree-l1"><a class="reference internal" href="tilengine.html">Using RingTilengine</a></li>
<li class="toctree-l1"><a class="reference internal" href="performancetips.html">Performance Tips</a></li>
<li class="toctree-l1"><a class="reference internal" href="compiler.html">Command Line Options</a></li>
<li class="toctree-l1"><a class="reference internal" href="distribute.html">Distributing Ring Applications (Manual)</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Distributing Ring Applications using Ring2EXE</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#using-ring2exe">Using Ring2EXE</a></li>
<li class="toctree-l2"><a class="reference internal" href="#how-ring2exe-works">How Ring2EXE works?</a></li>
<li class="toctree-l2"><a class="reference internal" href="#example">Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="#options">Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-standalone-console-application">Building standalone console application</a></li>
<li class="toctree-l2"><a class="reference internal" href="#distributing-ringallegro-applications">Distributing RingAllegro Applications</a></li>
<li class="toctree-l2"><a class="reference internal" href="#distributing-ringqt-applications">Distributing RingQt Applications</a></li>
<li class="toctree-l2"><a class="reference internal" href="#distributing-applications-for-mobile-using-ringqt">Distributing Applications for Mobile using RingQt</a></li>
<li class="toctree-l2"><a class="reference internal" href="#distributing-applications-for-webassembly-using-ringqt">Distributing Applications for WebAssembly using RingQt</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-the-cards-game-for-mobile-using-ringqt">Building the Cards Game for Mobile using RingQt</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-the-weight-history-application-for-mobile-using-ringqt">Building the Weight History Application for Mobile using RingQt</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-the-form-designer-for-mobile-using-ringqt">Building the Form Designer for Mobile using RingQt</a></li>
<li class="toctree-l2"><a class="reference internal" href="#creating-the-qt-resource-file-using-folder2qrc">Creating the Qt resource file using Folder2qrc</a></li>
<li class="toctree-l2"><a class="reference internal" href="#important-information-about-ring2exe">Important Information about Ring2EXE</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="ringpm.html">The Ring Package Manager (RingPM)</a></li>
<li class="toctree-l1"><a class="reference internal" href="zerolib.html">ZeroLib Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="foxringfuncsdoc.html">FoxRing Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="bignumber.html">BigNumber Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="libcurl.html">Using RingLibCurl</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringlibcurlfuncsdoc.html">RingLibCurl Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="socket.html">Using RingSockets</a></li>
<li class="toctree-l1"><a class="reference internal" href="threads.html">Using RingThreads</a></li>
<li class="toctree-l1"><a class="reference internal" href="libui.html">Using RingLibui</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringzip.html">Using RingZip</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringlibzipfuncsdoc.html">RingLibZip Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringmurmurhashfuncsdoc.html">RingMurmurHash Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringconsolecolorsfuncsdoc.html">RingConsoleColors Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringallegrofuncsdoc.html">RingAllegro Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="libsdl.html">Using RingLibSDL</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringlibsdlfuncsdoc.html">RingLibSDL Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="libuv.html">Using Ringlibuv</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringlibuvfuncsdoc.html">RingLibuv Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringfreeglutfuncsdoc.html">RingFreeGLUT Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringstbimage.html">RingStbImage Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringopengl32funcsdoc.html">RingOpenGL (OpenGL 3.2) Functions Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="qtclassesdoc.html">RingQt Classes and Methods Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="lowlevel.html">Low Level Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="extension_tutorial.html">Tutorial: Ring Extensions in C/C++</a></li>
<li class="toctree-l1"><a class="reference internal" href="extension.html">Extension using the C/C++ languages</a></li>
<li class="toctree-l1"><a class="reference internal" href="embedding.html">Embedding Ring Language in C/C++ Programs</a></li>
<li class="toctree-l1"><a class="reference internal" href="codegenerator.html">Code Generator for wrapping C/C++ Libraries</a></li>
<li class="toctree-l1"><a class="reference internal" href="ringbeep.html">Create your first extension using the Code Generator</a></li>
<li class="toctree-l1"><a class="reference internal" href="languagedesign.html">Release Notes: Version 1.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew.html">Release Notes: Version 1.1</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew2.html">Release Notes: Version 1.2</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew3.html">Release Notes: Version 1.3</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew4.html">Release Notes: Version 1.4</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew5.html">Release Notes: Version 1.5</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew6.html">Release Notes: Version 1.6</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew7.html">Release Notes: Version 1.7</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew8.html">Release Notes: Version 1.8</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew9.html">Release Notes: Version 1.9</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew10.html">Release Notes: Version 1.10</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew11.html">Release Notes: Version 1.11</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew12.html">Release Notes: Version 1.12</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew13.html">Release Notes: Version 1.13</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatisnew14.html">Release Notes: Version 1.14</a></li>
<li class="toctree-l1"><a class="reference internal" href="codeeditors.html">Using Other Code Editors</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">Frequently Asked Questions (FAQ)</a></li>
<li class="toctree-l1"><a class="reference internal" href="sourcecode.html">How to Compile Ring From Source Code?</a></li>
<li class="toctree-l1"><a class="reference internal" href="contribute.html">How to contribute?</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Language Specification</a></li>
<li class="toctree-l1"><a class="reference internal" href="resources.html">Resources</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Ring</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> »</li>
<li>Distributing Ring Applications using Ring2EXE</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="distributing-ring-applications-using-ring2exe">
<span id="index-0"></span><h1>Distributing Ring Applications using Ring2EXE<a class="headerlink" href="#distributing-ring-applications-using-ring2exe" title="Permalink to this headline">¶</a></h1>
<p>In this chapter we will learn about distributing Ring applications.</p>
<p>Starting from Ring 1.6 we have a nice tool called Ring2EXE (Written in Ring itself)</p>
<p>Using Ring2EXE we can distribute applications quickly for Windows, Linux, macOS, WebAssembly and Mobile devices</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>We can use the Distribute Menu in the Ring Notepad application (More Easy)</p>
</div>
<div class="section" id="using-ring2exe">
<span id="index-1"></span><h2>Using Ring2EXE<a class="headerlink" href="#using-ring2exe" title="Permalink to this headline">¶</a></h2>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe filename.ring [Options]
</pre></div>
</div>
<p>This will set filename.ring as input to the program</p>
<p>The next files will be generated</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>filename.ringo (The Ring Object File - by Ring Compiler)
filename.c (The C Source code file
Contains the ringo file content
Will be generated by this program)
filename_buildvc.bat (Will be executed to build filename.c using Visual C/C++)
filename_buildgcc.bat (Will be executed to build filename.c using GNU C/C++)
filename_buildclang.bat (Will be executed to build filename.c using CLang C/C++)
filename.obj (Will be generated by the Visual C/C++ compiler)
filename.exe (Will ge generated by the Visual C/C++ Linker)
filename (Executable File - On Linux & MacOS X platforms)
</pre></div>
</div>
</div>
<div class="section" id="how-ring2exe-works">
<span id="index-2"></span><h2>How Ring2EXE works?<a class="headerlink" href="#how-ring2exe-works" title="Permalink to this headline">¶</a></h2>
<p>At first the Ring compiler will be used to generate the Ring object file (<a href="#id1"><span class="problematic" id="id2">*</span></a>.ringo)</p>
<p>If we have a C compiler (optional), This object file will be embedded inside a C source code file</p>
<p>Then using the C compiler and the Ring library (Contains the Ring Virtual Machine) the executable file</p>
<p>will be generated!</p>
<p>If we don’t have a C compiler, the Ring executable will be copied and renamed to your application name</p>
<p>And your Ring object file (<a href="#id3"><span class="problematic" id="id4">*</span></a>.ringo) will become ring.ringo to be executed at startup of the executable file.</p>
<p>So it’s better and easy to have a C compiler on your machine to be used by Ring2EXE.</p>
</div>
<div class="section" id="example">
<span id="index-3"></span><h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
<p>We have test.ring contains the next code</p>
<div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="k">see</span> <span class="s">"Hello, World!"</span> <span class="o">+</span> <span class="n">nl</span>
</pre></div>
</div>
<p>To build th executable file for Windows, Linux or macOS</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test.ring
</pre></div>
</div>
<p>To run the program (Windows)</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>test
</pre></div>
</div>
<p>To run the program (Linux and macOS)</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>./test
</pre></div>
</div>
</div>
<div class="section" id="options">
<span id="index-4"></span><h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>-keep : Don't delete Temp. Files
-static : Build Standalone Executable File
(Don't use ring.dll/ring.so/ring.dylib)
-gui : Build GUI Application (Hide the Console Window)
-dist : Prepare application for distribution
-allruntime : Include all libraries in distribution
-mobileqt : Prepare Qt Project to distribute Ring Application for Mobile
-webassemblyqt : Prepare Qt Project to distribute Ring Application for the web (WebAssembly)
-noqt : Remove RingQt from distribution
-noallegro : Remove RingAllegro from distribution
-noopenssl : Remove RingOpenSSL from distribution
-nolibcurl : Remove RingLibCurl from distribution
-nomysql : Remove RingMySQL from distribution
-noodbc : Remove RingODBC from distribution
-nosqlite : Remove RingSQLite from distribution
-noopengl : Remove RingOpenGL from distribution
-nofreeglut : Remove RingFreeGLUT from distribution
-nolibzip : Remove RingLibZip from distribution
-noconsolecolors : Remove RingConsoleColors from distribution
-nomurmuhash : Remove RingMurmurHash from distribution
-nocruntime : Remove C Runtime from distribution
-qt : Add RingQt to distribution
-allegro : Add RingAllegro to distribution
-openssl : Add RingOpenSSL to distribution
-libcurl : Add RingLibCurl to distribution
-mysql : Add RingMySQL to distribution
-odbc : Add RingODBC to distribution
-sqlite : Add RingSQLite to distribution
-postgresql : Add RingPostgreSQL to distribution
-opengl : Add RingOpenGL to distribution
-freeglut : Add RingFreeGLUT to distribution
-libzip : Add RingLibZip to distribution
-libuv : Add RingLibuv to distribution
-consolecolors : Add RingConsoleColors to distribution
-murmurhash : Add RingMurmurHash to distribution
-cruntime : Add C Runtime to distribution
</pre></div>
</div>
</div>
<div class="section" id="building-standalone-console-application">
<span id="index-5"></span><h2>Building standalone console application<a class="headerlink" href="#building-standalone-console-application" title="Permalink to this headline">¶</a></h2>
<p>Using the “-static” option we can build executable console application</p>
<p>So we don’t have to use ring.dll, ring.so or ring.dylib</p>
<p>This avoid only the need to Ring dynamic link library</p>
<p>If you are using another libraries, You will need to include it with your application.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test.ring -static
</pre></div>
</div>
</div>
<div class="section" id="distributing-ringallegro-applications">
<span id="index-6"></span><h2>Distributing RingAllegro Applications<a class="headerlink" href="#distributing-ringallegro-applications" title="Permalink to this headline">¶</a></h2>
<p>We have test2.ring contains the next code</p>
<div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="c"># Just a simple program to test Ring2EXE Tool!</span>
<span class="c"># Using RingAllegro</span>
<span class="k">load</span> <span class="s">"gameengine.ring"</span> <span class="c"># Give Control to the Game Engine</span>
<span class="k">func</span> <span class="n">main</span> <span class="c"># Called by the Game Engine</span>
<span class="n">oGame</span> <span class="o">=</span> <span class="k">New</span> <span class="n">Game</span> <span class="c"># Create the Game Object</span>
<span class="p">{</span>
<span class="n">title</span> <span class="o">=</span> <span class="s">"My First Game"</span>
<span class="p">}</span>
</pre></div>
</div>
<p>To build the executable file and prepare for distributing the Game</p>
<p>We use “-dist” option and “-allruntime” to include all libraries</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test2.ring -dist -allruntime
</pre></div>
</div>
<p>After executing the previous command</p>
<p>On Windows we will have : target/windows folder</p>
<p>On Linux we will have : target/linux folder</p>
<p>On macOS we will have : target/macos folder</p>
<p>The previous command will add all of the Ring runtime libraries to our distribution</p>
<p>But we may need only RingAllegro, So it’s better to use the next command</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test2.ring -dist -allegro -cruntime
</pre></div>
</div>
<p>This will produce smaller size distribution and will avoid the runtime files that we don’t need!</p>
<p>Also we could use the “-gui” option to hide the console window</p>
<p>So it’s better to use the next command</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test2.ring -dist -gui -allegro -cruntime
</pre></div>
</div>
</div>
<div class="section" id="distributing-ringqt-applications">
<span id="index-7"></span><h2>Distributing RingQt Applications<a class="headerlink" href="#distributing-ringqt-applications" title="Permalink to this headline">¶</a></h2>
<p>We have test3.ring contains the next code</p>
<div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="c"># Just a simple program to test Ring2EXE Tool!</span>
<span class="c"># Using RingQt</span>
<span class="k">load</span> <span class="s">"guilib.ring"</span>
<span class="k">new</span> <span class="n">qApp</span> <span class="p">{</span>
<span class="k">new</span> <span class="n">qWidget</span><span class="p">()</span> <span class="p">{</span>
<span class="n">setwindowtitle</span><span class="p">(</span><span class="s">"Hello, World!"</span><span class="p">)</span>
<span class="n">resize</span><span class="p">(</span><span class="mi">400</span><span class="p">,</span><span class="mi">400</span><span class="p">)</span>
<span class="n">show</span><span class="p">()</span>
<span class="p">}</span>
<span class="n">exec</span><span class="p">()</span>
<span class="p">}</span>
</pre></div>
</div>
<p>To build the executable file and prepare for distributing the GUI application</p>
<p>We use “-dist” option and “-allruntime” to include all libraries</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test3.ring -dist -allruntime
</pre></div>
</div>
<p>After executing the previous command</p>
<p>On Windows we will have : target/windows folder</p>
<p>On Linux we will have : target/linux folder</p>
<p>On macOS we will have : target/macos folder</p>
<p>The previous command will add all of the Ring runtime libraries to our distribution</p>
<p>But we may need only RingQt, So it’s better to use the next command</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test3.ring -dist -qt -cruntime
</pre></div>
</div>
<p>This will produce smaller size distribution and will avoid the runtime files that we don’t need!</p>
<p>Also we could use the “-gui” option to hide the console window</p>
<p>So it’s better to use the next command</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test3.ring -dist -gui -qt -cruntime
</pre></div>
</div>
</div>
<div class="section" id="distributing-applications-for-mobile-using-ringqt">
<span id="index-8"></span><h2>Distributing Applications for Mobile using RingQt<a class="headerlink" href="#distributing-applications-for-mobile-using-ringqt" title="Permalink to this headline">¶</a></h2>
<p>To prepare a Qt project for your RingQt application (test3.ring) use the “-mobileqt” option</p>
<p>Example :</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test3.ring -dist -mobileqt
</pre></div>
</div>
<p>After executing the previous command, We will have the Qt project in target/mobile/qtproject folder</p>
<p>The main project file will be project.pro which we can open using the Qt Creator IDE.</p>
<p>Also we will have the resource file : project.qrc</p>
<p>Another important file is our C++ main file : main.cpp</p>
</div>
<div class="section" id="distributing-applications-for-webassembly-using-ringqt">
<span id="index-9"></span><h2>Distributing Applications for WebAssembly using RingQt<a class="headerlink" href="#distributing-applications-for-webassembly-using-ringqt" title="Permalink to this headline">¶</a></h2>
<p>To prepare a Qt project (WebAssembly) for your RingQt application (myapp.ring) use the “-webassemblyqt” option</p>
<p>Example :</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe myapp.ring -dist -webassemblyqt
</pre></div>
</div>
<p>After executing the previous command, We will have the Qt project in target/webassembly/qtproject folder</p>
<p>The main project file will be project.pro which we can open using the Qt Creator IDE.</p>
<p>Also we will have the resource file : project.qrc</p>
<p>Another important file is our C++ main file : main.cpp</p>
</div>
<div class="section" id="building-the-cards-game-for-mobile-using-ringqt">
<span id="index-10"></span><h2>Building the Cards Game for Mobile using RingQt<a class="headerlink" href="#building-the-cards-game-for-mobile-using-ringqt" title="Permalink to this headline">¶</a></h2>
<p>For a better example, consider building an Android package for the Cards game that comes with the</p>
<p>Ring language in this folder : ring/application/cards</p>
<p>The Cards game folder contains three files</p>
<p>cards.ring : The Game source code</p>
<p>cards.jpg : The image file used by the game</p>
<p>project.qrc : Resource file to be used with the Qt project</p>
<p>The resource file contains the next content</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span><RCC>
<qresource>
<file>cards.ringo</file>
<file>cards.jpg</file>
</qresource>
</RCC>
</pre></div>
</div>
<p>We have two files in the resource file</p>
<p>The first file is cards.ringo (The Ring Object File) and the second file is cards.jpg (The image file)</p>
<p>As a start, Ring2EXE will generate this resource file in target/mobile/qtproject/project.qrc</p>
<p>But this file will contains only cards.ringo (That Ring2EXE will generate by calling Ring compiler)</p>
<p>We need to update this resource file to add the image file : cards.jpg</p>
<p>After this update, we copy the resource file to the main application folder</p>
<p>So when we use Ring2EXE again, Our updated resource file will be used!</p>
<p>Now to build the cards game for Mobile</p>
<ol class="arabic simple">
<li><p>Run the next command</p></li>
</ol>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe cards.ring -dist -mobileqt
</pre></div>
</div>
<ol class="arabic simple" start="2">
<li><p>Open target/mobile/qtproject/project.pro using Qt creator</p></li>
<li><p>Build and Run using Qt Creator</p></li>
</ol>
<p>How the Cards game will find the image file ?</p>
<p>RingQt comes with a simple function : AppFile() that we can use to determine the files that we may</p>
<p>access on Desktop or Mobile platforms</p>
<p>The next code from cards.ring</p>
<div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="n">mypic</span> <span class="o">=</span> <span class="k">new</span> <span class="n">QPixmap</span><span class="p">(</span><span class="n">AppFile</span><span class="p">(</span><span class="s">"cards.jpg"</span><span class="p">))</span>
</pre></div>
</div>
<p>So all what you need is using AppFile() function around your image files!</p>
</div>
<div class="section" id="building-the-weight-history-application-for-mobile-using-ringqt">
<span id="index-11"></span><h2>Building the Weight History Application for Mobile using RingQt<a class="headerlink" href="#building-the-weight-history-application-for-mobile-using-ringqt" title="Permalink to this headline">¶</a></h2>
<p>Another example to distribute your application for Mobile Devices using Ring2EXE and Qt</p>
<p>consider building an Android package for the Weight History application that comes with the</p>
<p>Ring language in this folder : ring/application/weighthistory</p>
<p>The Weight History application folder contains four files</p>
<p>weighthistory.ring : The application source code</p>
<p>weighthistory.db : The SQLite database</p>
<p>project.qrc : The resource file for the Qt project</p>
<p>main.cpp : The main C++ source file for the Qt project</p>
<p>To build the Weight History application for Mobile</p>
<ol class="arabic simple">
<li><p>Run the next command</p></li>
</ol>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe weighthistory.ring -dist -mobileqt
</pre></div>
</div>
<ol class="arabic simple" start="2">
<li><p>Open target/mobile/qtproject/project.pro using Qt creator</p></li>
<li><p>Build and Run using Qt Creator</p></li>
</ol>
<p>The resource file (project.qrc) contains two files</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span><RCC>
<qresource>
<file>weighthistory.ringo</file>
<file>weighthistory.db</file>
</qresource>
</RCC>
</pre></div>
</div>
<p>The first file is weighthistory.ringo (Ring Object File - Generated by Ring2EXE by calling Ring compiler)</p>
<p>The database file : weighthistory.db</p>
<p>The main.cpp contains the next little update, To copy the database file from resources to a writable location</p>
<p>on the mobile device</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>QString path3 ;
path3 = path+"/weighthistory.db";
QFile::copy(":/weighthistory.db",path3);
</pre></div>
</div>
<p>You will need to do this with database files only!</p>
<p>When we use Ring2EXE, the tool will check for project.qrc and main.cpp, if they exist then your updated</p>
<p>files will be used in target/mobile/qtproject instead of the default version generated by Ring2EXE</p>
<p>So Use Ring2EXE to generate these files, Then copy them to your application folder when you update them.</p>
</div>
<div class="section" id="building-the-form-designer-for-mobile-using-ringqt">
<span id="index-12"></span><h2>Building the Form Designer for Mobile using RingQt<a class="headerlink" href="#building-the-form-designer-for-mobile-using-ringqt" title="Permalink to this headline">¶</a></h2>
<p>To build the Form Designer application (ring/tools/formdesigner) for Mobile</p>
<ol class="arabic simple">
<li><p>Run the next command</p></li>
</ol>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe formdesigner.ring -dist -mobileqt
</pre></div>
</div>
<ol class="arabic simple" start="2">
<li><p>Open target/mobile/qtproject/project.pro using Qt creator</p></li>
<li><p>Build and Run using Qt Creator</p></li>
</ol>
<p>in the folder ring/application/formdesigner You will find the resource file : project.qrc</p>
<p>It will be used automatically by Ring2EXE</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span><RCC>
<qresource>
<file>formdesigner.ringo</file>
<file>image/allevents.png</file>
<file>image/checkbox.png</file>
<file>image/close.png</file>
<file>image/combobox.bmp</file>
<file>image/datepicker.bmp</file>
<file>image/dial.png</file>
<file>image/formdesigner.png</file>
<file>image/frame.png</file>
<file>image/grid.bmp</file>
<file>image/hyperlink.png</file>
<file>image/image.png</file>
<file>image/label.png</file>
<file>image/layout.png</file>
<file>image/lcdnumber.png</file>
<file>image/listview.png</file>
<file>image/lock.png</file>
<file>image/new.png</file>
<file>image/open.png</file>
<file>image/progressbar.png</file>
<file>image/project.png</file>
<file>image/pushbutton.png</file>
<file>image/radiobutton.png</file>
<file>image/save.png</file>
<file>image/saveas.png</file>
<file>image/select.png</file>
<file>image/slider.png</file>
<file>image/spinner.bmp</file>
<file>image/statusbar.png</file>
<file>image/tab.png</file>
<file>image/textarea.png</file>
<file>image/textfield.png</file>
<file>image/timer.png</file>
<file>image/toolbar.png</file>
<file>image/tree.bmp</file>
<file>image/videowidget.png</file>
<file>image/webview.png</file>
</qresource>
</RCC>
</pre></div>
</div>
<p>As we did in the Cards game, The Form Designer will use the AppFile() function to determine the
name of the Image files.</p>
<p>The next code from ring/tools/formdesigner/mainwindow/formdesignerview.ring</p>
<div class="highlight-ring notranslate"><div class="highlight"><pre><span></span><span class="k">func</span> <span class="n">CreateToolBar</span>
<span class="n">aBtns</span> <span class="o">=</span> <span class="o">[</span>
<span class="k">new</span> <span class="n">qtoolbutton</span><span class="p">(</span><span class="n">win</span><span class="p">)</span> <span class="p">{</span>
<span class="n">setbtnimage</span><span class="p">(</span><span class="n">self</span><span class="p">,</span><span class="n">AppFile</span><span class="p">(</span><span class="s">"image/new.png"</span><span class="p">))</span>
<span class="n">setclickevent</span><span class="p">(</span><span class="n">Method</span><span class="p">(:</span><span class="n">NewAction</span><span class="p">))</span>
<span class="n">settooltip</span><span class="p">(</span><span class="s">"New File"</span><span class="p">)</span>
<span class="p">}</span> <span class="p">,</span>
<span class="k">new</span> <span class="n">qtoolbutton</span><span class="p">(</span><span class="n">win</span><span class="p">)</span> <span class="p">{</span>
<span class="n">setbtnimage</span><span class="p">(</span><span class="n">self</span><span class="p">,</span><span class="n">AppFile</span><span class="p">(</span><span class="s">"image/open.png"</span><span class="p">))</span>
<span class="n">setclickevent</span><span class="p">(</span><span class="n">Method</span><span class="p">(:</span><span class="n">OpenAction</span><span class="p">))</span>
<span class="n">settooltip</span><span class="p">(</span><span class="s">"Open File"</span><span class="p">)</span>
<span class="p">}</span> <span class="p">,</span>
<span class="k">new</span> <span class="n">qtoolbutton</span><span class="p">(</span><span class="n">win</span><span class="p">)</span> <span class="p">{</span>
<span class="n">setbtnimage</span><span class="p">(</span><span class="n">self</span><span class="p">,</span><span class="n">AppFile</span><span class="p">(</span><span class="s">"image/save.png"</span><span class="p">))</span>
<span class="n">setclickevent</span><span class="p">(</span><span class="n">Method</span><span class="p">(:</span><span class="n">SaveAction</span><span class="p">))</span>
<span class="n">settooltip</span><span class="p">(</span><span class="s">"Save"</span><span class="p">)</span>
<span class="p">}</span> <span class="p">,</span>
<span class="k">new</span> <span class="n">qtoolbutton</span><span class="p">(</span><span class="n">win</span><span class="p">)</span> <span class="p">{</span>
<span class="n">setbtnimage</span><span class="p">(</span><span class="n">self</span><span class="p">,</span><span class="n">AppFile</span><span class="p">(</span><span class="s">"image/saveas.png"</span><span class="p">))</span>
<span class="n">setclickevent</span><span class="p">(</span><span class="n">Method</span><span class="p">(:</span><span class="n">SaveAsAction</span><span class="p">))</span>
<span class="n">settooltip</span><span class="p">(</span><span class="s">"Save As"</span><span class="p">)</span>
<span class="p">}</span> <span class="p">,</span>
<span class="k">new</span> <span class="n">qtoolbutton</span><span class="p">(</span><span class="n">win</span><span class="p">)</span> <span class="p">{</span>
<span class="n">setbtnimage</span><span class="p">(</span><span class="n">self</span><span class="p">,</span><span class="n">AppFile</span><span class="p">(</span><span class="s">"image/close.png"</span><span class="p">))</span>
<span class="n">setclickevent</span><span class="p">(</span><span class="n">Method</span><span class="p">(:</span><span class="n">ExitAction</span><span class="p">))</span>
<span class="n">settooltip</span><span class="p">(</span><span class="s">"Exit"</span><span class="p">)</span>
<span class="p">}</span>
<span class="o">]</span>
<span class="n">tool1</span> <span class="o">=</span> <span class="n">win</span><span class="p">.</span><span class="n">addtoolbar</span><span class="p">(</span><span class="s">"files"</span><span class="p">)</span> <span class="p">{</span>
<span class="k">for</span> <span class="n">x</span> <span class="k">in</span> <span class="n">aBtns</span> <span class="p">{</span> <span class="n">addwidget</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="n">addseparator</span><span class="p">()</span> <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>From this example, We know that we can use sub folders for images.</p>
</div>
<div class="section" id="creating-the-qt-resource-file-using-folder2qrc">
<span id="index-13"></span><h2>Creating the Qt resource file using Folder2qrc<a class="headerlink" href="#creating-the-qt-resource-file-using-folder2qrc" title="Permalink to this headline">¶</a></h2>
<p>When we have large RingQt project that contains a lot of images and files, We need to add these files
to the resource file ( <a href="#id5"><span class="problematic" id="id6">*</span></a>.qrc ) when distributing applications for Mobile devices.</p>
<p>Instead of adding these files one by one, Ring 1.6 comes with a simple tool that save our time, It’s
called Folder2qrc.</p>
<p>Example:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>folder2qrc formdesigner.ring
</pre></div>
</div>
<p>We determine the main source file while we are in the application folder, and Folder2qrc will check all
of the files in the current folder and sub folders, Then add them to the resource file after the
mainfile.ringo (In our example this will be formdesigner.ringo)</p>
<p>The output file will be : project.qrc</p>
<p>You can open it and remove the files that you don’t need in the resources!</p>
</div>
<div class="section" id="important-information-about-ring2exe">
<span id="index-14"></span><h2>Important Information about Ring2EXE<a class="headerlink" href="#important-information-about-ring2exe" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>Using Ring2EXE to prepare distribution will delete all of the files in the old distribution</p></li>
</ul>
<p>for example, if you have target/windows folder then used</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test3.ring -dist -allruntime
</pre></div>
</div>
<p>The files in target/windows will be deleted before adding the files again</p>
<p>This is important when you prepare a distribution for Mobile devices</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ring2exe test3.ring -dist -mobileqt
</pre></div>
</div>
<p>If you modified the resource file : project.qrc or the main file : main.cpp</p>
<p>Don’t forget to copy them to the application folder!</p>
<p>So Ring2EXE can use the updated version if you tried the previous command again!</p>
<ul>
<li><p>Ring2EXE is written in Ring, and you can read the source code from</p>
<blockquote>
<div><p><a class="reference external" href="https://github.com/ring-lang/ring/blob/master/tools/ring2exe/ring2exe.ring">https://github.com/ring-lang/ring/blob/master/tools/ring2exe/ring2exe.ring</a></p>
</div></blockquote>
</li>
<li><p>The libraries information are stored in a separated files, So these files can be updated in the future</p></li>
</ul>
<p>automatically to support new libraries</p>
<blockquote>
<div><p><a class="reference external" href="https://github.com/ring-lang/ring/blob/master/tools/ring2exe/libs">https://github.com/ring-lang/ring/blob/master/tools/ring2exe/libs</a></p>
</div></blockquote>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="ringpm.html" class="btn btn-neutral float-right" title="The Ring Package Manager (RingPM)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="distribute.html" class="btn btn-neutral float-left" title="Distributing Ring Applications (Manual)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2016-2021, Ring Team
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(false);
});
</script>
</body>
</html>