From f9ba524a8e333388da0d3be1ca70240340a2b32b Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 25 Feb 2011 13:49:51 -0800 Subject: [PATCH 1/1] Fix version number update for hardcoding. --- MobileCydia.mm | 4 ++-- Version.h.sh | 10 ---------- makefile | 11 +++++------ 3 files changed, 7 insertions(+), 18 deletions(-) delete mode 100755 Version.h.sh diff --git a/MobileCydia.mm b/MobileCydia.mm index da8ef753..0b4b56e3 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -125,8 +125,6 @@ extern "C" { #include "SDURLCache/SDURLCache.h" #include "substrate.h" - -#include "Version.h" /* }}} */ /* Profiler {{{ */ @@ -208,6 +206,8 @@ void PrintTimes() { while (false); \ [_pool release]; +#define Cydia_ CYDIA_VERSION + #define lprintf(args...) fprintf(stderr, args) #define ForRelease 1 diff --git a/Version.h.sh b/Version.h.sh deleted file mode 100755 index 29313692..00000000 --- a/Version.h.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -version=$(./version.sh) - -new="#define Cydia_ \"${version}\"" -old=$(cat Version.h 2>/dev/null) - -if [[ ${old} != ${new} ]]; then - echo "${new}" >Version.h -fi diff --git a/makefile b/makefile index 57b04869..fbd040c4 100644 --- a/makefile +++ b/makefile @@ -50,6 +50,8 @@ uikit += -framework UIKit backrow := backrow += -FAppleTV -framework BackRow -framework AppleTV +version := $(shell ./version.sh) + #cycc = cycc -r4.2 -i$(ios) -o$@ gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc) cycc = $(gxx) -mthumb -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=2.0 -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks @@ -62,16 +64,13 @@ clean: %.o: %.c $(cycc) -c -o $@ -x c $< -Version.h: - ./Version.h.sh - sysroot: @echo "Please read compiling.txt: you do not have a ./sysroot/ folder with the on-device requirements." 1>&2 @echo 1>&2 @exit 1 -MobileCydia: sysroot Version.h MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp - $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit) +MobileCydia: sysroot MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp + $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit) -DCYDIA_VERSION='"$(version)"' ldid -Slaunch.xml $@ || { rm -f $@ && false; } CydiaAppliance: CydiaAppliance.mm @@ -109,7 +108,7 @@ package: MobileCydia sudo chmod 6755 _/Applications/Cydia.app/MobileCydia mkdir -p debs - ln -sf debs/cydia_$$(./version.sh)_iphoneos-arm.deb Cydia.deb + ln -sf debs/cydia_$(version)_iphoneos-arm.deb Cydia.deb $(dpkg) -b _ Cydia.deb @echo "$$(stat -L -f "%z" Cydia.deb) $$(stat -f "%Y" Cydia.deb)" -- 2.45.2