Thread: [Jsmooth-cvs] jsmooth/skeletons/autodownload mainres.rc, 1.2, 1.3 customdownload.skel, 1.5, 1.6 mai
Status: Beta
Brought to you by:
reyes
From: Rodrigo R. <re...@us...> - 2007-05-27 09:14:55
|
Update of /cvsroot/jsmooth/jsmooth/skeletons/autodownload In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv14482/skeletons/autodownload Modified Files: mainres.rc customdownload.skel main.cpp autodownload.skel Makefile.win Log Message: splash screen support and small overall refactoring Index: Makefile.win =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/autodownload/Makefile.win,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.win 18 May 2007 21:33:58 -0000 1.7 --- Makefile.win 27 May 2007 09:14:50 -0000 1.8 *************** *** 1,46 **** ! # Project: util-core ! ! PROJECTNAME=autodownload ! ##libmscabd_la_SOURCES = mspack/system.c mspack/cabd.c mspack/lzxd.c mspack/mszipd.c mspack/qtmd.c ! ##libmscabd_la_OBJS = system.o cabd.o lzxd.o mszipd.o qtmd.o ! ! SHELL = /bin/sh ! RM = rm -f ! CPP = g++.exe ! CC = gcc.exe ! WINDRES = windres.exe ! MINGW = ! RES = JWrap_private.res ! LINKOBJ = main.o execcab.o execexe.o $(RES) ! OBJ = main.o execcab.o execexe.o $(libmscabd_la_OBJS) $(RES) ! FLTK-LDFLAGS = $(shell fltk-config --ldflags --use-images) ! FLTK-CXXFLAGS = $(shell fltk-config --cxxflags --use-images) ! ##LINKLIBS = ../commonjava/CommonJava.a ../util-core/util-core.a mspack.a ../util-net/util-net.a ! LINKLIBS = ../commonjava/CommonJava.a ../util-net/util-net.a ../util-core/util-core.a ! LIBS = -L. -L"$(MINGW)/lib" -L"/lib" -lws2_32 -L"/lib" -L"../commonjava" -mwindows -L"../util-core" -L"../util-net" $(LINKLIBS) $(FLTK-LDFLAGS) -lsetupapi -lwininet ! INCS = -I"$(MINGW)/include" -I"$(JDK)/include" -I"$(JDK)/include/win32" ! CXXINCS = -I"$(MINGW)/include/c++" -I"$(MINGW)/include/c++/mingw32" -I"$(MINGW)/include/c++/backward" -I"$(MINGW)/include" -I"$(JDK)/include" -I"$(JDK)/include/win32" -I"../commonjava" -I"../util-core" -I"../util-net" $(FLTK-CXXFLAGS) ! BIN = autodownload.exe ! CXXFLAGS = $(CUSTOMFLAGS) $(CXXINCS) -DJDK="$(JDK)" ! CFLAGS = $(INCS) ! ! .PHONY: all all-before all-after clean clean-custom $(PROJECTNAME) ! ! all: all-before $(BIN) all-after ! ! clean: clean-custom ! $(RM) $(OBJ) $(BIN) JWrap_private.res ! ! $(BIN): $(LINKOBJ) $(LINKLIBS) ! $(CPP) $(CXXFLAGS) $(LINKOBJ) $(LIBS) -o $(BIN) ! ! #mspack.a: $(libmscabd_la_SOURCES) ! # $(CC) -c -Imspack $(libmscabd_la_SOURCES) ! # ar r mspack.a $(libmscabd_la_OBJS) ! # ranlib mspack.a ! ! JWrap_private.res: JWrap_private.rc mainres.rc ! $(WINDRES) -i JWrap_private.rc -I rc -o JWrap_private.res -O coff ! ! main.o: main.cpp ! $(CPP) -c main.cpp $(CXXFLAGS) --- 1,46 ---- ! # Project: util-core ! ! PROJECTNAME=autodownload ! ##libmscabd_la_SOURCES = mspack/system.c mspack/cabd.c mspack/lzxd.c mspack/mszipd.c mspack/qtmd.c ! ##libmscabd_la_OBJS = system.o cabd.o lzxd.o mszipd.o qtmd.o ! ! SHELL = /bin/sh ! RM = rm -f ! CPP = g++.exe ! CC = gcc.exe ! WINDRES = windres.exe ! MINGW = ! RES = JWrap_private.res ! LINKOBJ = main.o execcab.o execexe.o $(RES) ! OBJ = main.o execcab.o execexe.o $(libmscabd_la_OBJS) $(RES) ! FLTK-LDFLAGS = $(shell fltk-config --use-images --ldflags ) ! FLTK-CXXFLAGS = $(shell fltk-config --use-images --cxxflags ) ! ##LINKLIBS = ../commonjava/CommonJava.a ../util-core/util-core.a mspack.a ../util-net/util-net.a ! LINKLIBS = ../commonjava/CommonJava.a ../util-net/util-net.a ../util-gui/util-gui.a ../util-core/util-core.a ../jnismooth/jnismooth.a ../util-gui/util-gui.a ! LIBS = -L. -L"$(MINGW)/lib" -L"/lib" -lws2_32 -L"/lib" -L"../commonjava" -mwindows -L"../util-core" -L"../util-net" -L"../util-gui" $(LINKLIBS) -lsetupapi -lwininet $(FLTK-LDFLAGS) -lfltk_images -lfltk_png -lfltk_z -lfltk_jpeg ! INCS = -I"$(MINGW)/include" -I"$(JDK)/include" -I"$(JDK)/include/win32" ! CXXINCS = -I"$(MINGW)/include/c++" -I"$(MINGW)/include/c++/mingw32" -I"$(MINGW)/include/c++/backward" -I"$(MINGW)/include" -I"$(JDK)/include" -I"$(JDK)/include/win32" -I"../commonjava" -I"../util-core" -I"../util-net" -I"../util-gui" -I"../jnismooth" $(FLTK-CXXFLAGS) ! BIN = autodownload.exe ! CXXFLAGS = $(CUSTOMFLAGS) $(CXXINCS) -DJDK="$(JDK)" ! CFLAGS = $(INCS) ! ! .PHONY: all all-before all-after clean clean-custom $(PROJECTNAME) ! ! all: all-before $(BIN) all-after ! ! clean: clean-custom ! $(RM) $(OBJ) $(BIN) JWrap_private.res ! ! $(BIN): $(LINKOBJ) $(LINKLIBS) ! $(CPP) $(CXXFLAGS) $(LINKOBJ) $(LIBS) -o $(BIN) ! ! #mspack.a: $(libmscabd_la_SOURCES) ! # $(CC) -c -Imspack $(libmscabd_la_SOURCES) ! # ar r mspack.a $(libmscabd_la_OBJS) ! # ranlib mspack.a ! ! JWrap_private.res: JWrap_private.rc mainres.rc ! $(WINDRES) -i JWrap_private.rc -I rc -o JWrap_private.res -O coff ! ! main.o: main.cpp ! $(CPP) -c main.cpp $(CXXFLAGS) Index: main.cpp =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/autodownload/main.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main.cpp 19 May 2007 15:11:53 -0000 1.10 --- main.cpp 27 May 2007 09:14:50 -0000 1.11 *************** *** 33,36 **** --- 33,43 ---- #include "execcab.h" + #include <FL/Fl_Shared_Image.H> + #include "Splash.h" + + #include "JniSmooth.h" + #include "JniSmoothRegister.h" + #include "splashhelper.h" + #include "JVMBase.h" ResourceManager* globalResMan; *************** *** 59,63 **** --- 66,90 ---- } + void displaySplash(void *param) + { + } + class JVMListener : public JVMSetUpListener + { + virtual void jvmHasPid(int pid) + { + splashwindow_setProcessId(pid); + } + }; + + // SplashWindow* sw; + + // void splashwindow_runnerthread(void* param) + // { + // Fl::lock(); + // sw->splashOn(); + // Fl::run(); + // Fl::unlock(); + // } int WINAPI WinMain (HINSTANCE hThisInstance, *************** *** 69,72 **** --- 96,108 ---- SingleInstanceManager instanceman; + vector<JNIRegister*> jnireg; + jnireg.push_back(new JniSmoothRegister()); + + // fl_register_images(); + // sw = new SplashWindow("z:\\SOURCE\\RELEASE\\jsmooth\\skeletons\\autodownload\\splash.jpg"); + + // Thread splashthread; + // splashthread.start(splashwindow_runnerthread, NULL); + globalResMan = new ResourceManager("JAVA", PROPID, JARID, JNISMOOTHID); *************** *** 102,105 **** --- 138,149 ---- } + std::string splashimg = globalResMan->getProperty("skel_SplashImg"); + DEBUG("splash: " + splashimg); + if (splashimg.size() > 0) + { + splashwindow_start(splashimg); + // Sleep(1000); + } + DEBUG(string("Main class: ") + globalResMan->getMainName()); *************** *** 112,115 **** --- 156,160 ---- JavaMachineManager man(*globalResMan); + man.setJNI(jnireg); man.setAcceptExe(true); man.setAcceptDLL(true); *************** *** 120,123 **** --- 165,173 ---- man.setPreferDLL(globalResMan->getBooleanProperty("skel_SingleProcess")); + if (splashimg.size() > 0) + { + man.addListener(new JVMListener()); + } + if (man.run() == false) { Index: customdownload.skel =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/autodownload/customdownload.skel,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** customdownload.skel 18 May 2007 21:33:58 -0000 1.5 --- customdownload.skel 27 May 2007 09:14:50 -0000 1.6 *************** *** 44,47 **** --- 44,54 ---- </skeletonProperties> <skeletonProperties> + <description>SKEL_GENERIC_PROPERTY_SPLASH_DESCRIPTION</description> + <idName>SplashImg</idName> + <label>SKEL_GENERIC_PROPERTY_SPLASH</label> + <type>imgselector</type> + <value></value> + </skeletonProperties> + <skeletonProperties> <description>SKEL_GENERIC_PROPERTY_DEBUG_DESCRIPTION</description> <idName>Debug</idName> Index: mainres.rc =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/autodownload/mainres.rc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mainres.rc 18 May 2007 21:33:58 -0000 1.2 --- mainres.rc 27 May 2007 09:14:50 -0000 1.3 *************** *** 1,3 **** - #include "resource.h" --- 1,2 ---- Index: autodownload.skel =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/autodownload/autodownload.skel,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** autodownload.skel 18 May 2007 21:33:58 -0000 1.7 --- autodownload.skel 27 May 2007 09:14:50 -0000 1.8 *************** *** 44,47 **** --- 44,54 ---- </skeletonProperties> <skeletonProperties> + <description>SKEL_GENERIC_PROPERTY_SPLASH_DESCRIPTION</description> + <idName>SplashImg</idName> + <label>SKEL_GENERIC_PROPERTY_SPLASH</label> + <type>imgselector</type> + <value></value> + </skeletonProperties> + <skeletonProperties> <description>SKEL_GENERIC_PROPERTY_DEBUG_DESCRIPTION</description> <idName>Debug</idName> |