Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
bd184a14
Commit
bd184a14
authored
Nov 09, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bin: re-implement --language for OS X
parent
a868dc7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
bin/Makefile.am
bin/Makefile.am
+3
-0
bin/darwinvlc.c
bin/darwinvlc.c
+33
-0
No files found.
bin/Makefile.am
View file @
bd184a14
...
@@ -33,6 +33,9 @@ vlc_wrapper_SOURCES = rootwrap.c
...
@@ -33,6 +33,9 @@ vlc_wrapper_SOURCES = rootwrap.c
vlc_wrapper_LDADD
=
$(SOCKET_LIBS)
vlc_wrapper_LDADD
=
$(SOCKET_LIBS)
vlc_LDFLAGS
=
$(LDFLAGS_vlc)
vlc_LDFLAGS
=
$(LDFLAGS_vlc)
if
HAVE_DARWIN
vlc_LDFLAGS
+=
-Wl
,-framework,CoreFoundation
endif
vlc_LDADD
=
../lib/libvlc.la
$(LIBPTHREAD)
vlc_LDADD
=
../lib/libvlc.la
$(LIBPTHREAD)
vlc_static_SOURCES
=
$(vlc_SOURCES)
vlc_static_SOURCES
=
$(vlc_SOURCES)
...
...
bin/darwinvlc.c
View file @
bd184a14
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
# include <pthread.h>
# include <pthread.h>
#endif
#endif
#include <unistd.h>
#include <unistd.h>
#include <TargetConditionals.h>
#import <CoreFoundation/CoreFoundation.h>
extern
void
vlc_enable_override
(
void
);
extern
void
vlc_enable_override
(
void
);
...
@@ -154,6 +156,37 @@ int main( int i_argc, const char *ppsz_argv[] )
...
@@ -154,6 +156,37 @@ int main( int i_argc, const char *ppsz_argv[] )
argv
[
argc
++
]
=
"--no-ignore-config"
;
argv
[
argc
++
]
=
"--no-ignore-config"
;
argv
[
argc
++
]
=
"--media-library"
;
argv
[
argc
++
]
=
"--media-library"
;
/* overwrite system language on Mac */
#if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR // TARGET_OS_MAC is unspecific
char
*
lang
=
NULL
;
for
(
int
i
=
0
;
i
<
i_argc
;
i
++
)
{
if
(
!
strncmp
(
ppsz_argv
[
i
],
"--language"
,
10
))
{
lang
=
strstr
(
ppsz_argv
[
i
],
"="
);
ppsz_argv
++
,
i_argc
--
;
continue
;
}
}
if
(
!
lang
)
{
CFStringRef
language
;
language
=
(
CFStringRef
)
CFPreferencesCopyAppValue
(
CFSTR
(
"language"
),
kCFPreferencesCurrentApplication
);
if
(
language
)
{
if
(
CFStringGetLength
(
language
)
>
0
)
lang
=
(
char
*
)
CFStringGetCStringPtr
(
language
,
kCFStringEncodingUTF8
);
CFRelease
(
language
);
}
}
if
(
lang
&&
strncmp
(
lang
,
"auto"
,
4
))
{
char
tmp
[
11
];
snprintf
(
tmp
,
11
,
"LANG%s"
,
lang
);
putenv
(
tmp
);
}
#endif
ppsz_argv
++
;
i_argc
--
;
/* skip executable path */
ppsz_argv
++
;
i_argc
--
;
/* skip executable path */
/* When VLC.app is run by double clicking in Mac OS X, the 2nd arg
/* When VLC.app is run by double clicking in Mac OS X, the 2nd arg
...
...
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