standalone-ruby 1.3.1 → 1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -23
  3. data/bin/standalone-ruby +3 -3
  4. data/lib/data/exe_template/launcher_stub.c +35 -0
  5. data/lib/data/exe_template/launcher_stub.cpp +9 -0
  6. data/lib/data/tcc/include/_mingw.h +54 -0
  7. data/lib/data/tcc/include/assert.h +71 -0
  8. data/lib/data/tcc/include/conio.h +159 -0
  9. data/lib/data/tcc/include/ctype.h +232 -0
  10. data/lib/data/tcc/include/dir.h +26 -0
  11. data/lib/data/tcc/include/direct.h +95 -0
  12. data/lib/data/tcc/include/dirent.h +96 -0
  13. data/lib/data/tcc/include/dos.h +110 -0
  14. data/lib/data/tcc/include/errno.h +117 -0
  15. data/lib/data/tcc/include/excpt.h +20 -0
  16. data/lib/data/tcc/include/fcntl.h +135 -0
  17. data/lib/data/tcc/include/fenv.h +85 -0
  18. data/lib/data/tcc/include/float.h +224 -0
  19. data/lib/data/tcc/include/inttypes.h +275 -0
  20. data/lib/data/tcc/include/io.h +296 -0
  21. data/lib/data/tcc/include/limits.h +115 -0
  22. data/lib/data/tcc/include/locale.h +100 -0
  23. data/lib/data/tcc/include/malloc.h +87 -0
  24. data/lib/data/tcc/include/math.h +438 -0
  25. data/lib/data/tcc/include/mem.h +8 -0
  26. data/lib/data/tcc/include/memory.h +9 -0
  27. data/lib/data/tcc/include/process.h +158 -0
  28. data/lib/data/tcc/include/setjmp.h +72 -0
  29. data/lib/data/tcc/include/share.h +44 -0
  30. data/lib/data/tcc/include/signal.h +111 -0
  31. data/lib/data/tcc/include/stdarg.h +16 -0
  32. data/lib/data/tcc/include/stdbool.h +10 -0
  33. data/lib/data/tcc/include/stddef.h +26 -0
  34. data/lib/data/tcc/include/stdint.h +184 -0
  35. data/lib/data/tcc/include/stdio.h +413 -0
  36. data/lib/data/tcc/include/stdlib.h +482 -0
  37. data/lib/data/tcc/include/string.h +206 -0
  38. data/lib/data/tcc/include/sys/fcntl.h +8 -0
  39. data/lib/data/tcc/include/sys/file.h +9 -0
  40. data/lib/data/tcc/include/sys/locking.h +52 -0
  41. data/lib/data/tcc/include/sys/stat.h +190 -0
  42. data/lib/data/tcc/include/sys/time.h +3 -0
  43. data/lib/data/tcc/include/sys/timeb.h +82 -0
  44. data/lib/data/tcc/include/sys/types.h +118 -0
  45. data/lib/data/tcc/include/sys/unistd.h +9 -0
  46. data/lib/data/tcc/include/sys/utime.h +89 -0
  47. data/lib/data/tcc/include/tchar.h +367 -0
  48. data/lib/data/tcc/include/time.h +219 -0
  49. data/lib/data/tcc/include/unistd.h +10 -0
  50. data/lib/data/tcc/include/values.h +4 -0
  51. data/lib/data/tcc/include/varargs.h +11 -0
  52. data/lib/data/tcc/include/wchar.h +318 -0
  53. data/lib/data/tcc/include/wctype.h +127 -0
  54. data/lib/data/tcc/include/winapi/basetsd.h +119 -0
  55. data/lib/data/tcc/include/winapi/basetyps.h +144 -0
  56. data/lib/data/tcc/include/winapi/winbase.h +1852 -0
  57. data/lib/data/tcc/include/winapi/wincon.h +207 -0
  58. data/lib/data/tcc/include/winapi/windef.h +240 -0
  59. data/lib/data/tcc/include/winapi/windows.h +176 -0
  60. data/lib/data/tcc/include/winapi/winerror.h +1054 -0
  61. data/lib/data/tcc/include/winapi/wingdi.h +2843 -0
  62. data/lib/data/tcc/include/winapi/winnetwk.h +346 -0
  63. data/lib/data/tcc/include/winapi/winnls.h +651 -0
  64. data/lib/data/tcc/include/winapi/winnt.h +2667 -0
  65. data/lib/data/tcc/include/winapi/winreg.h +159 -0
  66. data/lib/data/tcc/include/winapi/winsvc.h +309 -0
  67. data/lib/data/tcc/include/winapi/winuser.h +3472 -0
  68. data/lib/data/tcc/include/winapi/winver.h +133 -0
  69. data/lib/data/tcc/lib/gdi32.def +337 -0
  70. data/lib/data/tcc/lib/kernel32.def +763 -0
  71. data/lib/data/tcc/lib/libtcc1.a +0 -0
  72. data/lib/data/tcc/lib/msvcrt.def +782 -0
  73. data/lib/data/tcc/lib/user32.def +654 -0
  74. data/lib/data/tcc/tcc.exe +0 -0
  75. data/lib/data/tcc/tiny_impdef.exe +0 -0
  76. data/lib/data/tcc/tiny_libmaker.exe +0 -0
  77. data/lib/data/vbs/default_vbs.txt +1 -1
  78. data/lib/data/vbs/vbs_gui.txt +1 -1
  79. data/lib/standalone_ruby.rb +6 -6
  80. data/lib/utils/config_generator.rb +5 -0
  81. data/lib/utils/displayer.rb +61 -59
  82. data/lib/utils/exe_packer.rb +68 -0
  83. data/lib/utils/launcher.rb +15 -16
  84. data/lib/utils/launcher_handler.rb +2 -0
  85. data/lib/utils/logger_helper.rb +24 -24
  86. data/lib/utils/parameter_parser.rb +206 -201
  87. data/lib/utils/ruby_copy.rb +26 -26
  88. metadata +77 -3
  89. data/lib/data/bat/default_bat.txt +0 -9
@@ -0,0 +1,44 @@
1
+ /*
2
+ * share.h
3
+ *
4
+ * Constants for file sharing functions.
5
+ *
6
+ * This file is part of the Mingw32 package.
7
+ *
8
+ * Contributors:
9
+ * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
10
+ *
11
+ * THIS SOFTWARE IS NOT COPYRIGHTED
12
+ *
13
+ * This source code is offered for use in the public domain. You may
14
+ * use, modify or distribute it freely.
15
+ *
16
+ * This code is distributed in the hope that it will be useful but
17
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18
+ * DISCLAIMED. This includes but is not limited to warranties of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
+ *
21
+ * $Revision: 1.2 $
22
+ * $Author: bellard $
23
+ * $Date: 2005/04/17 13:14:29 $
24
+ *
25
+ */
26
+
27
+ #ifndef __STRICT_ANSI__
28
+
29
+ #ifndef _SHARE_H_
30
+ #define _SHARE_H_
31
+
32
+ /* All the headers include this file. */
33
+ #include <_mingw.h>
34
+
35
+ #define SH_COMPAT 0x00 /* Compatibility */
36
+ #define SH_DENYRW 0x10 /* Deny read/write */
37
+ #define SH_DENYWR 0x20 /* Deny write */
38
+ #define SH_DENYRD 0x30 /* Deny read */
39
+ #define SH_DENYNO 0x40 /* Deny nothing */
40
+
41
+ #endif /* Not _SHARE_H_ */
42
+
43
+ #endif /* Not __STRICT_ANSI__ */
44
+
@@ -0,0 +1,111 @@
1
+ /*
2
+ * signal.h
3
+ *
4
+ * A way to set handlers for exceptional conditions (also known as signals).
5
+ *
6
+ * This file is part of the Mingw32 package.
7
+ *
8
+ * Contributors:
9
+ * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
10
+ *
11
+ * THIS SOFTWARE IS NOT COPYRIGHTED
12
+ *
13
+ * This source code is offered for use in the public domain. You may
14
+ * use, modify or distribute it freely.
15
+ *
16
+ * This code is distributed in the hope that it will be useful but
17
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18
+ * DISCLAIMED. This includes but is not limited to warranties of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
+ *
21
+ * $Revision: 1.2 $
22
+ * $Author: bellard $
23
+ * $Date: 2005/04/17 13:14:29 $
24
+ *
25
+ */
26
+
27
+ #ifndef _SIGNAL_H_
28
+ #define _SIGNAL_H_
29
+
30
+ /* All the headers include this file. */
31
+ #include <_mingw.h>
32
+
33
+ /*
34
+ * The actual signal values. Using other values with signal
35
+ * produces a SIG_ERR return value.
36
+ *
37
+ * NOTE: SIGINT is produced when the user presses Ctrl-C.
38
+ * SIGILL has not been tested.
39
+ * SIGFPE doesn't seem to work?
40
+ * SIGSEGV does not catch writing to a NULL pointer (that shuts down
41
+ * your app; can you say "segmentation violation core dump"?).
42
+ * SIGTERM comes from what kind of termination request exactly?
43
+ * SIGBREAK is indeed produced by pressing Ctrl-Break.
44
+ * SIGABRT is produced by calling abort.
45
+ * TODO: The above results may be related to not installing an appropriate
46
+ * structured exception handling frame. Results may be better if I ever
47
+ * manage to get the SEH stuff down.
48
+ */
49
+ #define SIGINT 2 /* Interactive attention */
50
+ #define SIGILL 4 /* Illegal instruction */
51
+ #define SIGFPE 8 /* Floating point error */
52
+ #define SIGSEGV 11 /* Segmentation violation */
53
+ #define SIGTERM 15 /* Termination request */
54
+ #define SIGBREAK 21 /* Control-break */
55
+ #define SIGABRT 22 /* Abnormal termination (abort) */
56
+
57
+ #define NSIG 23 /* maximum signal number + 1 */
58
+
59
+ #ifndef RC_INVOKED
60
+
61
+ #ifndef _SIG_ATOMIC_T_DEFINED
62
+ typedef int sig_atomic_t;
63
+ #define _SIG_ATOMIC_T_DEFINED
64
+ #endif
65
+
66
+ /*
67
+ * The prototypes (below) are the easy part. The hard part is figuring
68
+ * out what signals are available and what numbers they are assigned
69
+ * along with appropriate values of SIG_DFL and SIG_IGN.
70
+ */
71
+
72
+ /*
73
+ * A pointer to a signal handler function. A signal handler takes a
74
+ * single int, which is the signal it handles.
75
+ */
76
+ typedef void (*__p_sig_fn_t)(int);
77
+
78
+ /*
79
+ * These are special values of signal handler pointers which are
80
+ * used to send a signal to the default handler (SIG_DFL), ignore
81
+ * the signal (SIG_IGN), or indicate an error return (SIG_ERR).
82
+ */
83
+ #define SIG_DFL ((__p_sig_fn_t) 0)
84
+ #define SIG_IGN ((__p_sig_fn_t) 1)
85
+ #define SIG_ERR ((__p_sig_fn_t) -1)
86
+
87
+ #ifdef __cplusplus
88
+ extern "C" {
89
+ #endif
90
+
91
+ /*
92
+ * Call signal to set the signal handler for signal sig to the
93
+ * function pointed to by handler. Returns a pointer to the
94
+ * previous handler, or SIG_ERR if an error occurs. Initially
95
+ * unhandled signals defined above will return SIG_DFL.
96
+ */
97
+ __p_sig_fn_t signal(int, __p_sig_fn_t);
98
+
99
+ /*
100
+ * Raise the signal indicated by sig. Returns non-zero on success.
101
+ */
102
+ int raise (int);
103
+
104
+ #ifdef __cplusplus
105
+ }
106
+ #endif
107
+
108
+ #endif /* Not RC_INVOKED */
109
+
110
+ #endif /* Not _SIGNAL_H_ */
111
+
@@ -0,0 +1,16 @@
1
+ #ifndef _STDARG_H
2
+ #define _STDARG_H
3
+
4
+ typedef char *va_list;
5
+
6
+ /* only correct for i386 */
7
+ #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)
8
+ #define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3)))
9
+ #define va_copy(dest, src) (dest) = (src)
10
+ #define va_end(ap)
11
+
12
+ /* fix a buggy dependency on GCC in libio.h */
13
+ typedef va_list __gnuc_va_list;
14
+ #define _VA_LIST_DEFINED
15
+
16
+ #endif
@@ -0,0 +1,10 @@
1
+ #ifndef _STDBOOL_H
2
+ #define _STDBOOL_H
3
+
4
+ /* ISOC99 boolean */
5
+
6
+ #define bool _Bool
7
+ #define true 1
8
+ #define false 0
9
+
10
+ #endif /* _STDBOOL_H */
@@ -0,0 +1,26 @@
1
+ #ifndef _STDDEF_H
2
+ #define _STDDEF_H
3
+
4
+ #define NULL ((void *)0)
5
+ typedef __SIZE_TYPE__ size_t;
6
+ typedef __WCHAR_TYPE__ wchar_t;
7
+ typedef __PTRDIFF_TYPE__ ptrdiff_t;
8
+ #define offsetof(type, field) ((size_t) &((type *)0)->field)
9
+
10
+ /* need to do that because of glibc 2.1 bug (should have a way to test
11
+ presence of 'long long' without __GNUC__, or TCC should define
12
+ __GNUC__ ? */
13
+ #if !defined(__int8_t_defined) && !defined(__dietlibc__)
14
+ #define __int8_t_defined
15
+ typedef char int8_t;
16
+ typedef short int int16_t;
17
+ typedef int int32_t;
18
+ typedef long long int int64_t;
19
+ #endif
20
+
21
+ #ifdef __i386__
22
+ void *_alloca(size_t);
23
+ #define alloca _alloca
24
+ #endif
25
+
26
+ #endif
@@ -0,0 +1,184 @@
1
+ /* ISO C9x 7.18 Integer types <stdint.h>
2
+ * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
3
+ *
4
+ * THIS SOFTWARE IS NOT COPYRIGHTED
5
+ *
6
+ * Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
7
+ *
8
+ * This source code is offered for use in the public domain. You may
9
+ * use, modify or distribute it freely.
10
+ *
11
+ * This code is distributed in the hope that it will be useful but
12
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
13
+ * DISCLAIMED. This includes but is not limited to warranties of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
+ *
16
+ * Date: 2000-12-02
17
+ */
18
+
19
+
20
+ #ifndef _STDINT_H
21
+ #define _STDINT_H
22
+
23
+ /* 7.18.1.1 Exact-width integer types */
24
+ typedef signed char int8_t;
25
+ typedef unsigned char uint8_t;
26
+ typedef short int16_t;
27
+ typedef unsigned short uint16_t;
28
+ typedef int int32_t;
29
+ typedef unsigned uint32_t;
30
+ typedef long long int64_t;
31
+ typedef unsigned long long uint64_t;
32
+
33
+ /* 7.18.1.2 Minimum-width integer types */
34
+ typedef signed char int_least8_t;
35
+ typedef unsigned char uint_least8_t;
36
+ typedef short int_least16_t;
37
+ typedef unsigned short uint_least16_t;
38
+ typedef int int_least32_t;
39
+ typedef unsigned uint_least32_t;
40
+ typedef long long int_least64_t;
41
+ typedef unsigned long long uint_least64_t;
42
+
43
+ /* 7.18.1.3 Fastest minimum-width integer types
44
+ * Not actually guaranteed to be fastest for all purposes
45
+ * Here we use the exact-width types for 8 and 16-bit ints.
46
+ */
47
+ typedef char int_fast8_t;
48
+ typedef unsigned char uint_fast8_t;
49
+ typedef short int_fast16_t;
50
+ typedef unsigned short uint_fast16_t;
51
+ typedef int int_fast32_t;
52
+ typedef unsigned int uint_fast32_t;
53
+ typedef long long int_fast64_t;
54
+ typedef unsigned long long uint_fast64_t;
55
+
56
+ /* 7.18.1.4 Integer types capable of holding object pointers */
57
+ typedef int intptr_t;
58
+ typedef unsigned uintptr_t;
59
+
60
+ /* 7.18.1.5 Greatest-width integer types */
61
+ typedef long long intmax_t;
62
+ typedef unsigned long long uintmax_t;
63
+
64
+ /* 7.18.2 Limits of specified-width integer types */
65
+ #if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
66
+
67
+ /* 7.18.2.1 Limits of exact-width integer types */
68
+ #define INT8_MIN (-128)
69
+ #define INT16_MIN (-32768)
70
+ #define INT32_MIN (-2147483647 - 1)
71
+ #define INT64_MIN (-9223372036854775807LL - 1)
72
+
73
+ #define INT8_MAX 127
74
+ #define INT16_MAX 32767
75
+ #define INT32_MAX 2147483647
76
+ #define INT64_MAX 9223372036854775807LL
77
+
78
+ #define UINT8_MAX 0xff /* 255U */
79
+ #define UINT16_MAX 0xffff /* 65535U */
80
+ #define UINT32_MAX 0xffffffff /* 4294967295U */
81
+ #define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
82
+
83
+ /* 7.18.2.2 Limits of minimum-width integer types */
84
+ #define INT_LEAST8_MIN INT8_MIN
85
+ #define INT_LEAST16_MIN INT16_MIN
86
+ #define INT_LEAST32_MIN INT32_MIN
87
+ #define INT_LEAST64_MIN INT64_MIN
88
+
89
+ #define INT_LEAST8_MAX INT8_MAX
90
+ #define INT_LEAST16_MAX INT16_MAX
91
+ #define INT_LEAST32_MAX INT32_MAX
92
+ #define INT_LEAST64_MAX INT64_MAX
93
+
94
+ #define UINT_LEAST8_MAX UINT8_MAX
95
+ #define UINT_LEAST16_MAX UINT16_MAX
96
+ #define UINT_LEAST32_MAX UINT32_MAX
97
+ #define UINT_LEAST64_MAX UINT64_MAX
98
+
99
+ /* 7.18.2.3 Limits of fastest minimum-width integer types */
100
+ #define INT_FAST8_MIN INT8_MIN
101
+ #define INT_FAST16_MIN INT16_MIN
102
+ #define INT_FAST32_MIN INT32_MIN
103
+ #define INT_FAST64_MIN INT64_MIN
104
+
105
+ #define INT_FAST8_MAX INT8_MAX
106
+ #define INT_FAST16_MAX INT16_MAX
107
+ #define INT_FAST32_MAX INT32_MAX
108
+ #define INT_FAST64_MAX INT64_MAX
109
+
110
+ #define UINT_FAST8_MAX UINT8_MAX
111
+ #define UINT_FAST16_MAX UINT16_MAX
112
+ #define UINT_FAST32_MAX UINT32_MAX
113
+ #define UINT_FAST64_MAX UINT64_MAX
114
+
115
+ /* 7.18.2.4 Limits of integer types capable of holding
116
+ object pointers */
117
+ #define INTPTR_MIN INT32_MIN
118
+ #define INTPTR_MAX INT32_MAX
119
+ #define UINTPTR_MAX UINT32_MAX
120
+
121
+ /* 7.18.2.5 Limits of greatest-width integer types */
122
+ #define INTMAX_MIN INT64_MIN
123
+ #define INTMAX_MAX INT64_MAX
124
+ #define UINTMAX_MAX UINT64_MAX
125
+
126
+ /* 7.18.3 Limits of other integer types */
127
+ #define PTRDIFF_MIN INT32_MIN
128
+ #define PTRDIFF_MAX INT32_MAX
129
+
130
+ #define SIG_ATOMIC_MIN INT32_MIN
131
+ #define SIG_ATOMIC_MAX INT32_MAX
132
+
133
+ #define SIZE_MAX UINT32_MAX
134
+
135
+ #ifndef WCHAR_MIN /* also in wchar.h */
136
+ #define WCHAR_MIN 0
137
+ #define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
138
+ #endif
139
+
140
+ /*
141
+ * wint_t is unsigned int in __MINGW32__,
142
+ * but unsigned short in MS runtime
143
+ */
144
+ #define WINT_MIN 0
145
+ #define WINT_MAX UINT32_MAX
146
+
147
+ #endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
148
+
149
+
150
+ /* 7.18.4 Macros for integer constants */
151
+ #if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
152
+
153
+ /* 7.18.4.1 Macros for minimum-width integer constants
154
+
155
+ Accoding to Douglas Gwyn <gwyn@arl.mil>:
156
+ "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
157
+ 9899:1999 as initially published, the expansion was required
158
+ to be an integer constant of precisely matching type, which
159
+ is impossible to accomplish for the shorter types on most
160
+ platforms, because C99 provides no standard way to designate
161
+ an integer constant with width less than that of type int.
162
+ TC1 changed this to require just an integer constant
163
+ *expression* with *promoted* type."
164
+
165
+ The trick used here is from Clive D W Feather.
166
+ */
167
+
168
+ #define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val))
169
+ #define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val))
170
+ #define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val))
171
+ #define INT64_C(val) (INT_LEAST64_MAX-INT_LEAST64_MAX+(val))
172
+
173
+ #define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val))
174
+ #define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val))
175
+ #define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val))
176
+ #define UINT64_C(val) (UINT_LEAST64_MAX-UINT_LEAST64_MAX+(val))
177
+
178
+ /* 7.18.4.2 Macros for greatest-width integer constants */
179
+ #define INTMAX_C(val) (INTMAX_MAX-INTMAX_MAX+(val))
180
+ #define UINTMAX_C(val) (UINTMAX_MAX-UINTMAX_MAX+(val))
181
+
182
+ #endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
183
+
184
+ #endif