transactd 2.4.0 → 2.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/BUILD_UNIX-JA.md +37 -29
  3. data/BUILD_WIN-JA.md +96 -69
  4. data/CMakeLists.txt +7 -17
  5. data/README-JA.md +22 -17
  6. data/README.md +23 -16
  7. data/{RELEASE_NOTE-JA → RELEASE_NOTE-JA.md} +163 -98
  8. data/{RELEASE_NOTE → RELEASE_NOTE.md} +165 -99
  9. data/bin/common/tdclc_32_2_4.dll +0 -0
  10. data/bin/common/tdclc_64_2_4.dll +0 -0
  11. data/build/common/get_boost_libs.cmake +2 -0
  12. data/build/common/system.cmake +6 -4
  13. data/build/common/transactd_cl_output.cmake +14 -2
  14. data/build/common/transactd_common.cmake +34 -12
  15. data/build/tdclc/CMakeLists.txt +10 -2
  16. data/build/tdclc/tdclc.rc +4 -4
  17. data/build/tdclcpp/CMakeLists.txt +34 -9
  18. data/build/tdclcpp/tdclcpp.rc +4 -4
  19. data/build/tdclrb/CMakeLists.txt +24 -15
  20. data/build/tdclrb/gem/Makefile.win32-VS +2 -2
  21. data/build/tdclrb/gem_output.cmake +27 -10
  22. data/build/tdclrb/tdclrb.rc +4 -4
  23. data/source/bzs/db/engine/mysql/database.cpp +18 -18
  24. data/source/bzs/db/engine/mysql/database.h +4 -4
  25. data/source/bzs/db/engine/mysql/dbManager.cpp +1 -2
  26. data/source/bzs/db/engine/mysql/mysqlInternal.h +23 -2
  27. data/source/bzs/db/engine/mysql/mysqlThd.cpp +3 -2
  28. data/source/bzs/db/protocol/tdap/client/activeTableImple.h +26 -12
  29. data/source/bzs/db/protocol/tdap/client/dbDef.cpp +3 -3
  30. data/source/bzs/db/protocol/tdap/client/field.cpp +74 -23
  31. data/source/bzs/db/protocol/tdap/client/field.h +3 -1
  32. data/source/bzs/db/protocol/tdap/client/filter.h +4 -4
  33. data/source/bzs/db/protocol/tdap/client/groupQuery.cpp +3 -1
  34. data/source/bzs/db/protocol/tdap/client/memRecord.cpp +16 -9
  35. data/source/bzs/db/protocol/tdap/client/memRecord.h +2 -2
  36. data/source/bzs/db/protocol/tdap/client/nsDatabase.cpp +1 -1
  37. data/source/bzs/db/protocol/tdap/client/recordsetImple.h +3 -2
  38. data/source/bzs/db/protocol/tdap/client/serializer.cpp +12 -0
  39. data/source/bzs/db/protocol/tdap/client/serializer.h +1 -0
  40. data/source/bzs/db/protocol/tdap/client/table.cpp +60 -109
  41. data/source/bzs/db/protocol/tdap/client/table.h +2 -1
  42. data/source/bzs/db/protocol/tdap/client/trdboostapi.h +13 -0
  43. data/source/bzs/db/protocol/tdap/client/trdboostapiInternal.h +1 -1
  44. data/source/bzs/db/protocol/tdap/client/trdormapi.h +8 -8
  45. data/source/bzs/db/protocol/tdap/fieldComp.h +6 -0
  46. data/source/bzs/db/protocol/tdap/mysql/recordsetReader.h +147 -46
  47. data/source/bzs/db/protocol/tdap/tdapSchema.cpp +78 -0
  48. data/source/bzs/db/protocol/tdap/tdapSchema.h +6 -1
  49. data/source/bzs/db/protocol/tdap/tdapcapi.h +3 -3
  50. data/source/bzs/db/transactd/transactd.cpp +1 -1
  51. data/source/bzs/env/compiler.h +12 -0
  52. data/source/bzs/env/tcharMinGW.h +1 -0
  53. data/source/bzs/netsvc/client/tcpClient.h +4 -2
  54. data/source/bzs/netsvc/server/serverCpt.cpp +1 -0
  55. data/source/bzs/netsvc/server/serverTpool.cpp +3 -0
  56. data/source/bzs/test/tdclphp/transactd_Test.php +2 -2
  57. data/source/bzs/test/tdclphp/transactd_pool_Test.php +6 -0
  58. data/source/bzs/test/trdclengn/test_trdclengn.cpp +2 -2
  59. data/source/global/ormsrcgen/srcgen.cpp +1 -2
  60. data/source/linux/tchar.h +1 -0
  61. metadata +4 -4
@@ -1,121 +1,165 @@
1
1
  Release note
2
+ ================================================================================
3
+ Version 2.4.2 2015/08/31
4
+ ================================================================================
5
+ New Features
6
+ --------------------------------------------------------------------------------
7
+ * Added a bit AND operator to queryBase and recordsetQuery.
8
+ In addition to the operators of the past, you can use the '&' and '!&'.
9
+ '&' operator performs the value and bit operation of the field. If the same as
10
+ the specified value matches.
11
+ '!&' operator performs the value and bit operation of the field. If the not
12
+ same as the specified value matches.
13
+
14
+ ex)flags & 8 and flags !& 16
15
+
16
+
17
+ Other Modifications
18
+ --------------------------------------------------------------------------------
19
+ * Changed method
20
+ field::addAllFileds(tabledef* def) : Chnaged from protected to public.
21
+
22
+ * Added method parameters
23
+ writableRecord::del and writableRecord::update,added option of "bool noSeek=false".
24
+ If true the noSeek, current record as an established, omit the read operation
25
+ in the delete or update operation.
26
+
27
+ * Added method
28
+ void queryStatements::move(int from, int to)
29
+
30
+ * It was fixed a bug that connection timeout does not work as configured on
31
+ windows.
32
+
33
+ * If there is no record to Join in HasManyJoin, Fixed a bug that may not be
34
+ processed correctly.
35
+
36
+ * In the Join, When the binding key is a string, Fixed a problem that may not
37
+ be able to properly search.
38
+
39
+
2
40
 
3
41
  ================================================================================
4
42
  Version 2.4.0 2015/06/03
5
43
  ================================================================================
6
44
  Upgrade Notes
7
45
  --------------------------------------------------------------------------------
8
- * Compatibility between server plugin and clients.
46
+ * Compatibility between server plugin and clients
47
+
9
48
  Upgrade from the Version 2.3 is easy.
10
- Server plug-ins, clients, it is both compatible with 2.4.
11
- (However, except the new features of the 2.4)
12
-
13
- Upgrade from a previous version than Version 2.3, please check the previous
14
- release notes.
49
+ Server plugins and clients are compatible with 2.4.
50
+ (However, except the new features from version 2.4)
51
+
52
+ Upgrade from the older versions than 2.3, please check the previous
53
+ release notes.
15
54
 
16
55
  New Features
17
56
  --------------------------------------------------------------------------------
18
57
  * Transactd studio
58
+
19
59
  The following information API has been added to the Transactd.
20
- Connection in use
21
- Database in use
22
- Table in use
23
-
24
- In the table information, it will be examined following number of records from
25
- the open table.
26
- read,update,insert,delete
27
-
28
- * ActiveTable, It was now possible to obtain a recordset from bookmarks.
29
- You can set multiple bookmark using the queryBase::addSeekBookmark method.
60
+ * Connection in use
61
+ * Database in use
62
+ * Table in use
30
63
 
31
- After you set the query to the table object, and at the same time and count the
32
- number of records that match the conditions when you call the table::recordCount()
33
- , you can get them of bookmark by the table::bookmarks().
64
+ Table information shows the number of records which were read, updated,
65
+ inserted, deleted since the table has been opened.
34
66
 
35
- * The following methods in C ++ API, it has to allow simultaneous access from
36
- multiple threads.
37
- table::insertBookmarks
38
- table::moveBookmarks
39
- table::bookmarksCount
40
- table::bookmarks
67
+ * ActiveTable can obtain a recordset from bookmarks.
68
+
69
+ You can set multiple bookmark using queryBase::addSeekBookmark.
70
+
71
+ If you call table::recordCount() after setting query object to table object,
72
+ you will get the number of records which match the conditions, and you also
73
+ get bookmarks of them at the same time. You can access the bookmarks with
74
+ table::bookmarks().
75
+
76
+ * The following methods in C ++ API were modified to allow simultaneous access
77
+ from multiple threads.
78
+ * table::insertBookmarks
79
+ * table::moveBookmarks
80
+ * table::bookmarksCount
81
+ * table::bookmarks
41
82
 
42
83
  Other Modifications
43
84
  --------------------------------------------------------------------------------
44
- * Fixed, In null key access P.SQL compatible, that may be whether the judgment
45
- mistake or null key.
85
+ * Fix a bug that null key detection is sometimes wrong in P.SQL compatible
86
+ null key access.
46
87
 
47
- * Fixed, Sometimes automatic schema generation does not work.
88
+ * Fix a bug that automatic schema generation sometimes does not work well.
48
89
 
49
- * Improved, lock control to get the server statistics. Improve the simultaneous
50
- effectiveness at the time of monitoring.
90
+ * Improved lock control to get the server statistics. Improve the simultaneous
91
+ effectiveness at monitoring.
51
92
 
52
- * Added, the nsdatabase::isReconnected() method.
53
-   It indicates whether went to reconnect to the server.
93
+ * nsdatabase::isReconnected() method was added.
94
+ It indicates whether reconnected to the server.
54
95
 
55
- * Supported, The reconnect in the case of using multiple databases in a single
96
+ * Support reconnection in the case of using multiple databases in single
56
97
  connection.
57
98
 
58
- * Fixed, If there is a null key to when the table is created, may cause by adding
59
- unnecessary internal null field.
60
-
61
- * Fixed, invalid pointer operations when it receives an invalid prepared query
62
- handle.
63
-
64
- * Fixed, May not be able to coexist with the lock by the SQL access.
65
-
66
- * Adding Methods
67
- short dbdef::validateTableDef(short TableIndex)
68
- ushort_td nstable::bookmarkLen() const
69
- bookmark_td tabale::bookmarks(unsigned int index) const
70
- recordCountFn Call back function
71
- table::setOnRecordCount
72
- table::onRecordCount
73
- bool queryBase::isSeekByBookmarks() const
74
- void queryBase::addSeekBookmark(bookmark_td& bm, ushort_td len, bool reset=false)
75
- bool writableRecord::read(bookmark_td& bm)
76
-
77
- * Changing the method name
78
- table::setBookMarks --> table::insertBookmarks
79
- table::moveBookmarksId --> table::moveBookmarks
80
- table::bookMarksCount --> table::bookmarksCount
81
-
82
- * Adding of method parameters
83
- void database::close(bool withDropDefaultSchema = false)
84
- activeTable::activeTable(database* db, short tableIndex,
99
+ * Fix a bug that useless internal null fields will be added when create table
100
+ if there is a null key.
101
+
102
+ * Fix invalid pointer operations that occurs when an invalid prepared query
103
+ handle are received.
104
+
105
+ * Fix a bug that can not coexist with the lock by SQL access sometimes.
106
+
107
+ * Added methods
108
+ * short dbdef::validateTableDef(short TableIndex)
109
+ * ushort_td nstable::bookmarkLen() const
110
+ * bookmark_td tabale::bookmarks(unsigned int index) const
111
+ * recordCountFn Call back function
112
+ * table::setOnRecordCount
113
+ * table::onRecordCount
114
+ * bool queryBase::isSeekByBookmarks() const
115
+ * void queryBase::addSeekBookmark(bookmark_td& bm, ushort_td len, bool reset=false)
116
+ * bool writableRecord::read(bookmark_td& bm)
117
+
118
+ * Changed method names
119
+ * table::setBookMarks --> table::insertBookmarks
120
+ * table::moveBookmarksId --> table::moveBookmarks
121
+ * table::bookMarksCount --> table::bookmarksCount
122
+
123
+ * Added method parameters
124
+ * void database::close(bool withDropDefaultSchema = false)
125
+ * activeTable::activeTable(database* db, short tableIndex,
85
126
  short mode = TD_OPEN_NORMAL)
86
- static activeTable* create(database* db, short tableIndex,
127
+ * static activeTable* create(database* db, short tableIndex,
87
128
  short mode = TD_OPEN_NORMAL);
88
129
 
89
- * Change of bookmark_td type from unsigned int.
90
- struct BOOKMARK
91
- {
92
- uchar_td val[MAX_BOOKMARK_SIZE];
93
- bool empty;
94
- BOOKMARK():empty(true){ }
95
- bool isEmpty(){ return empty; }
96
- void set(uchar_td* p, int len)
97
- {
98
- memcpy(val, p, len);
99
- empty = false;
100
- }
101
- };
102
-
103
- * A function that takes a bookmark_td type argument, it was changed to refer
104
- to the bookmark_td type.
105
-
106
- * The argument of openTable of C++ convenience API it was all arguments
107
- correspondence.
108
-
109
- * We added the following function in a C++ convenience API.
110
- void deleteTable(dbdef* def, short id)
111
- void renumberTable(dbdef* def, short id, short newid)
112
- void deleteField(dbdef* def, short tableid, short fieldNum)
113
- void deleteKey(dbdef* def, short tableid, short keynum)
114
- void validateTableDef(dbdef* def, short tableid)
115
-
116
- * Trasnactd Client with SDK for Windows, binary for Embarcadero C ++ Builder is
117
- no longer included. If you want to use in the Embarcadero C ++ Builder,
118
- it is still available at that to build from source.
130
+ * Change bookmark type from unsigned int to bookmark_td.
131
+ ```
132
+ struct BOOKMARK
133
+ {
134
+ uchar_td val[MAX_BOOKMARK_SIZE];
135
+ bool empty;
136
+ BOOKMARK():empty(true){ }
137
+ bool isEmpty(){ return empty; }
138
+ void set(uchar_td* p, int len)
139
+ {
140
+ memcpy(val, p, len);
141
+ empty = false;
142
+ }
143
+ };
144
+ ```
145
+
146
+ * Changed the type of function arguments to reference of bookmark_td from
147
+ bookmark_td.
148
+
149
+ * openTable method in C++ convenience API supports all arguments of
150
+ original openTable method.
151
+
152
+ * The following functions are added to C++ convenience API.
153
+ * void deleteTable(dbdef* def, short id)
154
+ * void renumberTable(dbdef* def, short id, short newid)
155
+ * void deleteField(dbdef* def, short tableid, short fieldNum)
156
+ * void deleteKey(dbdef* def, short tableid, short keynum)
157
+ * void validateTableDef(dbdef* def, short tableid)
158
+
159
+ * The binaries which compiled with Embarcadero C++ Builder are no longer
160
+ included in Transactd Client with SDK for Windows. If you want to use them,
161
+ they are still available by building from source code.
162
+
119
163
  http://www.bizstation.jp/ja/transactd/documents/BUILD_WIN.html
120
164
 
121
165
 
@@ -126,38 +170,48 @@ Version 2.3.0 2015-03-20
126
170
 
127
171
  Upgrade Notes
128
172
  --------------------------------------------------------------------------------
129
- * Compatibility between server plugin and clients.
173
+ * Compatibility between server plugin and clients
174
+
130
175
  You have to upgrade both of the server plugin and client libraries.
176
+
131
177
  The protocol that is used communicating between server and client were changed
132
178
  for database::reconnect() method. This version of server plugin and clients
133
- has no compatibility with the past versions of them.
134
- If you access to 2.2 or earlier version of server plugin with this version of
179
+ have no compatibility with the past versions of them.
180
+
181
+ If you access to 2.2 or older version of server plugin with this version of
135
182
  clients, error code SERVER_CLIENT_NOT_COMPATIBLE (3003) will be returned.
136
183
 
137
184
  * Some methods were moved.
185
+
138
186
  table::usePadChar() and table:: trimPadChar() were moved to fielddef structure.
187
+
139
188
  The setter methods of them were put together to setPadCharSettings(bool set,
140
189
  bool trim). By this change, these values can be saved to the schema.
190
+
141
191
  This affects to the field types ft_string, ft_wstring, ft_mychar and ft_mywchar.
142
192
  Other field types are not affected.
193
+
143
194
  The default value of table::usePadChar() and trimPadChar() are true. If you did
144
195
  not change this value, there is no changes on program behavior.
145
196
  If you changed the values, you have to fix program code.
146
197
 
147
198
  For example, the code `tb->setUsePadChar(false);` has to be modified like this:
148
- ```
199
+ ```
149
200
  for (int i = 0 ; i < tb->tableDef()->fieldCount ; ++i)
150
201
  {
151
202
  fielddef* fd = const_cast<fielddef*>(&tb->tableDef()->fieldDefs[i]);
152
203
  fd->setPadCharSettings(false/*set*/, true/*trim*/);
153
204
  }
154
- ```
205
+ ```
206
+
155
207
  Note: Changes in this code are volatile, and not saved on schema. Add updating
156
208
  schema code if you need.
157
209
 
158
- * openTable in transaction.
210
+ * openTable in transaction
211
+
159
212
  The error code STATUS_ALREADY_INTRANSACTION is added. If openTable is called
160
213
  in transaction, and binary log is enable, the server returns this error.
214
+
161
215
  The binary log was supported until now, but there was the problem that if
162
216
  openTable is called in transaction the binlog map will not be generated and
163
217
  replication does not go well. So that, we modified the server plugin to return
@@ -168,17 +222,21 @@ New Features
168
222
  --------------------------------------------------------------------------------
169
223
  * Add bias parameter ROW_LOCK_S to seek and step read operations in
170
224
  MULTILOCK_READ_COMMITED transaction.
225
+
171
226
  By this, you can control lock in more detail with using shared lock.
172
227
 
173
228
  * Add limit option to finish searching to table query with queryBase.
229
+
174
230
  In the past, the value of limit option meant that max number of records which
175
231
  will be got with one operation. The clients automatically called read operation
176
232
  many times until the other finish conditions are met. In effect, limit was the
177
233
  option that save receive buffer.
234
+
178
235
  If you set true to queryBase::stopAtLimit(), the limit option behaves as finish
179
236
  condition. The default value is false, and it is same as the past behavior.
180
237
 
181
238
  * Add findContinue to enum eFindType for table::find(eFindType type).
239
+
182
240
  If the last find operation has been finished because of the filter conditions
183
241
  maxRecord or rejectCount, it is able to continue searching from next record
184
242
  with findContinue.
@@ -189,15 +247,19 @@ New Features
189
247
 
190
248
  * Add first and last method to recordset grouping functions. These methods
191
249
  return first or last record in each group. Strings and numbers are supported.
250
+
192
251
  These methods are useful when use non-normalized field values to avoid JOIN
193
252
  for some reason.
194
253
 
195
254
  * Add case-insensitive comparison operator to filter and query.
255
+
196
256
  To compare strings without case sensitivity, add "i" after the normal
197
257
  comparison operators.
198
258
 
199
- * Case-sensitive: =, >, < , >=, <=, <>
200
- * Case-insensitive: =i, >i, <i, >=i, <=i, <>i
259
+ ```
260
+ Case-sensitive: =, >, < , >=, <=, <>
261
+ Case-insensitive: =i, >i, <i, >=i, <=i, <>i
262
+ ```
201
263
 
202
264
  When the comparison field is same as the index field which is using, setting
203
265
  case sensitivity same as field definition makes performance better. If case
@@ -207,9 +269,11 @@ New Features
207
269
  * Add database::reconnect() which is used to reconnect to database. You can
208
270
  reconnect to database with this method even if server process has been
209
271
  restarted unexpectedly.
272
+
210
273
  The reconnection contains reopening tables, recovering cursor positions and
211
274
  record locks. Transactions which have not been commited yet will not be
212
275
  recovered. You have to run it again.
276
+
213
277
  There is no way to change the reconnect address at present, but tdclc will
214
278
  support it in the future.
215
279
 
@@ -220,8 +284,10 @@ New Features
220
284
  * Add connectTimeout and netTimeout to client setting file (transactd.ini or
221
285
  transactd.cnf). The default values are following:
222
286
 
287
+ ```
223
288
  connectTimeout = 20
224
289
  netTimeout = 180
290
+ ```
225
291
 
226
292
  connectTimeout means timeout seconds for connection. netTimeout means timeout
227
293
  seconds for waiting response from server in a operation.
Binary file
Binary file
@@ -31,6 +31,7 @@
31
31
  function(get_boost_libs libs)
32
32
  # Get pathes STATIC_RUNTIME_ON (for /MT and /MTd)
33
33
  set(Boost_USE_STATIC_RUNTIME ON)
34
+ set(Boost_USE_STATIC_LIBS ON)
34
35
  find_package(Boost COMPONENTS ${libs})
35
36
  if(NOT Boost_FOUND)
36
37
  message(SEND_ERROR "Boost not found. ${libs}")
@@ -39,6 +40,7 @@ function(get_boost_libs libs)
39
40
  set(Boost_LIBRARIES "")
40
41
  # Get pathes STATIC_RUNTIME_OFF (for /MD and /MDd)
41
42
  set(Boost_USE_STATIC_RUNTIME OFF)
43
+ set(Boost_USE_STATIC_LIBS ON)
42
44
  find_package(Boost COMPONENTS ${libs})
43
45
  if(NOT Boost_FOUND)
44
46
  message(SEND_ERROR "Boost not found. ${libs}")
@@ -51,17 +51,19 @@ macro(bz_get_compiler)
51
51
  set(BZ_COMPILER "")
52
52
  if(WIN32)
53
53
  if(MSVC60)
54
- set(BZ_COMPILER "_vc060")
54
+ set(BZ_COMPILER "_vc60")
55
55
  elseif(MSVC70)
56
- set(BZ_COMPILER "_vc070")
56
+ set(BZ_COMPILER "_vc70")
57
57
  elseif(MSVC80)
58
- set(BZ_COMPILER "_vc080")
58
+ set(BZ_COMPILER "_vc80")
59
59
  elseif(MSVC90)
60
- set(BZ_COMPILER "_vc090")
60
+ set(BZ_COMPILER "_vc90")
61
61
  elseif(MSVC10)
62
62
  set(BZ_COMPILER "_vc100")
63
63
  elseif(MSVC11)
64
64
  set(BZ_COMPILER "_vc110")
65
+ elseif(MSVC12)
66
+ set(BZ_COMPILER "_vc120")
65
67
  elseif(MINGW)
66
68
  string(REPLACE "." ";" tmp_list ${CMAKE_CXX_COMPILER_VERSION})
67
69
  list (GET tmp_list 0 MINGW_MAJOR)
@@ -115,18 +115,30 @@ endif()
115
115
  # ==========================================================
116
116
  if(NOT COMMAND transactd_make_msvc_install_file)
117
117
  macro(transactd_make_msvc_install_file TRANSACTD_BINARY_ROOT)
118
+ cmake_policy(PUSH)
119
+ if(POLICY CMP0026)
120
+ cmake_policy(SET CMP0026 OLD)
121
+ endif()
118
122
  get_target_property(${this_target}_BINARY_BASENAME "${this_target}" LOCATION)
123
+ cmake_policy(POP)
119
124
  get_filename_component(${this_target}_BINARY_BASENAME "${${this_target}_BINARY_BASENAME}" NAME_WE)
120
125
  foreach(build_type "RELEASE" "DEBUG" "RELWITHDEBINFO" "MINSIZEREL")
126
+ get_target_property(BINARY_NAME "${this_target}" OUTPUT_NAME_${build_type})
127
+ if (${BINARY_NAME} STREQUAL "BINARY_NAME-NOTFOUND")
128
+ get_target_property(BINARY_NAME "${this_target}" OUTPUT_NAME)
129
+ endif()
130
+ if (${BINARY_NAME} STREQUAL "BINARY_NAME-NOTFOUND")
131
+ set(BINARY_NAME ${this_target}_BINARY_BASENAME)
132
+ endif()
121
133
  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/msvc_install_${build_type}.cmake
122
134
  "
123
135
  foreach(dirname bin lib)
124
- file(GLOB dellist \"${TRANSACTD_BINARY_ROOT}/\${dirname}/${${this_target}_BINARY_BASENAME}*\")
136
+ file(GLOB dellist \"${TRANSACTD_BINARY_ROOT}/\${dirname}/${BINARY_NAME}*\")
125
137
  if(NOT \"\${dellist}\" STREQUAL \"\")
126
138
  file(REMOVE \${dellist})
127
139
  endif()
128
140
  file(GLOB copylist
129
- \"${TRANSACTD_BINARY_ROOT}/\${dirname}/${build_type}/${${this_target}_BINARY_BASENAME}*\")
141
+ \"${TRANSACTD_BINARY_ROOT}/\${dirname}/${build_type}/${BINARY_NAME}*\")
130
142
  file(COPY \${copylist} DESTINATION \"${TRANSACTD_BINARY_ROOT}/\${dirname}/\")
131
143
  endforeach()
132
144
  ")
@@ -239,6 +239,22 @@ endmacro()
239
239
  endif()
240
240
 
241
241
 
242
+ # ==========================================================
243
+ # transactd_has_MD_option
244
+ # ==========================================================
245
+ if(NOT COMMAND transactd_has_MD_option)
246
+ macro(transactd_has_MD_option option_string)
247
+ set(IS_MD OFF)
248
+ if(MSVC)
249
+ if( ("${option_string}" MATCHES "(.* )?/MD( .*)?$") OR
250
+ ("${option_string}" MATCHES "(.* )?/MDd( .*)?$") )
251
+ set(IS_MD ON)
252
+ endif()
253
+ endif()
254
+ endmacro()
255
+ endif()
256
+
257
+
242
258
  # ==========================================================
243
259
  # transactd_link_boost_libraries MACRO
244
260
  # boost_components : "system;chrono;thread;filesystem"
@@ -247,6 +263,9 @@ if(NOT COMMAND transactd_link_boost_libraries)
247
263
  macro(transactd_link_boost_libraries boost_components)
248
264
  set(Boost_USE_MULTITHREADED ON)
249
265
  set(Boost_USE_STATIC_LIBS ON)
266
+ if("${BOOST_ROOT}" STREQUAL "")
267
+ set(BOOST_ROOT "${WITH_BOOST}")
268
+ endif()
250
269
  if("${BOOST_ROOT}" STREQUAL "")
251
270
  if(WIN32)
252
271
  bz_get_compiler_bitness()
@@ -294,24 +313,27 @@ macro(transactd_link_boost_libraries boost_components)
294
313
  endif()
295
314
  set(boost_libs_listlen 0)
296
315
  # buildtype-specified libraries
297
- foreach(BT_NAME "" ${CMAKE_CONFIGURATION_TYPES})
316
+ foreach(BUILD_TYPE DEBUG RELEASE RELWITHDEBINFO MINSIZEREL)
317
+ set(BT_NAME "${BUILD_TYPE}")
298
318
  if(NOT("${BT_NAME}" STREQUAL ""))
299
319
  set(BT_NAME "_${BT_NAME}")
300
320
  string(TOUPPER "${BT_NAME}" BT_NAME)
301
321
  endif()
302
- transactd_has_MTMD_option("${CMAKE_CXX_FLAGS${BT_NAME}}")
303
- if("${transactd_has_MTMD_option_return}" STREQUAL "ON")
304
- # find buildtype-specified boost libraries
305
- get_boost_libs_from_compiler_flags("${CMAKE_CXX_FLAGS${BT_NAME}}")
306
- set(boost_libs_for${BT_NAME} "${get_boost_libs_from_compiler_flags_return}")
322
+
323
+ transactd_has_MD_option("${CMAKE_CXX_FLAGS_${BUILD_TYPE}}")
324
+ message(STATUS "CMAKE_CXX_FLAGS_${BUILD_TYPE} = ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} IS_MD=${IS_MD}")
325
+ if ("${IS_MD}" STREQUAL "ON")
326
+ if("${BUILD_TYPE}" STREQUAL "DEBUG")
327
+ set(boost_libs_for${BT_NAME} "${Boost_LIBRARIES_STATIC_USE_RUNTIME_DEBUG}")
328
+ else()
329
+ set(boost_libs_for${BT_NAME} "${Boost_LIBRARIES_STATIC_USE_RUNTIME_NO_DEBUG}")
330
+ endif()
331
+ elseif("${BUILD_TYPE}" STREQUAL "DEBUG")
332
+ set(boost_libs_for${BT_NAME} "${Boost_LIBRARIES_STATIC_NOTUSE_RUNTIME_DEBUG}")
307
333
  else()
308
- # use project-specified libaries if buildtype-specified option is not set
309
- if("${boost_libs_for_${this_target}}" STREQUAL "")
310
- set(boost_libs_for${BT_NAME} "${Boost_LIBRARIES_STATIC_NOTUSE_RUNTIME_NO_DEBUG}")
311
- else()
312
- set(boost_libs_for${BT_NAME} "${boost_libs_for_${this_target}}")
313
- endif()
334
+ set(boost_libs_for${BT_NAME} "${Boost_LIBRARIES_STATIC_NOTUSE_RUNTIME_NO_DEBUG}")
314
335
  endif()
336
+
315
337
  # check number of boost libaries
316
338
  string(REGEX REPLACE ";$" "" boost_libs_for${BT_NAME} "${boost_libs_for${BT_NAME}}")
317
339
  list(LENGTH boost_libs_for${BT_NAME} boost_libs_listlen${BT_NAME})
@@ -103,6 +103,12 @@ endif()
103
103
  # Add compile options
104
104
  # ==========================================================
105
105
  transactd_set_MTMD("MT")
106
+ if(NOT MSVC)
107
+ bz_add_cxx_flag("-Wno-unknown-pragmas -Wno-ignored-qualifiers" "_RELEASE")
108
+ bz_add_cxx_flag("-Wno-unknown-pragmas -Wno-ignored-qualifiers" "_DEBUG")
109
+ bz_add_cxx_flag("-Wno-unknown-pragmas -Wno-ignored-qualifiers" "_RELWITHDEBINFO")
110
+ bz_add_cxx_flag("-Wno-unknown-pragmas -Wno-ignored-qualifiers" "_MINSIZEREL")
111
+ endif()
106
112
 
107
113
 
108
114
  # ==========================================================
@@ -131,9 +137,11 @@ if(CAN_LINK_ICONV)
131
137
  target_link_libraries(${this_target} "${ICONV_LIBRARY}")
132
138
  endif()
133
139
  if(NOT MSVC)
134
- target_link_libraries(${this_target} pthread)
140
+ target_link_libraries(${this_target} pthread)
135
141
  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
136
- ## target_link_libraries(${this_target} "${TRANSACTD_ROOT}/build/tdclc/libtdclcm.map")
142
+ ## target_link_libraries(${this_target} "${TRANSACTD_ROOT}/build/tdclc/libtdclcm.map")
143
+ elseif(APPLE)
144
+ target_link_libraries(${this_target} -Wl,-map,"${TRANSACTD_ROOT}/build/tdclc/libtdclcm.map")
137
145
  else()
138
146
  target_link_libraries(${this_target} -Wl,--version-script,"${TRANSACTD_ROOT}/build/tdclc/libtdclcm.map")
139
147
  endif()
data/build/tdclc/tdclc.rc CHANGED
@@ -29,8 +29,8 @@
29
29
  //
30
30
 
31
31
  VS_VERSION_INFO VERSIONINFO
32
- FILEVERSION 2,4,0,66
33
- PRODUCTVERSION 2,4,0,66
32
+ FILEVERSION 2,4,2,91
33
+ PRODUCTVERSION 2,4,2,91
34
34
  FILEFLAGSMASK 0x3fL
35
35
  #ifdef _DEBUG
36
36
  FILEFLAGS 0x1L
@@ -47,9 +47,9 @@ BEGIN
47
47
  BEGIN
48
48
  VALUE "CompanyName", "BizStation Corp."
49
49
  VALUE "FileDescription", "Transactd C client"
50
- VALUE "FileVersion", "2.4.0.66"
50
+ VALUE "FileVersion", "2.4.2.91"
51
51
  VALUE "LegalCopyright", "Copyright(C) 2014 BizStation Corp"
52
- VALUE "ProductVersion", "2.4.0.66"
52
+ VALUE "ProductVersion", "2.4.2.91"
53
53
  VALUE "ProductName", "Transactd Client (GPL V2)"
54
54
  END
55
55
  END
@@ -92,17 +92,38 @@ endif()
92
92
  # ==========================================================
93
93
  add_library(${this_target} SHARED ${${this_target}_SOURCE_FILES})
94
94
 
95
+ # ==========================================================
96
+ # add dependencie projects
97
+ # ==========================================================
98
+ add_dependencies(${this_target} tdclc)
99
+
95
100
 
96
101
  # ==========================================================
97
102
  # Add compile options
98
103
  # ==========================================================
99
- if(TDCL_CPP_USE_RUNTIME_LIBS)
100
- transactd_set_MTMD("MD")
104
+ transactd_reset_MTMD()
105
+ if (MSVC)
106
+ if((TRANSACTD_RUBY_GEM) OR (TRANSACTD_PHP))
107
+ bz_add_cxx_flag("/MD" "_RELEASE")
108
+ bz_add_cxx_flag("/MDd" "_DEBUG")
109
+ bz_add_cxx_flag("/MD" "_RELWITHDEBINFO")
110
+ bz_add_cxx_flag("/MD" "_MINSIZEREL")
111
+ else()
112
+ bz_add_cxx_flag("/MT" "_RELEASE")
113
+ bz_add_cxx_flag("/MTd" "_DEBUG")
114
+ bz_add_cxx_flag("/MT" "_RELWITHDEBINFO")
115
+ bz_add_cxx_flag("/MD" "_MINSIZEREL")
116
+ endif()
117
+ foreach(build_type "" "_RELEASE" "_DEBUG" "_RELWITHDEBINFO" "_MINSIZEREL")
118
+ bz_add_cxx_flag("/wd4996" "${build_type}")
119
+ endforeach()
101
120
  else()
102
- transactd_set_MTMD("MT")
121
+ bz_add_cxx_flag("-Wno-unknown-pragmas -Wno-ignored-qualifiers" "_RELEASE")
122
+ bz_add_cxx_flag("-Wno-unknown-pragmas -Wno-ignored-qualifiers" "_DEBUG")
123
+ bz_add_cxx_flag("-Wno-unknown-pragmas -Wno-ignored-qualifiers" "_RELWITHDEBINFO")
124
+ bz_add_cxx_flag("-Wno-unknown-pragmas -Wno-ignored-qualifiers" "_MINSIZEREL")
103
125
  endif()
104
126
 
105
-
106
127
  # ==========================================================
107
128
  # Add compile definitions
108
129
  # ==========================================================
@@ -154,12 +175,16 @@ if(WIN32)
154
175
  ## Windows tdclcpp[_Compiler]_[32|64][m|u|mr]_[MAJOR]_[MINOR].dll
155
176
  bz_get_compiler()
156
177
  set(TDCL_CPP_NAME_TMP "tdclcpp${BZ_COMPILER}_${BZ_BITNESS}${TDCL_CPP_CHARSET}")
157
- if(TDCL_CPP_USE_RUNTIME_LIBS)
158
- set(TDCL_CPP_NAME_TMP "${TDCL_CPP_NAME_TMP}r")
159
- endif()
178
+
179
+ foreach(BUILD_TYPE DEBUG RELEASE RELWITHDEBINFO MINSIZEREL)
180
+ transactd_has_MD_option("${CMAKE_CXX_FLAGS_${BUILD_TYPE}}")
181
+ if("${IS_MD}" STREQUAL "ON")
182
+ set_target_properties(${this_target} PROPERTIES OUTPUT_NAME_${BUILD_TYPE} "${TDCL_CPP_NAME_TMP}r_${TD_RC_VER_MAJOR}_${TD_RC_VER_MINOR}")
183
+ else()
184
+ set_target_properties(${this_target} PROPERTIES OUTPUT_NAME_${BUILD_TYPE} "${TDCL_CPP_NAME_TMP}_${TD_RC_VER_MAJOR}_${TD_RC_VER_MINOR}")
185
+ endif()
186
+ endforeach()
160
187
  set_target_properties(${this_target} PROPERTIES PREFIX "")
161
- set_target_properties(${this_target} PROPERTIES OUTPUT_NAME
162
- "${TDCL_CPP_NAME_TMP}_${TD_RC_VER_MAJOR}_${TD_RC_VER_MINOR}")
163
188
  set_target_properties(${this_target} PROPERTIES SUFFIX ".dll")
164
189
  else()
165
190
  ## Linux libtdclcpp_[32|64][m|u].so.[MAJOR].[MINOR].[RELEASE]