From: Felix Paul Kühne Date: Wed, 1 Mar 2006 22:21:36 +0000 (+0000) Subject: * don't store the temp release note in the user's Caches-folder, but in /tmp. Renamed... X-Git-Tag: 0.9.0-test0~12103 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=349175aaf78a843b02252d0fc46263e7f1a56d58;p=vlc * don't store the temp release note in the user's Caches-folder, but in /tmp. Renamed it to vlc_releasenote_%@.tmp, whereas %@ is a timestamp (%m-%d-%y--%I.%M.%S.%F) * cleanup of the source --- diff --git a/modules/gui/macosx/update.h b/modules/gui/macosx/update.h index ab47b2bb05..a4eb52c15c 100644 --- a/modules/gui/macosx/update.h +++ b/modules/gui/macosx/update.h @@ -35,7 +35,6 @@ IBOutlet id o_update_window; IBOutlet id o_bar_checking; - NSString * o_hashOfOurBinary; NSString * o_urlOfBinary; update_t * p_u; intf_thread_t * p_intf; diff --git a/modules/gui/macosx/update.m b/modules/gui/macosx/update.m index b5783725fb..9637eff5c1 100644 --- a/modules/gui/macosx/update.m +++ b/modules/gui/macosx/update.m @@ -72,8 +72,6 @@ static VLCUpdate *_o_sharedInstance = nil; - (void)dealloc { - if( o_hashOfOurBinary ) - [o_hashOfOurBinary release]; if( o_urlOfBinary ) [o_urlOfBinary release]; @@ -144,9 +142,9 @@ static VLCUpdate *_o_sharedInstance = nil; BOOL releaseChecked = NO; int x = 0; NSString * pathToReleaseNote; - pathToReleaseNote = [[NSString stringWithString: \ - @"~/Library/Caches/vlc_releasenote_temp.txt"] \ - stringByExpandingTildeInPath]; + pathToReleaseNote = [NSString stringWithFormat: \ + @"/tmp/vlc_releasenote_%@.tmp", [[NSCalendarDate calendarDate] \ + descriptionWithCalendarFormat: @"%m-%d-%y--%I.%M.%S.%F"]]; if( p_uit ) { @@ -172,13 +170,13 @@ static VLCUpdate *_o_sharedInstance = nil; } else if( p_uit->file.i_type == UPDATE_FILE_TYPE_BINARY ) { - msg_Dbg( p_intf, "binary found, version = %s" \ - ", hash=%s, size=%i MB", p_uit->release.psz_version, \ - p_uit->file.psz_md5, \ + msg_Dbg( p_intf, "binary found, version = %s, " \ + "url=%s, size=%i MB", p_uit->release.psz_version, \ + p_uit->file.psz_url, \ (int)((p_uit->file.l_size / 1024) / 1024) ); - [o_fld_currentVersionAndSize setStringValue: \ - [NSString stringWithFormat: \ - @"The current release is %s (%i MB to download).", \ + [o_fld_currentVersionAndSize setStringValue: [NSString \ + stringWithFormat: \ + _NS("The current release is %s (%i MB to download)."), \ p_uit->release.psz_version, ((p_uit->file.l_size \ / 1024) / 1024)]]; @@ -186,15 +184,6 @@ static VLCUpdate *_o_sharedInstance = nil; [o_urlOfBinary release]; o_urlOfBinary = [[NSString alloc] initWithUTF8String: \ p_uit->file.psz_url]; - - /* save the hash of our file, if available */ - if( p_uit->file.psz_md5 ) - { - if( o_hashOfOurBinary ) - [o_hashOfOurBinary release]; - o_hashOfOurBinary = [[NSString alloc] \ - initWithUTF8String: p_uit->file.psz_md5]; - } } if( p_uit->release.i_status == UPDATE_RELEASE_STATUS_NEWER && !releaseChecked ) @@ -272,6 +261,11 @@ static VLCUpdate *_o_sharedInstance = nil; p_uit->release.i_status == UPDATE_RELEASE_STATUS_NEWER && p_uit->file.i_type == UPDATE_FILE_TYPE_BINARY ) { + /* put the mirror information */ + msg_Dbg( p_intf, "used mirror: %s, %s [%s]", \ + p_uit->mirror.psz_name, p_uit->mirror.psz_location, \ + p_uit->mirror.psz_type ); + /* that's our binary */ update_download( p_uit, (char *)[path UTF8String] ); }