summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/app.c b/src/app.c
index 148bba52..abcf95da 100644
--- a/src/app.c
+++ b/src/app.c
@@ -23,7 +23,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
23#include "app.h" 23#include "app.h"
24#include "bookmarks.h" 24#include "bookmarks.h"
25#include "defs.h" 25#include "defs.h"
26#include "embedded.h" 26#include "resources.h"
27#include "feeds.h" 27#include "feeds.h"
28#include "mimehooks.h" 28#include "mimehooks.h"
29#include "gmcerts.h" 29#include "gmcerts.h"
@@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
33#include "ipc.h" 33#include "ipc.h"
34#include "periodic.h" 34#include "periodic.h"
35#include "sitespec.h" 35#include "sitespec.h"
36#include "updater.h"
36#include "ui/certimportwidget.h" 37#include "ui/certimportwidget.h"
37#include "ui/color.h" 38#include "ui/color.h"
38#include "ui/command.h" 39#include "ui/command.h"
@@ -711,19 +712,17 @@ static void init_App_(iApp *d, int argc, char **argv) {
711 } 712 }
712 SDL_free(exec); 713 SDL_free(exec);
713 } 714 }
714#if defined (iHaveLoadEmbed)
715 /* Load the resources from a file. Check the executable directory first, then a 715 /* Load the resources from a file. Check the executable directory first, then a
716 system-wide location, and as a final fallback, the current working directory. */ { 716 system-wide location, and as a final fallback, the current working directory. */ {
717 if (!load_Embed(concatPath_CStr(cstr_String(execPath_App()), EMB_BIN2))) { 717 if (!init_Resources(concatPath_CStr(cstr_String(execPath_App()), EMB_BIN2))) {
718 if (!load_Embed(concatPath_CStr(cstr_String(execPath_App()), EMB_BIN))) { 718 if (!init_Resources(concatPath_CStr(cstr_String(execPath_App()), EMB_BIN))) {
719 if (!load_Embed("resources.lgr")) { 719 if (!init_Resources("resources.lgr")) {
720 fprintf(stderr, "failed to load resources: %s\n", strerror(errno)); 720 fprintf(stderr, "failed to load resources: %s\n", strerror(errno));
721 exit(-1); 721 exit(-1);
722 } 722 }
723 } 723 }
724 } 724 }
725 } 725 }
726#endif
727 init_Lang(); 726 init_Lang();
728 /* Configure the valid command line options. */ { 727 /* Configure the valid command line options. */ {
729 defineValues_CommandLine(&d->args, "close-tab", 0); 728 defineValues_CommandLine(&d->args, "close-tab", 0);
@@ -742,7 +741,7 @@ static void init_App_(iApp *d, int argc, char **argv) {
742 iStringList *openCmds = new_StringList(); 741 iStringList *openCmds = new_StringList();
743 /* Handle command line options. */ { 742 /* Handle command line options. */ {
744 if (contains_CommandLine(&d->args, "help")) { 743 if (contains_CommandLine(&d->args, "help")) {
745 puts(cstr_Block(&blobArghelp_Embedded)); 744 puts(cstr_Block(&blobArghelp_Resources));
746 terminate_App_(0); 745 terminate_App_(0);
747 } 746 }
748 if (contains_CommandLine(&d->args, "version;V")) { 747 if (contains_CommandLine(&d->args, "version;V")) {
@@ -3127,6 +3126,10 @@ iBool handleCommand_App(const char *cmd) {
3127 } 3126 }
3128 return iFalse; 3127 return iFalse;
3129 } 3128 }
3129 else if (equal_Command(cmd, "updater.check")) {
3130 checkNow_Updater();
3131 return iTrue;
3132 }
3130 else if (equal_Command(cmd, "fontpack.enable")) { 3133 else if (equal_Command(cmd, "fontpack.enable")) {
3131 const iString *packId = collect_String(suffix_Command(cmd, "id")); 3134 const iString *packId = collect_String(suffix_Command(cmd, "id"));
3132 enablePack_Fonts(packId, arg_Command(cmd)); 3135 enablePack_Fonts(packId, arg_Command(cmd));