Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libpeas
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
GNOME
libpeas
Commits
11d2f2b7
Commit
11d2f2b7
authored
Jan 18, 2020
by
Christian Hergert
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tschoonj/libpeas-g_win32_get_package_installation_directory_of_module-fix'
parents
0f875b99
b5dcc0e1
Pipeline
#144562
passed with stages
in 6 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
libpeas/peas-dirs.c
libpeas/peas-dirs.c
+24
-3
No files found.
libpeas/peas-dirs.c
View file @
11d2f2b7
...
...
@@ -29,6 +29,27 @@
#include "peas-utils-osx.h"
#endif
#ifdef G_OS_WIN32
// inspired by gobject-introspection...
#include <libloaderapi.h>
static
HMODULE
libpeas_dll
=
NULL
;
#ifdef DLL_EXPORT
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
);
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
if
(
fdwReason
==
DLL_PROCESS_ATTACH
)
libpeas_dll
=
hinstDLL
;
return
TRUE
;
}
#endif
#endif
gchar
*
peas_dirs_get_data_dir
(
void
)
{
...
...
@@ -37,7 +58,7 @@ peas_dirs_get_data_dir (void)
#ifdef G_OS_WIN32
gchar
*
win32_dir
;
win32_dir
=
g_win32_get_package_installation_directory_of_module
(
NULL
);
win32_dir
=
g_win32_get_package_installation_directory_of_module
(
libpeas_dll
);
data_dir
=
g_build_filename
(
win32_dir
,
"share"
,
"libpeas-1.0"
,
NULL
);
g_free
(
win32_dir
);
...
...
@@ -58,7 +79,7 @@ peas_dirs_get_lib_dir (void)
#ifdef G_OS_WIN32
gchar
*
win32_dir
;
win32_dir
=
g_win32_get_package_installation_directory_of_module
(
NULL
);
win32_dir
=
g_win32_get_package_installation_directory_of_module
(
libpeas_dll
);
lib_dir
=
g_build_filename
(
win32_dir
,
"lib"
,
"libpeas-1.0"
,
NULL
);
g_free
(
win32_dir
);
...
...
@@ -98,7 +119,7 @@ peas_dirs_get_locale_dir (void)
#ifdef G_OS_WIN32
gchar
*
win32_dir
;
win32_dir
=
g_win32_get_package_installation_directory_of_module
(
NULL
);
win32_dir
=
g_win32_get_package_installation_directory_of_module
(
libpeas_dll
);
locale_dir
=
g_build_filename
(
win32_dir
,
"share"
,
"locale"
,
NULL
);
...
...
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