If you added new options to configuration file and you are able to write Chinese, please also update dists/请先读我.txt.For example "Added new feature.", "Updated README.md.". I prefer to write commit message in past tense, capitalize the first character and add period.Prefer to ++i, except when you really need i before increasement. ![]() For example, add period for all comments and printed text, add \n yourself for logging. There are still some coding style clang-format cannot change, please keep the same as existing code.It will keep most coding style consistent. clang-format for this project, please run clang-format yourself before committing something. When you are coding please use Linux kernel coding style.Try not to pull new dependencies into project other than SDL2 and SDL2_ttf, it's too brain damage to add dependency when building on Windows, building on this platform is a disaster and packaging on this platform is a mistery.Use RETURN_IF_FAIL(EXPR) or RETURN_VAL_IF_FAIL(EXPR, VAL) from flipclock.h to check arguments for newly added functions.(Note: Android will also define _linux_, so if you are targeting traditional Linux distributions, please use defined(_linux_) & !defined(_ANDROID_).) Do use preprocessor ( _WIN32, _ANDROID_ and _linux_) for platform-dependent code. Try to use C standard functions first, until you are implementing some platform-dependent features that libc does not support.If your comment is longer than Column 80, break it into block comment with /* */ (but don't break long URL, it's fine), don't use // for block comment. Comments should always occupy a new line. If you are writing multi-line comment, please use the same style with existing comments.If you want some features and you can implement it, a PR is always welcome, but there are some rules or personal habits: On Windows, program will use nf under the same directory as program.įnf should be installed with the binary by Meson. If per-user configuration file does not exist, it will use /etc/nf or nf under sysconfdir you choosed while building. On Linux, program will first use $XDG_CONFIG_HOME/nf, if XDG_CONFIG_HOME is not set or file does not exist, it will use $HOME/.config/nf. It may be obsolete because I don't have enough time to update the Android wrapper. Go to flipclock dir under your prefix directory, you can now find flipclock.scr and right click it to install it as a screensaver.You can change prefix argument to other path you created in Step 2, but you need to use UNIX style slash instead of backslash because it's escape character in C. Run mkdir build & cd build & meson setup -prefix=d:/flipclock-prefix -buildtype=release. Change dir to where you put this project.Open 圆4 Native Tools Command Prompt for VS 2019 from Start Menu, or other architectures you need.Create a prefix directory, for example d:/flipclock-prefix, program files will be installed into it.But thanks to Meson which handles all dirty things for me, it's SDL2 wrap works now and I managed to tweak it to build a static linked program automatically if no pre-built dependency found. Windows is a horrible platform for developers: no package manager for easy distribution, slowly visual studio, complicated tool chains. It might be quite hard for some Windows users to understand how complicated building static libraries is and what dynamically libraries are. Anyone who knows something about compiling, linking and loading won't complain. NOTICE: I saw a windows user says "This program has dlls in its folder so it's not simple!" and I got angry. If you want to install this to your system, it is suggested to build with mkdir build & cd build & meson setup -prefix=/usr -buildtype=release. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |