@digitalshieldfe/react-native-backup-card-sdk 0.1.4 → 0.1.5

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. package/android/build.gradle +6 -49
  2. package/android/libs/backupcardsdk.aar +0 -0
  3. package/android/src/main/AndroidManifest.xml +1 -4
  4. package/package.json +6 -4
  5. package/android/consumer-rules.pro +0 -0
  6. package/android/proguard-rules.pro +0 -21
  7. package/android/src/main/java/com/ziancube/backupcardsdk/BackupCardSdk.kt +0 -478
  8. package/android/src/main/java/com/ziancube/backupcardsdk/GPChannelNatives.java +0 -41
  9. package/android/src/main/java/com/ziancube/backupcardsdk/listener/ApiAsyncListener.java +0 -13
  10. package/android/src/main/java/com/ziancube/backupcardsdk/nfc/ApiNfc.java +0 -173
  11. package/android/src/main/java/com/ziancube/backupcardsdk/nfc/ImplNfc.java +0 -39
  12. package/android/src/main/java/com/ziancube/backupcardsdk/nfc/NfcComm.java +0 -115
  13. package/android/src/main/java/com/ziancube/backupcardsdk/utils/ApduParam.java +0 -67
  14. package/android/src/main/java/com/ziancube/backupcardsdk/utils/CommList.java +0 -41
  15. package/android/src/main/java/com/ziancube/backupcardsdk/utils/Utils.java +0 -109
  16. package/android/src/main/jni/CMakeLists.txt +0 -60
  17. package/android/src/main/jni/GPChannel/include/GPChannelSDK.h +0 -306
  18. package/android/src/main/jni/GPChannel/include/context/BaseContext.h +0 -56
  19. package/android/src/main/jni/GPChannel/include/device/ApduBuilder.hpp +0 -72
  20. package/android/src/main/jni/GPChannel/include/utility/Apdu.hpp +0 -166
  21. package/android/src/main/jni/GPChannel/include/utility/Debug.hpp +0 -59
  22. package/android/src/main/jni/GPChannel/include/utility/Singleton.h +0 -34
  23. package/android/src/main/jni/GPChannel/include/utility/mutex.h +0 -24
  24. package/android/src/main/jni/GPChannel/include/utility/trim.hpp +0 -155
  25. package/android/src/main/jni/GPChannel/include/utility/util.h +0 -104
  26. package/android/src/main/jni/GPChannel/include/utility/xFactory.hpp +0 -26
  27. package/android/src/main/jni/GPChannel/include/utility/xManager.hpp +0 -84
  28. package/android/src/main/jni/GPChannel/src/arm64-v8a/libJUB_GPC_APDU_SDK.a +0 -0
  29. package/android/src/main/jni/GPChannel/src/arm64-v8a/libTrezorCrypto.a +0 -0
  30. package/android/src/main/jni/GPChannel/src/armeabi-v7a/libJUB_GPC_APDU_SDK.a +0 -0
  31. package/android/src/main/jni/GPChannel/src/armeabi-v7a/libTrezorCrypto.a +0 -0
  32. package/android/src/main/jni/GPChannel/src/x86/libJUB_GPC_APDU_SDK.a +0 -0
  33. package/android/src/main/jni/GPChannel/src/x86/libTrezorCrypto.a +0 -0
  34. package/android/src/main/jni/src/implJni.cpp +0 -313
  35. package/android/src/main/jni/src/implJni.h +0 -9
  36. package/android/src/main/jni/utils/jsoncpp/AUTHORS +0 -111
  37. package/android/src/main/jni/utils/jsoncpp/CMakeLists.txt +0 -159
  38. package/android/src/main/jni/utils/jsoncpp/LICENSE +0 -55
  39. package/android/src/main/jni/utils/jsoncpp/README.md +0 -135
  40. package/android/src/main/jni/utils/jsoncpp/amalgamate.py +0 -155
  41. package/android/src/main/jni/utils/jsoncpp/appveyor.yml +0 -22
  42. package/android/src/main/jni/utils/jsoncpp/dev.makefile +0 -35
  43. package/android/src/main/jni/utils/jsoncpp/devtools/__init__.py +0 -6
  44. package/android/src/main/jni/utils/jsoncpp/devtools/agent_vmw7.json +0 -33
  45. package/android/src/main/jni/utils/jsoncpp/devtools/agent_vmxp.json +0 -26
  46. package/android/src/main/jni/utils/jsoncpp/devtools/antglob.py +0 -205
  47. package/android/src/main/jni/utils/jsoncpp/devtools/batchbuild.py +0 -278
  48. package/android/src/main/jni/utils/jsoncpp/devtools/fixeol.py +0 -70
  49. package/android/src/main/jni/utils/jsoncpp/devtools/licenseupdater.py +0 -94
  50. package/android/src/main/jni/utils/jsoncpp/devtools/tarball.py +0 -52
  51. package/android/src/main/jni/utils/jsoncpp/doxybuild.py +0 -189
  52. package/android/src/main/jni/utils/jsoncpp/include/CMakeLists.txt +0 -2
  53. package/android/src/main/jni/utils/jsoncpp/include/json/allocator.h +0 -98
  54. package/android/src/main/jni/utils/jsoncpp/include/json/assertions.h +0 -54
  55. package/android/src/main/jni/utils/jsoncpp/include/json/autolink.h +0 -25
  56. package/android/src/main/jni/utils/jsoncpp/include/json/config.h +0 -187
  57. package/android/src/main/jni/utils/jsoncpp/include/json/features.h +0 -61
  58. package/android/src/main/jni/utils/jsoncpp/include/json/forwards.h +0 -37
  59. package/android/src/main/jni/utils/jsoncpp/include/json/json.h +0 -15
  60. package/android/src/main/jni/utils/jsoncpp/include/json/reader.h +0 -411
  61. package/android/src/main/jni/utils/jsoncpp/include/json/value.h +0 -888
  62. package/android/src/main/jni/utils/jsoncpp/include/json/version.h +0 -20
  63. package/android/src/main/jni/utils/jsoncpp/include/json/writer.h +0 -357
  64. package/android/src/main/jni/utils/jsoncpp/makefiles/vs71/jsontest.vcproj +0 -119
  65. package/android/src/main/jni/utils/jsoncpp/makefiles/vs71/lib_json.vcproj +0 -205
  66. package/android/src/main/jni/utils/jsoncpp/makefiles/vs71/test_lib_json.vcproj +0 -130
  67. package/android/src/main/jni/utils/jsoncpp/makerelease.py +0 -390
  68. package/android/src/main/jni/utils/jsoncpp/meson.build +0 -103
  69. package/android/src/main/jni/utils/jsoncpp/pkg-config/jsoncpp.pc.in +0 -9
  70. package/android/src/main/jni/utils/jsoncpp/src/CMakeLists.txt +0 -5
  71. package/android/src/main/jni/utils/jsoncpp/src/jsontestrunner/CMakeLists.txt +0 -25
  72. package/android/src/main/jni/utils/jsoncpp/src/jsontestrunner/main.cpp +0 -333
  73. package/android/src/main/jni/utils/jsoncpp/src/lib_json/CMakeLists.txt +0 -117
  74. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_reader.cpp +0 -2060
  75. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_tool.h +0 -114
  76. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_value.cpp +0 -1661
  77. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_valueiterator.inl +0 -167
  78. package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_writer.cpp +0 -1233
  79. package/android/src/main/jni/utils/jsoncpp/src/lib_json/version.h.in +0 -20
  80. package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/CMakeLists.txt +0 -38
  81. package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/jsontest.cpp +0 -457
  82. package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/jsontest.h +0 -286
  83. package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/main.cpp +0 -2606
  84. package/android/src/main/jni/utils/jsoncpp/travis.sh +0 -23
  85. package/android/src/main/jni/utils/jsoncpp/version +0 -1
  86. package/android/src/main/jni/utils/jsoncpp/version.in +0 -1
  87. package/android/src/main/jni/utils/logUtils.cpp +0 -108
  88. package/android/src/main/jni/utils/logUtils.h +0 -87
  89. package/android/src/main/jni/utils/mSIGNA/stdutils/uchar_vector.h +0 -614
@@ -1,130 +0,0 @@
1
- <?xml version="1.0" encoding="Windows-1252"?>
2
- <VisualStudioProject
3
- ProjectType="Visual C++"
4
- Version="7.10"
5
- Name="test_lib_json"
6
- ProjectGUID="{B7A96B78-2782-40D2-8F37-A2DEF2B9C26D}"
7
- RootNamespace="test_lib_json"
8
- Keyword="Win32Proj">
9
- <Platforms>
10
- <Platform
11
- Name="Win32"/>
12
- </Platforms>
13
- <Configurations>
14
- <Configuration
15
- Name="Debug|Win32"
16
- OutputDirectory="../../build/vs71/debug/test_lib_json"
17
- IntermediateDirectory="../../build/vs71/debug/test_lib_json"
18
- ConfigurationType="1"
19
- CharacterSet="2">
20
- <Tool
21
- Name="VCCLCompilerTool"
22
- Optimization="0"
23
- AdditionalIncludeDirectories="../../include"
24
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
25
- MinimalRebuild="TRUE"
26
- BasicRuntimeChecks="3"
27
- RuntimeLibrary="1"
28
- UsePrecompiledHeader="0"
29
- WarningLevel="3"
30
- Detect64BitPortabilityProblems="TRUE"
31
- DebugInformationFormat="4"/>
32
- <Tool
33
- Name="VCCustomBuildTool"/>
34
- <Tool
35
- Name="VCLinkerTool"
36
- OutputFile="$(OutDir)/test_lib_json.exe"
37
- LinkIncremental="2"
38
- GenerateDebugInformation="TRUE"
39
- ProgramDatabaseFile="$(OutDir)/test_lib_json.pdb"
40
- SubSystem="1"
41
- TargetMachine="1"/>
42
- <Tool
43
- Name="VCMIDLTool"/>
44
- <Tool
45
- Name="VCPostBuildEventTool"
46
- Description="Running all unit tests"
47
- CommandLine="$(TargetPath)"/>
48
- <Tool
49
- Name="VCPreBuildEventTool"/>
50
- <Tool
51
- Name="VCPreLinkEventTool"/>
52
- <Tool
53
- Name="VCResourceCompilerTool"/>
54
- <Tool
55
- Name="VCWebServiceProxyGeneratorTool"/>
56
- <Tool
57
- Name="VCXMLDataGeneratorTool"/>
58
- <Tool
59
- Name="VCWebDeploymentTool"/>
60
- <Tool
61
- Name="VCManagedWrapperGeneratorTool"/>
62
- <Tool
63
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
64
- </Configuration>
65
- <Configuration
66
- Name="Release|Win32"
67
- OutputDirectory="../../build/vs71/release/test_lib_json"
68
- IntermediateDirectory="../../build/vs71/release/test_lib_json"
69
- ConfigurationType="1"
70
- CharacterSet="2">
71
- <Tool
72
- Name="VCCLCompilerTool"
73
- AdditionalIncludeDirectories="../../include"
74
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
75
- RuntimeLibrary="0"
76
- UsePrecompiledHeader="0"
77
- WarningLevel="3"
78
- Detect64BitPortabilityProblems="TRUE"
79
- DebugInformationFormat="3"/>
80
- <Tool
81
- Name="VCCustomBuildTool"/>
82
- <Tool
83
- Name="VCLinkerTool"
84
- OutputFile="$(OutDir)/test_lib_json.exe"
85
- LinkIncremental="1"
86
- GenerateDebugInformation="TRUE"
87
- SubSystem="1"
88
- OptimizeReferences="2"
89
- EnableCOMDATFolding="2"
90
- TargetMachine="1"/>
91
- <Tool
92
- Name="VCMIDLTool"/>
93
- <Tool
94
- Name="VCPostBuildEventTool"
95
- Description="Running all unit tests"
96
- CommandLine="$(TargetPath)"/>
97
- <Tool
98
- Name="VCPreBuildEventTool"/>
99
- <Tool
100
- Name="VCPreLinkEventTool"/>
101
- <Tool
102
- Name="VCResourceCompilerTool"/>
103
- <Tool
104
- Name="VCWebServiceProxyGeneratorTool"/>
105
- <Tool
106
- Name="VCXMLDataGeneratorTool"/>
107
- <Tool
108
- Name="VCWebDeploymentTool"/>
109
- <Tool
110
- Name="VCManagedWrapperGeneratorTool"/>
111
- <Tool
112
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
113
- </Configuration>
114
- </Configurations>
115
- <References>
116
- </References>
117
- <Files>
118
- <File
119
- RelativePath="..\..\src\test_lib_json\jsontest.cpp">
120
- </File>
121
- <File
122
- RelativePath="..\..\src\test_lib_json\jsontest.h">
123
- </File>
124
- <File
125
- RelativePath="..\..\src\test_lib_json\main.cpp">
126
- </File>
127
- </Files>
128
- <Globals>
129
- </Globals>
130
- </VisualStudioProject>
@@ -1,390 +0,0 @@
1
- # Copyright 2010 Baptiste Lepilleur and The JsonCpp Authors
2
- # Distributed under MIT license, or public domain if desired and
3
- # recognized in your jurisdiction.
4
- # See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
-
6
- """Tag the sandbox for release, make source and doc tarballs.
7
-
8
- Requires Python 2.6
9
-
10
- Example of invocation (use to test the script):
11
- python makerelease.py --platform=msvc6,msvc71,msvc80,msvc90,mingw -ublep 0.6.0 0.7.0-dev
12
-
13
- When testing this script:
14
- python makerelease.py --force --retag --platform=msvc6,msvc71,msvc80,mingw -ublep test-0.6.0 test-0.6.1-dev
15
-
16
- Example of invocation when doing a release:
17
- python makerelease.py 0.5.0 0.6.0-dev
18
-
19
- Note: This was for Subversion. Now that we are in GitHub, we do not
20
- need to build versioned tarballs anymore, so makerelease.py is defunct.
21
- """
22
-
23
- from __future__ import print_function
24
- import os.path
25
- import subprocess
26
- import sys
27
- import doxybuild
28
- import subprocess
29
- import xml.etree.ElementTree as ElementTree
30
- import shutil
31
- import urllib2
32
- import tempfile
33
- import os
34
- import time
35
- from devtools import antglob, fixeol, tarball
36
- import amalgamate
37
-
38
- SVN_ROOT = 'https://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/'
39
- SVN_TAG_ROOT = SVN_ROOT + 'tags/jsoncpp'
40
- SCONS_LOCAL_URL = 'http://sourceforge.net/projects/scons/files/scons-local/1.2.0/scons-local-1.2.0.tar.gz/download'
41
- SOURCEFORGE_PROJECT = 'jsoncpp'
42
-
43
- def set_version(version):
44
- with open('version','wb') as f:
45
- f.write(version.strip())
46
-
47
- def rmdir_if_exist(dir_path):
48
- if os.path.isdir(dir_path):
49
- shutil.rmtree(dir_path)
50
-
51
- class SVNError(Exception):
52
- pass
53
-
54
- def svn_command(command, *args):
55
- cmd = ['svn', '--non-interactive', command] + list(args)
56
- print('Running:', ' '.join(cmd))
57
- process = subprocess.Popen(cmd,
58
- stdout=subprocess.PIPE,
59
- stderr=subprocess.STDOUT)
60
- stdout = process.communicate()[0]
61
- if process.returncode:
62
- error = SVNError('SVN command failed:\n' + stdout)
63
- error.returncode = process.returncode
64
- raise error
65
- return stdout
66
-
67
- def check_no_pending_commit():
68
- """Checks that there is no pending commit in the sandbox."""
69
- stdout = svn_command('status', '--xml')
70
- etree = ElementTree.fromstring(stdout)
71
- msg = []
72
- for entry in etree.getiterator('entry'):
73
- path = entry.get('path')
74
- status = entry.find('wc-status').get('item')
75
- if status != 'unversioned' and path != 'version':
76
- msg.append('File "%s" has pending change (status="%s")' % (path, status))
77
- if msg:
78
- msg.insert(0, 'Pending change to commit found in sandbox. Commit them first!')
79
- return '\n'.join(msg)
80
-
81
- def svn_join_url(base_url, suffix):
82
- if not base_url.endswith('/'):
83
- base_url += '/'
84
- if suffix.startswith('/'):
85
- suffix = suffix[1:]
86
- return base_url + suffix
87
-
88
- def svn_check_if_tag_exist(tag_url):
89
- """Checks if a tag exist.
90
- Returns: True if the tag exist, False otherwise.
91
- """
92
- try:
93
- list_stdout = svn_command('list', tag_url)
94
- except SVNError as e:
95
- if e.returncode != 1 or not str(e).find('tag_url'):
96
- raise e
97
- # otherwise ignore error, meaning tag does not exist
98
- return False
99
- return True
100
-
101
- def svn_commit(message):
102
- """Commit the sandbox, providing the specified comment.
103
- """
104
- svn_command('ci', '-m', message)
105
-
106
- def svn_tag_sandbox(tag_url, message):
107
- """Makes a tag based on the sandbox revisions.
108
- """
109
- svn_command('copy', '-m', message, '.', tag_url)
110
-
111
- def svn_remove_tag(tag_url, message):
112
- """Removes an existing tag.
113
- """
114
- svn_command('delete', '-m', message, tag_url)
115
-
116
- def svn_export(tag_url, export_dir):
117
- """Exports the tag_url revision to export_dir.
118
- Target directory, including its parent is created if it does not exist.
119
- If the directory export_dir exist, it is deleted before export proceed.
120
- """
121
- rmdir_if_exist(export_dir)
122
- svn_command('export', tag_url, export_dir)
123
-
124
- def fix_sources_eol(dist_dir):
125
- """Set file EOL for tarball distribution.
126
- """
127
- print('Preparing exported source file EOL for distribution...')
128
- prune_dirs = antglob.prune_dirs + 'scons-local* ./build* ./libs ./dist'
129
- win_sources = antglob.glob(dist_dir,
130
- includes = '**/*.sln **/*.vcproj',
131
- prune_dirs = prune_dirs)
132
- unix_sources = antglob.glob(dist_dir,
133
- includes = '''**/*.h **/*.cpp **/*.inl **/*.txt **/*.dox **/*.py **/*.html **/*.in
134
- sconscript *.json *.expected AUTHORS LICENSE''',
135
- excludes = antglob.default_excludes + 'scons.py sconsign.py scons-*',
136
- prune_dirs = prune_dirs)
137
- for path in win_sources:
138
- fixeol.fix_source_eol(path, is_dry_run = False, verbose = True, eol = '\r\n')
139
- for path in unix_sources:
140
- fixeol.fix_source_eol(path, is_dry_run = False, verbose = True, eol = '\n')
141
-
142
- def download(url, target_path):
143
- """Download file represented by url to target_path.
144
- """
145
- f = urllib2.urlopen(url)
146
- try:
147
- data = f.read()
148
- finally:
149
- f.close()
150
- fout = open(target_path, 'wb')
151
- try:
152
- fout.write(data)
153
- finally:
154
- fout.close()
155
-
156
- def check_compile(distcheck_top_dir, platform):
157
- cmd = [sys.executable, 'scons.py', 'platform=%s' % platform, 'check']
158
- print('Running:', ' '.join(cmd))
159
- log_path = os.path.join(distcheck_top_dir, 'build-%s.log' % platform)
160
- flog = open(log_path, 'wb')
161
- try:
162
- process = subprocess.Popen(cmd,
163
- stdout=flog,
164
- stderr=subprocess.STDOUT,
165
- cwd=distcheck_top_dir)
166
- stdout = process.communicate()[0]
167
- status = (process.returncode == 0)
168
- finally:
169
- flog.close()
170
- return (status, log_path)
171
-
172
- def write_tempfile(content, **kwargs):
173
- fd, path = tempfile.mkstemp(**kwargs)
174
- f = os.fdopen(fd, 'wt')
175
- try:
176
- f.write(content)
177
- finally:
178
- f.close()
179
- return path
180
-
181
- class SFTPError(Exception):
182
- pass
183
-
184
- def run_sftp_batch(userhost, sftp, batch, retry=0):
185
- path = write_tempfile(batch, suffix='.sftp', text=True)
186
- # psftp -agent -C blep,jsoncpp@web.sourceforge.net -batch -b batch.sftp -bc
187
- cmd = [sftp, '-agent', '-C', '-batch', '-b', path, '-bc', userhost]
188
- error = None
189
- for retry_index in range(0, max(1,retry)):
190
- heading = retry_index == 0 and 'Running:' or 'Retrying:'
191
- print(heading, ' '.join(cmd))
192
- process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
193
- stdout = process.communicate()[0]
194
- if process.returncode != 0:
195
- error = SFTPError('SFTP batch failed:\n' + stdout)
196
- else:
197
- break
198
- if error:
199
- raise error
200
- return stdout
201
-
202
- def sourceforge_web_synchro(sourceforge_project, doc_dir,
203
- user=None, sftp='sftp'):
204
- """Notes: does not synchronize sub-directory of doc-dir.
205
- """
206
- userhost = '%s,%s@web.sourceforge.net' % (user, sourceforge_project)
207
- stdout = run_sftp_batch(userhost, sftp, """
208
- cd htdocs
209
- dir
210
- exit
211
- """)
212
- existing_paths = set()
213
- collect = 0
214
- for line in stdout.split('\n'):
215
- line = line.strip()
216
- if not collect and line.endswith('> dir'):
217
- collect = True
218
- elif collect and line.endswith('> exit'):
219
- break
220
- elif collect == 1:
221
- collect = 2
222
- elif collect == 2:
223
- path = line.strip().split()[-1:]
224
- if path and path[0] not in ('.', '..'):
225
- existing_paths.add(path[0])
226
- upload_paths = set([os.path.basename(p) for p in antglob.glob(doc_dir)])
227
- paths_to_remove = existing_paths - upload_paths
228
- if paths_to_remove:
229
- print('Removing the following file from web:')
230
- print('\n'.join(paths_to_remove))
231
- stdout = run_sftp_batch(userhost, sftp, """cd htdocs
232
- rm %s
233
- exit""" % ' '.join(paths_to_remove))
234
- print('Uploading %d files:' % len(upload_paths))
235
- batch_size = 10
236
- upload_paths = list(upload_paths)
237
- start_time = time.time()
238
- for index in range(0,len(upload_paths),batch_size):
239
- paths = upload_paths[index:index+batch_size]
240
- file_per_sec = (time.time() - start_time) / (index+1)
241
- remaining_files = len(upload_paths) - index
242
- remaining_sec = file_per_sec * remaining_files
243
- print('%d/%d, ETA=%.1fs' % (index+1, len(upload_paths), remaining_sec))
244
- run_sftp_batch(userhost, sftp, """cd htdocs
245
- lcd %s
246
- mput %s
247
- exit""" % (doc_dir, ' '.join(paths)), retry=3)
248
-
249
- def sourceforge_release_tarball(sourceforge_project, paths, user=None, sftp='sftp'):
250
- userhost = '%s,%s@frs.sourceforge.net' % (user, sourceforge_project)
251
- run_sftp_batch(userhost, sftp, """
252
- mput %s
253
- exit
254
- """ % (' '.join(paths),))
255
-
256
-
257
- def main():
258
- usage = """%prog release_version next_dev_version
259
- Update 'version' file to release_version and commit.
260
- Generates the document tarball.
261
- Tags the sandbox revision with release_version.
262
- Update 'version' file to next_dev_version and commit.
263
-
264
- Performs an svn export of tag release version, and build a source tarball.
265
-
266
- Must be started in the project top directory.
267
-
268
- Warning: --force should only be used when developing/testing the release script.
269
- """
270
- from optparse import OptionParser
271
- parser = OptionParser(usage=usage)
272
- parser.allow_interspersed_args = False
273
- parser.add_option('--dot', dest="dot_path", action='store', default=doxybuild.find_program('dot'),
274
- help="""Path to GraphViz dot tool. Must be full qualified path. [Default: %default]""")
275
- parser.add_option('--doxygen', dest="doxygen_path", action='store', default=doxybuild.find_program('doxygen'),
276
- help="""Path to Doxygen tool. [Default: %default]""")
277
- parser.add_option('--force', dest="ignore_pending_commit", action='store_true', default=False,
278
- help="""Ignore pending commit. [Default: %default]""")
279
- parser.add_option('--retag', dest="retag_release", action='store_true', default=False,
280
- help="""Overwrite release existing tag if it exist. [Default: %default]""")
281
- parser.add_option('-p', '--platforms', dest="platforms", action='store', default='',
282
- help="""Comma separated list of platform passed to scons for build check.""")
283
- parser.add_option('--no-test', dest="no_test", action='store_true', default=False,
284
- help="""Skips build check.""")
285
- parser.add_option('--no-web', dest="no_web", action='store_true', default=False,
286
- help="""Do not update web site.""")
287
- parser.add_option('-u', '--upload-user', dest="user", action='store',
288
- help="""Sourceforge user for SFTP documentation upload.""")
289
- parser.add_option('--sftp', dest='sftp', action='store', default=doxybuild.find_program('psftp', 'sftp'),
290
- help="""Path of the SFTP compatible binary used to upload the documentation.""")
291
- parser.enable_interspersed_args()
292
- options, args = parser.parse_args()
293
-
294
- if len(args) != 2:
295
- parser.error('release_version missing on command-line.')
296
- release_version = args[0]
297
- next_version = args[1]
298
-
299
- if not options.platforms and not options.no_test:
300
- parser.error('You must specify either --platform or --no-test option.')
301
-
302
- if options.ignore_pending_commit:
303
- msg = ''
304
- else:
305
- msg = check_no_pending_commit()
306
- if not msg:
307
- print('Setting version to', release_version)
308
- set_version(release_version)
309
- svn_commit('Release ' + release_version)
310
- tag_url = svn_join_url(SVN_TAG_ROOT, release_version)
311
- if svn_check_if_tag_exist(tag_url):
312
- if options.retag_release:
313
- svn_remove_tag(tag_url, 'Overwriting previous tag')
314
- else:
315
- print('Aborting, tag %s already exist. Use --retag to overwrite it!' % tag_url)
316
- sys.exit(1)
317
- svn_tag_sandbox(tag_url, 'Release ' + release_version)
318
-
319
- print('Generated doxygen document...')
320
- ## doc_dirname = r'jsoncpp-api-html-0.5.0'
321
- ## doc_tarball_path = r'e:\prg\vc\Lib\jsoncpp-trunk\dist\jsoncpp-api-html-0.5.0.tar.gz'
322
- doc_tarball_path, doc_dirname = doxybuild.build_doc(options, make_release=True)
323
- doc_distcheck_dir = 'dist/doccheck'
324
- tarball.decompress(doc_tarball_path, doc_distcheck_dir)
325
- doc_distcheck_top_dir = os.path.join(doc_distcheck_dir, doc_dirname)
326
-
327
- export_dir = 'dist/export'
328
- svn_export(tag_url, export_dir)
329
- fix_sources_eol(export_dir)
330
-
331
- source_dir = 'jsoncpp-src-' + release_version
332
- source_tarball_path = 'dist/%s.tar.gz' % source_dir
333
- print('Generating source tarball to', source_tarball_path)
334
- tarball.make_tarball(source_tarball_path, [export_dir], export_dir, prefix_dir=source_dir)
335
-
336
- amalgamation_tarball_path = 'dist/%s-amalgamation.tar.gz' % source_dir
337
- print('Generating amalgamation source tarball to', amalgamation_tarball_path)
338
- amalgamation_dir = 'dist/amalgamation'
339
- amalgamate.amalgamate_source(export_dir, '%s/jsoncpp.cpp' % amalgamation_dir, 'json/json.h')
340
- amalgamation_source_dir = 'jsoncpp-src-amalgamation' + release_version
341
- tarball.make_tarball(amalgamation_tarball_path, [amalgamation_dir],
342
- amalgamation_dir, prefix_dir=amalgamation_source_dir)
343
-
344
- # Decompress source tarball, download and install scons-local
345
- distcheck_dir = 'dist/distcheck'
346
- distcheck_top_dir = distcheck_dir + '/' + source_dir
347
- print('Decompressing source tarball to', distcheck_dir)
348
- rmdir_if_exist(distcheck_dir)
349
- tarball.decompress(source_tarball_path, distcheck_dir)
350
- scons_local_path = 'dist/scons-local.tar.gz'
351
- print('Downloading scons-local to', scons_local_path)
352
- download(SCONS_LOCAL_URL, scons_local_path)
353
- print('Decompressing scons-local to', distcheck_top_dir)
354
- tarball.decompress(scons_local_path, distcheck_top_dir)
355
-
356
- # Run compilation
357
- print('Compiling decompressed tarball')
358
- all_build_status = True
359
- for platform in options.platforms.split(','):
360
- print('Testing platform:', platform)
361
- build_status, log_path = check_compile(distcheck_top_dir, platform)
362
- print('see build log:', log_path)
363
- print(build_status and '=> ok' or '=> FAILED')
364
- all_build_status = all_build_status and build_status
365
- if not build_status:
366
- print('Testing failed on at least one platform, aborting...')
367
- svn_remove_tag(tag_url, 'Removing tag due to failed testing')
368
- sys.exit(1)
369
- if options.user:
370
- if not options.no_web:
371
- print('Uploading documentation using user', options.user)
372
- sourceforge_web_synchro(SOURCEFORGE_PROJECT, doc_distcheck_top_dir, user=options.user, sftp=options.sftp)
373
- print('Completed documentation upload')
374
- print('Uploading source and documentation tarballs for release using user', options.user)
375
- sourceforge_release_tarball(SOURCEFORGE_PROJECT,
376
- [source_tarball_path, doc_tarball_path],
377
- user=options.user, sftp=options.sftp)
378
- print('Source and doc release tarballs uploaded')
379
- else:
380
- print('No upload user specified. Web site and download tarball were not uploaded.')
381
- print('Tarball can be found at:', doc_tarball_path)
382
-
383
- # Set next version number and commit
384
- set_version(next_version)
385
- svn_commit('Released ' + release_version)
386
- else:
387
- sys.stderr.write(msg + '\n')
388
-
389
- if __name__ == '__main__':
390
- main()
@@ -1,103 +0,0 @@
1
- project(
2
- 'jsoncpp',
3
- 'cpp',
4
- version : '1.8.4',
5
- default_options : [
6
- 'buildtype=release',
7
- 'warning_level=1'],
8
- license : 'Public Domain',
9
- meson_version : '>= 0.41.1')
10
-
11
- jsoncpp_ver_arr = meson.project_version().split('.')
12
- jsoncpp_major_version = jsoncpp_ver_arr[0]
13
- jsoncpp_minor_version = jsoncpp_ver_arr[1]
14
- jsoncpp_patch_version = jsoncpp_ver_arr[2]
15
-
16
- jsoncpp_cdata = configuration_data()
17
- jsoncpp_cdata.set('JSONCPP_VERSION', meson.project_version())
18
- jsoncpp_cdata.set('JSONCPP_VERSION_MAJOR', jsoncpp_major_version)
19
- jsoncpp_cdata.set('JSONCPP_VERSION_MINOR', jsoncpp_minor_version)
20
- jsoncpp_cdata.set('JSONCPP_VERSION_PATCH', jsoncpp_patch_version)
21
- jsoncpp_cdata.set('JSONCPP_USE_SECURE_MEMORY',0)
22
-
23
- jsoncpp_gen_sources = configure_file(
24
- input : 'src/lib_json/version.h.in',
25
- output : 'version.h',
26
- configuration : jsoncpp_cdata,
27
- install : true,
28
- install_dir : join_paths(get_option('prefix'), get_option('includedir'), 'json')
29
- )
30
-
31
- jsoncpp_headers = [
32
- 'include/json/allocator.h',
33
- 'include/json/assertions.h',
34
- 'include/json/autolink.h',
35
- 'include/json/config.h',
36
- 'include/json/features.h',
37
- 'include/json/forwards.h',
38
- 'include/json/json.h',
39
- 'include/json/reader.h',
40
- 'include/json/value.h',
41
- 'include/json/writer.h']
42
- jsoncpp_include_directories = include_directories('include')
43
-
44
- install_headers(
45
- jsoncpp_headers,
46
- subdir : 'json')
47
-
48
- jsoncpp_lib = library(
49
- 'jsoncpp',
50
- [ jsoncpp_gen_sources,
51
- jsoncpp_headers,
52
- 'src/lib_json/json_tool.h',
53
- 'src/lib_json/json_reader.cpp',
54
- 'src/lib_json/json_value.cpp',
55
- 'src/lib_json/json_writer.cpp'],
56
- soversion : 20,
57
- install : true,
58
- include_directories : jsoncpp_include_directories)
59
-
60
- import('pkgconfig').generate(
61
- libraries : jsoncpp_lib,
62
- version : meson.project_version(),
63
- name : 'jsoncpp',
64
- filebase : 'jsoncpp',
65
- description : 'A C++ library for interacting with JSON')
66
-
67
- # for libraries bundling jsoncpp
68
- jsoncpp_dep = declare_dependency(
69
- include_directories : jsoncpp_include_directories,
70
- link_with : jsoncpp_lib,
71
- version : meson.project_version(),
72
- sources : jsoncpp_gen_sources)
73
-
74
- # tests
75
- python = import('python3').find_python()
76
-
77
- jsoncpp_test = executable(
78
- 'jsoncpp_test',
79
- [ 'src/test_lib_json/jsontest.cpp',
80
- 'src/test_lib_json/jsontest.h',
81
- 'src/test_lib_json/main.cpp'],
82
- include_directories : jsoncpp_include_directories,
83
- link_with : jsoncpp_lib,
84
- install : false)
85
- test(
86
- 'unittest_jsoncpp_test',
87
- jsoncpp_test)
88
-
89
- jsontestrunner = executable(
90
- 'jsontestrunner',
91
- 'src/jsontestrunner/main.cpp',
92
- include_directories : jsoncpp_include_directories,
93
- link_with : jsoncpp_lib,
94
- install : false)
95
- test(
96
- 'unittest_jsontestrunner',
97
- python,
98
- args : [
99
- '-B',
100
- join_paths(meson.current_source_dir(), 'test/runjsontests.py'),
101
- jsontestrunner,
102
- join_paths(meson.current_source_dir(), 'test/data')]
103
- )
@@ -1,9 +0,0 @@
1
- libdir=@CMAKE_INSTALL_FULL_LIBDIR@
2
- includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
3
-
4
- Name: jsoncpp
5
- Description: A C++ library for interacting with JSON
6
- Version: @JSONCPP_VERSION@
7
- URL: https://github.com/open-source-parsers/jsoncpp
8
- Libs: -L${libdir} -ljsoncpp
9
- Cflags: -I${includedir}
@@ -1,5 +0,0 @@
1
- ADD_SUBDIRECTORY(lib_json)
2
- IF(JSONCPP_WITH_TESTS)
3
- ADD_SUBDIRECTORY(jsontestrunner)
4
- ADD_SUBDIRECTORY(test_lib_json)
5
- ENDIF()
@@ -1,25 +0,0 @@
1
- FIND_PACKAGE(PythonInterp 2.6)
2
-
3
- ADD_EXECUTABLE(jsontestrunner_exe
4
- main.cpp
5
- )
6
-
7
- IF(BUILD_SHARED_LIBS)
8
- ADD_DEFINITIONS( -DJSON_DLL )
9
- TARGET_LINK_LIBRARIES(jsontestrunner_exe jsoncpp_lib)
10
- ELSE(BUILD_SHARED_LIBS)
11
- TARGET_LINK_LIBRARIES(jsontestrunner_exe jsoncpp_lib_static)
12
- ENDIF()
13
-
14
- SET_TARGET_PROPERTIES(jsontestrunner_exe PROPERTIES OUTPUT_NAME jsontestrunner_exe)
15
-
16
- IF(PYTHONINTERP_FOUND)
17
- # Run end to end parser/writer tests
18
- SET(TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../test)
19
- SET(RUNJSONTESTS_PATH ${TEST_DIR}/runjsontests.py)
20
- ADD_CUSTOM_TARGET(jsoncpp_readerwriter_tests
21
- "${PYTHON_EXECUTABLE}" -B "${RUNJSONTESTS_PATH}" $<TARGET_FILE:jsontestrunner_exe> "${TEST_DIR}/data"
22
- DEPENDS jsontestrunner_exe jsoncpp_test
23
- )
24
- ADD_CUSTOM_TARGET(jsoncpp_check DEPENDS jsoncpp_readerwriter_tests)
25
- ENDIF()