Skip to content

Commit

Permalink
[master] release version 2020.04.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheVice committed Apr 27, 2020
2 parents 0d1e101 + d32fbab commit f597248
Show file tree
Hide file tree
Showing 60 changed files with 15,875 additions and 4,478 deletions.
21 changes: 17 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ add_library(ant4c STATIC
"${CMAKE_SOURCE_DIR}/common.h"
"${CMAKE_SOURCE_DIR}/conversion.c"
"${CMAKE_SOURCE_DIR}/conversion.h"
"${CMAKE_SOURCE_DIR}/copy_move.c"
"${CMAKE_SOURCE_DIR}/copy_move.h"
"${CMAKE_SOURCE_DIR}/date_time.c"
"${CMAKE_SOURCE_DIR}/date_time.h"
"${CMAKE_SOURCE_DIR}/echo.c"
Expand All @@ -27,8 +29,17 @@ add_library(ant4c STATIC
"${CMAKE_SOURCE_DIR}/exec.h"
"${CMAKE_SOURCE_DIR}/file_system.c"
"${CMAKE_SOURCE_DIR}/file_system.h"
"${CMAKE_SOURCE_DIR}/for_each.c"
"${CMAKE_SOURCE_DIR}/hash.blake2.c"
"${CMAKE_SOURCE_DIR}/hash.blake3.c"
"${CMAKE_SOURCE_DIR}/hash.c"
"${CMAKE_SOURCE_DIR}/hash.crc32.c"
"${CMAKE_SOURCE_DIR}/hash.h"
"${CMAKE_SOURCE_DIR}/hash.sha3.c"
"${CMAKE_SOURCE_DIR}/interpreter.c"
"${CMAKE_SOURCE_DIR}/interpreter.h"
"${CMAKE_SOURCE_DIR}/load_file.c"
"${CMAKE_SOURCE_DIR}/load_file.h"
"${CMAKE_SOURCE_DIR}/math_unit.c"
"${CMAKE_SOURCE_DIR}/math_unit.h"
"${CMAKE_SOURCE_DIR}/operating_system.c"
Expand All @@ -41,10 +52,15 @@ add_library(ant4c STATIC
"${CMAKE_SOURCE_DIR}/property.h"
"${CMAKE_SOURCE_DIR}/range.c"
"${CMAKE_SOURCE_DIR}/range.h"
"${CMAKE_SOURCE_DIR}/sleep_unit.c"
"${CMAKE_SOURCE_DIR}/sleep_unit.h"
"${CMAKE_SOURCE_DIR}/string_unit.c"
"${CMAKE_SOURCE_DIR}/string_unit.h"
"${CMAKE_SOURCE_DIR}/target.c"
"${CMAKE_SOURCE_DIR}/target.h"
"${CMAKE_SOURCE_DIR}/text_encoding.c"
"${CMAKE_SOURCE_DIR}/text_encoding.h"
"${CMAKE_SOURCE_DIR}/try_catch.c"
"${CMAKE_SOURCE_DIR}/version.c"
"${CMAKE_SOURCE_DIR}/version.h"
"${CMAKE_SOURCE_DIR}/xml.c"
Expand All @@ -57,12 +73,9 @@ add_executable(ant4c_app

target_link_libraries(ant4c_app ant4c)

if(DEFINED PROGRAM_VERSION AND DEFINED PROGRAM_VERSION_LENGTH)
if(DEFINED PROGRAM_VERSION)
target_compile_definitions(ant4c PRIVATE -DPROGRAM_VERSION=${PROGRAM_VERSION})
target_compile_definitions(ant4c PRIVATE -DPROGRAM_VERSION_LENGTH=${PROGRAM_VERSION_LENGTH})

target_compile_definitions(ant4c_app PRIVATE -DPROGRAM_VERSION=${PROGRAM_VERSION})
target_compile_definitions(ant4c_app PRIVATE -DPROGRAM_VERSION_LENGTH=${PROGRAM_VERSION_LENGTH})
endif()

if(NOT MSVC)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 TheVice
Copyright (c) 2019 - 2020 TheVice

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
189 changes: 7 additions & 182 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ Ant for C is C-based script tool. Source of script should be written in XML-base
For understanding why tools with such vision was written read [Apache Ant Introduction](http://jakarta.apache.org/ant/manual/) or/and [NAnt help](http://nant.sourceforge.net/).

Name of program just reference to language on which source was written.

For first initial release echo and exec tasks support. Targets are not support. Functions from name spaces bool, cygpath, datetime, double, environment, int, int64, long, math, operating_system, path, platform, program, project, property, string, timespan and version are available.

Developing was started in August of 2019 and first present to the public in October of 2019.
The second public release available on April of 2020.

## Downloads
Binaries for Windows, Ubuntu 16.04, OpenBSD 6.5 and FreeBSD 12.0 are available on [release page](https://github.com/TheVice/Ant4C/releases).
Binaries for Windows, Ubuntu, OpenBSD and FreeBSD are available on [release page](https://github.com/TheVice/Ant4C/releases).
Also library available to use ant4c with other C/C++ projects.
For Windows binaries present after compiled with MinGW and Visual Studio 2019.

## Differences from NAnt
Some name space have addition functions (like is64bit-operating-system from environment) and addition version (like substring with two arguments from string addition to version with three arguments) comparing to NAnt implementation. Some functions are missed.
## Developing
Tests (at the develop branch) written in C++ and required [Google Test](https://github.com/google/googletest) and [pugixml](https://github.com/zeux/pugixml/) libraries.
On systems with missed this libraries in packages repositories or if unable to install it, PUGIXML_PATH and GTEST_PATH definition can be used while configure project with CMake.
For example:
* cmake -DCMAKE_BUILD_TYPE=Debug -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_MAKE_ARGUMENTS="-j$(nproc) -s" -DPUGIXML_PATH=<full path>/pugixml-1.9/ -DGTEST_PATH=<full path>/googletest-release-1.8.1/ <full path>/Ant4C

## Building
Build can be done by one of C compilers - MSVC, MinGW, GCC or CLang, after configuring with [CMake](http://www.cmake.org/download/).
Expand All @@ -32,180 +32,5 @@ For release configuration, without version information, Ant4C script can be used

Of course full path to cmake (for example -D:cmake=/usr/local/bin/cmake or -D:cmake="C:\Program Files\cmake\bin\cmake.exe") and build file should be provided.

## List of functions
```
bool::parse
bool::to-string
```
```
double::parse
double::to-string
```
```
int::parse
int::to-string
```
```
long::parse
long::to-string
```
```
datetime::format-to-string
datetime::parse
datetime::to-string
```
```
datetime::get-day
datetime::get-day-of-year
datetime::get-days-in-month
datetime::get-hour
datetime::get-minute
datetime::get-month
datetime::get-second
datetime::get-year
datetime::is-leap-year
datetime::now
datetime::from-input
```
```
timespan::parse
timespan::to-string
```
```
timespan::from-days
timespan::from-hours
timespan::from-minutes
timespan::from-seconds
timespan::get-days
timespan::get-hours
timespan::get-minutes
timespan::get-seconds
timespan::get-total-days
timespan::get-total-hours
timespan::get-total-minutes
timespan::get-total-seconds
```
```
environment::get-folder-path
environment::get-machine-name
environment::get-operating-system
environment::get-user-name
environment::get-variable
environment::get-version
environment::newline
environment::variable-exists
```
```
math::abs
math::ceiling
math::floor
math::round
math::acos
math::asin
math::atan
math::atan2
math::cos
math::cosh
math::exp
math::log
math::log10
math::max
math::min
math::pow
math::sign
math::sin
math::sinh
math::sqrt
math::tan
math::tanh
math::cot
math::coth
math::truncate
math::PI
math::E
math::degrees
math::radians
math::addition
math::subtraction
math::multiplication
math::division
math::near
math::less
math::greater
```
```
program::version
program::current_directory
```
```
platform::get-name
platform::is-unix
platform::is-windows
```
```
project::get-base-directory
project::get-buildfile-path
project::get-buildfile-uri
project::get-default-target
project::get-name
```
```
property::exists
property::get-value
property::is-dynamic
property::is-readonly
```
```
operating-system::get-platform
operating-system::get-version
operating-system::to-string
```
```
path::change-extension
path::combine
path::get-directory-name
path::get-extension
path::get-file-name
path::get-file-name-without-extension
path::get-full-path
path::get-path-root
path::get-temp-file-name
path::get-temp-path
path::has-extension
path::is-path-rooted
```
```
string::contains
string::empty
string::ends-with
string::equal
string::get-length
string::index-of
string::last-index-of
string::quote
string::replace
string::starts-with
string::substring
string::to-lower
string::to-upper
string::trim
string::trim-end
string::trim-start
string::un-quote
```
```
cygpath::get-dos-path
cygpath::get-unix-path
cygpath::get-windows-path
```
```
version::parse
version::to-string
version::get-build
version::get-major
version::get-minor
version::get-revision
```

## License
This project available under terms of [MIT License](LICENSE).
Loading

0 comments on commit f597248

Please sign in to comment.