Merge pull request #5 from basxto/stable

Change makefile and gamepad buttons
This commit is contained in:
Daniel Darias 2018-09-03 09:17:40 +01:00 committed by GitHub
commit a6e9279cf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 22 deletions

View file

@ -1,26 +1,53 @@
prefix ?= /usr/local
prefix ?= usr/local
DESTDIR :=
ICONSIZES := 64 128
define \n
all:
mkdir -p build
cd build; git clone -b 2.1 --single-branch https://github.com/godotengine/godot || true
cd build/godot; scons -j `nproc` platform=server target=release_debug use_llvm=yes unix_global_settings_path=".."
endef
build/cowsrevenge: $(wildcard "Scenes/*/*") $(wildcard "Locales/*") $(wildcard "Sound/*") $(wildcard "Music/*") $(wildcard "Sprites/*") $(wildcard "Sprites/*/*") $(wildcard "Fonts/*") $(wildcard "Fonts/*/*") export.cfg engine.cfg d.tscn build/godot/bin/godot_server.server.opt.tools.64
cd build/godot; scons platform=x11 tools=no target=release bits=`getconf LONG_BIT` use_llvm=yes -j `nproc`
mkdir -p build/templates/
cp build/godot/bin/godot.x11*.llvm build/templates/linux_x11_`getconf LONG_BIT`_release
build/godot/bin/godot_server.server.tools.64 -export "Linux X11" build/cowsrevenge
build/godot/bin/godot_server.server.opt.tools.64 -export "Linux X11" build/cowsrevenge
#build engine
build/godot/bin/godot_server.server.opt.tools.64:
mkdir -p build
cd build; git clone -b 2.1 --single-branch https://github.com/godotengine/godot || true
cd build/godot; scons -j `nproc` platform=server target=release_debug use_llvm=yes unix_global_settings_path=".."
install:
mkdir -p $(prefix)/bin/
mkdir -p $(prefix)/share/applications/
mkdir -p $(prefix)/share/metainfo/
mkdir -p $(prefix)/share/icons/hicolor/64x64/apps/
mkdir -p $(prefix)/share/icons/hicolor/128x128/apps/
cp build/cowsrevenge $(prefix)/bin/
cp linux_build/com.github.dariasteam.cowsrevenge.desktop $(prefix)/share/applications/
cp linux_build/com.github.dariasteam.cowsrevenge.appdata.xml $(prefix)/share/metainfo/
cp linux_build/cowsrevenge_icon_64.png $(prefix)/share/icons/hicolor/64x64/apps/com.github.dariasteam.cowsrevenge.png
cp linux_build/cowsrevenge_icon_128.png $(prefix)/share/icons/hicolor/128x128/apps/com.github.dariasteam.cowsrevenge.png
.PHONY: install
install: build/cowsrevenge $(wildcard "linux_build/*")
install -d "$(DESTDIR)/$(prefix)/bin/"
install -d "$(DESTDIR)/$(prefix)/share/applications/"
install -d "$(DESTDIR)/$(prefix)/share/metainfo/"
install build/cowsrevenge "$(DESTDIR)/$(prefix)/bin/"
install -m644 linux_build/com.github.dariasteam.cowsrevenge.desktop "$(DESTDIR)/$(prefix)/share/applications/"
install linux_build/com.github.dariasteam.cowsrevenge.appdata.xml "$(DESTDIR)/$(prefix)/share/metainfo/"
#install icon files
$(foreach size,$(ICONSIZES),install -d "$(DESTDIR)/$(prefix)/share/icons/hicolor/$(size)x$(size)/apps/";$(\n))
$(foreach size,$(ICONSIZES),install -m644 "linux_build/cowsrevenge_icon_$(size).png" "$(DESTDIR)/$(prefix)/share/icons/hicolor/$(size)x$(size)/apps/com.github.dariasteam.cowsrevenge.png";$(\n))
#update databases if installed to system
ifeq ($(DESTDIR),)
-xdg-icon-resource forceupdate --mode system;
-xdg-desktop-menu forceupdate --mode system;
endif
.PHONY: uninstall
uninstall: "$(DESTDIR)/$(prefix)/bin/cowsrevenge"
rm "$(DESTDIR)/$(prefix)/bin/cowsrevenge"
rm "$(DESTDIR)/$(prefix)/share/applications/linux_build/com.github.dariasteam.cowsrevenge.desktop"
rm "$(DESTDIR)/$(prefix)/share/metainfo/linux_build/com.github.dariasteam.cowsrevenge.appdata.xml"
#remove icon files
$(foreach size,$(ICONSIZES),rm "$(DESTDIR)/$(prefix)/share/icons/hicolor/$(size)x$(size)/apps/com.github.dariasteam.cowsrevenge.png";$(\n))
#update databases if removed from system
ifeq ($(DESTDIR),)
-xdg-icon-resource forceupdate --mode system;
-xdg-desktop-menu forceupdate --mode system;
endif
.PHONY: clean
clean:
rm -rf build

View file

@ -38,13 +38,15 @@ gen_mipmaps=false
[input]
ui_cancel=[key(Escape), jbutton(0, 2), jbutton(0, 3)]
ui_left=[key(Left), jbutton(0, 14)]
ui_right=[key(Right), jbutton(0, 15)]
ui_cancel=[key(Escape), jbutton(0, 1), jbutton(0, 2), jbutton(0, 3)]
ui_left=[key(Left), jbutton(0, 14), jaxis(0, 0)]
ui_right=[key(Right), jbutton(0, 15), jaxis(0, 1)]
ui_up=[key(Up), jbutton(0, 12), jaxis(0, 2)]
ui_down=[key(Down), jbutton(0, 13), jaxis(0, 3)]
ui_change_weapon=[key(R), jbutton(0, 5), jbutton(0, 4)]
ui_shoot=[key(S), jbutton(0, 1), jbutton(0, 6), jbutton(0, 7)]
ui_menu=[key(Escape), jbutton(0, 11)]
ui_jump=[key(A), key(Space), jbutton(0, 0)]
ui_shoot=[key(S), jbutton(0, 1)]
ui_change_weapon=[key(R), jbutton(0, 6), jbutton(0, 5)]
[locale]