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
eb7d7ef8
Commit
eb7d7ef8
authored
Mar 13, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unicode: Read data files from inside the zip without extracting them.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dec6f077
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
make_unicode
tools/make_unicode
+14
-12
No files found.
tools/make_unicode
View file @
eb7d7ef8
...
...
@@ -436,26 +436,28 @@ sub open_data_file($$)
my
(
$base
,
$name
)
=
@_
;
(
my
$dir
=
"data/$name"
)
=~
s/\/[^\/]+$//
;
local
*
FILE
;
unless
(
-
f
"data/$name"
)
if
(
$base
=~
/.*\/([^\/]+)\.zip$/
)
{
system
"mkdir"
,
"-p"
,
$dir
;
if
(
$base
=~
/.*\/([^\/]+\.zip)$/
)
my
$zip
=
$1
;
unless
(
-
f
"data/$zip"
)
{
my
$zip
=
$1
;
unless
(
-
f
"data/$zip"
)
{
print
"Fetching $base...\n"
;
!
system
"wget"
,
"-q"
,
"-O"
,
"data/$zip"
,
"$base"
or
die
"cannot fetch $base"
;
}
!
system
"unzip"
,
"-q"
,
"-d"
,
"data"
,
"data/$zip"
,
$name
or
die
"cannot extract $name from $zip"
;
mkdir
"data"
;
print
"Fetching $base...\n"
;
!
system
"wget"
,
"-q"
,
"-O"
,
"data/$zip"
,
$base
or
die
"cannot fetch $base"
;
}
else
open
FILE
,
"-|"
,
"unzip"
,
"-p"
,
"data/$zip"
,
$name
or
die
"cannot extract $name from $zip"
;
}
else
{
unless
(
-
f
"data/$name"
)
{
system
"mkdir"
,
"-p"
,
$dir
;
print
"Fetching $base/$name...\n"
;
!
system
"wget"
,
"-q"
,
"-O"
,
"data/$name"
,
"$base/$name"
or
die
"cannot fetch $base/$name"
;
}
open
FILE
,
"<data/$name"
or
die
"cannot open data/$name"
;
}
open
FILE
,
"<data/$name"
or
die
"cannot open data/$name"
;
return
*
FILE
;
}
...
...
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