1. Changed jsharp files to java files
2. Added CommandLauncher to allow java classes to be invoked from msi install
This commit is contained in:
@@ -24,40 +24,48 @@ SUBDIRS =
|
||||
|
||||
DIST_SUBDIRS =
|
||||
|
||||
EXTRA_DIST = SetupAsWindowsService.vjsproj Program.jsl
|
||||
EXTRA_DIST = SetupAsWindowsService.java
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
DEBUG = -g
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
DEBUG = -g:none
|
||||
endif
|
||||
|
||||
PACKAGE = SetupAsWindowsService
|
||||
TARGET_FILE = $(PACKAGE).exe
|
||||
TARGET_FILE = $(PACKAGE).class
|
||||
LOG_FILE = $(PACKAGE).log
|
||||
JAVAFILES = SetupAsWindowsService.java
|
||||
CLASSES = $(addprefix $(BUILDDIR)/, $(JAVAFILES:%.java=%.class))
|
||||
BUILDDIR = bin/$(TARGET_CFG)
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall devenv
|
||||
.PHONY: package package-clean package-install package-uninstall
|
||||
|
||||
package: $(TARGET_FILE)
|
||||
all: $(BUILDDIR) $(CLASSES)
|
||||
|
||||
devenv:
|
||||
@if ! test -x "$(VSINSTALLDIR)/Common7/IDE/devenv.exe"; then echo "Error: Microsoft Visual Studio .NET is currently required to build MSI and MSM packages"; exit 1; fi
|
||||
|
||||
$(TARGET_FILE): devenv
|
||||
$(BUILDDIR)/%.class: %.java
|
||||
@rm -f $(LOG_FILE) $@
|
||||
@CMD='"$(VSINSTALLDIR)/Common7/IDE/devenv.exe" ../server-java_msi/server-java_msi.sln /build $(TARGET_CFG) /project $(PACKAGE) /out $(LOG_FILE)'; \
|
||||
echo $$CMD; \
|
||||
@echo [======== Compiling $@ ========]
|
||||
@javac $(DEBUG) -d $(BUILDDIR) $< 2> $(LOG_FILE)
|
||||
@echo $$CMD; \
|
||||
if eval $$CMD; then \
|
||||
ls -l bin/$(TARGET_CFG)/$(TARGET_FILE); \
|
||||
ls -l $(BUILDDIR)/$(TARGET_FILE); \
|
||||
cp $(BUILDDIR)/$(TARGET_FILE) bin; \
|
||||
else \
|
||||
grep -a "ERROR:" $(LOG_FILE); \
|
||||
fi
|
||||
|
||||
$(BUILDDIR):
|
||||
[ -d $(BUILDDIR) ] || mkdir -p $(BUILDDIR)
|
||||
|
||||
|
||||
package-clean clean-local:
|
||||
rm -rf Release/* Release Debug/* Debug*/Release */Debug *.log *.suo
|
||||
rm -rf bin/Release/* bin/Release bin/Debug/* bin/Debug bin/* bin *.log
|
||||
|
||||
clean:
|
||||
rm -rf Release/* Release Debug/* Debug */Release */Debug *.log *.suo
|
||||
rm -rf bin/Release/* bin/Release bin/Debug/* bin/Debug bin/* bin *.log
|
||||
|
||||
distclean-local: package-clean
|
||||
rm -f Makefile
|
||||
|
||||
Reference in New Issue
Block a user