summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm7
-rw-r--r--Version.mm3
-rw-r--r--makefile4
3 files changed, 8 insertions, 6 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index bd5ddb9..f842c17 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -208,8 +208,7 @@ void PrintTimes() {
#define _end }
/* }}} */
-#include "Version.h"
-#define Cydia_ CYDIA_VERSION
+extern NSString *Cydia_;
#define lprintf(args...) fprintf(stderr, args)
@@ -3987,7 +3986,7 @@ static _H<NSMutableSet> Diversions_;
}
- (NSString *) version {
- return @ Cydia_;
+ return Cydia_;
}
- (NSString *) device {
@@ -4594,7 +4593,7 @@ static _H<NSMutableSet> Diversions_;
}
- (NSString *) applicationNameForUserAgent {
- NSString *application([NSString stringWithFormat:@"Cydia/%@", @ Cydia_]);
+ NSString *application([NSString stringWithFormat:@"Cydia/%@", Cydia_]);
if (Safari_ != nil)
application = [NSString stringWithFormat:@"Safari/%@ %@", Safari_, application];
diff --git a/Version.mm b/Version.mm
new file mode 100644
index 0000000..83f5982
--- /dev/null
+++ b/Version.mm
@@ -0,0 +1,3 @@
+#include <Foundation/Foundation.h>
+#include "Version.h"
+NSString *Cydia_ = @ CYDIA_VERSION;
diff --git a/makefile b/makefile
index 18dc376..293bc76 100644
--- a/makefile
+++ b/makefile
@@ -67,7 +67,7 @@ dirs := Menes CyteKit Cydia SDURLCache
code := $(foreach dir,$(dirs),$(wildcard $(foreach ext,h hpp c cpp m mm,$(dir)/*.$(ext))))
code := $(filter-out SDURLCache/SDURLCacheTests.m,$(code))
-code += MobileCydia.mm iPhonePrivate.h Cytore.hpp lookup3.c
+code += MobileCydia.mm Version.mm iPhonePrivate.h Cytore.hpp lookup3.c
source := $(filter %.m,$(code)) $(filter %.mm,$(code))
source += $(filter %.c,$(code)) $(filter %.cpp,$(code))
@@ -106,7 +106,7 @@ Objects/%.o: %.mm $(header)
@echo "[cycc] $<"
@$(cycc) -c -o $@ $< $(flags) $(xflags)
-Objects/MobileCydia.o: version.h
+Objects/Version.o: version.h
Images/%.png: %.png
@mkdir -p $(dir $@)