diff --git a/CMakeLists.txt b/CMakeLists.txt index b7ebd6629..b0c707d40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ endif() project(swmm-solver - VERSION 5.2.3 + VERSION 1.0.0 LANGUAGES C CXX ) diff --git a/extern/version.h.in b/extern/version.h.in index 6fcc6a895..1a23b6cb3 100644 --- a/extern/version.h.in +++ b/extern/version.h.in @@ -16,24 +16,17 @@ #define PROJECT "SWMM" -#define ORGANIZATION "Open_Water_Analytics" +#define ORGANIZATION "pyswmm" -#define VERSION "@swmm-solver_VERSION@" -#define VERSION_MAJOR @swmm-solver_VERSION_MAJOR@ -#define VERSION_MINOR @swmm-solver_VERSION_MINOR@ -#define VERSION_PATCH @swmm-solver_VERSION_PATCH@ -#define GIT_HASH "@GIT_HASH@" +#define TK_VERSION "@swmm-solver_VERSION@" +#define TK_VERSION_MAJOR @swmm-solver_VERSION_MAJOR@ +#define TK_VERSION_MINOR @swmm-solver_VERSION_MINOR@ +#define TK_VERSION_PATCH @swmm-solver_VERSION_PATCH@ +#define Tk_GIT_HASH "@GIT_HASH@" #define PLATFORM "@CMAKE_SYSTEM_NAME@" #define COMPILER "@CMAKE_C_COMPILER_ID@" #define COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@" #define BUILD_ID "@BUILD_ID@" - -static inline int get_version_legacy() { \ - return VERSION_MAJOR * 10000 + VERSION_MINOR * 1000 + VERSION_PATCH; \ -} - - - #endif /* VERSION_H_ */ diff --git a/src/solver/consts.h b/src/solver/consts.h index 3cf490793..e5d851b14 100644 --- a/src/solver/consts.h +++ b/src/solver/consts.h @@ -16,8 +16,7 @@ // General Constants //------------------ -// OWA Version string stored in version.h -// #define VERSION 52003 +#define VERSION 52003 #define MAGICNUMBER 516114522 #define EOFMARK 0x1A // Use 0x04 for UNIX systems #define MAXTITLE 3 // Max. # title lines diff --git a/src/solver/output.c b/src/solver/output.c index 507af9e56..c299560c0 100644 --- a/src/solver/output.c +++ b/src/solver/output.c @@ -192,13 +192,7 @@ int output_open() F_SEEK(Fout.file, 0, SEEK_SET); k = MAGICNUMBER; fwrite(&k, sizeof(INT4), 1, Fout.file); // Magic number - - // OWA EDIT ######################################################## - // OWA manages model version differently from EPA SWMM. - //This function call maintains compatibility - k = get_version_legacy(); - //################################################################## - + k = VERSION; fwrite(&k, sizeof(INT4), 1, Fout.file); // Version number k = FlowUnits; fwrite(&k, sizeof(INT4), 1, Fout.file); // Flow units diff --git a/src/solver/report.c b/src/solver/report.c index dd1a3c9d4..ec14f9426 100644 --- a/src/solver/report.c +++ b/src/solver/report.c @@ -227,9 +227,10 @@ void report_writeLogo() // // OWA manages model version differently from EPA SWMM. { + fprintf(Frpt.file, FMT08); sprintf(Msg, \ - "\n OWA STORM WATER MANAGEMENT MODEL - VERSION v%s (OWA %.10s)", - VERSION, BUILD_ID); + "\n PYSWMM TOOLKIT API - VERSION v%s (%.10s)", + TK_VERSION, BUILD_ID); fprintf(Frpt.file, "%s", Msg); fprintf(Frpt.file, FMT09); diff --git a/src/solver/swmm5.c b/src/solver/swmm5.c index 2e49e27f4..d6137ad6a 100644 --- a/src/solver/swmm5.c +++ b/src/solver/swmm5.c @@ -774,14 +774,14 @@ int DLLEXPORT swmm_getMassBalErr(float *runoffErr, float *flowErr, int DLLEXPORT swmm_getVersion() // // Input: none -// Output: returns SWMM engine version number in legacy format +// Output: returns SWMM engine version number // Purpose: retrieves version number of current SWMM engine which // uses a format of xyzzz where x = major version number, // y = minor version number, and zzz = build number. // // NOTE: Each New Release should be updated in consts.h { - return get_version_legacy(); + return VERSION; } //=============================================================================