Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
974a6ad2
Commit
974a6ad2
authored
Jul 29, 2009
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed update mechanism for release builds
This will still assert in debug build due to a core bug
parent
1f1f81b9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
23 deletions
+19
-23
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+4
-4
modules/gui/macosx/update.h
modules/gui/macosx/update.h
+2
-4
modules/gui/macosx/update.m
modules/gui/macosx/update.m
+13
-15
No files found.
modules/gui/macosx/intf.m
View file @
974a6ad2
...
...
@@ -813,10 +813,6 @@ static VLCMain *_o_sharedMainInstance = nil;
/* remove global observer watching for vout device changes correctly */
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
];
#ifdef UPDATE_CHECK
[
o_update
end
];
#endif
/* release some other objects here, because it isn't sure whether dealloc
* will be called later on */
if
(
nib_about_loaded
)
...
...
@@ -848,6 +844,10 @@ static VLCMain *_o_sharedMainInstance = nil;
if
(
nib_wizard_loaded
)
[
o_wizard
release
];
#ifdef UPDATE_CHECK
[
o_update
release
];
#endif
[
crashLogURLConnection
cancel
];
[
crashLogURLConnection
release
];
...
...
modules/gui/macosx/update.h
View file @
974a6ad2
/*****************************************************************************
* update.h: MacOS X Check-For-Update window
*****************************************************************************
* Copyright
© 2005-2008
the VideoLAN team
* Copyright
(C) 2005-2009
the VideoLAN team
* $Id$
*
* Authors: Felix Kühne <fkuehne@users.sf.net>
...
...
@@ -43,12 +43,10 @@
IBOutlet
id
o_bar_checking
;
IBOutlet
id
o_chk_updateOnStartup
;
update_t
*
p_u
;
update_t
*
p_u
pdate
;
bool
b_checked
;
}
-
(
void
)
end
;
-
(
IBAction
)
download
:(
id
)
sender
;
-
(
IBAction
)
okay
:(
id
)
sender
;
-
(
IBAction
)
changeCheckUpdateOnStartup
:(
id
)
sender
;
...
...
modules/gui/macosx/update.m
View file @
974a6ad2
/*****************************************************************************
* update.m: MacOS X Check-For-Update window
*****************************************************************************
* Copyright
© 2005-2008
the VideoLAN team
* Copyright
(C) 2005-2009
the VideoLAN team
* $Id$
*
* Authors: Felix Kühne <fkuehne@users.sf.net>
* Authors: Felix
Paul
Kühne <fkuehne@users.sf.net>
* Rafaël Carré <funman@videolanorg>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -60,9 +60,10 @@ static VLCUpdate *_o_sharedInstance = nil;
return
_o_sharedInstance
;
}
-
(
void
)
end
-
(
void
)
dealloc
{
if
(
p_u
)
update_Delete
(
p_u
);
if
(
p_update
)
update_Delete
(
p_update
);
[
super
dealloc
];
}
-
(
void
)
awakeFromNib
...
...
@@ -142,7 +143,7 @@ static VLCUpdate *_o_sharedInstance = nil;
[
saveFilePanel
setRequiredFileType
:
@"dmg"
];
[
saveFilePanel
setCanSelectHiddenExtension
:
YES
];
[
saveFilePanel
setCanCreateDirectories
:
YES
];
update_release_t
*
p_release
=
update_GetRelease
(
p_u
);
update_release_t
*
p_release
=
update_GetRelease
(
p_u
pdate
);
assert
(
p_release
);
[
saveFilePanel
beginSheetForDirectory
:
@"~/Downloads"
file
:
[[[
NSString
stringWithUTF8String
:
p_release
->
psz_url
]
componentsSeparatedByString
:
@"/"
]
lastObject
]
...
...
@@ -186,7 +187,7 @@ static VLCUpdate *_o_sharedInstance = nil;
}
else
{
update_release_t
*
p_release
=
update_GetRelease
(
p_u
);
update_release_t
*
p_release
=
update_GetRelease
(
p_u
pdate
);
[
o_fld_releaseNote
setString
:
[
NSString
stringWithUTF8String
:
(
p_release
->
psz_desc
?
p_release
->
psz_desc
:
""
)]];
[
o_fld_status
setStringValue
:
_NS
(
"This version of VLC is outdated."
)];
[
o_fld_currentVersion
setStringValue
:
[
NSString
stringWithFormat
:
...
...
@@ -204,17 +205,17 @@ static void updateCallback( void * p_data, bool b_success )
{
VLCUpdate
*
update
=
p_data
;
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSNumber
*
state
=
[
NSNumber
numberWithBool
:
!
b_success
||
!
update_NeedUpgrade
(
update
->
p_u
)];
NSNumber
*
state
=
[
NSNumber
numberWithBool
:
!
b_success
||
!
update_NeedUpgrade
(
update
->
p_u
pdate
)];
[
update
performSelectorOnMainThread
:
@selector
(
setUpToDate
:)
withObject
:
state
waitUntilDone
:
YES
];
[
pool
release
];
}
-
(
void
)
checkForUpdate
{
p_u
=
update_New
(
VLCIntf
);
if
(
!
p_u
)
p_u
pdate
=
update_New
(
VLCIntf
);
if
(
!
p_u
pdate
)
return
;
update_Check
(
p_u
,
updateCallback
,
self
);
update_Check
(
p_u
pdate
,
updateCallback
,
self
);
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
[
NSDate
date
]
forKey
:
kPrefUpdateLastTimeChecked
];
...
...
@@ -224,12 +225,9 @@ static void updateCallback( void * p_data, bool b_success )
-
(
void
)
performDownload
:(
NSString
*
)
path
{
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
update_Download
(
p_u
,
[
path
UTF8String
]
);
[
o_btn_DownloadNow
setEnabled
:
NO
];
[
o_update_window
orderOut
:
self
];
update_WaitDownload
(
p_u
);
update_Delete
(
p_u
);
p_u
=
nil
;
update_Download
(
p_update
,
[
path
UTF8String
]
);
[
o_btn_DownloadNow
setEnabled
:
NO
];
[
pool
release
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment