Skip to content

Commit 62dd95d

Browse files
committed
Using RapidAssist version 0.8.1.
1 parent 1b0cb14 commit 62dd95d

17 files changed

+290
-280
lines changed

CHANGES

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Changes for 2.3.0:
2+
3+
* New feature: Using RapidAssist version 0.8.1
4+
5+
16
Changes for 2.2.0:
27

38
* Fixed issue #9: bin2cpp on Linux.
@@ -8,10 +13,12 @@ Changes for 2.2.0:
813
* Fixed issue #27: Application icon.
914
* New feature: Generators generate files with appropriate include guard. Removed all `#pragma once` statements in the code.
1015

16+
1117
Changes for 2.1.0:
1218

1319
* New feature (issue #6): Implement Windows support using resource file and Windows API for getting resources.
1420

21+
1522
Changes for 2.0.0:
1623

1724
* New feature (issue #2): Update command line parameters syntax with the --name=value syntax
@@ -28,6 +35,7 @@ Changes for 2.0.0:
2835
* Fixed issue #22: Modify IGenerator interface to use setters/getters.
2936
* Fixed issue #23: Create a new interface for abstracting the string literal encoding format
3037

38+
3139
Changes for 1.4:
3240

3341
* New feature: Now encoding binary using c++ control characters. Reduces the size of the output.
@@ -42,12 +50,14 @@ Changes for 1.4:
4250
* Fixed issue #12: Fix failling test: TestExtraction.testRandom3()
4351
* Fixed issue #13: bin2cpp crashes when encoding a generated file with size=1000 fill=random seed=1
4452

53+
4554
Changes for 1.3.40:
4655

4756
* Improvement: Changed the alignment of output code.
4857
* Improvement: Modified installer script for clarity.
4958
* Bug/warning fixes.
5059

60+
5161
Changes for 1.3.29:
5262

5363
* First public release.

ci/appveyor/install_googletest.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cd googletest
1616
echo.
1717

1818
echo Checking out version 1.8.0...
19-
git checkout release-1.8.0
19+
git -c advice.detachedHead=false checkout release-1.8.0
2020
echo.
2121

2222
echo ============================================================================

ci/appveyor/install_rapidassist.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ git clone "https://github.com/end2endzone/RapidAssist.git"
1919
cd RapidAssist
2020
echo.
2121

22-
echo Checking out version v0.5.0...
23-
git checkout 0.5.0
22+
echo Checking out version v0.8.1...
23+
git -c advice.detachedHead=false checkout 0.8.1
2424
echo.
2525

2626
echo ============================================================================

ci/travis/install_googletest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cd googletest
1717
echo
1818

1919
echo Checking out version 1.8.0...
20-
git checkout release-1.8.0
20+
git -c advice.detachedHead=false checkout release-1.8.0
2121
echo
2222

2323
echo ============================================================================

ci/travis/install_rapidassist.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ git clone "https://github.com/end2endzone/RapidAssist.git"
2020
cd RapidAssist
2121
echo
2222

23-
echo Checking out version v0.5.0...
24-
git checkout 0.5.0
23+
echo Checking out version v0.8.1...
24+
git -c advice.detachedHead=false checkout 0.8.1
2525
echo
2626

2727
echo ============================================================================

src/bin2cpp/ArrayGenerator.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <string>
2929
#include <stdlib.h>
3030

31-
#include "rapidassist/cppencoder.h"
31+
#include "rapidassist/code_cpp.h"
3232
#include "rapidassist/strings.h"
3333
#include "rapidassist/filesystem.h"
3434

@@ -55,13 +55,13 @@ namespace bin2cpp
5555
return false;
5656

5757
//Uppercase function identifier
58-
std::string functionIdentifier = ra::strings::capitalizeFirstCharacter(mFunctionIdentifier);
58+
std::string functionIdentifier = ra::strings::CapitalizeFirstCharacter(mFunctionIdentifier);
5959

6060
//Build header and cpp file path
6161
std::string headerPath = getHeaderFilePath(iCppFilePath);
6262
std::string cppPath = iCppFilePath;
63-
std::string headerFilename = ra::filesystem::getFilename(headerPath.c_str());
64-
std::string cppFilename = ra::filesystem::getFilename(iCppFilePath);
63+
std::string headerFilename = ra::filesystem::GetFilename(headerPath.c_str());
64+
std::string cppFilename = ra::filesystem::GetFilename(iCppFilePath);
6565

6666
//create cpp file
6767
FILE * cpp = fopen(cppPath.c_str(), "w");
@@ -72,8 +72,8 @@ namespace bin2cpp
7272
}
7373

7474
//determine file properties
75-
uint32_t fileSize = ra::filesystem::getFileSize(input);
76-
std::string filename = ra::filesystem::getFilename(mInputFile.c_str());
75+
uint32_t fileSize = ra::filesystem::GetFileSize(input);
76+
std::string filename = ra::filesystem::GetFilename(mInputFile.c_str());
7777

7878
//Build class name
7979
std::string className;
@@ -96,7 +96,7 @@ namespace bin2cpp
9696
fprintf(cpp, " %s() {}\n", className.c_str());
9797
fprintf(cpp, " virtual ~%s() {}\n", className.c_str());
9898
fprintf(cpp, " virtual size_t getSize() const { return %u; }\n", fileSize);
99-
fprintf(cpp, " virtual const char * getFilename() const { return \"%s\"; }\n", ra::filesystem::getFilename(mInputFile.c_str()).c_str());
99+
fprintf(cpp, " virtual const char * getFilename() const { return \"%s\"; }\n", ra::filesystem::GetFilename(mInputFile.c_str()).c_str());
100100
fprintf(cpp, " virtual const char * getBuffer() const\n");
101101
fprintf(cpp, " {\n");
102102
fprintf(cpp, " static const unsigned char buffer[] = {\n");
@@ -120,7 +120,7 @@ namespace bin2cpp
120120
}
121121

122122
//output
123-
fprintf(cpp, " %s", ra::cppencoder::toCppCharactersArray(buffer, readSize).c_str());
123+
fprintf(cpp, " %s", ra::code::cpp::ToCppCharactersArray(buffer, readSize).c_str());
124124
numLinePrinted++;
125125
}
126126

src/bin2cpp/BaseGenerator.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ namespace bin2cpp
115115
std::string BaseGenerator::getGetterFunctionName()
116116
{
117117
//Uppercase function identifier
118-
std::string functionIdentifier = ra::strings::capitalizeFirstCharacter(mFunctionIdentifier);
118+
std::string functionIdentifier = ra::strings::CapitalizeFirstCharacter(mFunctionIdentifier);
119119

120120
std::string getter;
121121
getter.append("get");
@@ -128,22 +128,22 @@ namespace bin2cpp
128128
{
129129
//Build header file path
130130
std::string headerPath = iCppFilePath;
131-
ra::strings::replace(headerPath, ".cpp", ".h");
131+
ra::strings::Replace(headerPath, ".cpp", ".h");
132132
return headerPath;
133133
}
134134

135135
std::string BaseGenerator::getCppFilePath(const char * iHeaderFilePath)
136136
{
137137
//Build header file path
138138
std::string cppPath = iHeaderFilePath;
139-
ra::strings::replace(cppPath, ".cpp", ".h");
139+
ra::strings::Replace(cppPath, ".cpp", ".h");
140140
return cppPath;
141141
}
142142

143143
std::string BaseGenerator::getHeaderTemplate()
144144
{
145-
std::string filename = ra::filesystem::getFilename(mInputFile.c_str());
146-
uint64_t lastModifiedDate = ra::filesystem::getFileModifiedDate(mInputFile);
145+
std::string filename = ra::filesystem::GetFilename(mInputFile.c_str());
146+
uint64_t lastModifiedDate = ra::filesystem::GetFileModifiedDate(mInputFile);
147147

148148
std::string header;
149149
header <<

src/bin2cpp/SegmentGenerator.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <string>
2929
#include <stdlib.h>
3030

31-
#include "rapidassist/cppencoder.h"
31+
#include "rapidassist/code_cpp.h"
3232
#include "rapidassist/strings.h"
3333
#include "rapidassist/filesystem.h"
3434

@@ -55,13 +55,13 @@ namespace bin2cpp
5555
return false;
5656

5757
//Uppercase function identifier
58-
std::string functionIdentifier = ra::strings::capitalizeFirstCharacter(mFunctionIdentifier);
58+
std::string functionIdentifier = ra::strings::CapitalizeFirstCharacter(mFunctionIdentifier);
5959

6060
//Build header and cpp file path
6161
std::string headerPath = getHeaderFilePath(iCppFilePath);
6262
std::string cppPath = iCppFilePath;
63-
std::string headerFilename = ra::filesystem::getFilename(headerPath.c_str());
64-
std::string cppFilename = ra::filesystem::getFilename(iCppFilePath);
63+
std::string headerFilename = ra::filesystem::GetFilename(headerPath.c_str());
64+
std::string cppFilename = ra::filesystem::GetFilename(iCppFilePath);
6565

6666
//create cpp file
6767
FILE * cpp = fopen(cppPath.c_str(), "w");
@@ -72,8 +72,8 @@ namespace bin2cpp
7272
}
7373

7474
//determine file properties
75-
uint32_t fileSize = ra::filesystem::getFileSize(input);
76-
std::string filename = ra::filesystem::getFilename(mInputFile.c_str());
75+
uint32_t fileSize = ra::filesystem::GetFileSize(input);
76+
std::string filename = ra::filesystem::GetFilename(mInputFile.c_str());
7777
//long lastSegmentSize = fileSize%iChunkSize;
7878
//size_t numSegments = fileSize/iChunkSize + (lastSegmentSize == 0 ? 0 : 1);
7979

@@ -98,7 +98,7 @@ namespace bin2cpp
9898
fprintf(cpp, " %s() { build(); }\n", className.c_str());
9999
fprintf(cpp, " virtual ~%s() {}\n", className.c_str());
100100
fprintf(cpp, " virtual size_t getSize() const { return %u; }\n", fileSize);
101-
fprintf(cpp, " virtual const char * getFilename() const { return \"%s\"; }\n", ra::filesystem::getFilename(mInputFile.c_str()).c_str());
101+
fprintf(cpp, " virtual const char * getFilename() const { return \"%s\"; }\n", ra::filesystem::GetFilename(mInputFile.c_str()).c_str());
102102
fprintf(cpp, " virtual const char * getBuffer() const { return mBuffer.c_str(); }\n");
103103
fprintf(cpp, " void build()\n");
104104
fprintf(cpp, " {\n");
@@ -122,11 +122,11 @@ namespace bin2cpp
122122
switch(mCppEncoder)
123123
{
124124
case IGenerator::CPP_ENCODER_HEX:
125-
cppEncoder = ra::cppencoder::toHexString(buffer, readSize);
125+
cppEncoder = ra::code::cpp::ToHexString(buffer, readSize);
126126
break;
127127
case IGenerator::CPP_ENCODER_OCT:
128128
default:
129-
cppEncoder = ra::cppencoder::toOctString(buffer, readSize, false);
129+
cppEncoder = ra::code::cpp::ToOctString(buffer, readSize, false);
130130
break;
131131
};
132132

src/bin2cpp/StringGenerator.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <string>
2929
#include <stdlib.h>
3030

31-
#include "rapidassist/cppencoder.h"
31+
#include "rapidassist/code_cpp.h"
3232
#include "rapidassist/strings.h"
3333
#include "rapidassist/filesystem.h"
3434

@@ -55,13 +55,13 @@ namespace bin2cpp
5555
return false;
5656

5757
//Uppercase function identifier
58-
std::string functionIdentifier = ra::strings::capitalizeFirstCharacter(mFunctionIdentifier);
58+
std::string functionIdentifier = ra::strings::CapitalizeFirstCharacter(mFunctionIdentifier);
5959

6060
//Build header and cpp file path
6161
std::string headerPath = getHeaderFilePath(iCppFilePath);
6262
std::string cppPath = iCppFilePath;
63-
std::string headerFilename = ra::filesystem::getFilename(headerPath.c_str());
64-
std::string cppFilename = ra::filesystem::getFilename(iCppFilePath);
63+
std::string headerFilename = ra::filesystem::GetFilename(headerPath.c_str());
64+
std::string cppFilename = ra::filesystem::GetFilename(iCppFilePath);
6565

6666
//create cpp file
6767
FILE * cpp = fopen(cppPath.c_str(), "w");
@@ -72,8 +72,8 @@ namespace bin2cpp
7272
}
7373

7474
//determine file properties
75-
uint32_t fileSize = ra::filesystem::getFileSize(input);
76-
std::string filename = ra::filesystem::getFilename(mInputFile.c_str());
75+
uint32_t fileSize = ra::filesystem::GetFileSize(input);
76+
std::string filename = ra::filesystem::GetFilename(mInputFile.c_str());
7777

7878
//Build class name
7979
std::string className;
@@ -96,7 +96,7 @@ namespace bin2cpp
9696
fprintf(cpp, " %s() {}\n", className.c_str());
9797
fprintf(cpp, " virtual ~%s() {}\n", className.c_str());
9898
fprintf(cpp, " virtual size_t getSize() const { return %u; }\n", fileSize);
99-
fprintf(cpp, " virtual const char * getFilename() const { return \"%s\"; }\n", ra::filesystem::getFilename(mInputFile.c_str()).c_str());
99+
fprintf(cpp, " virtual const char * getFilename() const { return \"%s\"; }\n", ra::filesystem::GetFilename(mInputFile.c_str()).c_str());
100100
fprintf(cpp, " virtual const char * getBuffer() const\n");
101101
fprintf(cpp, " {\n");
102102
fprintf(cpp, " const char * buffer = ""\n");
@@ -124,11 +124,11 @@ namespace bin2cpp
124124
switch(mCppEncoder)
125125
{
126126
case IGenerator::CPP_ENCODER_HEX:
127-
cppEncoder = ra::cppencoder::toHexString(buffer, readSize);
127+
cppEncoder = ra::code::cpp::ToHexString(buffer, readSize);
128128
break;
129129
case IGenerator::CPP_ENCODER_OCT:
130130
default:
131-
cppEncoder = ra::cppencoder::toOctString(buffer, readSize, false);
131+
cppEncoder = ra::code::cpp::ToOctString(buffer, readSize, false);
132132
break;
133133
};
134134

src/bin2cpp/Win32ResourceGenerator.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <stdlib.h>
3333
#include <string.h> //for strlen()
3434

35-
#include "rapidassist/cppencoder.h"
35+
#include "rapidassist/code_cpp.h"
3636
#include "rapidassist/strings.h"
3737
#include "rapidassist/filesystem.h"
3838

@@ -63,13 +63,13 @@ namespace bin2cpp
6363
return false;
6464

6565
//Uppercase function identifier
66-
std::string functionIdentifier = ra::strings::capitalizeFirstCharacter(mFunctionIdentifier);
66+
std::string functionIdentifier = ra::strings::CapitalizeFirstCharacter(mFunctionIdentifier);
6767

6868
//Build header and cpp file path
6969
std::string headerPath = getHeaderFilePath(iCppFilePath);
7070
std::string cppPath = iCppFilePath;
71-
std::string headerFilename = ra::filesystem::getFilename(headerPath.c_str());
72-
std::string cppFilename = ra::filesystem::getFilename(iCppFilePath);
71+
std::string headerFilename = ra::filesystem::GetFilename(headerPath.c_str());
72+
std::string cppFilename = ra::filesystem::GetFilename(iCppFilePath);
7373

7474
//create cpp file
7575
FILE * cpp = fopen(cppPath.c_str(), "w");
@@ -80,8 +80,8 @@ namespace bin2cpp
8080
}
8181

8282
//determine file properties
83-
//uint32_t fileSize = ra::filesystem::getFileSize(input);
84-
std::string filename = ra::filesystem::getFilename(mInputFile.c_str());
83+
//uint32_t fileSize = ra::filesystem::GetFileSize(input);
84+
std::string filename = ra::filesystem::GetFilename(mInputFile.c_str());
8585

8686
//Build class name
8787
std::string className;
@@ -123,7 +123,7 @@ namespace bin2cpp
123123
fprintf(cpp, " }\n");
124124
fprintf(cpp, " virtual ~%s() { unloadResource(); }\n", className.c_str());
125125
fprintf(cpp, " virtual size_t getSize() const { return mBufferSize; }\n");
126-
fprintf(cpp, " virtual const char * getFilename() const { return \"%s\"; }\n", ra::filesystem::getFilename(mInputFile.c_str()).c_str());
126+
fprintf(cpp, " virtual const char * getFilename() const { return \"%s\"; }\n", ra::filesystem::GetFilename(mInputFile.c_str()).c_str());
127127
fprintf(cpp, " virtual const char * getBuffer() const { return mBuffer; }\n");
128128
fprintf(cpp, " void loadResource()\n");
129129
fprintf(cpp, " {\n");
@@ -188,7 +188,7 @@ namespace bin2cpp
188188
{
189189
//Build header file path
190190
std::string resourcePath = iCppFilePath;
191-
ra::strings::replace(resourcePath, ".cpp", ".rc");
191+
ra::strings::Replace(resourcePath, ".cpp", ".rc");
192192
return resourcePath;
193193
}
194194

@@ -204,7 +204,7 @@ namespace bin2cpp
204204
return false;
205205
}
206206

207-
std::string filename = ra::filesystem::getFilename(mInputFile.c_str());
207+
std::string filename = ra::filesystem::GetFilename(mInputFile.c_str());
208208

209209
//write res file heading
210210
fprintf(res, "%s", getHeaderTemplate().c_str());
@@ -228,7 +228,7 @@ namespace bin2cpp
228228

229229
std::string checksumString;
230230
crc32String(&checksum, checksumString);
231-
checksumString = ra::strings::uppercase(checksumString);
231+
checksumString = ra::strings::Uppercase(checksumString);
232232

233233
//build the final identifier
234234
std::string id;

0 commit comments

Comments
 (0)