4.0.18 ready to go
parent
e41ab45230
commit
623026c655
|
@ -124,7 +124,6 @@ default_keys(Bind_Helper *context){
|
|||
// value such as key_left or key_back then it is a vanilla key.
|
||||
// It is possible to override this binding for individual keys.
|
||||
bind_vanilla_keys(context, write_character);
|
||||
bind(context, 241, MDFR_NONE, write_character);
|
||||
|
||||
// NOTE(allen|a4.0.7): You can now bind left and right clicks.
|
||||
// They only trigger on mouse presses. Modifiers do work
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
FLAGS := -Wno-write-strings -D_GNU_SOURCE -fno-threadsafe-statics \
|
||||
-pthread -I../foreign -I. -Wno-literal-suffix
|
||||
LIBS := -lX11 -lXfixes -lGL -lrt -ldl -lm -lfreetype -lfontconfig
|
||||
|
||||
# main targets
|
||||
|
||||
debug: FLAGS += -DFRED_SUPER=1 -DFRED_INTERNAL=1 -O0 -g
|
||||
debug: ../4ed ../4ed_app.so ../4coder_custom.so
|
||||
|
||||
super: FLAGS += -DFRED_SUPER=1
|
||||
super: alpha ../4coder_custom.so
|
||||
|
||||
alpha: FLAGS += -O3 -Wl,-s -fno-stack-protector -U_FORTIFY_SOURCE -DFRED_KEEP_ASSERT=1
|
||||
alpha: ../4ed ../4ed_app.so
|
||||
|
||||
# auto-generated dependencies
|
||||
|
||||
-include ../build/*.d
|
||||
|
||||
# file targets
|
||||
|
||||
../build:
|
||||
mkdir $@
|
||||
|
||||
../build/fsmgen: fsm_table_generator.cpp | ../build
|
||||
$(CXX) -MMD $(FLAGS) $< -o $@
|
||||
$@
|
||||
|
||||
../build/metagen: 4ed_metagen.cpp | ../build
|
||||
$(CXX) -MMD $(FLAGS) $< -o $@
|
||||
$@
|
||||
|
||||
../4ed: linux_4ed.cpp ../build/fsmgen ../build/metagen
|
||||
$(CXX) -MMD -MF ../build/4ed.d $(FLAGS) $(shell pkg-config --cflags freetype2) $< -o $@ $(LIBS)
|
||||
|
||||
../4ed_app.so: 4ed_app_target.cpp ../build/fsmgen ../build/metagen
|
||||
$(CXX) -MMD -MF ../build/app.d $(FLAGS) -fPIC -shared $< -o $@
|
||||
|
||||
../4coder_custom.so: power/4coder_experiments.cpp ../build/fsmgen ../build/metagen
|
||||
$(CXX) -MMD -MF ../build/custom.d $(FLAGS) -I. -fPIC -shared $< -o $@
|
||||
|
||||
# cleaning
|
||||
|
||||
clean:
|
||||
$(RM) ../4ed_app.so ../4ed ../4coder_custom.so
|
||||
|
||||
veryclean: clean
|
||||
$(RM) ../build/fsmgen ../build/metagen ../build/*.d
|
||||
|
||||
# packaging
|
||||
|
||||
PACKAGE_FILES := ../4ed ../4ed_app.so README.txt TODO.txt
|
||||
V_MAJ := $(shell grep "define MAJOR" 4coder_version.h | cut -d\ -f 3)
|
||||
V_MIN := $(shell grep "define MINOR" 4coder_version.h | cut -d\ -f 3)
|
||||
V_PCH := $(shell grep "define PATCH" 4coder_version.h | cut -d\ -f 3)
|
||||
|
||||
super_zip: PACKAGE_FILES += ../4coder_custom.so 4coder_*.h 4coder_*.cpp buildsuper.sh
|
||||
super_zip: ../4coder-linux-64-$(V_MAJ)-$(V_MIN)-$(V_PCH)-super.zip
|
||||
alpha_zip: ../4coder-linux-64-$(V_MAJ)-$(V_MIN)-$(V_PCH)-alpha.zip
|
||||
|
||||
../4coder-linux-64-$(V_MAJ)-$(V_MIN)-$(V_PCH)-%.zip: %
|
||||
@echo === Creating $@ ===
|
||||
zip -j $@ $(PACKAGE_FILES)
|
||||
$(MAKE) clean
|
||||
|
||||
package: clean
|
||||
$(MAKE) alpha_zip
|
||||
$(MAKE) super_zip
|
||||
|
||||
.PHONY: debug alpha super all clean veryclean package alpha_zip super_zip
|
|
@ -421,10 +421,10 @@ copy_file(char *path, char *file, char *folder1, char *folder2, char *newname){
|
|||
static void
|
||||
copy_all(char *source, char *tag, char *folder){
|
||||
if (source){
|
||||
systemf("cp -rf %s/%s %s", source, tag, folder);
|
||||
systemf("cp -f %s/%s %s", source, tag, folder);
|
||||
}
|
||||
else{
|
||||
systemf("cp -rf %s %s", tag, folder);
|
||||
systemf("cp -f %s %s", tag, folder);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -556,31 +556,37 @@ get_4coder_dist_name(String *zip_file, b32 OS_specific, char *folder, char *tier
|
|||
static void
|
||||
package(char *cdir){
|
||||
char str_space[1024];
|
||||
String str = make_fixed_width_string(str_space), str2 = {0};
|
||||
String str = make_fixed_width_string(str_space);
|
||||
|
||||
// NOTE(allen): meta
|
||||
fsm_generator(cdir);
|
||||
metagen(cdir);
|
||||
|
||||
#define SITE_DIR "../site"
|
||||
#define PACK_DATA_DIR "../data/dist_files"
|
||||
#define PACK_DATA_DIR "../data/dist_files"
|
||||
#define PACK_FONTS_DIR PACK_DATA_DIR"/fonts"
|
||||
#define DATA_DIR "../data/test"
|
||||
|
||||
DECL_STR(build_dir, BUILD_DIR);
|
||||
DECL_STR(site_dir, SITE_DIR);
|
||||
DECL_STR(pack_dir, PACK_DIR);
|
||||
DECL_STR(pack_data_dir, PACK_DATA_DIR);
|
||||
DECL_STR(pack_fonts_dir, PACK_FONTS_DIR);
|
||||
DECL_STR(data_dir, DATA_DIR);
|
||||
|
||||
#define PACK_ALPHA_PAR_DIR "../current_dist"
|
||||
#define PACK_ALPHA_DIR PACK_ALPHA_PAR_DIR"/4coder"
|
||||
#define PACK_ALPHA_PAR_DIR "../current_dist"
|
||||
#define PACK_ALPHA_DIR PACK_ALPHA_PAR_DIR"/4coder"
|
||||
#define PACK_ALPHA_FONTS_DIR PACK_ALPHA_DIR"/fonts"
|
||||
DECL_STR(pack_alpha_par_dir, PACK_ALPHA_PAR_DIR);
|
||||
DECL_STR(pack_alpha_dir, PACK_ALPHA_DIR);
|
||||
DECL_STR(pack_alpha_fonts_dir, PACK_ALPHA_FONTS_DIR);
|
||||
|
||||
#define PACK_ALPHA_X86_PAR_DIR "../current_dist_x86"
|
||||
#define PACK_ALPHA_X86_DIR PACK_ALPHA_X86_PAR_DIR"/4coder"
|
||||
#define PACK_ALPHA_X86_PAR_DIR "../current_dist_x86"
|
||||
#define PACK_ALPHA_X86_DIR PACK_ALPHA_X86_PAR_DIR"/4coder"
|
||||
#define PACK_ALPHA_X86_FONTS_DIR PACK_ALPHA_X86_DIR"/fonts"
|
||||
DECL_STR(pack_alpha_x86_par_dir, PACK_ALPHA_X86_PAR_DIR);
|
||||
DECL_STR(pack_alpha_x86_dir, PACK_ALPHA_X86_DIR);
|
||||
DECL_STR(pack_alpha_x86_fonts_dir, PACK_ALPHA_X86_FONTS_DIR);
|
||||
|
||||
// NOTE(allen): alpha
|
||||
{
|
||||
|
@ -594,6 +600,11 @@ package(char *cdir){
|
|||
pack_alpha_x86_par_dir,
|
||||
};
|
||||
|
||||
char *dest_fonts_dirs[] = {
|
||||
pack_alpha_fonts_dir,
|
||||
pack_alpha_x86_fonts_dir,
|
||||
};
|
||||
|
||||
char *zip_dirs[] = {
|
||||
"alpha",
|
||||
"alpha_x86",
|
||||
|
@ -618,17 +629,19 @@ package(char *cdir){
|
|||
for (u32 i = 0; i < count; ++i){
|
||||
char *dir = dest_dirs[i];
|
||||
char *par_dir = dest_par_dirs[i];
|
||||
char *fonts_dir = dest_fonts_dirs[i];
|
||||
char *zip_dir = zip_dirs[i];
|
||||
char *arch = archs[i];
|
||||
|
||||
build_main(cdir, base_flags | flags[i]);
|
||||
|
||||
clear_folder(par_dir);
|
||||
make_folder_if_missing(dir, "3rdparty");
|
||||
make_folder_if_missing(dir, 0);
|
||||
make_folder_if_missing(dir, "fonts");
|
||||
make_folder_if_missing(pack_dir, zip_dir);
|
||||
copy_file(build_dir, "4ed" EXE, dir, 0, 0);
|
||||
copy_file(build_dir, "4ed_app" DLL, dir, 0, 0);
|
||||
copy_all (pack_data_dir, "*", dir);
|
||||
copy_all(pack_fonts_dir, "*", fonts_dir);
|
||||
copy_file(data_dir, "release-config.4coder", dir, 0, "config.4coder");
|
||||
|
||||
get_4coder_dist_name(&str, true, zip_dir, tier, arch, "zip");
|
||||
|
@ -637,15 +650,19 @@ package(char *cdir){
|
|||
}
|
||||
|
||||
// NOTE(allen): super
|
||||
#define PACK_SUPER_PAR_DIR "../current_dist_super"
|
||||
#define PACK_SUPER_DIR PACK_SUPER_PAR_DIR"/4coder"
|
||||
#define PACK_SUPER_PAR_DIR "../current_dist_super"
|
||||
#define PACK_SUPER_DIR PACK_SUPER_PAR_DIR"/4coder"
|
||||
#define PACK_SUPER_FONTS_DIR PACK_SUPER_DIR"/fonts"
|
||||
DECL_STR(pack_super_par_dir, PACK_SUPER_PAR_DIR);
|
||||
DECL_STR(pack_super_dir, PACK_SUPER_DIR);
|
||||
DECL_STR(pack_super_fonts_dir, PACK_SUPER_FONTS_DIR);
|
||||
|
||||
#define PACK_SUPER_X86_PAR_DIR "../current_dist_super_x86"
|
||||
#define PACK_SUPER_X86_DIR PACK_SUPER_X86_PAR_DIR"/4coder"
|
||||
#define PACK_SUPER_X86_PAR_DIR "../current_dist_super_x86"
|
||||
#define PACK_SUPER_X86_DIR PACK_SUPER_X86_PAR_DIR"/4coder"
|
||||
#define PACK_SUPER_X86_FONTS_DIR PACK_SUPER_X86_DIR"/fonts"
|
||||
DECL_STR(pack_super_x86_par_dir, PACK_SUPER_X86_PAR_DIR);
|
||||
DECL_STR(pack_super_x86_dir, PACK_SUPER_X86_DIR);
|
||||
DECL_STR(pack_super_x86_fonts_dir, PACK_SUPER_X86_FONTS_DIR);
|
||||
|
||||
{
|
||||
char *dest_dirs[] = {
|
||||
|
@ -658,6 +675,11 @@ package(char *cdir){
|
|||
pack_super_x86_par_dir,
|
||||
};
|
||||
|
||||
char *dest_fonts_dirs[] = {
|
||||
pack_super_fonts_dir,
|
||||
pack_super_x86_fonts_dir,
|
||||
};
|
||||
|
||||
char *zip_dirs[] = {
|
||||
"super",
|
||||
"super_x86",
|
||||
|
@ -682,6 +704,7 @@ package(char *cdir){
|
|||
for (u32 i = 0; i < count; ++i){
|
||||
char *dir = dest_dirs[i];
|
||||
char *par_dir = dest_par_dirs[i];
|
||||
char *fonts_dir = dest_fonts_dirs[i];
|
||||
char *zip_dir = zip_dirs[i];
|
||||
char *arch = archs[i];
|
||||
|
||||
|
@ -689,15 +712,14 @@ package(char *cdir){
|
|||
do_buildsuper(cdir, Custom_Default, flags[i]);
|
||||
|
||||
clear_folder(par_dir);
|
||||
make_folder_if_missing(dir, "3rdparty");
|
||||
make_folder_if_missing(dir, 0);
|
||||
make_folder_if_missing(dir, "fonts");
|
||||
make_folder_if_missing(pack_dir, zip_dir);
|
||||
|
||||
copy_file(build_dir, "4ed" EXE, dir, 0, 0);
|
||||
copy_file(build_dir, "4ed_app" DLL, dir, 0, 0);
|
||||
copy_file(build_dir, "custom_4coder" DLL, dir, 0, 0);
|
||||
|
||||
copy_all (pack_data_dir, "*", dir);
|
||||
//copy_file(0, "TODO.txt", dir, 0, 0);
|
||||
copy_all(pack_fonts_dir, "*", fonts_dir);
|
||||
copy_file(data_dir, "release-config.4coder", dir, 0, "config.4coder");
|
||||
|
||||
copy_all(0, "4coder_*", dir);
|
||||
|
@ -737,7 +759,7 @@ package(char *cdir){
|
|||
|
||||
make_folder_if_missing(pack_dir, "super-docs");
|
||||
get_4coder_dist_name(&str, false, "super-docs", "API", 0, "html");
|
||||
str2 = front_of_directory(str);
|
||||
String str2 = front_of_directory(str);
|
||||
copy_file(site_dir, "custom_docs.html", pack_dir, "super-docs", str2.str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue