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
ec19bbf4
Commit
ec19bbf4
authored
Mar 24, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unicode: Store downloaded data files in the cache directory.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8286b780
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
make_unicode
tools/make_unicode
+12
-9
No files found.
tools/make_unicode
View file @
ec19bbf4
...
...
@@ -475,29 +475,32 @@ sub to_utf16(@)
sub
open_data_file
($$)
{
my
(
$base
,
$name
)
=
@_
;
(
my
$dir
=
"data/$name"
)
=~
s/\/[^\/]+$//
;
my
$cache
=
(
$ENV
{
XDG_CACHE_HOME
}
||
"$ENV{HOME}/.cache"
)
.
"/wine"
;
(
my
$dir
=
"$cache/$name"
)
=~
s/\/[^\/]+$//
;
my
$suffix
=
(
$base
=~
/\/\Q$UNIVERSION\E/
)
?
"-$UNIVERSION"
:
""
;
local
*
FILE
;
if
(
$base
=~
/.*\/([^\/]+)\.zip$/
)
{
my
$zip
=
$1
;
unless
(
-
f
"
data
/$zip"
)
my
$zip
=
"$1$suffix.zip"
;
unless
(
-
f
"
$cache
/$zip"
)
{
mkdir
"data"
;
system
"mkdir"
,
"-p"
,
$cache
;
print
"Fetching $base...\n"
;
!
system
"wget"
,
"-q"
,
"-O"
,
"
data
/$zip"
,
$base
or
die
"cannot fetch $base"
;
!
system
"wget"
,
"-q"
,
"-O"
,
"
$cache
/$zip"
,
$base
or
die
"cannot fetch $base"
;
}
open
FILE
,
"-|"
,
"unzip"
,
"-p"
,
"
data
/$zip"
,
$name
or
die
"cannot extract $name from $zip"
;
open
FILE
,
"-|"
,
"unzip"
,
"-p"
,
"
$cache
/$zip"
,
$name
or
die
"cannot extract $name from $zip"
;
}
else
{
unless
(
-
f
"data/$name"
)
(
my
$dest
=
"$cache/$name"
)
=~
s/(.*)(\.[^\/.]+)$/$1$suffix$2/
;
unless
(
-
f
$dest
)
{
system
"mkdir"
,
"-p"
,
$dir
;
print
"Fetching $base/$name...\n"
;
!
system
"wget"
,
"-q"
,
"-O"
,
"data/$name"
,
"$base/$name"
or
die
"cannot fetch $base/$name"
;
!
system
"wget"
,
"-q"
,
"-O"
,
$dest
,
"$base/$name"
or
die
"cannot fetch $base/$name"
;
}
open
FILE
,
"<
data/$name"
or
die
"cannot open data/$name
"
;
open
FILE
,
"<
$dest"
or
die
"cannot open $dest
"
;
}
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