Skip to content

Commit

Permalink
Prefer ulwgl-launcher when using --user-install to avoid conflicts
Browse files Browse the repository at this point in the history
with `ULWGL` on casefolding filesystems
  • Loading branch information
loathingKernel committed Mar 1, 2024
1 parent 2dedc0d commit d887de4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
43 changes: 21 additions & 22 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This is different from ULWGL to facilitate user installations
# If this is changed to ULWGL (uppercase), `uninstall` target will also remove the SLR directory
PROJECT := ulwgl
INSTALLDIR ?= ulwgl

OBJDIR := builddir

Expand All @@ -19,7 +18,7 @@ all: reaper ulwgl ulwgl-launcher

$(OBJDIR)/.build-ulwgl: | $(OBJDIR)
$(info :: Building ulwgl )
sed 's|##INSTALL_PATH##|$(DATADIR)/$(PROJECT)|g' ULWGL/ulwgl-run.in > $(OBJDIR)/ulwgl-run
sed 's|##INSTALL_PATH##|$(DATADIR)/$(INSTALLDIR)|g' ULWGL/ulwgl-run.in > $(OBJDIR)/ulwgl-run
touch $(@)

.PHONY: ulwgl
Expand All @@ -31,14 +30,14 @@ ulwgl-bin-install: ulwgl

ulwgl-dist-install:
$(info :: Installing ulwgl )
install -d $(DESTDIR)$(DATADIR)/$(PROJECT)
install -Dm 644 ULWGL/ulwgl_consts.py -t $(DESTDIR)$(DATADIR)/$(PROJECT)
install -Dm 644 ULWGL/ulwgl_dl_util.py -t $(DESTDIR)$(DATADIR)/$(PROJECT)
install -Dm 644 ULWGL/ulwgl_log.py -t $(DESTDIR)$(DATADIR)/$(PROJECT)
install -Dm 644 ULWGL/ulwgl_plugins.py -t $(DESTDIR)$(DATADIR)/$(PROJECT)
install -Dm 755 ULWGL/ulwgl_run.py -t $(DESTDIR)$(DATADIR)/$(PROJECT)
install -Dm 644 ULWGL/ulwgl_util.py -t $(DESTDIR)$(DATADIR)/$(PROJECT)
install -Dm 644 ULWGL/ULWGL_VERSION.json -t $(DESTDIR)$(DATADIR)/$(PROJECT)
install -d $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 644 ULWGL/ulwgl_consts.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 644 ULWGL/ulwgl_dl_util.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 644 ULWGL/ulwgl_log.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 644 ULWGL/ulwgl_plugins.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 755 ULWGL/ulwgl_run.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 644 ULWGL/ulwgl_util.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 644 ULWGL/ULWGL_VERSION.json -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)

# Install both dist and sh script target
ulwgl-install: ulwgl-dist-install ulwgl-bin-install
Expand All @@ -48,21 +47,21 @@ ulwgl-install: ulwgl-dist-install ulwgl-bin-install

$(OBJDIR)/.build-ulwgl-launcher: | $(OBJDIR)
$(info :: Building ulwgl-launcher )
sed 's|##INSTALL_PATH##|$(DATADIR)/$(PROJECT)|g' ULWGL/ULWGL-Launcher/ulwgl-run.in > $(OBJDIR)/ulwgl-launcher-run
sed 's|##INSTALL_PATH##|$(DATADIR)/$(INSTALLDIR)|g' ULWGL/ULWGL-Launcher/ulwgl-run.in > $(OBJDIR)/ulwgl-launcher-run
touch $(@)

.PHONY: ulwgl-launcher
ulwgl-launcher: $(OBJDIR)/.build-ulwgl-launcher

ulwgl-launcher-bin-install: ulwgl-launcher
install -d $(DESTDIR)$(DATADIR)/$(PROJECT)/ULWGL-Launcher
install -Dm 755 $(OBJDIR)/$(<)-run $(DESTDIR)$(DATADIR)/$(PROJECT)/ULWGL-Launcher/ulwgl-run
install -d $(DESTDIR)$(DATADIR)/$(INSTALLDIR)/ULWGL-Launcher
install -Dm 755 $(OBJDIR)/$(<)-run $(DESTDIR)$(DATADIR)/$(INSTALLDIR)/ULWGL-Launcher/ulwgl-run

ulwgl-launcher-dist-install:
$(info :: Installing ulwgl-launcher )
install -d $(DESTDIR)$(DATADIR)/$(PROJECT)/ULWGL-Launcher
install -Dm 644 ULWGL/ULWGL-Launcher/compatibilitytool.vdf -t $(DESTDIR)$(DATADIR)/$(PROJECT)/ULWGL-Launcher
install -Dm 644 ULWGL/ULWGL-Launcher/toolmanifest.vdf -t $(DESTDIR)$(DATADIR)/$(PROJECT)/ULWGL-Launcher
install -d $(DESTDIR)$(DATADIR)/$(INSTALLDIR)/ULWGL-Launcher
install -Dm 644 ULWGL/ULWGL-Launcher/compatibilitytool.vdf -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)/ULWGL-Launcher
install -Dm 644 ULWGL/ULWGL-Launcher/toolmanifest.vdf -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)/ULWGL-Launcher

# Install both dist and sh script target
#ulwgl-launcher-install: ulwgl-launcher-dist-install ulwgl-launcher-bin-install
Expand All @@ -81,7 +80,7 @@ reaper: $(OBJDIR)/.build-reaper

reaper-install: reaper
$(info :: Installing reaper )
install -Dm 755 $(OBJDIR)/$</$< -t $(DESTDIR)$(DATADIR)/$(PROJECT)
install -Dm 755 $(OBJDIR)/$</$< -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)


.PHONY: $(OBJDIR)
Expand All @@ -98,16 +97,16 @@ clean:
.PHONY: uninstall
# NEVER use a wildcard here
uninstall:
$(info Removing $(PROJECT) files in $(DESTDIR)$(BINDIR))
$(info Removing $(INSTALLDIR) files in $(DESTDIR)$(BINDIR))
@rm -rf -v --preserve-root=all $(DESTDIR)$(BINDIR)/ulwgl-run
$(info Removing $(PROJECT) directory in $(DESTDIR)$(DATADIR))
@rm -rf -v --preserve-root=all $(DESTDIR)$(DATADIR)/$(PROJECT)
$(info Removing $(INSTALLDIR) directory in $(DESTDIR)$(DATADIR))
@rm -rf -v --preserve-root=all $(DESTDIR)$(DATADIR)/$(INSTALLDIR)


.PHONY: user-install
user-install:
$(info :: ---)
$(info :: Installed under user-only location "$(DATADIR)/$(PROJECT)")
$(info :: Installed under user-only location "$(DATADIR)/$(INSTALLDIR)")
$(info :: To run you need to make sure "$(BINDIR)" is in your PATH)


Expand Down
1 change: 1 addition & 0 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function configure() {
echo ""
if [[ -n "$arg_user_install" ]]; then
echo "USERINSTALL := xtrue"
echo "INSTALLDIR := ulwgl-launcher"
fi

# Prefix was specified, baking it into the Makefile
Expand Down

0 comments on commit d887de4

Please sign in to comment.