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

Command line config file download util #622

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 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
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
10 changes: 8 additions & 2 deletions Makedefs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@

LD = $(CXX)

CFLAGS += -Wall -Wextra -O3
CXXFLAGS += -Wall -Wextra -O3
#CFLAGS += -Wall -Wextra -O3
CodeOhms marked this conversation as resolved.
Show resolved Hide resolved
#CXXFLAGS += -Wall -Wextra -O3
#Comment the above two lines and uncomment the below three lines to compile with debug symbols.

#CFLAGS += -Wall -Wextra -O0 -g -fsanitize=address -fno-omit-frame-pointer
#CXXFLAGS += -Wall -Wextra -O0 -g -fsanitize=address -fno-omit-frame-pointer

#Library address sanitiser is not available for mingw64. This applies to msys2.
#Uncomment below lines, and comment above lines, for plain debug symbols.
CodeOhms marked this conversation as resolved.
Show resolved Hide resolved
CFLAGS += -Wall -Wextra -O0 -g
CXXFLAGS += -Wall -Wextra -O0 -g

CPPFLAGS += -I../shared

GIMXCONFIGEDITOR_LDFLAGS = -L../shared/gimxconfigeditor \
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
68 changes: 68 additions & 0 deletions fetchconfig/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
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++11

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