Commit acc0f1b4 authored by Melroy van den Berg's avatar Melroy van den Berg

Clean-up cmakelists + add link to Doxygen artifact, yeah\!

parent dc7e64f8
Pipeline #2511 passed with stages
in 1 minute and 48 seconds
......@@ -38,8 +38,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Production build
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
add_definitions(-DPRODUCTION=1)
# Include CPack packaging settings
include(packaging)
endif()
......
......@@ -21,6 +21,8 @@ Development has been done in Visual Studio Code editor, using the following exte
* C/C++
* CMake Tools
* [WineGUI Docs](https://gitlab.melroy.org/melroy/winegui/-/jobs/artifacts/master/file/doc/doxygen/index.html?job=build).
### Requirements
Dependencies should be met before build:
......@@ -82,15 +84,30 @@ gdb -ex=run bin/winegui
For production build and DEB file package, you can run: `./scripts/build_prod.sh`
Or use the `cmake -DCMAKE_BUILD_TYPE=Release`.
Or use:
```sh
cmake -DCMAKE_BUILD_TYPE=Release
ninja
```
### Doxygen
Open the latest [WineGUI Doxygen page](https://gitlab.melroy.org/melroy/winegui/-/jobs/artifacts/master/file/doc/doxygen/index.html?job=build).
Or build with generated doxygen files locally:
```sh
cmake -GNinja -Ddoc=ON
ninja
```
### Releasing
Before you can make a new release, align the version number in WineGUI with the version you want to release.
Then create a new tagged version in Gitlab with the same version name.
*Note:* Only the `master` branch will trigger the publish task.
*Note:* Only the `release tag` will trigger the publish task.
## Coding standard
......
......@@ -877,8 +877,8 @@ string Helper::GetFontFilename(const string prefix_path, BottleTypes::Bit bit, c
*/
string Helper::GetImageLocation(const string filename)
{
for (string data_dir : Glib::get_system_data_dirs())
{
// Try absolute path first
for (string data_dir : Glib::get_system_data_dirs()) {
std::vector<std::string> path_builder{data_dir, "winegui", "images", filename};
string file_path = Glib::build_path(G_DIR_SEPARATOR_S, path_builder);
if (FileExists(file_path)) {
......@@ -886,13 +886,18 @@ string Helper::GetImageLocation(const string filename)
}
}
// try local path if the images are not installed
// Try local path if the images are not installed (yet)
// When working directory is in the build folder (relative path)
string file_path = Glib::build_filename("../images/", filename);
// When working directory is in the build/bin folder (relative path)
string file_path2 = Glib::build_filename("../../images/", filename);
if (FileExists(file_path)) {
return file_path;
}
else
{
else if(FileExists(file_path2)) {
return file_path2;
}
else {
return "";
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment