Externalize version string into a header file (version must be in double quotes)

This commit is contained in:
Shazron Abdullah 2016-01-05 16:21:19 -08:00
parent e57a4da108
commit ca29173c80
3 changed files with 6 additions and 2 deletions

View File

@ -25,6 +25,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
7E1C00CC1C3C93AF00D686B5 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = version.h; path = src/version.h; sourceTree = SOURCE_ROOT; };
7E70898E1B587BF3004D23AA /* ios-deploy */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ios-deploy"; sourceTree = BUILT_PRODUCTS_DIR; };
7E7089991B587DE4004D23AA /* ios-deploy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ios-deploy.c"; path = "src/ios-deploy.c"; sourceTree = SOURCE_ROOT; };
7E70899A1B587DE4004D23AA /* errors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = errors.h; path = src/errors.h; sourceTree = SOURCE_ROOT; };
@ -66,6 +67,7 @@
7E7089901B587BF3004D23AA /* ios-deploy */ = {
isa = PBXGroup;
children = (
7E1C00CC1C3C93AF00D686B5 /* version.h */,
7E7089991B587DE4004D23AA /* ios-deploy.c */,
7E70899A1B587DE4004D23AA /* errors.h */,
7E70899B1B587DE4004D23AA /* MobileDevice.h */,

View File

@ -18,7 +18,6 @@
#include "MobileDevice.h"
#include "errors.h"
#define APP_VERSION @"1.8.4"
#define PREP_CMDS_PATH @"/tmp/%@/fruitstrap-lldb-prep-cmds-"
#define LLDB_SHELL @"lldb -s %@"
/*
@ -1806,7 +1805,9 @@ void usage(const char* app) {
}
void show_version() {
NSLogOut(@"%@", APP_VERSION);
NSLogOut(@"%@", @
#include "version.h"
);
}
int main(int argc, char *argv[]) {

1
src/version.h Normal file
View File

@ -0,0 +1 @@
"1.8.4"