Add `VDBStartupA` into `jv:vdb/application`
This class is just a placeholder, all logic is in its superclass,
`VDBStatup`. The reason for this is the way the initial package
path is computed (see `AbstractOpratingSystem >> defaultPackagePath`)
The code there assumes that startup class is from the same package
as the application itself.
This way, we have a startup class in the application package but still
have `VDBStartup` available when only `jv:vdb` is loaded (like when
developing and.or using VDB from Smalltalk/X IDE.
--- a/VDBStartup.st Mon Jul 08 23:12:19 2019 +0100
+++ b/VDBStartup.st Tue Jul 23 12:32:01 2019 +0100
@@ -28,6 +28,33 @@
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
"
+!
+
+documentation
+"
+ This is the entrypoint to start VDB.
+
+ Examples:
+
+ * start VDB with no command line options/parameters
+
+ VDBStartup main: { }.
+
+ * start VDB with --no-pty command line option:
+
+ VDBStartup main: { '--no-pty' }.
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+ Standalone
+
+ [see also:]
+
+"
! !
!VDBStartup class methodsFor:'constants & defaults'!
--- a/application/Make.proto Mon Jul 08 23:12:19 2019 +0100
+++ b/application/Make.proto Tue Jul 23 12:32:01 2019 +0100
@@ -154,7 +154,7 @@
APPLICATION_LIBLIST="$(REQUIRED_LIBS)" \
APPLICATION_LIBOBJS="$(REQUIRED_LIBOBJS)" \
APPLICATION_LINK_LIBOBJS="$(REQUIRED_LINK_LIBOBJS)" \
- STARTUP_CLASS="VDBStartup" \
+ STARTUP_CLASS="VDBStartupA" \
STARTUP_SELECTOR="start" \
MAIN_DEFINES="-DIGNORE_IMAGE -DNO_DISPLAY"
@@ -609,6 +609,7 @@
-rm -f vdb.do *.img *.sav
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)VDBStartupA.$(O) VDBStartupA.$(C) VDBStartupA.$(H): VDBStartupA.st $(INCLUDE_TOP)/jv/vdb/VDBStartup.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/StandaloneStartup.$(H) $(STCHDR)
$(OUTDIR)jv_vdb_application.$(O) jv_vdb_application.$(C) jv_vdb_application.$(H): jv_vdb_application.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
--- a/application/Make.spec Mon Jul 08 23:12:19 2019 +0100
+++ b/application/Make.spec Tue Jul 23 12:32:01 2019 +0100
@@ -51,12 +51,14 @@
STCWARNINGS=-warnNonStandard
COMMON_CLASSES= \
+ VDBStartupA \
jv_vdb_application \
COMMON_OBJS= \
+ $(OUTDIR)VDBStartupA.$(O) \
$(OUTDIR)jv_vdb_application.$(O) \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/application/VDBStartupA.st Tue Jul 23 12:32:01 2019 +0100
@@ -0,0 +1,51 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb/application' }"
+
+"{ NameSpace: Smalltalk }"
+
+VDBStartup subclass:#VDBStartupA
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-UI'
+!
+
+!VDBStartupA class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+!
+
+documentation
+"
+ This is a placeholder startup class used when VDB is compiled
+ as standalone application. No code should be added here,
+ add/modify class `VDBStartup` instead!!
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+ VDBStartup
+
+"
+! !
+
--- a/application/abbrev.stc Mon Jul 08 23:12:19 2019 +0100
+++ b/application/abbrev.stc Tue Jul 23 12:32:01 2019 +0100
@@ -1,4 +1,5 @@
# 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.
+VDBStartupA VDBStartupA jv:vdb/application 'VDB-UI' 1
jv_vdb_application jv_vdb_application jv:vdb/application '* Projects & Packages *' 3
--- a/application/bc.mak Mon Jul 08 23:12:19 2019 +0100
+++ b/application/bc.mak Tue Jul 23 12:32:01 2019 +0100
@@ -40,7 +40,7 @@
!endif
CFLAGS_LOCAL=$(CFLAGS_APPTYPE) \
- -DSTARTUP_CLASS="\"VDBStartup\"" \
+ -DSTARTUP_CLASS="\"VDBStartupA\"" \
-DSTARTUP_SELECTOR="\"start\"" \
-DUSE_MODULE_TABLE
@@ -574,6 +574,7 @@
@rem stupid win-make does not allow empty
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)VDBStartupA.$(O) VDBStartupA.$(C) VDBStartupA.$(H): VDBStartupA.st $(INCLUDE_TOP)\jv\vdb\VDBStartup.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\StandaloneStartup.$(H) $(STCHDR)
$(OUTDIR)jv_vdb_application.$(O) jv_vdb_application.$(C) jv_vdb_application.$(H): jv_vdb_application.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
--- a/application/jv_vdb_application.st Mon Jul 08 23:12:19 2019 +0100
+++ b/application/jv_vdb_application.st Tue Jul 23 12:32:01 2019 +0100
@@ -80,6 +80,7 @@
Please take a look at the #referencedPreRequisites method as well."
^ #(
+ #'jv:vdb' "VDBStartup - superclass of VDBStartupA"
#'stx:libbasic' "ApplicationDefinition - superclass of jv_vdb_application"
)
!
@@ -96,7 +97,6 @@
Please also take a look at the #mandatoryPreRequisites method"
^ #(
- #'jv:vdb' "VDBStartup - referenced by jv_vdb_application class>>startupClassName"
)
!
@@ -119,6 +119,7 @@
^ #(
"<className> or (<className> attributes...) in load order"
+ VDBStartupA
#'jv_vdb_application'
)
!
@@ -204,9 +205,9 @@
"the name of the class which starts the show in its <startupSelector> method.
Usually, the name of a subclass of StandAloneStartup."
- ^ VDBStartup
+ ^ VDBStartupA
- "Modified: / 21-09-2014 / 01:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 23-07-2019 / 12:39:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
startupSelector
--- a/application/modules.c Mon Jul 08 23:12:19 2019 +0100
+++ b/application/modules.c Tue Jul 23 12:32:01 2019 +0100
@@ -8,11 +8,13 @@
*/
typedef void (*vf)();
+extern void _VDBStartupA_Init();
extern void _jv_137vdb_137application_Init();
static vf modules[] = {
- _jv_137vdb_137application_Init,
+ _VDBStartupA_Init,
+_jv_137vdb_137application_Init,
(vf)0
};