Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
64ff68c8
Commit
64ff68c8
authored
Feb 12, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Add --nls-dir option.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
37d977da
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
0 deletions
+17
-0
Makefile.in
tools/wrc/Makefile.in
+2
-0
wrc.c
tools/wrc/wrc.c
+9
-0
wrc.h
tools/wrc/wrc.h
+2
-0
wrc.man.in
tools/wrc/wrc.man.in
+4
-0
No files found.
tools/wrc/Makefile.in
View file @
64ff68c8
...
@@ -16,7 +16,9 @@ LEX_SRCS = parser.l
...
@@ -16,7 +16,9 @@ LEX_SRCS = parser.l
BISON_SRCS
=
parser.y
BISON_SRCS
=
parser.y
wrc_EXTRADEFS
=
\
wrc_EXTRADEFS
=
\
-DNLSDIR
=
"
\"
${
nlsdir
}
\"
"
\
-DINCLUDEDIR
=
"
\"
${
includedir
}
\"
"
\
-DINCLUDEDIR
=
"
\"
${
includedir
}
\"
"
\
-DBIN_TO_NLSDIR
=
\"
`
$(MAKEDEP)
-R
${
bindir
}
${
nlsdir
}
`
\"
\
-DBIN_TO_INCLUDEDIR
=
\"
`
$(MAKEDEP)
-R
${
bindir
}
${
includedir
}
`
\"
-DBIN_TO_INCLUDEDIR
=
\"
`
$(MAKEDEP)
-R
${
bindir
}
${
includedir
}
`
\"
EXTRALIBS
=
$(GETTEXTPO_LIBS)
-lwpp
EXTRALIBS
=
$(GETTEXTPO_LIBS)
-lwpp
...
...
tools/wrc/wrc.c
View file @
64ff68c8
...
@@ -66,6 +66,7 @@ static const char usage[] =
...
@@ -66,6 +66,7 @@ static const char usage[] =
" -J, --input-format=FORMAT The input format (either `rc' or `rc16')
\n
"
" -J, --input-format=FORMAT The input format (either `rc' or `rc16')
\n
"
" -l, --language=LANG Set default language to LANG (default is neutral {0, 0})
\n
"
" -l, --language=LANG Set default language to LANG (default is neutral {0, 0})
\n
"
" -m16, -m32, -m64 Build for 16-bit, 32-bit resp. 64-bit platforms
\n
"
" -m16, -m32, -m64 Build for 16-bit, 32-bit resp. 64-bit platforms
\n
"
" --nls-dir=DIR Directory containing the NLS codepage mappings
\n
"
" --no-use-temp-file Ignored for compatibility with windres
\n
"
" --no-use-temp-file Ignored for compatibility with windres
\n
"
" --nostdinc Disables searching the standard include path
\n
"
" --nostdinc Disables searching the standard include path
\n
"
" -o, --output=FILE Output to file (default is infile.res)
\n
"
" -o, --output=FILE Output to file (default is infile.res)
\n
"
...
@@ -157,6 +158,7 @@ char *input_name = NULL; /* The name given on the command-line */
...
@@ -157,6 +158,7 @@ char *input_name = NULL; /* The name given on the command-line */
static
char
*
temp_name
=
NULL
;
/* Temporary file for preprocess pipe */
static
char
*
temp_name
=
NULL
;
/* Temporary file for preprocess pipe */
static
const
char
*
includedir
;
static
const
char
*
includedir
;
const
char
*
nlsdirs
[
3
]
=
{
NULL
,
NLSDIR
,
NULL
};
int
line_number
=
1
;
/* The current line */
int
line_number
=
1
;
/* The current line */
int
char_number
=
1
;
/* The current char pos within the line */
int
char_number
=
1
;
/* The current char pos within the line */
...
@@ -175,6 +177,7 @@ enum long_options_values
...
@@ -175,6 +177,7 @@ enum long_options_values
LONG_OPT_NOSTDINC
=
1
,
LONG_OPT_NOSTDINC
=
1
,
LONG_OPT_TMPFILE
,
LONG_OPT_TMPFILE
,
LONG_OPT_NOTMPFILE
,
LONG_OPT_NOTMPFILE
,
LONG_OPT_NLS_DIR
,
LONG_OPT_PO_DIR
,
LONG_OPT_PO_DIR
,
LONG_OPT_PREPROCESSOR
,
LONG_OPT_PREPROCESSOR
,
LONG_OPT_SYSROOT
,
LONG_OPT_SYSROOT
,
...
@@ -196,6 +199,7 @@ static const struct option long_options[] = {
...
@@ -196,6 +199,7 @@ static const struct option long_options[] = {
{
"input"
,
1
,
NULL
,
'i'
},
{
"input"
,
1
,
NULL
,
'i'
},
{
"input-format"
,
1
,
NULL
,
'J'
},
{
"input-format"
,
1
,
NULL
,
'J'
},
{
"language"
,
1
,
NULL
,
'l'
},
{
"language"
,
1
,
NULL
,
'l'
},
{
"nls-dir"
,
1
,
NULL
,
LONG_OPT_NLS_DIR
},
{
"no-use-temp-file"
,
0
,
NULL
,
LONG_OPT_NOTMPFILE
},
{
"no-use-temp-file"
,
0
,
NULL
,
LONG_OPT_NOTMPFILE
},
{
"nostdinc"
,
0
,
NULL
,
LONG_OPT_NOSTDINC
},
{
"nostdinc"
,
0
,
NULL
,
LONG_OPT_NOSTDINC
},
{
"output"
,
1
,
NULL
,
'o'
},
{
"output"
,
1
,
NULL
,
'o'
},
...
@@ -349,6 +353,8 @@ static void init_argv0_dir( const char *argv0 )
...
@@ -349,6 +353,8 @@ static void init_argv0_dir( const char *argv0 )
if
(
p
==
dir
)
p
++
;
if
(
p
==
dir
)
p
++
;
*
p
=
0
;
*
p
=
0
;
includedir
=
strmake
(
"%s/%s"
,
dir
,
BIN_TO_INCLUDEDIR
);
includedir
=
strmake
(
"%s/%s"
,
dir
,
BIN_TO_INCLUDEDIR
);
if
(
strendswith
(
dir
,
"/tools/wrc"
))
nlsdirs
[
0
]
=
strmake
(
"%s/../../nls"
,
dir
);
else
nlsdirs
[
0
]
=
strmake
(
"%s/%s"
,
dir
,
BIN_TO_NLSDIR
);
free
(
dir
);
free
(
dir
);
#endif
#endif
}
}
...
@@ -408,6 +414,9 @@ int main(int argc,char *argv[])
...
@@ -408,6 +414,9 @@ int main(int argc,char *argv[])
case
LONG_OPT_NOTMPFILE
:
case
LONG_OPT_NOTMPFILE
:
if
(
debuglevel
)
warning
(
"--no-use-temp-file option not yet supported, ignored.
\n
"
);
if
(
debuglevel
)
warning
(
"--no-use-temp-file option not yet supported, ignored.
\n
"
);
break
;
break
;
case
LONG_OPT_NLS_DIR
:
nlsdirs
[
0
]
=
xstrdup
(
optarg
);
break
;
case
LONG_OPT_PO_DIR
:
case
LONG_OPT_PO_DIR
:
po_dir
=
xstrdup
(
optarg
);
po_dir
=
xstrdup
(
optarg
);
break
;
break
;
...
...
tools/wrc/wrc.h
View file @
64ff68c8
...
@@ -45,6 +45,8 @@ extern int check_utf8;
...
@@ -45,6 +45,8 @@ extern int check_utf8;
extern
char
*
input_name
;
extern
char
*
input_name
;
extern
char
*
cmdline
;
extern
char
*
cmdline
;
extern
const
char
*
nlsdirs
[];
extern
int
line_number
;
extern
int
line_number
;
extern
int
char_number
;
extern
int
char_number
;
...
...
tools/wrc/wrc.man.in
View file @
64ff68c8
...
@@ -80,6 +80,10 @@ Generate resources for 16-bit, 32-bit or 64-bit platforms respectively.
...
@@ -80,6 +80,10 @@ Generate resources for 16-bit, 32-bit or 64-bit platforms respectively.
The only difference between 32-bit and 64-bit is whether
The only difference between 32-bit and 64-bit is whether
the _WIN64 preprocessor symbol is defined.
the _WIN64 preprocessor symbol is defined.
.TP
.TP
.I \fB\-\-nls-dir=\fIdir\fR
Specify the directory to search for the NLS files containing the
codepage mapping tables.
.TP
.I \fB\-\-nostdinc\fR
.I \fB\-\-nostdinc\fR
Do not search the standard include path, look for include files only
Do not search the standard include path, look for include files only
in the directories explicitly specified with the \fB\-I\fR option.
in the directories explicitly specified with the \fB\-I\fR option.
...
...
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