Skip to content

Commit 8fdf656

Browse files
authored
Merge pull request #49 from saxbophone/develop
v0.11.3
2 parents 6f94fe0 + dca9e86 commit 8fdf656

File tree

6 files changed

+31
-12
lines changed

6 files changed

+31
-12
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
cmake_minimum_required(VERSION 3.0)
33
enable_language(C CXX)
44

5-
project(saxbospiral VERSION 0.11.1 LANGUAGES C)
5+
project(saxbospiral VERSION 0.11.3 LANGUAGES C)
66
set(CMAKE_C_STANDARD 99)
77
set(CMAKE_C_STANDARD_REQUIRED ON)
88
set(
99
SAXBOSPIRAL_VERSION_STRING
10-
"v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}"
10+
"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}"
1111
)
1212
set(SAXBOSPIRAL_ESCAPED_VERSION_STRING "\"${SAXBOSPIRAL_VERSION_STRING}\"")
1313
# end basic metadata
@@ -96,11 +96,11 @@ if(COMMAND_INTERPRETER)
9696
add_test(
9797
NAME func_test COMMAND ${COMMAND_INTERPRETER}
9898
# each script needs to know the path to the sxp cli executable
99-
"func_test.sh" sxp "saxbospiral ${SAXBOSPIRAL_VERSION_STRING}"
99+
"func_test.sh" sxp "saxbospiral v${SAXBOSPIRAL_VERSION_STRING}"
100100
)
101101
add_custom_target(
102102
build_logo ${COMMAND_INTERPRETER}
103-
"build_logo.sh" sxp "saxbospiral.png" "saxbospiral ${SAXBOSPIRAL_VERSION_STRING}"
103+
"build_logo.sh" sxp "saxbospiral.png" "saxbospiral v${SAXBOSPIRAL_VERSION_STRING}"
104104
)
105105
else()
106106
# warn about skipping of functional test script

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,42 @@ Experimental generation of 2D spiralling lines based on input binary data
44

55
## Dependencies
66

7-
You will need:
7+
### Library
8+
9+
For the library, you will need:
810

911
- A compiler that can compile C99 code
1012
- [Cmake](https://cmake.org/) - v3.0 or newer
1113
- [libpng](http://www.libpng.org/pub/png/libpng.html) - (this often comes preinstalled with many modern unix-like systems)
1214

15+
### CLI
16+
17+
For the included CLI program, you will also need:
18+
19+
- [Argtable 2](http://argtable.sourceforge.net/) - must use v2, v1 and v3 will not work
20+
1321
### Note:
1422

1523
These commands are for unix-like systems, without an IDE or other build system besides CMake. If building for a different system, or within an IDE or other environment, consult your IDE/System documentation on how to build CMake projects.
1624

17-
## Build
25+
Additionally, it is of worth noting that this library has only been thoroughly tested and developed on Ubuntu GNU/Linux, although every effort has been made to make it as cross-platform as possible. It should compile under any POSIX-compliant system with the correct additional dependencies listed. **v0.8** is known to successfully cross-compile from Ubuntu to Windows (via [cygwin](https://www.cygwin.com/)) and Max OSX (using a locally-built compiler toolchain provided via [OSXCross](https://github.com/tpoechtrager/osxcross). It is highly likely that all other versions cross-compile as well (but I haven't yet verified this).
26+
27+
## Basic Build
1828

1929
```sh
2030
cmake .
2131
make
2232
```
2333

34+
## Recommended Library Build
35+
36+
Add two custom options to CMake to build the library in release mode (with full optimisation) and as a shared dynamic library:
37+
38+
```sh
39+
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .
40+
make
41+
```
42+
2443
## Test
2544

2645
```sh

saxbospiral.png

0 Bytes
Loading

saxbospiral/render_backends/png_backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ write_png_image(bitmap_t bitmap) {
8282
metadata[2].text = "Copyright Joshua Saxby";
8383
metadata[3].key = "Software";
8484
// SAXBOSPIRAL_VERSION_STRING is a macro that expands to a double-quoted string
85-
metadata[3].text = "SAXBOSPIRAL " SAXBOSPIRAL_VERSION_STRING;
85+
metadata[3].text = "SAXBOSPIRAL v" SAXBOSPIRAL_VERSION_STRING;
8686
metadata[4].key = "Comment";
8787
metadata[4].text = "https://github.com/saxbophone/saxbospiral";
8888
// set compression of each metadata key

saxbospiral/serialise.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ load_spiral(buffer_t buffer) {
4141
.minor = buffer.bytes[13],
4242
.patch = buffer.bytes[14],
4343
};
44-
// we don't accept anything over v0.11.x, so the max is v0.11.255
45-
version_t max_version = { .major = 0, .minor = 11, .patch = 255, };
44+
// we don't accept anything over v0.12.x, so the max is v0.12.255
45+
version_t max_version = { .major = 0, .minor = 12, .patch = 255, };
4646
// check for version compatibility
4747
if(version_hash(buffer_version) > version_hash(max_version)) {
4848
// check failed

sxp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ run(
134134
if(spiral.size == 0) {
135135
fprintf(
136136
stderr, "ERROR - File data was invalid (not a format accepted "
137-
"by SAXBOSPIRAL " SAXBOSPIRAL_VERSION_STRING ")\n"
137+
"by SAXBOSPIRAL v" SAXBOSPIRAL_VERSION_STRING ")\n"
138138
);
139139
return false;
140140
}
@@ -149,7 +149,7 @@ run(
149149
if(spiral.size == 0) {
150150
fprintf(
151151
stderr, "ERROR - File data was invalid (not a format accepted "
152-
"by SAXBOSPIRAL " SAXBOSPIRAL_VERSION_STRING ")\n"
152+
"by SAXBOSPIRAL v" SAXBOSPIRAL_VERSION_STRING ")\n"
153153
);
154154
return false;
155155
}
@@ -240,7 +240,7 @@ main(int argc, char * argv[]) {
240240
int count_errors = arg_parse(argc, argv, argtable);
241241
// if we asked for the version, show it
242242
if(version->count > 0) {
243-
printf("Saxbospiral " SAXBOSPIRAL_VERSION_STRING "\n");
243+
printf("%s %s\n", program_name, SAXBOSPIRAL_VERSION_STRING);
244244
status_code = 0;
245245
}
246246
if(help->count > 0) {

0 commit comments

Comments
 (0)