# HG changeset patch # User Jan Vrany # Date 1426287108 0 # Node ID da028ec9cc07df20b36679aba691955fd4d38411 Initial commit diff -r 000000000000 -r da028ec9cc07 .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,21 @@ + +syntax: glob +*Init.c +makefile +*.so +*.H +*.o +*.STH +*.sc +objbc +objvc +*.class +java/libs/*.jar +java/libs-src/*.jar +*-Test.xml +st.chg +statascripteditor +resources/stx +keyboardMacros.rc +keyboard.rc +display.rc diff -r 000000000000 -r da028ec9cc07 Make.proto --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Make.proto Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,452 @@ +# $Header$ +# +# automagically generated from the projectDefinition: jv_statascripteditor. +# +# -------------- no need to change anything below ---------- +# +# This makefile generates some standalone demo applications +# +# make +# generates statascripteditor +# + +TOP=../../stx +INCLUDE_TOP=$(TOP)/.. + +# set to a dummy file name (like FORCE=@@@FORCE-BUILD@@@) to force the build of prereq packages +FORCE= +.PHONY: $(FORCE) + +PACKAGE=jv:statascripteditor +SUBDIRS= +SUPPRESS_LOCAL_ABBREVS="yes" +NOAUTOLOAD=1 +NOSUBAUTOLOAD=1 + +LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg +LOCALDEFINES= +GLOBALDEFINES= +MAIN_DEFINES=-DIGNORE_IMAGE -DNO_DISPLAY + +RCSSOURCES=Make.proto *.st +LINKSOURCES=Make.proto *.st + +DELIVERBINARIES= + +APPNAME=libjv_statascripteditor +LIBNAME=libjv_statascripteditor +STCLOCALOPT='-package=$(PACKAGE)' -I. -headerDir=. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=. -varPrefix=$(LIBNAME) + + +# ********** OPTIONAL: MODIFY the next line *** +# additional C-libraries that should be pre-linked with the class-objects +LD_OBJ_LIBS= +LOCAL_SHARED_LIBS= + + +# ********** OPTIONAL: MODIFY the next line *** +# additional C targets or libraries should be added below +LOCAL_EXTRA_TARGETS= + +OBJS= $(COMMON_OBJS) $(UNIX_OBJS) + + + + + +LIBLIST = $(REQUIRED_LIBS) + +# required libs: +# + +REQUIRED_LIBS= libstx_libbasic \ + libstx_goodies_refactoryBrowser_parser \ + libstx_libbasic2 \ + libstx_libcomp \ + libstx_libview \ + libstx_libbasic3 \ + libstx_libui \ + libstx_libview2 \ + libstx_libwidg \ + libstx_libwidg2 \ + libstx_libwidg3 \ + libstx_libtool \ + + +REQUIRED_LIBOBJS= $(TOP)/libbasic/libstx_libbasic$(O_EXT) \ + $(TOP)/goodies/refactoryBrowser/parser/libstx_goodies_refactoryBrowser_parser$(O_EXT) \ + $(TOP)/libbasic2/libstx_libbasic2$(O_EXT) \ + $(TOP)/libcomp/libstx_libcomp$(O_EXT) \ + $(TOP)/libview/libstx_libview$(O_EXT) \ + $(TOP)/libbasic3/libstx_libbasic3$(O_EXT) \ + $(TOP)/libui/libstx_libui$(O_EXT) \ + $(TOP)/libview2/libstx_libview2$(O_EXT) \ + $(TOP)/libwidg/libstx_libwidg$(O_EXT) \ + $(TOP)/libwidg2/libstx_libwidg2$(O_EXT) \ + $(TOP)/libwidg3/libstx_libwidg3$(O_EXT) \ + $(TOP)/libtool/libstx_libtool$(O_EXT) \ + + +REQUIRED_LINK_LIBOBJS= libstx_libbasic$(O_EXT) \ + libstx_goodies_refactoryBrowser_parser$(O_EXT) \ + libstx_libbasic2$(O_EXT) \ + libstx_libcomp$(O_EXT) \ + libstx_libview$(O_EXT) \ + libstx_libbasic3$(O_EXT) \ + libstx_libui$(O_EXT) \ + libstx_libview2$(O_EXT) \ + libstx_libwidg$(O_EXT) \ + libstx_libwidg2$(O_EXT) \ + libstx_libwidg3$(O_EXT) \ + libstx_libtool$(O_EXT) \ + + +REQUIRED_SUPPORT_DIRS=RESOURCEFILES + +SUBPROJECT_LIBS= + + +target: ALL + +all:: prereq ALL_NP + +# like ALL, but not prereqs +ALL_NP:: exe $(SUBPROJECT_LIBS) $(REQUIRED_SUPPORT_DIRS) $(SETUP_RULE) + +exe: statascripteditor registerApplication + +statascripteditor: $(APP_DIRS_TO_MAKE) $(APP_LIBOBJS) $(REQUIRED_LIBOBJS) $(OBJS) + $(MAKE) link_statascripteditor + + +link_statascripteditor: + $(MAKE) GUI_APPLICATION \ + TARGET=statascripteditor \ + APPLICATION_CLASSES="$(COMMON_CLASSES) $(UNIX_CLASSES)" \ + APPLICATION_OBJS="$(OBJS)" \ + APPLICATION_LIBLIST="$(REQUIRED_LIBS)" \ + APPLICATION_LIBOBJS="$(REQUIRED_LIBOBJS)" \ + APPLICATION_LINK_LIBOBJS="$(REQUIRED_LINK_LIBOBJS)" \ + STARTUP_CLASS="StataScriptEditorMain" \ + STARTUP_SELECTOR="start" \ + MAIN_DEFINES="-DIGNORE_IMAGE -DNO_DISPLAY" + +# build all mandatory prerequisite packages (containing superclasses) for this package +prereq: + $(MAKE) FORCE=@@@FORCE-BUILD@@@ $(REQUIRED_LIBOBJS) + +# +# a self installable delivery +# +# backward compatible fallback +setup:: + @if test -d autopackage; then \ + makepackage; \ + else \ + echo "Error: make setup not yet available in this unix"; \ + exit 1; \ + fi + +# +# for linux, this uses autopackage +# +setup_linux: + @if test -d autopackage; then \ + makepackage; \ + else \ + echo "Error: missing autopackage directory"; \ + exit 1; \ + fi + +# +# for mac, a dmg is generated +# +setup_macosx: "Stata Script Editor_dmg" + -rm "Stata Script Editor.dmg" + hdiutil create -fs HFSX -layout SPUD "Stata Script Editor.dmg" -srcfolder "Stata Script Editor_dmg" -format UDZO -volname "Stata Script Editor" -quiet + +app: "Stata Script Editor_dmg" + +"Stata Script Editor_dmg": $(SUBPROJECT_LIBS) $(REQUIRED_SUPPORT_DIRS) + @-rm -rf "Stata Script Editor_dmg" + @-mkdir "Stata Script Editor_dmg" + @-mkdir "Stata Script Editor_dmg/Stata Script Editor.app" + @-mkdir "Stata Script Editor_dmg/Stata Script Editor.app/Contents" + @-mkdir "Stata Script Editor_dmg/Stata Script Editor.app/Contents/MacOS" + cp "statascripteditor" "Stata Script Editor_dmg/Stata Script Editor.app/Contents/MacOS/Stata Script Editor" + @-mkdir "Stata Script Editor_dmg/Stata Script Editor.app/Contents/MacOS/." + -cp -r *.so "Stata Script Editor_dmg/Stata Script Editor.app/Contents/MacOS/." + -cp -r symbols.stc "Stata Script Editor_dmg/Stata Script Editor.app/Contents/MacOS/." + -cp -r *.stx "Stata Script Editor_dmg/Stata Script Editor.app/Contents/MacOS/." + -cp -r *.rc "Stata Script Editor_dmg/Stata Script Editor.app/Contents/MacOS/." + -cp -r resources "Stata Script Editor_dmg/Stata Script Editor.app/Contents/MacOS/." + + +SOURCEFILES: statascripteditor_SOURCES \ + stx_SOURCES + + + + +RESOURCEFILES: statascripteditor_RESOURCES statascripteditor_BITMAPS \ + stx_RESOURCES stx_STYLES stx_BITMAPS + + +statascripteditor_RESOURCES: + mkdir -p resources/jv/statascripteditor + -cp ../resources/*.rs ../resources/*.style resources/jv/statascripteditor/.. + +statascripteditor_BITMAPS: + mkdir -p resources/jv/statascripteditor/bitmaps + -cp *.ico *.gif *.png resources/jv/statascripteditor/bitmaps + + + +stx_RESOURCES: \ + keyboard.rc \ + keyboardMacros.rc \ + display.rc \ + libbasic_RESOURCES \ + libview_RESOURCES \ + libtool_RESOURCES \ + libtool2_RESOURCES + +keyboard.rc: $(TOP)/projects/smalltalk/keyboard.rc + cp $(TOP)/projects/smalltalk/keyboard.rc . + +keyboardMacros.rc: $(TOP)/projects/smalltalk/keyboardMacros.rc + cp $(TOP)/projects/smalltalk/keyboardMacros.rc . + +display.rc: $(TOP)/projects/smalltalk/display.rc + cp $(TOP)/projects/smalltalk/display.rc . + +stx_STYLES: + mkdir -p resources/stx/libview + mkdir -p resources/stx/libview/styles + cp $(TOP)/libview/styles/*.common resources/stx/libview/styles + cp $(TOP)/libview/styles/*.style resources/stx/libview/styles + +stx_BITMAPS: \ + libwidg_BITMAPS + +libwidg_BITMAPS: + mkdir -p resources/stx/libwidg/bitmaps + -cp $(TOP)/libwidg/bitmaps/*.* resources/stx/libwidg/bitmaps + +libbasic_RESOURCES: + mkdir -p resources/stx/libbasic + -cp $(TOP)/libbasic/resources/*.* resources/stx/libbasic + +libtool_RESOURCES: + mkdir -p resources/stx/libtool + -cp $(TOP)/libtool/resources/*.* resources/stx/libtool + +libtool2_RESOURCES: + mkdir -p resources/stx/libtool2 + -cp $(TOP)/libtool2/resources/*.* resources/stx/libtool2 + +libview_RESOURCES: + mkdir -p resources/stx/libview + -cp $(TOP)/libview/resources/*.* resources/stx/libview + +libview2_RESOURCES: + mkdir -p resources/stx/libview2 + -cp $(TOP)/libview2/resources/*.* resources/stx/libview2 + +bitmaps: + mkdir -p bitmaps + +doc: + mkdir -p doc + + + +libstx_libbasic.so: $(TOP)/libbasic/libstx_libbasic.so + ln -sf $(TOP)/libbasic/libstx_libbasic.so . + +$(TOP)/libbasic/libstx_libbasic.so: $(TOP)/libbasic/makefile $(FORCE) + @if [ -f "$(TOP)/libbasic/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libbasic (no source)"; \ + else \ + cd $(TOP)/libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libbasic/makefile: $(TOP)/libbasic/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libbasic + +libstx_goodies_refactoryBrowser_parser.so: $(TOP)/goodies/refactoryBrowser/parser/libstx_goodies_refactoryBrowser_parser.so + ln -sf $(TOP)/goodies/refactoryBrowser/parser/libstx_goodies_refactoryBrowser_parser.so . + +$(TOP)/goodies/refactoryBrowser/parser/libstx_goodies_refactoryBrowser_parser.so: $(TOP)/goodies/refactoryBrowser/parser/makefile $(FORCE) + @if [ -f "$(TOP)/goodies/refactoryBrowser/parser/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/goodies/refactoryBrowser/parser (no source)"; \ + else \ + cd $(TOP)/goodies/refactoryBrowser/parser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/goodies/refactoryBrowser/parser/makefile: $(TOP)/goodies/refactoryBrowser/parser/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/goodies/refactoryBrowser/parser + +libstx_libbasic2.so: $(TOP)/libbasic2/libstx_libbasic2.so + ln -sf $(TOP)/libbasic2/libstx_libbasic2.so . + +$(TOP)/libbasic2/libstx_libbasic2.so: $(TOP)/libbasic2/makefile $(FORCE) + @if [ -f "$(TOP)/libbasic2/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libbasic2 (no source)"; \ + else \ + cd $(TOP)/libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libbasic2/makefile: $(TOP)/libbasic2/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libbasic2 + +libstx_libcomp.so: $(TOP)/libcomp/libstx_libcomp.so + ln -sf $(TOP)/libcomp/libstx_libcomp.so . + +$(TOP)/libcomp/libstx_libcomp.so: $(TOP)/libcomp/makefile $(FORCE) + @if [ -f "$(TOP)/libcomp/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libcomp (no source)"; \ + else \ + cd $(TOP)/libcomp && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libcomp/makefile: $(TOP)/libcomp/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libcomp + +libstx_libview.so: $(TOP)/libview/libstx_libview.so + ln -sf $(TOP)/libview/libstx_libview.so . + +$(TOP)/libview/libstx_libview.so: $(TOP)/libview/makefile $(FORCE) + @if [ -f "$(TOP)/libview/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libview (no source)"; \ + else \ + cd $(TOP)/libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libview/makefile: $(TOP)/libview/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libview + +libstx_libbasic3.so: $(TOP)/libbasic3/libstx_libbasic3.so + ln -sf $(TOP)/libbasic3/libstx_libbasic3.so . + +$(TOP)/libbasic3/libstx_libbasic3.so: $(TOP)/libbasic3/makefile $(FORCE) + @if [ -f "$(TOP)/libbasic3/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libbasic3 (no source)"; \ + else \ + cd $(TOP)/libbasic3 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libbasic3/makefile: $(TOP)/libbasic3/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libbasic3 + +libstx_libui.so: $(TOP)/libui/libstx_libui.so + ln -sf $(TOP)/libui/libstx_libui.so . + +$(TOP)/libui/libstx_libui.so: $(TOP)/libui/makefile $(FORCE) + @if [ -f "$(TOP)/libui/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libui (no source)"; \ + else \ + cd $(TOP)/libui && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libui/makefile: $(TOP)/libui/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libui + +libstx_libview2.so: $(TOP)/libview2/libstx_libview2.so + ln -sf $(TOP)/libview2/libstx_libview2.so . + +$(TOP)/libview2/libstx_libview2.so: $(TOP)/libview2/makefile $(FORCE) + @if [ -f "$(TOP)/libview2/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libview2 (no source)"; \ + else \ + cd $(TOP)/libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libview2/makefile: $(TOP)/libview2/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libview2 + +libstx_libwidg.so: $(TOP)/libwidg/libstx_libwidg.so + ln -sf $(TOP)/libwidg/libstx_libwidg.so . + +$(TOP)/libwidg/libstx_libwidg.so: $(TOP)/libwidg/makefile $(FORCE) + @if [ -f "$(TOP)/libwidg/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libwidg (no source)"; \ + else \ + cd $(TOP)/libwidg && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libwidg/makefile: $(TOP)/libwidg/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libwidg + +libstx_libwidg2.so: $(TOP)/libwidg2/libstx_libwidg2.so + ln -sf $(TOP)/libwidg2/libstx_libwidg2.so . + +$(TOP)/libwidg2/libstx_libwidg2.so: $(TOP)/libwidg2/makefile $(FORCE) + @if [ -f "$(TOP)/libwidg2/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libwidg2 (no source)"; \ + else \ + cd $(TOP)/libwidg2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libwidg2/makefile: $(TOP)/libwidg2/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libwidg2 + +libstx_libwidg3.so: $(TOP)/libwidg3/libstx_libwidg3.so + ln -sf $(TOP)/libwidg3/libstx_libwidg3.so . + +$(TOP)/libwidg3/libstx_libwidg3.so: $(TOP)/libwidg3/makefile $(FORCE) + @if [ -f "$(TOP)/libwidg3/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libwidg3 (no source)"; \ + else \ + cd $(TOP)/libwidg3 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libwidg3/makefile: $(TOP)/libwidg3/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libwidg3 + +libstx_libtool.so: $(TOP)/libtool/libstx_libtool.so + ln -sf $(TOP)/libtool/libstx_libtool.so . + +$(TOP)/libtool/libstx_libtool.so: $(TOP)/libtool/makefile $(FORCE) + @if [ -f "$(TOP)/libtool/.NOSOURCE" ]; then \ + echo "skip make in $(TOP)/libtool (no source)"; \ + else \ + cd $(TOP)/libtool && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \ + fi + +$(TOP)/libtool/makefile: $(TOP)/libtool/Make.proto + $(TOP)/rules/stmkmf --cd $(TOP)/libtool + + + + + + + + + + +# Enforce recompilation of package definition class if Mercurial working +# copy state changes. Together with --guessVersion it ensures that package +# definition class always contains correct binary revision string. +ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**')) +jv_statascripteditor.$(O): $(shell hg root)/.hg/dirstate +endif + + + + +clean:: + -rm -f *.so statascripteditor.$(O) + +clobber:: clean + -rm -f statascripteditor *.img *.sav + +# BEGINMAKEDEPEND --- do not remove this line; make depend needs it +$(OUTDIR)StataScriptEditor.$(O) StataScriptEditor.$(H): StataScriptEditor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/MultiViewToolApplication.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libview2/ToolApplicationModel.$(H) $(STCHDR) +$(OUTDIR)StataScriptEditorMain.$(O) StataScriptEditorMain.$(H): StataScriptEditorMain.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/StandaloneStartup.$(H) $(STCHDR) +$(OUTDIR)StataScriptLogImporter.$(O) StataScriptLogImporter.$(H): StataScriptLogImporter.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) +$(OUTDIR)StataScriptLogParser.$(O) StataScriptLogParser.$(H): StataScriptLogParser.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) +$(OUTDIR)jv_statascripteditor.$(O) jv_statascripteditor.$(H): jv_statascripteditor.st $(INCLUDE_TOP)/stx/libbasic/ApplicationDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR) + +# ENDMAKEDEPEND --- do not remove this line diff -r 000000000000 -r da028ec9cc07 Make.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Make.spec Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,71 @@ +# $Header$ +# +# DO NOT EDIT +# automagically generated from the projectDefinition: jv_statascripteditor. +# +# Warning: once you modify this file, do not rerun +# stmkmp or projectDefinition-build again - otherwise, your changes are lost. +# +# This file contains specifications which are common to all platforms. +# + +# Do NOT CHANGE THESE DEFINITIONS +# (otherwise, ST/X will have a hard time to find out the packages location from its packageID, +# to find the source code of a class and to find the library for a package) +MODULE=jv +MODULE_DIR=statascripteditor +PACKAGE=$(MODULE):$(MODULE_DIR) + + +# Argument(s) to the stc compiler (stc --usage). +# -headerDir=. : create header files locally +# (if removed, they will be created as common +# -Pxxx : defines the package +# -Zxxx : a prefix for variables within the classLib +# -Dxxx : defines passed to to CC for inline C-code +# -Ixxx : include path passed to CC for inline C-code +# +optspace : optimized for space +# +optspace2 : optimized more for space +# +optspace3 : optimized even more for space +# +optinline : generate inline code for some ST constructs +# +inlineNew : additionally inline new +# +inlineMath : additionally inline some floatPnt math stuff +# +# ********** OPTIONAL: MODIFY the next line(s) *** +# STCLOCALOPTIMIZATIONS=+optinline +inlineNew +# STCLOCALOPTIMIZATIONS=+optspace3 +STCLOCALOPTIMIZATIONS=+optspace3 + + +# Argument(s) to the stc compiler (stc --usage). +# -warn : no warnings +# -warnNonStandard : no warnings about ST/X extensions +# -warnEOLComments : no warnings about EOL comment extension +# -warnPrivacy : no warnings about privateClass extension +# -warnUnused : no warnings about unused variables +# +# ********** OPTIONAL: MODIFY the next line(s) *** +# STCWARNINGS=-warn +# STCWARNINGS=-warnNonStandard +# STCWARNINGS=-warnEOLComments +STCWARNINGS=-warnNonStandard + +COMMON_CLASSES= \ + StataScriptEditor \ + StataScriptEditorMain \ + StataScriptLogImporter \ + StataScriptLogParser \ + jv_statascripteditor \ + + + + +COMMON_OBJS= \ + $(OUTDIR_SLASH)StataScriptEditor.$(O) \ + $(OUTDIR_SLASH)StataScriptEditorMain.$(O) \ + $(OUTDIR_SLASH)StataScriptLogImporter.$(O) \ + $(OUTDIR_SLASH)StataScriptLogParser.$(O) \ + $(OUTDIR_SLASH)jv_statascripteditor.$(O) \ + + + diff -r 000000000000 -r da028ec9cc07 Makefile.init --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.init Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,27 @@ +# +# DO NOT EDIT +# +# make uses this file (Makefile) only, if there is no +# file named "makefile" (lower-case m) in the same directory. +# My only task is to generate the real makefile and call make again. +# Thereafter, I am no longer used and needed. +# +# MACOSX caveat: +# as filenames are not case sensitive (in a default setup), +# we cannot use the above trick. Therefore, this file is now named +# "Makefile.init", and you have to execute "make -f Makefile.init" to +# get the initial makefile. This is now also done by the toplevel CONFIG +# script. + +.PHONY: run + +run: makefile + $(MAKE) -f makefile + +#only needed for the definition of $(TOP) +include Make.proto + +makefile: mf + +mf: + $(TOP)/rules/stmkmf diff -r 000000000000 -r da028ec9cc07 StataScriptEditor.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StataScriptEditor.st Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,269 @@ +"{ Package: 'jv:statascripteditor' }" + +"{ NameSpace: Smalltalk }" + +MultiViewToolApplication subclass:#StataScriptEditor + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'Stata Script Editor' +! + + +!StataScriptEditor class methodsFor:'menu specs'! + +mainMenu + "This resource specification was automatically generated + by the MenuEditor of ST/X." + + "Do not manually edit this!! If it is corrupted, + the MenuEditor may not be able to read the specification." + + + " + MenuEditor new openOnClass:StataScriptEditor andSelector:#mainMenu + (Menu new fromLiteralArrayEncoding:(StataScriptEditor mainMenu)) startUp + " + + + + ^ + #(Menu + ( + (MenuItem + label: 'File' + submenu: + (Menu + ( + (MenuItem + label: 'New' + itemValue: newWorkspace + shortcutKey: Ctrln + ) + (MenuItem + label: 'New Window' + itemValue: newWindow + ) + (MenuItem + label: '-' + ) + (MenuItem + label: 'Open...' + itemValue: menuLoad + shortcutKey: Ctrlo + ) + (MenuItem + label: '-' + ) + (MenuItem + label: 'Save' + itemValue: menuSave + shortcutKey: Ctrls + ) + (MenuItem + label: 'Save As...' + itemValue: menuSaveAs + ) + (MenuItem + label: '-' + ) + (MenuItem + label: 'Exit' + itemValue: closeRequest + ) + ) + nil + nil + ) + ) + (MenuItem + label: 'Buffers' + nameKey: Buffer + submenu: + (Menu + ( + (MenuItem + label: 'Add Buffer' + itemValue: addWorkspace + ) + (MenuItem + label: '-' + ) + (MenuItem + label: 'Rename...' + itemValue: renameWorkspace + ) + (MenuItem + label: '-' + ) + (MenuItem + enabled: canRemoveWorkspace + label: 'Remove Buffer' + itemValue: removeWorkspace + ) + ) + nil + nil + ) + ) + (MenuItem + label: 'Edit' + submenu: + (Menu + ( + (MenuItem + enabled: hasSelectionInActiveWorkspace + label: 'Cut' + itemValue: cutSelection + ) + (MenuItem + enabled: hasSelectionInActiveWorkspace + label: 'Copy' + itemValue: copySelection + ) + (MenuItem + label: 'Paste' + itemValue: paste + ) + (MenuItem + label: '-' + ) + (MenuItem + label: 'Select All' + itemValue: selectAll + ) + ) + nil + nil + ) + ) + (MenuItem + label: 'View' + submenuChannel: viewMenu + keepLinkedMenu: true + ) + (MenuItem + label: 'MENU_Help' + startGroup: conditionalRight + submenu: + (Menu + ( + (MenuItem + label: 'About this Application...' + itemValue: openAboutThisApplication + ) + ) + nil + nil + ) + ) + ) + nil + nil + ) + + "Modified: / 11-02-2015 / 00:43:03 / Jan Vrany " +! ! + +!StataScriptEditor methodsFor:'defaults'! + +defaultFileNameForLoad + ^ LastOpenedFile + + "Created: / 25-10-2006 / 14:56:19 / cg" + "Modified: / 10-02-2015 / 22:31:32 / Jan Vrany " +! + +defaultPatternLoad + ^ '*.do; *.smcl' + + "Created: / 25-10-2006 / 14:57:18 / cg" + "Modified: / 10-02-2015 / 22:33:17 / Jan Vrany " +! ! + +!StataScriptEditor methodsFor:'menu actions'! + +menuSave + "automatically generated by UIEditor ..." + + "*** the code below performs no action" + "*** (except for some feedback on the Transcript)" + "*** Please change as required and accept in the browser." + "*** (and replace this comment by something more useful ;-)" + + "action to be added ..." + + Transcript showCR:self class name, ': action for #menuSave ...'. +! ! + +!StataScriptEditor methodsFor:'menu-actions'! + +loadFile:aFileName encoding:encodingSymbolOrNil label:label + |file ws| + + file := aFileName asFilename. + ws := self selectedWorkspacesTextView. + [ + | contents | + + file suffix = 'smcl' ifTrue:[ + contents := StataScriptLogImporter new import: file + ] ifFalse:[ + contents := file contents. + ]. + + encodingSymbolOrNil notNil ifTrue:[ + contents := contents encodeFrom:encodingSymbolOrNil into:#'unicode'. + ws externalEncoding:encodingSymbolOrNil. + ]. + ws contents:contents. + ws defaultFileNameForFileDialog:file pathName. + ] on:StreamError do:[:ex| + Dialog warn:(resources stringWithCRs:'Cannot open "%1":\\%2' with:file asString with:ex description). + ^ self + ]. + ws modified:false. + self setLabel:label. + + "Created: / 11-02-2015 / 00:32:09 / Jan Vrany " +! + +menuLoad + | file | + + file := Dialog + requestFileName:(resources string:'Open file') + default:(self defaultFileNameForLoad) + pattern:(self defaultPatternLoad). + file size ~~ 0 ifTrue:[ + self loadFile:file + ] + + "Created: / 10-02-2015 / 22:30:53 / Jan Vrany " +! ! + +!StataScriptEditor methodsFor:'private'! + +createWorkspace + |ws| + + ws := (HVScrollableView for:Tools::CodeView2). + ^ ws + + "Modified: / 09-12-2010 / 10:55:25 / cg" + "Modified: / 05-02-2015 / 06:28:08 / Jan Vrany " +! + +isModifiedWorkspace:aView + ^ aView isModified + + "Created: / 05-02-2015 / 06:22:57 / Jan Vrany " +! ! + +!StataScriptEditor class methodsFor:'documentation'! + +version_HG + + ^ '$Changeset: $' +! ! + diff -r 000000000000 -r da028ec9cc07 StataScriptEditorMain.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StataScriptEditorMain.st Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,94 @@ +"{ Encoding: utf8 }" + +"{ Package: 'jv:statascripteditor' }" + +"{ NameSpace: Smalltalk }" + +StandaloneStartup subclass:#StataScriptEditorMain + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'Stata Script Editor' +! + + +!StataScriptEditorMain class methodsFor:'constants & defaults'! + +applicationRegistryPath + "the key under which this application stores its process ID in the registry + as a collection of path-components. + i.e. if #('foo' 'bar' 'baz') is returned here, the current applications ID will be stored + in HKEY_CURRENT_USER\Software\foo\bar\baz\CurrentID. + (would also be used as a relative path for a temporary lock file under unix). + Used to detect if another instance of this application is already running." + + ^ #('stx' 'StataScriptEditor') +! + +applicationUUID + "answer an application-specific unique uuid. + This is used as the name of some exclusive OS-resource, which is used to find out, + if another instance of this application is already running. + Under win32, a mutex is used; under unix, an exclusive file in the tempDir could be used. + If redefined, please return a real UUID (i.e. UUID fromString:'.....') and not a string or + similar possibly conflicting identifier. + You can paste a fresh worldwide unique id via the editor's more-misc-paste UUID menuFunction." + + ^ UUID fromString:'9cae6e80-ad00-11e4-9cc7-606720e43e2c' +! ! + +!StataScriptEditorMain class methodsFor:'defaults'! + +allowDebugOption + "enable/disable the --debug startup option. + Can be redefined in subclasses to enable it" + + ^ true + + "Created: / 12-03-2015 / 02:28:17 / Jan Vrany " +! + +suppressRCFileReading + "enable/disable the rc-file reading (and also the --rcFileName option). + If suppressed, there is no chance to interfere with the startup. + Can be redefined in subclasses to disable it" + + ^ true + + "Created: / 12-03-2015 / 02:28:05 / Jan Vrany " +! ! + +!StataScriptEditorMain class methodsFor:'startup'! + +main:argv + "main entry; argv is the array of command arguments (as array of words from space-separated command line). + Parse arguments, and proceed to the real work function" + + "/ do not exit here; caller will go into event loop when returning + + Smalltalk openDisplay. + StataScriptEditor open + + "Modified: / 12-03-2015 / 03:16:26 / Jan Vrany " +! + +realMain:args + "opens the application" + + StataScriptEditor open +! + +usage + Stderr nextPutLine:'usage: ',self applicationName,' [options...]'. + Stderr nextPutLine:' -h .................. output this message'. + + Smalltalk isStandAloneApp ifTrue:[ Smalltalk exit:1 ]. +! ! + +!StataScriptEditorMain class methodsFor:'documentation'! + +version_HG + + ^ '$Changeset: $' +! ! + diff -r 000000000000 -r da028ec9cc07 StataScriptLogImporter.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StataScriptLogImporter.st Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,55 @@ +"{ Package: 'jv:statascripteditor' }" + +"{ NameSpace: Smalltalk }" + +Object subclass:#StataScriptLogImporter + instanceVariableNames:'script inCom' + classVariableNames:'' + poolDictionaries:'' + category:'Stata Script Editor' +! + + +!StataScriptLogImporter methodsFor:'handling'! + +characterData:aString + (inCom and:[aString notEmptyOrNil]) ifTrue:[ + (aString startsWith: '. ') ifTrue:[ + script nextPutLine:(aString copyFrom: 3) + ] ifFalse:[ + script nextPutLine: aString + ]. + ]. + + "Created: / 11-02-2015 / 00:32:45 / Jan Vrany " +! + +tag: tag + inCom := tag = 'com' + + "Created: / 10-02-2015 / 22:22:23 / Jan Vrany " +! ! + +!StataScriptLogImporter methodsFor:'importing'! + +import: aStringOrStreamOrFilename + | parser | + + script := String new writeStream. + inCom := false. + parser := StataScriptLogParser new. + parser handler: self. + parser parse: aStringOrStreamOrFilename readStream. + ^ script contents. + + "Created: / 10-02-2015 / 22:20:55 / Jan Vrany " + "Modified: / 11-02-2015 / 00:32:25 / Jan Vrany " +! ! + +!StataScriptLogImporter class methodsFor:'documentation'! + +version_HG + + ^ '$Changeset: $' +! ! + diff -r 000000000000 -r da028ec9cc07 StataScriptLogParser.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StataScriptLogParser.st Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,107 @@ +"{ Package: 'jv:statascripteditor' }" + +"{ NameSpace: Smalltalk }" + +Object subclass:#StataScriptLogParser + instanceVariableNames:'input handler' + classVariableNames:'' + poolDictionaries:'' + category:'Stata Script Editor' +! + +!StataScriptLogParser methodsFor:'accessing'! + +handler: anObject + handler := anObject + + "Created: / 10-02-2015 / 22:16:10 / Jan Vrany " +! ! + +!StataScriptLogParser methodsFor:'parsing'! + +parse: aStream + input := aStream. + self parse. + + "Created: / 10-02-2015 / 21:54:55 / Jan Vrany " +! ! + +!StataScriptLogParser methodsFor:'parsing - private'! + +parse + [ input atEnd ] whileFalse:[ + input peek == ${ ifTrue:[ + self parseTag + ] ifFalse:[ + self parseCharacterData + ]. + ]. + + "Created: / 10-02-2015 / 21:54:55 / Jan Vrany " +! + +parseCharacterData + | c b | + + b := String new writeStream. + [ input atEnd not and:[ (c := input peek) ~~ ${ and:[c ~~ Character cr ] ] ] whileTrue:[ + b nextPut: c. + input next. + ]. + c == Character cr ifTrue:[ + input next. + ]. + handler characterData: b contents. + + "Created: / 10-02-2015 / 22:04:07 / Jan Vrany " + "Modified: / 11-02-2015 / 00:40:22 / Jan Vrany " +! + +parseTag + | c b | + + self expect: ${. + b := String new writeStream. + [ (c := input peek) ~~ $} ] whileTrue:[ + b nextPut: c. + input next. + ]. + input next. "/ eat closing $} + handler tag: b contents. + + "Created: / 10-02-2015 / 22:04:04 / Jan Vrany " + "Modified: / 11-02-2015 / 00:37:06 / Jan Vrany " +! ! + +!StataScriptLogParser methodsFor:'parsing - utils'! + +expect: aStringOrChar + + | c | + aStringOrChar isCharacter ifTrue:[ + (input atEnd or:[(c := input next) ~= aStringOrChar]) ifTrue:[ + self parseError:('Expected ''%1'' got ''%2''.' bindWith: aStringOrChar with: c). + ]. + ^self. + ]. + aStringOrChar isString ifTrue:[ + aStringOrChar do:[:expected| + (input atEnd or:[(c := input next) ~= expected]) ifTrue:[ + self parseError:('Expected ''%1''.' bindWith: aStringOrChar). + ]. + ]. + ^self. + ]. + + self parseError:'Invalid expected value'. + + "Created: / 19-11-2012 / 20:08:33 / Jan Vrany " + "Modified: / 10-02-2015 / 22:08:12 / Jan Vrany " +! + +parseError: message + ^ self error: message + + "Created: / 10-02-2015 / 22:08:12 / Jan Vrany " +! ! + diff -r 000000000000 -r da028ec9cc07 abbrev.stc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/abbrev.stc Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,8 @@ +# automagically generated by the project definition +# this file is needed for stc to be able to compile modules independently. +# it provides information about a classes filename, category and especially namespace. +StataScriptEditor StataScriptEditor jv:statascripteditor 'Stata Script Editor' 7 +StataScriptEditorMain StataScriptEditorMain jv:statascripteditor 'Stata Script Editor' 1 +StataScriptLogImporter StataScriptLogImporter jv:statascripteditor 'Stata Script Editor' 0 +StataScriptLogParser StataScriptLogParser jv:statascripteditor 'Stata Script Editor' 0 +jv_statascripteditor jv_statascripteditor jv:statascripteditor '* Projects & Packages *' 3 diff -r 000000000000 -r da028ec9cc07 autopackage/default.apspec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autopackage/default.apspec Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,90 @@ +# -*- shell-script -*- +[Meta] +ShortName: statascripteditor +SoftwareVersion: 6.2.5.0 +DisplayName: Simple Editor for STATA .do files +RootName: @exept.de/expecco:$SOFTWAREVERSION +Summary: Simple Editor for STATA .do files +Maintainer: Jan Vrany +Packager: Jan Vrany +PackageVersion: 1 +CPUArchitectures: x86 +AutopackageTarget: 1.0 +Type: Application +License: Commercial + +[Description] +Simple Editor for STATA .do files + +[BuildPrepare] +# If you're using autotools, the default should be enough. +# prepareBuild will set up apbuild and run configure for you. If you +# need to pass arguments to configure, just add them to prepareBuild: +# prepareBuild --enable-foo --disable-bar +#prepareBuild + +[BuildUnprepare] +# If you're using prepareBuild above, there is no need to change this! +#unprepareBuild + +[Globals] +# Variables declared in this section will be available in all other sections +export APKG_BUILD_SKIP_CONFIGURE=1 +export APKG_BUILD_SKIP_MAKE=1 +export MYPREFIX=/opt/statascripteditor + +[Prepare] +#recommend '@autopackage.org/autopackage-gtk' 1 + +[Imports] +import < :'bitbucket:janvrany' + + + tasks do + + task :'dist:main' => :'dist:install-archive' + task :'dist:install:post' do + rm DIST_DIR / BUILD_NAME / 'statascripteditor.rc' + rm DIST_DIR / BUILD_NAME / 'statascripteditorWinRC.rc' + end + redefine 'dist:jv-branch' + end +end \ No newline at end of file diff -r 000000000000 -r da028ec9cc07 builder/baseline.rbspec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/builder/baseline.rbspec Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,40 @@ + +# generated from project definition + +# load package dependencies +load 'package.deps.rake' + +# kludge: clear some invalid dependencies of libwidg +# (should be fixed in baseline) +clear "stx:libwidg" => "stx:libui" +clear "stx:libwidg" => "stx:libview2" +clear "stx:libwidg2" => "stx:libui" +clear "stx:libwidg2" => "stx:libview2" +clear "stx:libview2" => "stx:libui" + +project :'statascripteditor:baseline' do + # preamble + + # -------- + + package "stx:libbasic" + package "stx:goodies/refactoryBrowser/parser" + package "stx:libbasic2" + package "stx:libcomp" + package "stx:libview" + package "stx:libbasic3" + package "stx:libui" + package "stx:libview2" + package "stx:libwidg" + package "stx:libwidg2" + package "stx:libwidg3" + package "stx:libtool" + + + application "jv:statascripteditor" + + # postamble + + # --------- + +end diff -r 000000000000 -r da028ec9cc07 builder/package.deps.rake --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/builder/package.deps.rake Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,69 @@ + +# Package dependencies. +# Automatically generated by project defintion. + +task "stx:goodies/refactoryBrowser/parser" => "stx:libbasic" + +task "stx:libui" => "stx:libbasic" +task "stx:libui" => "stx:libview" + +task "stx:libview2" => "stx:libbasic" +task "stx:libview2" => "stx:libbasic2" +task "stx:libview2" => "stx:libview" +task "stx:libview2" => "stx:libui" + +task "stx:libwidg" => "stx:libbasic" +task "stx:libwidg" => "stx:libview" +task "stx:libwidg" => "stx:libview2" +task "stx:libwidg" => "stx:libbasic2" +task "stx:libwidg" => "stx:libbasic3" +task "stx:libwidg" => "stx:libui" + +task "stx:libwidg2" => "stx:libbasic" +task "stx:libwidg2" => "stx:libbasic2" +task "stx:libwidg2" => "stx:libview" +task "stx:libwidg2" => "stx:libview2" +task "stx:libwidg2" => "stx:libwidg" +task "stx:libwidg2" => "stx:libui" + +task "stx:libbasic3" => "stx:libbasic" +task "stx:libbasic3" => "stx:libbasic2" + +task "stx:libbasic2" => "stx:libbasic" + + +task "stx:libtool" => "stx:goodies/refactoryBrowser/parser" +task "stx:libtool" => "stx:libbasic" +task "stx:libtool" => "stx:libbasic2" +task "stx:libtool" => "stx:libbasic3" +task "stx:libtool" => "stx:libcomp" +task "stx:libtool" => "stx:libui" +task "stx:libtool" => "stx:libview" +task "stx:libtool" => "stx:libview2" +task "stx:libtool" => "stx:libwidg" +task "stx:libtool" => "stx:libwidg2" +task "stx:libtool" => "stx:libwidg3" + +task "stx:libwidg3" => "stx:libbasic" +task "stx:libwidg3" => "stx:libui" +task "stx:libwidg3" => "stx:libview" +task "stx:libwidg3" => "stx:libview2" +task "stx:libwidg3" => "stx:libwidg" +task "stx:libwidg3" => "stx:libwidg2" +task "stx:libwidg3" => "stx:libbasic2" + +task "stx:libcomp" => "stx:libbasic" + +task "stx:libview" => "stx:libbasic" + +task "jv:statascripteditor" => "stx:libbasic" +task "jv:statascripteditor" => "stx:libtool" +task "jv:statascripteditor" => "stx:libview2" +task "jv:statascripteditor" => "stx:libbasic2" +task "jv:statascripteditor" => "stx:libwidg" +task "jv:statascripteditor" => "stx:libcomp" +task "jv:statascripteditor" => "stx:libview" +task "jv:statascripteditor" => "stx:libwidg2" +task "jv:statascripteditor" => "stx:libui" + + diff -r 000000000000 -r da028ec9cc07 jv_statascripteditor.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jv_statascripteditor.st Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,162 @@ +"{ Package: 'jv:statascripteditor' }" + +"{ NameSpace: Smalltalk }" + +ApplicationDefinition subclass:#jv_statascripteditor + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'* Projects & Packages *' +! + + +!jv_statascripteditor class methodsFor:'description'! + +excludedFromPreRequisites + "list packages which are to be explicitely excluded from the automatic constructed + prerequisites list. If empty, everything that is found along the inheritance of any of + my classes is considered to be a prerequisite package." + + ^ #( + ) +! + +isGUIApplication + "return true, if this is a GUI application. + (these need more libraries and use a different startup procedure)" + + ^ true +! + +mandatoryPreRequisites + "list packages which are mandatory as a prerequisite. + This are packages containing superclasses of my classes and classes which + are extended by myself. + They are mandatory, because we need these packages as a prerequisite for loading and compiling. + This method is generated automatically, + by searching along the inheritance chain of all of my classes." + + ^ #( + #'stx:libbasic' "ApplicationDefinition - superclass of jv_statascripteditor" + #'stx:libtool' "MultiViewToolApplication - superclass of StataScriptEditor" + #'stx:libview2' "ApplicationModel - superclass of StataScriptEditor" + ) +! + +referencedPreRequisites + "list packages which are a prerequisite, because they contain + classes which are referenced by my classes. + We do not need these packages as a prerequisite for compiling or loading, + however, a class from it may be referenced during execution and having it + unloaded then may lead to a runtime doesNotUnderstand error, unless the caller + includes explicit checks for the package being present. + This method is generated automatically, + by searching all classes (and their packages) which are referenced by my classes." + + ^ #( + #'stx:libbasic2' "UUID - referenced by StataScriptEditorMain class>>applicationUUID" + #'stx:libwidg' "HVScrollableView - referenced by StataScriptEditor>>createWorkspace" + ) +! + +subProjects + "list packages which are known as subprojects. + This method is generated automatically; however, when generating automatically, + packages are only added - never removed, unless listed in #excludedFromSubProjects." + + ^ #( +) +! ! + +!jv_statascripteditor class methodsFor:'description - contents'! + +classNamesAndAttributes + "lists the classes which are to be included in the project. + Each entry in the list may be: a single class-name (symbol), + or an array-literal consisting of class name and attributes. + Attributes are: #autoload or # where os is one of win32, unix,..." + + ^ #( + " or ( attributes...) in load order" + StataScriptEditor + StataScriptEditorMain + StataScriptLogImporter + StataScriptLogParser + #'jv_statascripteditor' + ) +! + +extensionMethodNames + "list class/selector pairs of extensions. + A correponding method with real names must be present in my concrete subclasses" + + ^ #( + ) +! ! + +!jv_statascripteditor class methodsFor:'description - project information'! + +applicationIconFileName + "Return the name (without suffix) of an icon-file (the app's icon); will be included in the rc-resource file" + + ^ nil + " ^ self applicationName " +! + +companyName + "Returns a company string which will appear in .rc. + Under win32, this is placed into the dlls file-info" + + ^ 'Jan Vrany' + + "Modified: / 05-02-2015 / 06:31:42 / Jan Vrany " +! + +description + "Returns a description string which will appear in nt.def / bc.def" + + ^ 'Simple Editor for STATA .do files' + + "Modified: / 05-02-2015 / 06:31:56 / Jan Vrany " +! + +legalCopyright + "Returns a copyright string which will appear in .rc. + Under win32, this is placed into the dlls file-info" + + ^ 'COPYRIGHT (C) 2015 Jan Vrany' + + "Modified: / 05-02-2015 / 06:32:14 / Jan Vrany " +! + +productInstallDirBaseName + "Returns a default installDir which will appear in .nsi. + This is usually not the one you want to keep" + + ^ (self package asCollectionOfSubstringsSeparatedByAny:':/') last +! + +productName + "Returns a product name which will appear in .rc. + Under win32, this is placed into the dlls file-info. + This method is usually redefined in a concrete application definition" + + ^ 'Stata Script Editor' + + "Modified: / 05-02-2015 / 06:32:25 / Jan Vrany " +! ! + +!jv_statascripteditor class methodsFor:'description - startup'! + +startupClassName + "the class that starts the show in its startupSelector method" + + ^ 'StataScriptEditorMain' +! ! + +!jv_statascripteditor class methodsFor:'documentation'! + +version_HG + ^ '$Changeset: $' +! ! + diff -r 000000000000 -r da028ec9cc07 lccmake.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lccmake.bat Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,8 @@ +@REM ------- +@REM make using lcc compiler +@REM type lccmake, and wait... +@REM do not edit - automatically generated from ProjectDefinition +@REM ------- +make.exe -N -f bc.mak -DUSELCC=1 %* + + diff -r 000000000000 -r da028ec9cc07 libInit.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libInit.cc Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,35 @@ +/* + * $Header$ + * + * DO NOT EDIT + * automagically generated from the projectDefinition: jv_statascripteditor. + */ +#define __INDIRECTVMINITCALLS__ +#include + +#ifdef WIN32 +# pragma codeseg INITCODE "INITCODE" +#endif + +#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT) +DLL_EXPORT void _libjv_statascripteditor_Init() INIT_TEXT_SECTION; +DLL_EXPORT void _libjv_statascripteditor_InitDefinition() INIT_TEXT_SECTION; +#endif + +void _libjv_statascripteditor_InitDefinition(pass, __pRT__, snd) +OBJ snd; struct __vmData__ *__pRT__; { +__BEGIN_PACKAGE2__("libjv_statascripteditor__DFN", _libjv_statascripteditor_InitDefinition, "jv:statascripteditor"); +_jv_137statascripteditor_Init(pass,__pRT__,snd); + +__END_PACKAGE__(); +} + +void _libjv_statascripteditor_Init(pass, __pRT__, snd) +OBJ snd; struct __vmData__ *__pRT__; { +__BEGIN_PACKAGE2__("libjv_statascripteditor", _libjv_statascripteditor_Init, "jv:statascripteditor"); +_StataScriptEditor_Init(pass,__pRT__,snd); +_jv_137statascripteditor_Init(pass,__pRT__,snd); + + +__END_PACKAGE__(); +} diff -r 000000000000 -r da028ec9cc07 mingwmake.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mingwmake.bat Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,16 @@ +@REM ------- +@REM make using mingw gnu compiler +@REM type mingwmake, and wait... +@REM do not edit - automatically generated from ProjectDefinition +@REM ------- +@SET DEFINES= +@REM Kludge got Mercurial, cannot be implemented in Borland make +@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i +@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%" + +@pushd ..\..\stx\rules +@call find_mingw.bat +@popd +make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %* + + diff -r 000000000000 -r da028ec9cc07 modules.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/modules.c Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,28 @@ +/* $Header$ + * + * DO NOT EDIT + * automagically generated from the projectDefinition: jv_statascripteditor. + * + * Warning: once you modify this file, do not rerun + * stmkmp or projectDefinition-build again - otherwise, your changes are lost. + */ +typedef void (*vf)(); + +extern void _StataScriptEditor_Init(); +extern void _StataScriptEditorMain_Init(); +extern void _StataScriptLogImporter_Init(); +extern void _StataScriptLogParser_Init(); +extern void _jv_137statascripteditor_Init(); + + +static vf modules[] = { + _StataScriptEditor_Init, +_StataScriptEditorMain_Init, +_StataScriptLogImporter_Init, +_StataScriptLogParser_Init, +_jv_137statascripteditor_Init, + + (vf)0 +}; + +vf *__modules__ = modules; diff -r 000000000000 -r da028ec9cc07 modules.stx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/modules.stx Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,30 @@ +# $Header$ +# +# DO NOT EDIT +# automagically generated from the projectDefinition: jv_statascripteditor. +# +# Warning: once you modify this file, do not rerun +# stmkmp or projectDefinition-build again - otherwise, your changes are lost. +# +# This file is (currently) only used with win-95 / win-NT versions of STX. +# It lists the dll's which are to be loaded at startup time. +# Notice, lines starting with a "#" are comments. +# Lines starting with a "*" are treated as comments by the VM, but are usually loaded +# by the application at the very beginning. +# +# All classes loaded at startup time will be present as precompiled classes. +# Others might be autoloaded or loaded explicit using "Smalltalk loadPackage:xxx". +# +libstx_libbasic +libstx_goodies_refactoryBrowser_parser +libstx_libbasic2 +libstx_libcomp +libstx_libview +libstx_libbasic3 +libstx_libui +libstx_libview2 +libstx_libwidg +libstx_libwidg2 +libstx_libwidg3 +libstx_libtool + diff -r 000000000000 -r da028ec9cc07 statascripteditor.nsi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/statascripteditor.nsi Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,206 @@ +; $Header$ +; Script generated by ProjectDefinition. + +!define PRODUCT_NAME "Stata Script Editor" +!define PRODUCT_FILENAME "Stata Script Editor" +!define PRODUCT_VERSION "6.2.5.0" +!define PRODUCT_PUBLISHER "Jan Vrany" +!define PRODUCT_WEB_SITE "http://www.yoursite.com" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_FILENAME}" +!define PRODUCT_UNINST_ROOT_KEY "HKLM" + +!define STX_ROOT "..\..\stx\.." + +SetCompressor /solid lzma + +!include "MUI2.nsh" +!include "x64.nsh" + +; MUI Settings + +!define MUI_WELCOMEPAGE_TITLE_3LINES +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" +;; !define MUI_ICON "nil.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" +;; !define MUI_UNICON "nil.ico" + +; Language Selection Dialog Settings +!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" +!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" +!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language" + +; Welcome page +!insertmacro MUI_PAGE_WELCOME +; License page +; !define MUI_LICENSEPAGE_CHECKBOX + + +!insertmacro MUI_PAGE_COMPONENTS +; Directory page +!insertmacro MUI_PAGE_DIRECTORY +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES +; Finish page +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_INSTFILES + +; Language files +!insertmacro MUI_LANGUAGE "English" +!insertmacro MUI_LANGUAGE "German" + +; MUI end ------ + + + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +VIProductVersion "${PRODUCT_VERSION}.0" +VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_NAME}" +VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_PUBLISHER}" +VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "6.2.32767.32767" +VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${PRODUCT_NAME} Installer" +VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${PRODUCT_VERSION}" +VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "COPYRIGHT (C) 2015 Jan Vrany" + + +OutFile "Stata Script EditorSetup.exe" +InstallDir "$PROGRAMFILES\statascripteditor" +ShowInstDetails show +ShowUnInstDetails show + +Function .onInit + !insertmacro MUI_LANGDLL_DISPLAY +FunctionEnd + +InstType Full +InstType Partial + +Section "Programme" Section1 + SectionIn 1 2 + SetOutPath "$INSTDIR\bin" + SetOverwrite ifnewer + File "statascripteditor.exe" + File "*.dll" + File "symbols.stc" + File "*.stx" + File "*.rc" + File /r /x CVS /x ".*" resources + + + + + + WriteRegStr HKCR "Jv.Stata Script Editor.1" "" "Stata Script Editor File" + WriteRegStr HKCR "Jv.Stata Script Editor.1\DefaultIcon" "" '$INSTDIR\bin\statascripteditor.exe,0' + WriteRegStr HKCR "Jv.Stata Script Editor.1\Shell\open" "" $(appOpen) + WriteRegStr HKCR "Jv.Stata Script Editor.1\Shell\open\command" "" '"$INSTDIR\bin\statascripteditor.exe" -- "%1"' +SectionEnd + +;; Section "Online-Documentation for Stata Script Editor" Section2 +;; SectionIn 1 +;; SetOutPath "$INSTDIR\doc" +;; SetOverwrite ifnewer +;; File /r /x CVS "${STX_ROOT}\jv\statascripteditor\doc\*" +;; SectionEnd + +;; Section "Stata Script Editor Libraries and Demos" Section3 +;; SectionIn 1 +;; SetOutPath "$INSTDIR\lib" +;; SetOverwrite ifnewer +;; ; File /r /x CVS "${STX_ROOT}\jv\statascripteditor\examples\*" +;; SectionEnd +;; +;; Section "Stata Script Editor Reports and Printing" Section4 +;; SectionIn 1 +;; SetOutPath "$INSTDIR\reportGenerator" +;; SetOverwrite ifnewer +;; ; File /r /x CVS "..\reportGenerator\java" "..\reportGenerator\rules" "..\reportGenerator\*.xml" "..\reportGenerator\*.xslt" "..\reportGenerator\CloseApp.exe" "..\reportGenerator\expecco.jpg" +;; SectionEnd + + + + + + + + +Section -AdditionalIcons + SetOutPath "$INSTDIR\bin" + WriteIniStr "$INSTDIR\${PRODUCT_FILENAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" + CreateDirectory "$SMPROGRAMS\${PRODUCT_FILENAME}" + CreateShortCut "$SMPROGRAMS\${PRODUCT_FILENAME}\statascripteditor.lnk" "$INSTDIR\bin\statascripteditor.exe" + CreateShortCut "$DESKTOP\statascripteditor.lnk" "$INSTDIR\bin\statascripteditor.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_FILENAME}\Website.lnk" "$INSTDIR\${PRODUCT_FILENAME}.url" + CreateShortCut "$SMPROGRAMS\${PRODUCT_FILENAME}\Uninstall.lnk" "$INSTDIR\uninst.exe" +SectionEnd + +Section -Post + WriteUninstaller "$INSTDIR\uninst.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" +SectionEnd + +LangString appOpen ${LANG_GERMAN} "Mit Stata Script Editor öffnen" +LangString appOpen ${LANG_ENGLISH} "Open with Stata Script Editor" + +LangString DESC_Section1 ${LANG_ENGLISH} "Program components of Stata Script Editor" +LangString DESC_Section1 ${LANG_GERMAN} "Alle Programmkomponenten von Stata Script Editor" +;; LangString DESC_Section2 ${LANG_ENGLISH} "Online-Documentation of Stata Script Editor" +;; LangString DESC_Section2 ${LANG_GERMAN} "Online-Dokumentation zu Stata Script Editor" +;; LangString DESC_Section3 ${LANG_ENGLISH} "Libraries and Demo Projects" +;; LangString DESC_Section3 ${LANG_GERMAN} "Bibliotheken und Beispielprojekte" +;; LangString DESC_Section4 ${LANG_ENGLISH} "Logfile Printing and Report Generation" +;; LangString DESC_Section4 ${LANG_GERMAN} "Drucken und Report-Generierung aus Log-Dateien" +;; LangString DESC_Section3 ${LANG_ENGLISH} "Sources of ST/X (Base-System)" +;; LangString DESC_Section3 ${LANG_GERMAN} "Quellcode von ST/X (Basis-System)" +;; LangString DESC_Section4 ${LANG_ENGLISH} "Sources of Stata Script Editor" +;; LangString DESC_Section4 ${LANG_GERMAN} "Quellcode von Stata Script Editor" + + +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1) +;; !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2) +;; !insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3) +;; !insertmacro MUI_DESCRIPTION_TEXT ${Section4} $(DESC_Section4) + +!insertmacro MUI_FUNCTION_DESCRIPTION_END + + + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "Stata Script Editor wurde erfolgreich deinstalliert" +FunctionEnd + +Function un.onInit +!insertmacro MUI_UNGETLANGUAGE + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Möchten Sie Stata Script Editor und alle seine Komponenten deinstallieren?" IDYES +2 + Abort +FunctionEnd + +Section Uninstall + Delete "$INSTDIR\${PRODUCT_FILENAME}.url" + Delete "$INSTDIR\uninst.exe" + + Delete "$INSTDIR\*" + RMDir /r "$INSTDIR" + + Delete "$SMPROGRAMS\${PRODUCT_FILENAME}\Uninstall.lnk" + Delete "$SMPROGRAMS\${PRODUCT_FILENAME}\Website.lnk" + Delete "$SMPROGRAMS\${PRODUCT_FILENAME}\statascripteditor.lnk" + Delete "$DESKTOP\statascripteditor.lnk" + + RMDir "$SMPROGRAMS\${PRODUCT_FILENAME}" + + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + DeleteRegKey HKCR "Jv.Stata Script Editor.1" + + + + SetAutoClose true +SectionEnd diff -r 000000000000 -r da028ec9cc07 statascripteditor.rc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/statascripteditor.rc Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,37 @@ +// +// DO NOT EDIT +// automagically generated from the projectDefinition: jv_statascripteditor. +// +VS_VERSION_INFO VERSIONINFO + FILEVERSION 6,2,32767,32767 + PRODUCTVERSION 6,2,5,0 +#if (__BORLANDC__) + FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE + FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE VS_USER_DEFINED +#endif + +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "My Company\0" + VALUE "FileDescription", "Class Library (LIB)\0" + VALUE "FileVersion", "6.2.32767.32767\0" + VALUE "InternalName", "jv:statascripteditor\0" + VALUE "LegalCopyright", "My CopyRight or CopyLeft\0" + VALUE "ProductName", "LibraryName\0" + VALUE "ProductVersion", "6.2.5.0\0" + VALUE "ProductDate", "Thu, 05 Feb 2015 06:30:14 GMT\0" + END + + END + + BLOCK "VarFileInfo" + BEGIN // Language | Translation + VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual + END +END diff -r 000000000000 -r da028ec9cc07 statascripteditorWinRC.rc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/statascripteditorWinRC.rc Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,49 @@ +// +// DO NOT EDIT +// automagically generated from the projectDefinition: jv_statascripteditor. +// +#define IDR_MAINFRAME 128 +#define IDR_SPLASH 129 + +#if (__BORLANDC__) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#endif + +#pragma code_page(1252) + + + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 6,2,32767,32767 + PRODUCTVERSION 6,2,5,0 +#if (__BORLANDC__) + FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE + FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE VS_USER_DEFINED +#else + FILEFLAGSMASK 0x3fL +#endif + +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "Jan Vrany\0" + VALUE "FileDescription", "Simple Editor for STATA .do files\0" + VALUE "FileVersion", "6.2.32767.32767\0" + VALUE "InternalName", "jv:statascripteditor\0" + VALUE "LegalCopyright", "COPYRIGHT (C) 2015 Jan Vrany\0" + VALUE "ProductName", "Stata Script Editor\0" + VALUE "ProductVersion", "6.2.5.0\0" + VALUE "ProductDate", "Thu, 05 Feb 2015 06:32:52 GMT\0" + END + END + + BLOCK "VarFileInfo" + BEGIN // Language | Translation + VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual + END +END diff -r 000000000000 -r da028ec9cc07 vcmake.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vcmake.bat Fri Mar 13 22:51:48 2015 +0000 @@ -0,0 +1,20 @@ +@REM ------- +@REM make using Microsoft Visual C compiler +@REM type vcmake, and wait... +@REM do not edit - automatically generated from ProjectDefinition +@REM ------- + +@if not defined VSINSTALLDIR ( + pushd ..\..\stx\rules + call vcsetup.bat + popd +) +@SET DEFINES= +@REM Kludge got Mercurial, cannot be implemented in Borland make +@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i +@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%" +make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %* + + + +