mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.reference
git-svn-id: svn://ultimatepp.org/upp/trunk@11042 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d221ef478c
commit
1a178c9869
7 changed files with 42 additions and 67 deletions
|
|
@ -1,3 +1,11 @@
|
|||
BINARY(bin_cpp, "bin.cpp" BZ2)
|
||||
BINARY(bin_brc, "bin.brc" BZ2)
|
||||
BINARY_MASK(bin_all, "bin.*" BZ2)
|
||||
BINARY(brc_plain, "bin.cpp")
|
||||
BINARY(brc_bz2, "bin.cpp" BZ2)
|
||||
BINARY(brc_zip, "bin.cpp" ZIP)
|
||||
BINARY(brc_lz4, "bin.cpp" LZ4)
|
||||
BINARY(brc_lzma, "bin.cpp" LZMA)
|
||||
BINARY(brc_zstd, "bin.cpp" ZSTD)
|
||||
|
||||
BINARY_ARRAY(bin_array, 0, "bin.cpp" ZIP)
|
||||
BINARY_ARRAY(bin_array, 1, "bin.brc" ZIP)
|
||||
|
||||
BINARY_MASK(bin_mask, "bin.*" LZ4)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#include <Core/Core.h>
|
||||
#include "bin.brc"
|
||||
#include <plugin/bz2/bz2.h>
|
||||
#include <plugin/lzma/lzma.h>
|
||||
#include <plugin/lz4/lz4.h>
|
||||
#include <plugin/zstd/zstd.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
|
|
@ -8,27 +11,28 @@ using namespace Upp;
|
|||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
puts(String().Cat() << "brc length: " << bin_brc_length);
|
||||
fflush(stdout);
|
||||
puts(String().Cat() << "cpp length: " << bin_cpp_length);
|
||||
fflush(stdout);
|
||||
puts(String().Cat() << "all count: " << bin_all_count);
|
||||
fflush(stdout);
|
||||
// puts(String().Cat() << "cpp: <<<\n" << (const char *)bin_cpp << "\n>>>");
|
||||
MemReadStream in1(bin_cpp, bin_cpp_length);
|
||||
puts(String().Cat() << "cpp: <<<\n" << BZ2Decompress(in1) << "\n>>>");
|
||||
fflush(stdout);
|
||||
// puts(String().Cat() << "brc: <<<\n" << (const char *)bin_brc << "\n>>>");
|
||||
MemReadStream in2(bin_brc, bin_brc_length);
|
||||
puts(String().Cat() << "brc: <<<\n" << BZ2Decompress(in2) << "\n>>>");
|
||||
fflush(stdout);
|
||||
for(int i = 0; i < bin_all_count; i++) {
|
||||
puts(String().Cat() << "all length[" << i << "]: " << bin_all_length[i]);
|
||||
fflush(stdout);
|
||||
puts(String().Cat() << "all files[" << i << "]: " << bin_all_files[i]);
|
||||
fflush(stdout);
|
||||
MemReadStream in3(bin_all[i], bin_all_length[i]);
|
||||
puts(String().Cat() << "all[" << i << "]: <<<\n" << BZ2Decompress(in3) << "\n>>>");
|
||||
fflush(stdout);
|
||||
StdLogSetup(LOG_COUT|LOG_FILE);
|
||||
|
||||
LOG("=== PLAIN");
|
||||
LOG(String(brc_plain, brc_plain_length));
|
||||
LOG("=== ZIP");
|
||||
LOG(ZDecompress(brc_zip, brc_zip_length));
|
||||
LOG("=== BZ2");
|
||||
LOG(BZ2Decompress(brc_bz2, brc_bz2_length));
|
||||
LOG("=== LZ4");
|
||||
LOG(LZ4Decompress(brc_lz4, brc_lz4_length));
|
||||
LOG("=== LZMA");
|
||||
LOG(LZMADecompress(brc_lzma, brc_lzma_length));
|
||||
LOG("=== Zstd");
|
||||
LOG(ZstdDecompress(brc_zstd, brc_zstd_length));
|
||||
|
||||
for(int i = 0; i < bin_array_count; i++) {
|
||||
LOG("=== ARRAY " << i);
|
||||
LOG(ZDecompress(bin_array[i], bin_array_length[i]));
|
||||
}
|
||||
|
||||
for(int i = 0; i < bin_mask_count; i++) {
|
||||
LOG("=== MASK " << i);
|
||||
LOG(LZ4Decompress(bin_mask[i], bin_mask_length[i]));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
description "Including binary data into application";
|
||||
description "Including binary data into application\377";
|
||||
|
||||
uses
|
||||
Core,
|
||||
plugin\bz2;
|
||||
plugin\bz2,
|
||||
plugin/lzma,
|
||||
plugin/lz4,
|
||||
plugin/zstd;
|
||||
|
||||
file
|
||||
ship.usc,
|
||||
bin.cpp,
|
||||
bin.brc
|
||||
depends() bin.cpp;
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
macro "Ship" Ctrl+Shift+W {
|
||||
ClearConsole();
|
||||
cout("Building BRC...");
|
||||
if(!Build(""))
|
||||
cout("Error building BRC.");
|
||||
else {
|
||||
cout("Shipping BRC...");
|
||||
if(!BuildProject("BRC/ship", ""))
|
||||
cout("Error shipping BRC.");
|
||||
else
|
||||
cout("Build finished successfully.");
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
BINARY(BRC, "d:/temp/brc.exe" BZ2)
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
#include <Core/Core.h>
|
||||
#include <plugin/bz2/bz2.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#include "ship.brc"
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
puts("Unpacking BRC.exe...");
|
||||
if(!SaveFile("BRC.exe", BZ2Decompress(MemReadStream(BRC, BRC_length))))
|
||||
puts("Error unpacking file!");
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
description "Using binary data for installation";
|
||||
|
||||
uses
|
||||
plugin\bz2;
|
||||
|
||||
file
|
||||
ship.cpp,
|
||||
ship.brc;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue