| 1 | /**************************************************************************** |
|---|
| 2 | * NAME: App_Version.c |
|---|
| 3 | *---------------------------------------------------------------------------- |
|---|
| 4 | * Copyright (c) DIGITAL STREAM Technology Inc. |
|---|
| 5 | *---------------------------------------------------------------------------- |
|---|
| 6 | * CREATED_BY: Do Gon Lee |
|---|
| 7 | * CREATION_DATE: 2009/08/24 |
|---|
| 8 | * $Author: foxhunt $ |
|---|
| 9 | * $Revision: 1.0 $ |
|---|
| 10 | * $Date: 2009/08/24 10:39:43 $ |
|---|
| 11 | *---------------------------------------------------------------------------- |
|---|
| 12 | * PURPOSE: |
|---|
| 13 | * - build date/time and sw version/project name definition file. |
|---|
| 14 | *****************************************************************************/ |
|---|
| 15 | |
|---|
| 16 | /*_____ I N C L U D E __________________________________________*/ |
|---|
| 17 | |
|---|
| 18 | #include "App_Main.h" |
|---|
| 19 | |
|---|
| 20 | #include "App_Version.h" |
|---|
| 21 | #include "App_Revision.h" // ÁÖÀÇ!! ÀÌ Çì´õ ÆÄÀÏÀº makefile¿¡¼ ÀÚµ¿ »ý¼ºµÊ. |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | /*_____ D E F I N I T I O N ____________________________________*/ |
|---|
| 28 | |
|---|
| 29 | #if COMMENT |
|---|
| 30 | _____DbgPrint_____(){} |
|---|
| 31 | #endif |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | #if COMMENT |
|---|
| 38 | ____Config____(){} |
|---|
| 39 | #endif |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | #if COMMENT |
|---|
| 46 | ____Types____(){} |
|---|
| 47 | #endif |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | #if COMMENT |
|---|
| 54 | ____Variables____(){} |
|---|
| 55 | #endif |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | /*_____ F U N C T I O N ________________________________________*/ |
|---|
| 62 | |
|---|
| 63 | const char *App_GetSwVersion(void) |
|---|
| 64 | { |
|---|
| 65 | return APP_SW_VERSION; |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | // 2010.04.15 foxhunt : build date & timeÀ» µû·Î Ç¥±âÇϹǷÎ, APP_BUILD_NUMBER »ç¿ëÇÏÁö ¾Ê±â·Î ÇÑ´Ù. |
|---|
| 70 | const char *App_GetBuildNumber(void) |
|---|
| 71 | { |
|---|
| 72 | return APP_BUILD_NUMBER; |
|---|
| 73 | } |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | const char *App_GetPrjName(void) |
|---|
| 77 | { |
|---|
| 78 | const char *project_names[] = APP_PRJ_ID_NAME_TABLE; |
|---|
| 79 | |
|---|
| 80 | if ((UINT32)APP_PRJ_ID >= sizeof(project_names)/sizeof(project_names[0])) { |
|---|
| 81 | DHL_ASSERT(FALSE, "APP_PRJ_ID is invalid"); |
|---|
| 82 | } |
|---|
| 83 | |
|---|
| 84 | return project_names[APP_PRJ_ID]; |
|---|
| 85 | } |
|---|
| 86 | |
|---|
| 87 | |
|---|
| 88 | /* |
|---|
| 89 | cafrii 081223 add |
|---|
| 90 | |
|---|
| 91 | if revision string is just digits (ex: "340"), |
|---|
| 92 | then this local copy is exactly same as svn repository. |
|---|
| 93 | |
|---|
| 94 | if revision string has '+' sign at the end (ex: "340+3"), |
|---|
| 95 | this working copy is not same as repo, but it has some changed files. |
|---|
| 96 | last digit means the number of changed files. |
|---|
| 97 | */ |
|---|
| 98 | const char *App_GetRevision(void) |
|---|
| 99 | { |
|---|
| 100 | static char rev[100]; |
|---|
| 101 | |
|---|
| 102 | /* |
|---|
| 103 | ¿©±â¼´Â ProjectÀ̸§¿¡ »ó°ü ¾øÀÌ ¸ðµÎ NEO_xxx ¶ó´Â prefix¸¦ »ç¿ëÇÑ´Ù. |
|---|
| 104 | svn repositoryÀÇ À̸§Àº NEO À̰í, |
|---|
| 105 | Neo, Trinity, Udcp ¸ðµÎ neo svn ¿¡¼ °ü¸®µÇ±â ¶§¹®. |
|---|
| 106 | */ |
|---|
| 107 | |
|---|
| 108 | #if defined (NEO_SW_REVISION) |
|---|
| 109 | sprintf(rev, "%d", NEO_SW_REVISION); |
|---|
| 110 | #else |
|---|
| 111 | strcpy(rev, "0"); |
|---|
| 112 | #endif |
|---|
| 113 | |
|---|
| 114 | #if defined (NEO_SW_LOCALPATCH) |
|---|
| 115 | if (NEO_SW_LOCALPATCH) |
|---|
| 116 | sprintf(rev+strlen(rev), "+%d", NEO_SW_LOCALPATCH); |
|---|
| 117 | #endif |
|---|
| 118 | |
|---|
| 119 | return rev; |
|---|
| 120 | } |
|---|
| 121 | |
|---|
| 122 | |
|---|
| 123 | /* |
|---|
| 124 | "Dec 10 2009" ¿Í °°Àº Çü½ÄÀ» "2009/12/10" Çü½ÄÀ¸·Î º¯°æÇÔ. |
|---|
| 125 | */ |
|---|
| 126 | const char *App_GetBuildDateString(void) |
|---|
| 127 | { |
|---|
| 128 | #if 0 |
|---|
| 129 | static char s_buf[32]; |
|---|
| 130 | char stryear[10], strmonth[10], strday[10]; |
|---|
| 131 | int i, month = 0; |
|---|
| 132 | |
|---|
| 133 | const char *month_name[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", |
|---|
| 134 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; |
|---|
| 135 | |
|---|
| 136 | sscanf(__DATE__, "%s %s %s", strmonth, strday, stryear); |
|---|
| 137 | |
|---|
| 138 | for (i=0; i<12; i++) { |
|---|
| 139 | if (strncmp(strmonth, month_name[i], 3) == 0) |
|---|
| 140 | month = i+1; |
|---|
| 141 | } |
|---|
| 142 | sprintf(s_buf, "%s/%u/%s", stryear, month, strday); |
|---|
| 143 | #endif |
|---|
| 144 | |
|---|
| 145 | return "2013 May 2 "; |
|---|
| 146 | } |
|---|
| 147 | |
|---|
| 148 | |
|---|
| 149 | const char *App_GetBuildTimeString(void) |
|---|
| 150 | { |
|---|
| 151 | return __TIME__; |
|---|
| 152 | } |
|---|
| 153 | |
|---|
| 154 | const char *App_GetBuildDateTimeString(void) |
|---|
| 155 | { |
|---|
| 156 | return ""; |
|---|
| 157 | } |
|---|
| 158 | |
|---|
| 159 | |
|---|
| 160 | |
|---|
| 161 | |
|---|
| 162 | |
|---|
| 163 | /* end of file */ |
|---|