]> git.sesse.net Git - vlc/blobdiff - src/misc/update.c
Add AltiVec detection for OpenBSD/powerpc.
[vlc] / src / misc / update.c
index 8a4867377759d199f449093d9e2b2d4fa634e48b..70df3ac1fd6a073f0b8d421f8f43fc219da95f17 100644 (file)
 #   define UPDATE_VLC_STATUS_URL "http://update.videolan.org/vlc/status-ce"
 #elif defined( WIN32 )
 #   define UPDATE_VLC_STATUS_URL "http://update.videolan.org/vlc/status-win-x86"
-#elif defined( __APPLE__ )
-#   if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
-#       define UPDATE_VLC_STATUS_URL "http://update.videolan.org/vlc/status-mac-ppc"
-#   else
-#       define UPDATE_VLC_STATUS_URL "http://update.videolan.org/vlc/status-mac-x86"
-#   endif
 #elif defined( SYS_BEOS )
 #       define UPDATE_VLC_STATUS_URL "http://update.videolan.org/vlc/status-beos-x86"
 #else
@@ -278,8 +272,6 @@ static bool GetUpdateFile( update_t *p_update )
     strncpy( p_update->release.psz_desc, psz_update_data_parser, i_len );
     p_update->release.psz_desc[i_len] = '\0';
 
-    printf("desc %s\n", p_update->release.psz_desc);
-
     /* Now that we know the status is valid, we must download its signature
      * to authenticate it */
     signature_packet_t sign;
@@ -486,11 +478,11 @@ static char *size_str( long int l_size )
     char *psz_tmp = NULL;
     int i_retval = 0;
     if( l_size >> 30 )
-        i_retval = asprintf( &psz_tmp, _("%.1f GB"), (float)l_size/(1<<30) );
+        i_retval = asprintf( &psz_tmp, _("%.1f GiB"), (float)l_size/(1<<30) );
     else if( l_size >> 20 )
-        i_retval = asprintf( &psz_tmp, _("%.1f MB"), (float)l_size/(1<<20) );
+        i_retval = asprintf( &psz_tmp, _("%.1f MiB"), (float)l_size/(1<<20) );
     else if( l_size >> 10 )
-        i_retval = asprintf( &psz_tmp, _("%.1f kB"), (float)l_size/(1<<10) );
+        i_retval = asprintf( &psz_tmp, _("%.1f KiB"), (float)l_size/(1<<10) );
     else
         i_retval = asprintf( &psz_tmp, _("%ld B"), l_size );
 
@@ -739,7 +731,9 @@ static void* update_DownloadReal( vlc_object_t *p_this )
 
     if(answer == 1)
     {
-        answer = ShellExecuteA( NULL, "open", psz_destfile, NULL, NULL, SW_SHOW);
+        wchar_t psz_wdestfile[MAX_PATH];
+        MultiByteToWideChar( CP_UTF8, 0, psz_destfile, -1, psz_wdestfile, MAX_PATH );
+        answer = ShellExecuteW( NULL, L"open", psz_wdestfile, NULL, NULL, SW_SHOW);
         if(answer > 32)
             libvlc_Quit(p_this->p_libvlc);
     }