Skip to content

Commit

Permalink
ScrollView.jar related fixes: issue 985 and 987
Browse files Browse the repository at this point in the history
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@889 d0cd1f9f-072b-0410-8dd7-cf729c803f20
  • Loading branch information
zdenop@gmail.com committed Oct 5, 2013
1 parent d5b3c6c commit 4d30bf2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
36 changes: 18 additions & 18 deletions java/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ SCROLLVIEW_FILES = \
$(srcdir)/com/google/scrollview/ScrollView.java

SCROLLVIEW_CLASSES = \
$(srcdir)/com/google/scrollview/ui/SVAbstractMenuItem.class \
$(srcdir)/com/google/scrollview/ui/SVCheckboxMenuItem.class \
$(srcdir)/com/google/scrollview/ui/SVEmptyMenuItem.class \
$(srcdir)/com/google/scrollview/events/SVEvent.class \
$(srcdir)/com/google/scrollview/events/SVEventHandler.class \
$(srcdir)/com/google/scrollview/events/SVEventType.class \
$(srcdir)/com/google/scrollview/ui/SVImageHandler.class \
$(srcdir)/com/google/scrollview/ui/SVMenuBar.class \
$(srcdir)/com/google/scrollview/ui/SVMenuItem.class \
$(srcdir)/com/google/scrollview/ui/SVPopupMenu.class \
$(srcdir)/com/google/scrollview/ui/SVSubMenuItem.class \
$(srcdir)/com/google/scrollview/ui/SVWindow.class \
$(srcdir)/com/google/scrollview/ScrollView.class
com/google/scrollview/ui/SVAbstractMenuItem.class \
com/google/scrollview/ui/SVCheckboxMenuItem.class \
com/google/scrollview/ui/SVEmptyMenuItem.class \
com/google/scrollview/events/SVEvent.class \
com/google/scrollview/events/SVEventHandler.class \
com/google/scrollview/events/SVEventType.class \
com/google/scrollview/ui/SVImageHandler.class \
com/google/scrollview/ui/SVMenuBar.class \
com/google/scrollview/ui/SVMenuItem.class \
com/google/scrollview/ui/SVPopupMenu.class \
com/google/scrollview/ui/SVSubMenuItem.class \
com/google/scrollview/ui/SVWindow.class \
com/google/scrollview/ScrollView.class

SCROLLVIEW_LIBS = \
$(srcdir)/piccolo-1.2.jar \
Expand All @@ -42,16 +42,16 @@ SCROLLVIEW_LIBS = \
CLASSPATH = $(srcdir)/piccolo-1.2.jar:$(srcdir)/piccolox-1.2.jar

ScrollView.jar : $(SCROLLVIEW_CLASSES)
$(JAR) cf $@ $(srcdir)/com/google/scrollview/*.class \
$(srcdir)/com/google/scrollview/events/*.class $(srcdir)/com/google/scrollview/ui/*.class
$(JAR) cf $@ com/google/scrollview/*.class \
com/google/scrollview/events/*.class com/google/scrollview/ui/*.class

$(SCROLLVIEW_CLASSES) : $(SCROLLVIEW_FILES)
$(JAVAC) -encoding UTF8 -classpath $(CLASSPATH) $(SCROLLVIEW_FILES)
$(JAVAC) -encoding UTF8 -sourcepath $(srcdir) -classpath $(CLASSPATH) $(SCROLLVIEW_FILES) -d $(builddir)

.PHONY: install-jars
install-jars : ScrollView.jar
@if [ ! -d $(scrollview_path) ]; then mkdir -p $(scrollview_path); fi;
$(INSTALL) -m 644 $(srcdir)/*.jar $(scrollview_path);
$(INSTALL) -m 644 $(SCROLLVIEW_LIBS) $(scrollview_path);
$(INSTALL) -m 644 ScrollView.jar $(scrollview_path);
@echo "Don't forget to set eviroment variable SCROLLVIEW_PATH to $(scrollview_path)";

Expand All @@ -60,7 +60,7 @@ uninstall:
endif

clean :
rm -f ScrollView.jar *.class
rm -f ScrollView.jar *.class $(srcdir)/*.class

# all-am does nothing, to make the java part optional.
all all-am install :
1 change: 1 addition & 0 deletions java/com/google/scrollview/events/SVEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public void mouseReleased(PInputEvent e) {
}
if (selection != null) {
svWindow.canvas.getLayer().removeChild(selection);
selection = null;
}
}

Expand Down
4 changes: 2 additions & 2 deletions viewer/svutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ void SVSync::ExitThread() {

// Starts a new process.
void SVSync::StartProcess(const char* executable, const char* args) {
#ifdef _WIN32
std::string proc;
proc.append(executable);
proc.append(" ");
proc.append(args);
std::cout << "Starting " << proc << std::endl;
#ifdef _WIN32
STARTUPINFO start_info;
PROCESS_INFORMATION proc_info;
GetStartupInfo(&start_info);
Expand Down Expand Up @@ -304,7 +304,7 @@ static std::string ScrollViewCommand(std::string scrollview_path) {
"-Xms1024m -Xmx2048m -Djava.library.path=%s -cp %s/ScrollView.jar:"
"%s/piccolo-1.2.jar:%s/piccolox-1.2.jar"
" com.google.scrollview.ScrollView"
" >/dev/null 2>&1 & wait\"";
" & wait\"";
#endif
int cmdlen = strlen(cmd_template) + 4*strlen(scrollview_path.c_str()) + 1;
char* cmd = new char[cmdlen];
Expand Down

0 comments on commit 4d30bf2

Please sign in to comment.