Get app name & signature from Make.pre/Make.post

It's useful to change the name and signature when you want to test
changes while using another instance of Chat-O-Matic.
This commit is contained in:
Jaidyn Ann 2022-01-08 16:50:34 -06:00
parent 4ad75cd807
commit 866899eaad
25 changed files with 41 additions and 48 deletions

View File

@ -2,6 +2,8 @@ LIBPATHS = $(OBJ_DIR)
PROTOCOL_DIR = $(OBJ_DIR)/chat-o-matic/
DEBUG_ENABLED ?= false
DEFINES := VERSION="\"0.0.2\"" \
DEFINES = VERSION="\"0.0.2\"" \
BUILD_DATE="\"$(shell date +"%Y-%m-%d %H:%M")\"" \
DEBUG_ENABLED=$(DEBUG_ENABLED)
DEBUG_ENABLED=$(DEBUG_ENABLED) \
APP_NAME="\"$(APP_NAME)"\" \
APP_SIGNATURE="\"$(APP_SIGNATURE)"\"

2
Make.pre Normal file
View File

@ -0,0 +1,2 @@
APP_NAME ?= Chat-O-Matic
APP_SIGNATURE ?= application/x-vnd.chat-o-matic

View File

@ -1,11 +0,0 @@
/*
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _APP_H
#define _APP_H
#define APP_SIGNATURE "application/x-vnd.chat-o-matic"
#define APP_NAME "Chat-O-Matic"
#endif // _APP_H

View File

@ -1,5 +1,3 @@
#include "ChatOMatic.h"
resource app_signature APP_SIGNATURE;
resource app_version {

View File

@ -14,7 +14,6 @@
#include "AppConstants.h"
#include "AppPreferences.h"
#include "ChatOMatic.h"
#include "ChatProtocolMessages.h"
#include "RenderView.h"
#include "ChatCommand.h"

View File

@ -1,3 +1,5 @@
include Make.pre
## Haiku Generic Makefile v2.6 ##
## Fill in this file to specify the project being created, and the referenced
@ -8,7 +10,7 @@
## file:///system/develop/documentation/makefile-engine.html
# The name of the binary.
NAME = Chat-O-Matic
NAME = $(APP_NAME)
# The type of binary, must be one of:
# APP: Application
@ -18,7 +20,7 @@ NAME = Chat-O-Matic
TYPE = APP
# If you plan to use localization, specify the application's MIME signature.
APP_MIME_SIG = application/x-vnd.chat-o-matic
APP_MIME_SIG = $(APP_SIGNATURE)
# The following lines tell Pe and Eddie where the SRCS, RDEFS, and RSRCS are
# so that Pe and Eddie can fill them in for you.
@ -169,7 +171,7 @@ LOCALES = en eo
# use. For example, setting DEFINES to "DEBUG=1" will cause the compiler
# option "-DDEBUG=1" to be used. Setting DEFINES to "DEBUG" would pass
# "-DDEBUG" on the compiler's command line.
DEFINES :=
DEFINES =
# Specify the warning level. Either NONE (suppress all warnings),
# ALL (enable all warnings), or leave blank (enable default warnings).
@ -205,7 +207,6 @@ DRIVER_PATH =
## Include the Makefile-Engine
DEVEL_DIRECTORY := /boot/system/develop/
include $(DEVEL_DIRECTORY)/etc/makefile-engine
include Makefile.common
include Make.post
CC = g++

View File

@ -17,7 +17,6 @@
#include "Account.h"
#include "AppMessages.h"
#include "ChatOMatic.h"
#include "ChatProtocolMessages.h"
#include "Conversation.h"
#include "ConversationAccountItem.h"

View File

@ -28,7 +28,6 @@
#include "Account.h"
#include "AppMessages.h"
#include "AppPreferences.h"
#include "ChatOMatic.h"
#include "ChatProtocol.h"
#include "ConversationInfoWindow.h"
#include "ConversationView.h"

View File

@ -22,7 +22,6 @@
#include <librunview/Emoticor.h>
#include "ChatOMatic.h"
#include "AppMessages.h"
#include "FilePanel.h"
#include "MainWindow.h"

View File

@ -19,7 +19,6 @@
#include <kernel/fs_attr.h>
#include "ChatOMatic.h"
#include "Utils.h"

View File

@ -23,7 +23,6 @@
#include "AppMessages.h"
#include "AppPreferences.h"
#include "ChatOMatic.h"
#include "ChatProtocolMessages.h"
#include "Conversation.h"
#include "NotifyMessage.h"

View File

@ -29,7 +29,6 @@
#include "AppMessages.h"
#include "AppPreferences.h"
#include "ChatOMatic.h"
#include "ChatProtocolMessages.h"
#include "ReplicantMenuItem.h"
#include "Utils.h"

View File

@ -20,7 +20,6 @@
#include "AppMessages.h"
#include "AppPreferences.h"
#include "ChatOMatic.h"
#include "ChatProtocolMessages.h"
#include "RosterItem.h"
#include "RosterListView.h"

View File

@ -24,7 +24,6 @@
#include "AccountsWindow.h"
#include "AppMessages.h"
#include "AppPreferences.h"
#include "ChatOMatic.h"
#include "ChatProtocolAddOn.h"
#include "ChatProtocolMessages.h"
#include "ConversationItem.h"

View File

@ -1,3 +1,5 @@
include Make.pre
# Haiku Generic Makefile v2.6 ##
## Fill in this file to specify the project being created, and the referenced
@ -140,4 +142,4 @@ DEVEL_DIRECTORY := \
$(shell findpaths -r "makefile_engine" B_FIND_PATH_DEVELOP_DIRECTORY)
include $(DEVEL_DIRECTORY)/etc/makefile-engine
include Makefile.common
include Make.post

View File

@ -1,3 +1,5 @@
include Make.pre
## Haiku Generic Makefile v2.6 ##
## Fill in this file to specify the project being created, and the referenced
@ -134,4 +136,4 @@ DEVEL_DIRECTORY := \
$(shell findpaths -r "makefile_engine" B_FIND_PATH_DEVELOP_DIRECTORY)
include $(DEVEL_DIRECTORY)/etc/makefile-engine
include Makefile.common
include Make.post

View File

@ -1,3 +1,5 @@
include Make.pre
## Haiku Generic Makefile v2.6 ##
## Fill in this file to specify the project being created, and the referenced
@ -134,4 +136,4 @@ DEVEL_DIRECTORY := \
$(shell findpaths -r "makefile_engine" B_FIND_PATH_DEVELOP_DIRECTORY)
include $(DEVEL_DIRECTORY)/etc/makefile-engine
include Makefile.common
include Make.post

View File

@ -1,2 +1 @@
$(shell mkdir $(PROTOCOL_DIR) >/dev/null 2>&1)

View File

@ -18,7 +18,6 @@
#include <libinterface/BitmapUtils.h>
#include <ChatOMatic.h>
#include <ChatProtocolMessages.h>
#include <Flags.h>
#include <UserStatus.h>

View File

@ -1,3 +1,5 @@
include Make.pre
## Haiku Generic Makefile v2.6 ##
## Fill in this file to specify the project being created, and the referenced
@ -135,7 +137,7 @@ DRIVER_PATH =
DEVEL_DIRECTORY := /boot/system/develop/
include $(DEVEL_DIRECTORY)/etc/makefile-engine
include Makefile.common
include protocols/Makefile.common
CATKEYS_DIR = locales/irc
include Make.post
include protocols/Makefile.common

View File

@ -1,3 +1,5 @@
include Make.pre
## Haiku Generic Makefile v2.6 ##
## Fill in this file to specify the project being created, and the referenced
@ -136,7 +138,7 @@ DRIVER_PATH =
DEVEL_DIRECTORY := /boot/system/develop/
include $(DEVEL_DIRECTORY)/etc/makefile-engine
include Makefile.common
include protocols/Makefile.common
CATKEYS_DIR = locales/matrix
include Make.post
include protocols/Makefile.common

View File

@ -1,3 +1,5 @@
include Make.pre
## Haiku Generic Makefile v2.6 ##
## Fill in this file to specify the project being created, and the referenced
@ -137,7 +139,7 @@ DRIVER_PATH =
DEVEL_DIRECTORY := /boot/system/develop/
include $(DEVEL_DIRECTORY)/etc/makefile-engine
include Makefile.common
include protocols/Makefile.common
CATKEYS_DIR = locales/purple
include Make.post
include protocols/Makefile.common

View File

@ -35,7 +35,6 @@
#include <Path.h>
#include <Roster.h>
#include <ChatOMatic.h>
#include <ChatProtocolMessages.h>
#include <Flags.h>

View File

@ -27,7 +27,6 @@
#include <Roster.h>
#include <TranslationUtils.h>
#include <ChatOMatic.h>
#include <ChatProtocolMessages.h>
#include "Purple.h"

View File

@ -1,3 +1,5 @@
include Make.pre
## Haiku Generic Makefile v2.6 ##
## Fill in this file to specify the project being created, and the referenced
@ -136,7 +138,7 @@ DRIVER_PATH =
DEVEL_DIRECTORY := /boot/system/develop/
include $(DEVEL_DIRECTORY)/etc/makefile-engine
include Makefile.common
include protocols/Makefile.common
CATKEYS_DIR = locales/xmpp
include Make.post
include protocols/Makefile.common