Browse Source

Fix manpages not disabled when disabled by meson

master
Aqua-sama 1 month ago
parent
commit
9d62150b40
Signed by: Aqua-sama <aqua@iserlohn-fortress.net> GPG Key ID: 81A99984EABC02D1
2 changed files with 9 additions and 7 deletions
  1. +4
    -1
      doc/meson.build
  2. +5
    -6
      src/main.cpp

+ 4
- 1
doc/meson.build View File

@@ -1,5 +1,7 @@
scdoc = find_program('scdoc', required: get_option('manpage'), disabler: true)
sh = find_program('sh', required: get_option('manpage'), native: true, disabler: true)
if scdoc.found()

sh = find_program('sh', required: true, native: true, disabler: true)

man_files = ['man/smolbote.1.scd', 'man/smolbote.5.scd']

@@ -28,3 +30,4 @@ foreach input : man_files
)
endforeach

endif # manpage

+ 5
- 6
src/main.cpp View File

@@ -8,6 +8,7 @@

#include "browser.h"
#include "builtins.h"
#include "conf.hpp"
#include "configuration.h"
#include "crashhandler.h"
#include "session/session.h"
@@ -16,14 +17,13 @@
#include "version.h"
#include <QFile>
#include <QPluginLoader>
#include <QStandardPaths>
#include <args.hxx>
#include <iostream>
#include <memory>
#include <plugininterface.h>
#include <pluginloader.h>
#include <spdlog/spdlog.h>
#include "conf.hpp"
#include <QStandardPaths>

typedef std::function<void(const std::string &, std::vector<std::string>::const_iterator, std::vector<std::string>::const_iterator)> subcommand_func;
typedef std::unordered_map<std::string, subcommand_func> command_map;
@@ -76,7 +76,7 @@ int main(int argc, char **argv)
args::PositionalList<std::string> cmd_args(parser, "URL(s)", "List of URLs to open");

try {
/*auto next = */parser.ParseArgs(args);
/*auto next = */ parser.ParseArgs(args);

if(cmd_version)
return builtins::version();
@@ -118,7 +118,6 @@ int main(int argc, char **argv)
spdlog::debug("Opening config file {}", config_path);
init_conf(config_path);


QVector<QPluginLoader *> plugins;
CommandHash_t pluginCommands;

@@ -139,7 +138,7 @@ int main(int argc, char **argv)
spdlog::warn("{}", qUtf8Printable(loader->errorString()));
delete loader;
}
}
}
}();

// argc, argv, allowSecondary
@@ -168,7 +167,7 @@ int main(int argc, char **argv)
spdlog::debug("Installed breakpad exception handler (path {})", crashpath);
#endif // CONFIG_USEBREAKPAD

const auto profile = [](){
const auto profile = []() {
Configuration c;
return c.value<QString>("profile.default").value();
}();

Loading…
Cancel
Save