From d23ef66ee7fe30c6a830c72c0a32f470f4672728 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 25 Mar 2016 13:11:59 +0100 Subject: [PATCH] Settings registration added --- Updater.mak | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Updater.mak diff --git a/Updater.mak b/Updater.mak new file mode 100644 index 0000000..b4347d7 --- /dev/null +++ b/Updater.mak @@ -0,0 +1,50 @@ +# +# Copyright 2016 Amebis +# +# This file is part of Updater. +# +# Updater is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Updater is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Updater. If not, see . +# + +!IFNDEF UPDATER_CFG +UPDATER_CFG=HKLM\Software\Amebis\ZRCola\Updater +!ENDIF + +!IFNDEF UPDATER_OUTPUT_DIR +UPDATER_OUTPUT_DIR=output\update +!ENDIF + +!IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" +UPDATER_REG_FLAGS=/f /reg:64 +UPDATER_REG_FLAGS32=/f /reg:32 +!ELSE +UPDATER_REG_FLAGS=/f +!ENDIF + + +###################################################################### +# Main targets +###################################################################### + +UpdaterRegisterSettings :: + reg.exe add "$(UPDATER_CFG)" /v "CachePath" /t REG_SZ /d "$(MAKEDIR)\$(UPDATER_OUTPUT_DIR)" $(UPDATER_REG_FLAGS) > NUL +!IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" + reg.exe add "$(UPDATER_CFG)" /v "CachePath" /t REG_SZ /d "$(MAKEDIR)\$(UPDATER_OUTPUT_DIR)" $(UPDATER_REG_FLAGS32) > NUL +!ENDIF + +UpdaterUnregisterSettings :: + -reg.exe delete "$(UPDATER_CFG)" /v "CachePath" $(UPDATER_REG_FLAGS) > NUL +!IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" + -reg.exe delete "$(UPDATER_CFG)" /v "CachePath" $(UPDATER_REG_FLAGS32) > NUL +!ENDIF