Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config dl gimxfile rebase #636

Open
wants to merge 57 commits into
base: gimxfile
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
92825a7
Now prints to terminal. Needs fix for downloading as config download …
Aug 14, 2018
a47ab99
Merge pull request #1 from CodeOhms/gimxDownloader
CodeOhms Aug 14, 2018
f80e384
Can now download list of config files
Sep 10, 2018
576a24e
Merge branch 'master' of https://github.com/matlo/GIMX
Sep 10, 2018
56624e0
Fixed selection menu window
Sep 12, 2018
bb7d697
Grab updates from main project
Sep 12, 2018
119a325
Added basic debugging options for Makedefs
Sep 12, 2018
d567cf8
Merge branch 'master' of https://github.com/matlo/GIMX
Sep 12, 2018
ab829f6
Quick fix for last page not always showing when jumping from first to…
Sep 13, 2018
f7fc42d
Fixed selection menu. Added page number top right. Added functionalit…
Sep 15, 2018
79a5056
Merge updates for new gimxFileDownloader utility
Sep 15, 2018
e71b264
Selection menu now 100% complete. Now need to use returned info to do…
Sep 16, 2018
3306d1f
Can finally download configuration files! Huzza!
Sep 17, 2018
61edab3
Merge updates for gimxFileDownloader
Sep 17, 2018
7456c81
Progress bar now works. Also added download percentage. Soon a help m…
Sep 20, 2018
adb287f
Merge recent TUI polishes and bugfixes.
Sep 20, 2018
92316ec
Merge branch 'master' of https://github.com/matlo/GIMX
Oct 27, 2018
7b735e8
Refactored TUI to use less memory and better OOP design, and added he…
Apr 14, 2019
459bf6b
Merge branch 'master' of https://github.com/matlo/GIMX
Apr 15, 2019
815eefd
Add autoConfig() functionality, but requires testing once I have cont…
Apr 17, 2019
151363c
Merge branch 'master' of https://github.com/matlo/GIMX
Apr 17, 2019
80ac729
clean
Apr 17, 2019
0adfd2a
Merge branch 'master' of https://github.com/matlo/GIMX
Aug 9, 2019
b5ccccb
Fixed crash upon exiting help screen
Aug 9, 2019
3061a39
Changed the name of program to 'gimx-fetchconfig'. Now also resides i…
Aug 9, 2019
2651165
Fix typos
Aug 9, 2019
620eef0
Added -std=c++11 compiler flag for picky Mr Travis Cli, works on all …
Aug 9, 2019
7b93f7a
Removed all compiler warnings for my program, as requested
Aug 10, 2019
7f361ff
Refactored argument parsing. Replaced stray tabs with spaces. Removed…
Aug 11, 2019
bc6842b
Fixed crash upon pressing 'h' while in help menu
Aug 11, 2019
7dad208
Fixed a bunch of issues. Program now uses much simpler and more stabl…
Aug 19, 2019
8795d34
Merge branch 'master' into gimxfile
Sep 19, 2019
fdb612d
Grab updates for submodules from upstream
Sep 19, 2019
9af4500
Merge upstream updates for 'gimxfile' branch
Sep 19, 2019
ed7f59f
new stuff
Sep 20, 2019
3a5df76
Merge upstream updates
Sep 26, 2019
0ee8677
Removed warnings related to comparing unsigned to signed
Sep 26, 2019
4c64aad
Merge submodule updates
Oct 7, 2019
db3d413
Merge upstream updates to gimxfile branch
Oct 7, 2019
91ae5bb
Clean up code, and rebase on gimxfile library
Oct 8, 2019
cb76b7d
From GCC 8, new warnings have been added. Two cropped up related to b…
Oct 9, 2019
5808781
Only activate macros previously added when using GCC 8+
Oct 9, 2019
31cb193
Clean up code
Oct 9, 2019
599e737
Clean up
Oct 9, 2019
d4d4be4
Begin moving code copied from gimx-launcher to library
Oct 10, 2019
6c51491
Add -std=c++14 to gimxfetchconfig Makefile for Travis CI
Oct 10, 2019
650410c
Finish moving autoConfig() code from gimx-launcher to shared lib. Bot…
Oct 10, 2019
be0e182
Add -std=c++14 to gimxlauncher Makefile for Travis CI. Currently am s…
Oct 10, 2019
fdf5b31
Fix typos, silly me
Oct 10, 2019
9c7ee38
No longer using std::function. Using templates instead, which allowed…
Oct 10, 2019
437c525
Fix build failure on Travis CI
Oct 10, 2019
53ab6a8
Fix options parsing.
Oct 10, 2019
7b0543d
Forgot, still need -std=c++11 flag if I am to use lambdas.
Oct 10, 2019
df15ec9
Need -std=c++14 for gimx-fetchconfig. Lol, so tired.
Oct 10, 2019
cd3b33e
Merge upstream fix to core/connectors/btds4.c
Oct 15, 2019
8d38f6f
Fix merge mistake
Oct 15, 2019
3b34f02
Did not merge core/macros.c properly
Oct 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ fpsconfig/gimx-fpsconfig
core/gimx
core/test/haptic/ff_lg_test
loader/gimx-loader

.vscode
5 changes: 5 additions & 0 deletions Makedefs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ CXXFLAGS += -pg
LDFLAGS += -pg
endif

#Library address sanitiser is not available for mingw64. This applies to msys2.
#Uncomment below lines, and comment above lines, for plain debug symbols.
#CFLAGS += -Wall -Wextra -Werror -O0 -g
#CXXFLAGS += -Wall -Wextra -Werror -O0 -g

CPPFLAGS += -I../shared

GIMXFILE_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxfile
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DIRS = shared utils core config launcher fpsconfig loader
DIRS = shared utils core config launcher fpsconfig loader fetchconfig


ifneq ($(OS),Windows_NT)
DIRS+= po
Expand All @@ -19,13 +20,14 @@ build-core: build-shared
build-config: build-shared
build-launcher: build-shared
build-fpsconfig: build-shared
build-fetchconfig: build-shared

clean: $(CLEANDIRS)
$(CLEANDIRS):
$(CLEANDIRS):
$(MAKE) -C $(@:clean-%=%) clean

ifeq ($(OS),Windows_NT)
DLLS = $(shell ntldd -R {core,config,fpsconfig,launcher}/*.exe | grep mingw | sed "s/.*=> //g" | cut -d' ' -f 1 | sed 's/\\/\\\\/g' | xargs cygpath -u | sort | uniq)\
DLLS = $(shell ntldd -R {core,config,fpsconfig,launcher,fetchconfig}/*.exe | grep mingw | sed "s/.*=> //g" | cut -d' ' -f 1 | sed 's/\\/\\\\/g' | xargs cygpath -u | sort | uniq)\
$(shell ntldd -R shared/*/*.dll | grep mingw | sed "s/.*=> //g" | cut -d' ' -f 1 | sed 's/\\/\\\\/g' | xargs cygpath -u | sort | uniq)
install: all
mkdir -p setup
Expand All @@ -36,6 +38,7 @@ install: all
cp -u -f core/gimx setup/gimx.exe
cp -u -f config/gimx-config setup/gimx-config.exe
cp -u -f launcher/gimx-launcher setup/gimx-launcher.exe
cp -u -f fetchconfig/gimx-fetchconfig setup/gimx-fetchconfig.exe
cp -u -f fpsconfig/gimx-fpsconfig setup/gimx-fpsconfig.exe
cp -u -f loader/gimx-loader setup/gimx-loader.exe
cp -u -f shared/gimxinput/src/windows/gamecontrollerdb.txt setup
Expand Down
21 changes: 10 additions & 11 deletions core/macros.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static int get_macro(char tokens[MAX_LINE_TOKENS][LINE_MAX], int ntoks)
if(ntoks < 2) {
return -1;
}

pcurrent = NULL;

if(ntoks > 2)
Expand Down Expand Up @@ -460,19 +460,19 @@ static int get_event(char tokens[MAX_LINE_TOKENS][LINE_MAX], int ntoks)
int rvalue;
int delay_nb;
int i;

if(!pcurrent || ntoks < 2) {
return -1;
}

int ret = 0;

if (!strncmp(tokens[0], "KEYDOWN", strlen("KEYDOWN")))
{
rbutton = ginput_key_id(tokens[1]);

ALLOCATE_EVENT_OR_FAIL

pcurrent->events[pcurrent->nb_events - 1].type = GE_KEYDOWN;
pcurrent->events[pcurrent->nb_events - 1].key.keysym = rbutton;
}
Expand All @@ -490,7 +490,7 @@ static int get_event(char tokens[MAX_LINE_TOKENS][LINE_MAX], int ntoks)
rbutton = ginput_key_id(tokens[1]);

ALLOCATE_EVENT_OR_FAIL

pcurrent->events[pcurrent->nb_events - 1].type = GE_KEYDOWN;
pcurrent->events[pcurrent->nb_events - 1].key.keysym = rbutton;

Expand All @@ -501,7 +501,7 @@ static int get_event(char tokens[MAX_LINE_TOKENS][LINE_MAX], int ntoks)
}

ALLOCATE_EVENT_OR_FAIL

pcurrent->events[pcurrent->nb_events - 1].type = GE_KEYUP;
pcurrent->events[pcurrent->nb_events - 1].key.keysym = rbutton;
}
Expand All @@ -510,7 +510,7 @@ static int get_event(char tokens[MAX_LINE_TOKENS][LINE_MAX], int ntoks)
rbutton = ginput_mouse_button_id(tokens[1]);

ALLOCATE_EVENT_OR_FAIL

pcurrent->events[pcurrent->nb_events - 1].type = GE_MOUSEBUTTONDOWN;
pcurrent->events[pcurrent->nb_events - 1].button.button = rbutton;
}
Expand Down Expand Up @@ -646,12 +646,12 @@ int get_trigger(char tokens[MAX_LINE_TOKENS][LINE_MAX], int ntoks)
{
int etype = -1;
int rbutton;

if(!pcurrent || ntoks < 2)
{
return -1;
}

if(ntoks > 2)
{
if(!strncmp(tokens[1], "KEYDOWN", strlen("KEYDOWN")))
Expand Down Expand Up @@ -1386,4 +1386,3 @@ unsigned int macro_process()
}
return running_macro_nb;
}

70 changes: 70 additions & 0 deletions fetchconfig/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
include ../Makedefs


ifneq ($(OS),Windows_NT)
prefix=$(DESTDIR)/usr
bindir=$(prefix)/bin
endif


NAME=$(shell basename "$(shell pwd)")


ifneq ($(OS),Windows_NT)
LDLIBS += -lstdc++ -lm `pkg-config --libs ncursesw`
else
LDLIBS += -lws2_32 -lstdc++ -lpdcursesw -lintl
endif

CPPFLAGS += -Iinclude -std=c++14

LDFLAGS += -L../shared/gimxfetchconfig
LDLIBS += -lgimxfetchconfig
LDFLAGS += $(GIMXINPUT_LDFLAGS) $(GIMXUSB_LDFLAGS) $(GIMXPOLL_LDFLAGS)
LDLIBS += $(GIMXINPUT_LDLIBS) $(GIMXUSB_LDLIBS) $(GIMXPOLL_LDLIBS)
LDLIBS += $(GIMXUPDATER_LDLIBS) $(GIMXCONFIGUPDATER_LDLIBS)
LDFLAGS += $(GIMXUPDATER_LDFLAGS) $(GIMXCONFIGUPDATER_LDFLAGS)


OBJECTS := $(patsubst %.cpp,%.o,$(wildcard *.cpp))

OUT=gimx-$(NAME)

ifneq ($(OS),Windows_NT)
BINS = $(OUT)
else
OBJECTS += $(NAME).rc.o
endif


all: $(OUT)


$(OUT): $(OBJECTS)

ifeq ($(OS),Windows_NT)
$(NAME).rc.o: $(NAME).rc
WINDRES $^ -o $@
endif


clean:
$(RM) $(OBJECTS) $(OUT)

.PHONY: clean


ifneq ($(OS),Windows_NT)
install: all
mkdir -p $(prefix)
mkdir -p $(bindir)
for i in $(BINS); do cp $$i $(bindir)/; done
for i in $(BINS); do chmod ug+s $(bindir)/$$i; done

uninstall:
-for i in $(BINS); do $(RM) $(bindir)/$$i; done
-rmdir $(bindir)
-rmdir $(prefix)

really-clean: clean uninstall
endif
Loading