5 My projects will need dependencies and other things such as inclusion. I
6 have to have profiles and implemented standards for projects essentially.
7 Some of this information can be shared with the launcher too, which does
8 not need a complete view of information.
12 I am thinking of potentially refactoring the project dependency system
13 so that some dependencies can be auto-selected based on the configuration
14 or profile they require. So basically, all projects will need an
15 optional profile set and then they will need a configuration. I can also
16 use a set of determination for profiles and such. Basically I need to make
17 profiles in SquirrelJME more apparent. I suppose also, I could perform a
18 major restructoring of SquirrelJME I suppose. Maybe.
22 Although maybe I could just add an extra depth. For example src can contain
23 directories such as "game". Essentially there would be package namespaces
24 so to speak. Or maybe what I just need is an "extra" directory. Basically
25 this directory would contain stuff such as Squirrel Scavanger. Then the
26 src directory would contain the core set of projects. I already have the
27 contrib directory, but having a new directory for non-core stuff would
32 In fact, I could have automatic namespacing with a `NAMESPACE.MF` file for
33 each source directory.
37 I could also have it where I can remove dependencies and just have package
38 level dependencies. Essentially, Squirrel Scavenger instead of depending on
39 opengles, it will depend on javax.microedition.khronos.opengles. Then the
40 opengles project will automatically be included for compilation.
44 A number of classes are also only used by the JIT too. Also, some are only
45 used by the build system. Basically, I want to remove all of the cruft
46 that exists in the single directory.
50 Also, one thing I should do is potentially greatly remove the number of
51 projects that are used. That is, remove ones that are not needed at all and
52 fold others into other projects. For example the image reader can be moved
53 into the LCDUI code and anything that needs to handle images can just use
54 LCDUI image code essentially.
58 When it comes to SquirrelJME and unsafe, I can just rewrite the entire package
59 to use another one. This way I can split the static calls into multiple places
60 in unsafe rather than having it just in one place.
64 Actually, I should keep dependencies. However for dependencies I should
65 instead have a namespace prefix so that it is known which namespace the
66 project should get dependencies from. Then on top of that, I could actually
67 have namespace renaming. Since ':' is reserved, I would suppose I would use @.
68 So one that relies on the manifest parser would be 'foo@manifest'. But one
69 thing that can be ugly are the liblets and such. For example, Squirrel
70 Scavanger has a dependency on OpenGL ES. So essentially, the system would
71 depend on _opengles_. This is rather ugly. OpenGL ES will either be a part
72 of the target or it will not be. I also should split Squirrel Scavenger into
73 more parts based on the backing GUI implementation.
77 I believe I should get rid of the data sink, faucet, and pipe classes. The
78 inflate compression code along with the CRC checking code could be much
83 So my code builds again. What I must do is make it so the project handling
84 classes can handle namespaces.
88 I suppose I will have a `ProjectNamespaces` which contains every namespace
89 and where `ProjectNamespace` is essentially `ProjectList` for a single
94 What I can do is have it where I can specify virtualized namespaces with the
95 project manager. So for example I can construct a `ProjectList` which extra
96 namespaces to source projects from. This would allow projects that are in
97 other locations to be used.
101 Actually, instead of `ProjectList`, it can be `NamespaceDirectory` which
102 contains `ProjectDirectory`.
106 Going to make it where dependencies use standard names, profiles, and
107 configurations. Then my build system will determine which projects to
108 actually pull in based on the namespace they reside in. So, I will
109 essentially getting rid of the name based dependencies. However, since
110 I want MIDlets to also be LIBlets (despite this being invalid) I suppose
111 I can parse `LIBlet-Dependency-<n>`. For dependencies that existed before
112 MIDP3 (such as OpenGL ES) I will make my own up that make sense. This way
113 selection of projects to be included by the output SquirrelJME binary will
114 be determined on what is available. So after this refactor I want it so you
115 can build a Linux running SquirrelJME with virtually nothing in it to be
116 as minimal as possible, or one that contains the entire set of things to be
117 implemented. The former for example, I can use it on routers to run Java
118 programs which would be useful for me potentially. This would be compared to
119 using full sets or minimal sets where they are fixed to a target.
123 Seems the standard set of JARs has the following:
125 * `API` -- The API (JSR###).
127 * `API-Name` -- The full "nice" name of the API.
128 * `API-Type` -- Configuration, Optional, Profile
129 * `API-Specification-Version` -- The API version.
130 * `API-Dependencies` -- Dependency groups that may be separated by commas
131 to represent multiple ones. Single groups may be separated by a pipe to
132 indicate multiple ones.
134 This would be quite simple to use and means that standard libraries could
135 use this. So I suppose that those that provide APIs can use this way of
136 handling dependencies. These would be specific to APIs. So the APIs would not
137 need to have dependencies setup. So this means a project would either be an
138 API provider or something that uses API.
142 Java ME 8 uses the same stuff naturally, but I do not see any mentions of
143 the dependency names used by liblets.
147 So MEEP is a profile, but stuff such as GCF and MEEP-IO are optional. So
148 how are they even used?
152 Ok, so these are internally specified in the executable binary since the
153 service names appear as strings in the binary. What is interesting is
154 that the following strings appear:
156 * meep.microedition.concurrency
157 * meep.microedition.liblets
158 * meep.microedition.provisioning
159 * meep.microedition.securityframework
163 * microedition.io.file.FileConnection.version
164 * microedition.io.gcf
166 * microedition.location.version
170 * microedition.satsa.crypto.version
171 * microedition.security.policy
172 * microedition.smartcardslots
176 These themselves are not specified at all. Some of these may be system
177 properties. The ME docs say nothing about 'meep.version' for example.
178 So they are likely system properties. Since the FileConnection.version
179 one is a system property.
183 And these properties are likely defined directly in the binary.
187 Ok, so I believe I get it. MEEP is specified as 8.0, and the
188 microedition-profile is MEEP-8. Then a similar thing is done for CLDC
189 and other such things. So profile could sort of technically use
190 MEEP-8.0.0 if it wanted to.
194 Thinking about it, perhaps I should merge CLDC and CLDC Compact and
199 Well, I could just use my own magic. Have API dependencies use a
200 sub-variant and the full one will just depend on the compact one.
201 It will be a part of the version.
205 So JARs will be APIs, LIBlets, or MIDlets to match Java ME. Although it is a
206 bit more limited compared to what I have before, it more closely matches how
207 Java ME and the former J2ME operate.
211 For the projects and launcher, I should probably use the MEEP SWM classes.
215 Looks like IMCConnection in MEEP does not have authorization anymore.
219 Perhaps I should model the project manager on top of SWM. SWM uses interfaces
220 and then I care share some of the code between the launcher and a few other
225 No because suites are internal. But I should model the project builder and
226 such in a way where it can easily be mapped to it for the auto-interpreter.
227 So it could easily be used.
231 The project handler would be a bit more powerful, so APIs would be part of
232 the "System" suite rather than be a library or application.
236 Thinking about it, I have the launcher as a separate process. However should
237 it be just part of the kernel process? It would be somewhat a bit more
238 "secure" as a user process, however everything would essentially be bridged to
239 the server anyway using IMC. So effectively the launcher and the kernel will
240 have duplicate code managing everything.
244 Then MEEP's SWM can just be an IMC to the launcher system that manages the
245 JARs that are installed in the system along with tasks.
249 I should probably normalize all the manifests that exist.
253 I wonder if you can SO inject dlopen. Basically I have idea to write a Java SE
254 VM (like I have before) so I could potentially compile faster on PowerPC based
255 systems (since I use one daily). However, one issue is I would want to use the
256 standard OpenJDK classes on the system. Definitely feature creeping for a
257 bonus library however. A problem with existing libraries is if they `dlopen`.
258 Essentially I could not replace these. However, one feature I could use is
259 dynamic library re-interpretation. Some programs running on PowerPC systems
260 may hardcode a shared library. I essentially have to trap System.loadLibrary()
261 and instead choose an alternative library instead potentially. However, likely
262 the best choice reliably would be to implement the JIT first in my own
263 SquirrelJME. If I can output to a ELF file that I can link with using a C
264 program, I could essentially create my own `libjvm.so`. However a problem with
265 that is SquirrelJME does not support reflection and I have no plans to have it