Moveish the first files to libaxolotl/

This commit is contained in:
Matt Corallo 2015-01-14 12:22:26 -10:00 committed by lilia
parent 05a5b7e76c
commit 83c6fe9008
9 changed files with 11035 additions and 2462 deletions

View file

@ -10,9 +10,14 @@ module.exports = function(grunt) {
components.push('components/' + bower.concat.app[i] + '/**/*.js'); components.push('components/' + bower.concat.app[i] + '/**/*.js');
} }
var libcomponents = []; var libaxolotlcomponents = [];
for (i in bower.concat.lib) { for (i in bower.concat.libaxolotl) {
libcomponents.push('components/' + bower.concat.lib[i] + '/**/*.js'); libaxolotlcomponents.push('components/' + bower.concat.libaxolotl[i] + '/**/*.js');
}
var libtextsecurecomponents = [];
for (i in bower.concat.libtextsecure) {
libtextsecurecomponents.push('components/' + bower.concat.libtextsecure[i] + '/**/*.js');
} }
grunt.initConfig({ grunt.initConfig({
@ -22,8 +27,12 @@ module.exports = function(grunt) {
src: components, src: components,
dest: 'js/components.js', dest: 'js/components.js',
}, },
libcomponents: { libaxolotlcomponents: {
src: libcomponents, src: libaxolotlcomponents,
dest: 'libaxolotl/components.js',
},
libtextsecurecomponents: {
src: libtextsecurecomponents,
dest: 'libtextsecure/components.js', dest: 'libtextsecure/components.js',
}, },
curve25519: { curve25519: {
@ -31,7 +40,7 @@ module.exports = function(grunt) {
'build/curve25519_compiled.js', 'build/curve25519_compiled.js',
'build/curve25519.js', 'build/curve25519.js',
], ],
dest: 'libtextsecure/curve25519_concat.js', dest: 'libaxolotl/curve25519_concat.js',
options: { options: {
banner: ';(function(){\n', banner: ';(function(){\n',
footer: '\n})();' footer: '\n})();'
@ -49,7 +58,7 @@ module.exports = function(grunt) {
'components/cryptojs/src/aes.js', 'components/cryptojs/src/aes.js',
'build/webcrypto.js' 'build/webcrypto.js'
], ],
dest: 'libtextsecure/webcrypto_concat.js', dest: 'libaxolotl/webcrypto_concat.js',
options: { options: {
banner: ';(function(){\n', banner: ';(function(){\n',
footer: '\n})();' footer: '\n})();'
@ -63,23 +72,31 @@ module.exports = function(grunt) {
], ],
dest: 'test/test.js', dest: 'test/test.js',
}, },
libaxolotl: {
src: [
'libaxolotl/curve25519_concat.js',
'libaxolotl/webcrypto_concat.js',
'libaxolotl/components.js',
'libaxolotl/groups_storage.js',
'libaxolotl/crypto.js',
'libaxolotl/protocol.js',
],
dest: 'libtextsecure/libaxolotl_concat.js',
},
libtextsecure: { libtextsecure: {
src: [ src: [
'libtextsecure/curve25519_concat.js', 'libtextsecure/libaxolotl_concat.js',
'libtextsecure/webcrypto_concat.js',
'libtextsecure/storage.js',
'libtextsecure/storage/devices.js',
'libtextsecure/protobufs.js', 'libtextsecure/protobufs.js',
'libtextsecure/websocket.js', 'libtextsecure/websocket.js',
'libtextsecure/websocket-resources.js', 'libtextsecure/websocket-resources.js',
'libtextsecure/helpers.js', 'libtextsecure/helpers.js',
'libtextsecure/errors.js', 'libtextsecure/errors.js',
'libtextsecure/stringview.js', 'libtextsecure/stringview.js',
'libtextsecure/storage.js',
'libtextsecure/storage/devices.js',
'libtextsecure/storage/groups.js',
'libtextsecure/api.js', 'libtextsecure/api.js',
'libtextsecure/crypto.js',
'libtextsecure/protocol.js',
'libtextsecure/sendmessage.js', 'libtextsecure/sendmessage.js',
], ],
dest: 'js/libtextsecure.js', dest: 'js/libtextsecure.js',

View file

@ -106,11 +106,16 @@
"intl-tel-input", "intl-tel-input",
"backbone.typeahead" "backbone.typeahead"
], ],
"lib": [ "libtextsecure": [
"jquery", "jquery",
"long", "long",
"bytebuffer", "bytebuffer",
"protobuf" "protobuf"
],
"libaxolotl": [
"long",
"bytebuffer",
"protobuf"
] ]
} }
} }

8555
libaxolotl/components.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -838,7 +838,7 @@ function removeRunDependency(id) {
if (runDependencyWatcher !== null) { if (runDependencyWatcher !== null) {
clearInterval(runDependencyWatcher); clearInterval(runDependencyWatcher);
runDependencyWatcher = null; runDependencyWatcher = null;
} }
// If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)
if (!calledRun && shouldRunNow) run(); if (!calledRun && shouldRunNow) run();
} }
@ -899,7 +899,7 @@ function copyTempDouble(ptr) {
HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; HEAP8[tempDoublePtr+6] = HEAP8[ptr+6];
HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; HEAP8[tempDoublePtr+7] = HEAP8[ptr+7];
} }
Module["_memcpy"] = _memcpy; Module["_memcpy"] = _memcpy;
Module["_memmove"] = _memmove;var _llvm_memmove_p0i8_p0i8_i32=_memmove; Module["_memmove"] = _memmove;var _llvm_memmove_p0i8_p0i8_i32=_memmove;
var _llvm_memcpy_p0i8_p0i8_i32=_memcpy; var _llvm_memcpy_p0i8_p0i8_i32=_memcpy;
Module["_memset"] = _memset;var _llvm_memset_p0i8_i32=_memset; Module["_memset"] = _memset;var _llvm_memset_p0i8_i32=_memset;
@ -2061,9 +2061,9 @@ var i64Math = (function() { // Emscripten wrapper
* The above copyright notice and this permission notice shall be * The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software. * included in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
* *
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER

View file

@ -31,21 +31,17 @@
<script type="text/javascript" src="../components.js"></script> <script type="text/javascript" src="../components.js"></script>
<script type="text/javascript" src="../curve25519_concat.js"></script>
<script type="text/javascript" src="../webcrypto_concat.js"></script>
<script type="text/javascript" src="../protobufs.js" data-cover></script> <script type="text/javascript" src="../protobufs.js" data-cover></script>
<script type="text/javascript" src="../errors.js" data-cover></script>
<script type="text/javascript" src="../storage.js" data-cover></script>
<script type="text/javascript" src="../libaxolotl_concat.js"></script>
<script type="text/javascript" src="../websocket.js" data-cover></script> <script type="text/javascript" src="../websocket.js" data-cover></script>
<script type="text/javascript" src="../websocket-resources.js" data-cover></script> <script type="text/javascript" src="../websocket-resources.js" data-cover></script>
<script type="text/javascript" src="../helpers.js" data-cover></script> <script type="text/javascript" src="../helpers.js" data-cover></script>
<script type="text/javascript" src="../errors.js" data-cover></script>
<script type="text/javascript" src="../stringview.js" data-cover></script> <script type="text/javascript" src="../stringview.js" data-cover></script>
<script type="text/javascript" src="../storage.js" data-cover></script>
<script type="text/javascript" src="../storage/devices.js" data-cover></script> <script type="text/javascript" src="../storage/devices.js" data-cover></script>
<script type="text/javascript" src="../storage/groups.js" data-cover></script>
<script type="text/javascript" src="../api.js"></script> <script type="text/javascript" src="../api.js"></script>
<script type="text/javascript" src="../crypto.js" data-cover></script>
<script type="text/javascript" src="../protocol.js" data-cover></script>
<script type="text/javascript" src="../sendmessage.js" data-cover></script> <script type="text/javascript" src="../sendmessage.js" data-cover></script>
<script type="text/javascript" src="fake_api.js"></script> <script type="text/javascript" src="fake_api.js"></script>