Port to Windows(MINGW64)#259
Merged
Merged
Conversation
SilverRainZ
reviewed
Jul 20, 2020
| cp -rfv $gdbus $dst_bin/ | ||
| cp -rfv $mingw64_dlls $dst_bin/ | ||
| cp -rfv $prefix/lib/gio $dst_lib/ | ||
| cp -rfv $prefix/lib/gdk-pixbuf-2.0 $dst_lib/ |
Member
There was a problem hiding this comment.
不太懂 gio 和 gdk-pixbuf 为啥是单独复制的,不能也通过 get_dll 么?
Contributor
Author
There was a problem hiding this comment.
gio / gdk-pixbuf-2.0 是目录,下面的 dll 都是动态加载的,ldd 获取不到,其中还有几个不是动态库的文件
| if (g_file_test(path, G_FILE_TEST_EXISTS)){ | ||
| return path; | ||
| suffix = g_build_filename("themes", name, NULL); | ||
| if (!suffix){ |
Contributor
Author
There was a problem hiding this comment.
可以,如果不考虑 allocation failure 的话可以省略
Member
There was a problem hiding this comment.
对于 app 来说,可能考虑了会比较累,不过写了也无妨。
| path = srn_find_file_in_prefix(prefix, name); | ||
|
|
||
| for (size_t i = 0; i < sizeof(prefix) / sizeof(*prefix) - 1; i++){ | ||
| g_free(prefix[i]); |
| path = srn_try_to_find_data_file("srain.cfg"); | ||
| if (!path){ | ||
| path = g_build_filename(g_get_user_config_dir(), PACKAGE, "srain.cfg", NULL); | ||
| if (!path) { |
| @@ -0,0 +1,100 @@ | |||
| /* Copyright (C) 2020 Fei Li <lifeibiren@gmail.com> | |||
Member
There was a problem hiding this comment.
只在 path.c 内部用的话可以就写 path.c 里?copyright 加一行就好。
Contributor
Author
There was a problem hiding this comment.
似乎也有道理,之前纠结了一下到底是放在 path.c 中还是单独抽出来,主要纠结的点是“有没有可能未来会在其它地方用到获取可执行文件所在目录的功能”
Member
There was a problem hiding this comment.
这个倒是,应该都是 path 相关的,通过 inc/path.h 导出就好?
b964083 to
3ff17e7
Compare
Contributor
Author
|
看起来我理解错了,g-strfreev 要求存储 char* 的内存是动态分配的 |
…ht at the executable' location first
…itioned in portable directories
…ect icon showed in the taskbar for MINGW64
3ff17e7 to
0fc4816
Compare
Member
|
github 居然不能看 force push 的 diff 么? |
Contributor
Author
可以看的,你点 force-pushed 这个连接就是 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.