-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version constants to allow fetching version at runtime
- Loading branch information
1 parent
6200e2a
commit d892830
Showing
8 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef IPL3CHECKSUM_VERSION_H | ||
#define IPL3CHECKSUM_VERSION_H | ||
#pragma once | ||
|
||
#include <stdint.h> | ||
|
||
extern const int32_t ipl3checksum_version_major; | ||
extern const int32_t ipl3checksum_version_minor; | ||
extern const int32_t ipl3checksum_version_patch; | ||
|
||
extern const char *const ipl3checksum_version_str; | ||
|
||
extern const char *const ipl3checksum_version_author; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* SPDX-FileCopyrightText: © 2023 Decompollaborate */ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
pub static VERSION_MAJOR: i32 = 1; | ||
pub static VERSION_MINOR: i32 = 1; | ||
pub static VERSION_PATCH: i32 = 0; | ||
|
||
pub static VERSION_INFO: (i32, i32, i32) = (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); | ||
|
||
// TODO: figure out a way to construct this string by using VERSION_MAJOR, VERSION_MINOR and VERSION_PATCH (concat! and stringify! didn't work) | ||
pub static VERSION_STR: &str = "1.1.0"; | ||
|
||
pub static AUTHOR: &str = "Decompollaborate"; | ||
|
||
#[cfg(feature = "c_bindings")] | ||
mod c_bindings { | ||
#[no_mangle] | ||
static ipl3checksum_version_major: i32 = super::VERSION_MAJOR; | ||
#[no_mangle] | ||
static ipl3checksum_version_minor: i32 = super::VERSION_MINOR; | ||
#[no_mangle] | ||
static ipl3checksum_version_patch: i32 = super::VERSION_PATCH; | ||
|
||
// TODO: construct this from super::VERSION_STR | ||
#[no_mangle] | ||
static ipl3checksum_version_str: &[u8] = b"1.1.0\0"; | ||
|
||
// TODO: construct this from super::AUTHOR | ||
#[no_mangle] | ||
static ipl3checksum_version_author: &[u8] = b"Decompollaborate\0"; | ||
} |