Check-in [abbc2b7c1f]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Adjust SummerCoatROM builder to allow potential fork offs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:abbc2b7c1f9974a2cca7a3f272ded09c0657c1c2
User & Date: stephanie.gawroriski 2019-07-13 13:25:36
Context
2019-07-13
13:36
Add base for PalmOS distribution; Add base for PalmOS utilities. check-in: cc0e30498e user: stephanie.gawroriski tags: trunk
13:25
Adjust SummerCoatROM builder to allow potential fork offs. check-in: abbc2b7c1f user: stephanie.gawroriski tags: trunk
12:56
In sjme_vmmresolve allow Virtual Memory to be banked. check-in: 7268763706 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bldt/libs/builder-support/cc/squirreljme/builder/support/dist/SummerCoatROM.java.

121
122
123
124
125
126
127
128



















129
130


































































131








132

133
134
135
136
			}
		}
		
		// Get the main class of the launcher
		String mainbc = new EntryPoints(lbins[numlbins - 1].manifest()).get(0).
			entryPoint();
		
		// Write SummerCoat ROM file



















		try (OutputStream out = __zip.output("squirreljme.sqc"))
		{


































































			// Minimize








			PackMinimizer.minimize(out, boot, lstrs, mainbc, libs);

		}
	}
}









>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
>




121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
			}
		}
		
		// Get the main class of the launcher
		String mainbc = new EntryPoints(lbins[numlbins - 1].manifest()).get(0).
			entryPoint();
		
		// Write SummerCoat ROM file
		this.generate(__zip, new BuildParameters(boot, lstrs, mainbc, libs));
	}
	
	/**
	 * Generates the output files as needed.
	 *
	 * @param __zip The ZIP to write to.
	 * @param __bp The build parameters.
	 * @throws IOException On write errors.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/07/13
	 */
	protected void generate(ZipCompilerOutput __zip, BuildParameters __bp)
		throws IOException, NullPointerException
	{
		if (__zip == null || __bp == null)
			throw new NullPointerException("NARG");
		
		// Write SummerCoat ROM file
		try (OutputStream out = __zip.output("squirreljme.sqc"))
		{
			__bp.minimize(out);
		}
	}
	
	/**
	 * This contains the build parameters for the minimizer.
	 *
	 * @since 2019/07/13
	 */
	public static final class BuildParameters
	{
		/** The boot library. */
		public final String bootlib;
		
		/** Starting libraries. */
		public final String[] startlibs;
		
		/** Main boot class. */
		public final String mainbc;
		
		/** Libraries to use. */
		public final VMClassLibrary[] libs;
		
		/**
		 * Initializes the build parameters.
		 *
		 * @param __boot The boot library.
		 * @param __lstrs Starting libraries.
		 * @param __mainbc Main boot class.
		 * @param __libs Class Library.
		 * @throws NullPointerException On null arguments.
		 * @since 2019/07/13
		 */
		public BuildParameters(String __boot, String[] __lstrs,
			String __mainbc, VMClassLibrary[] __libs)
			throws NullPointerException
		{
			if (__boot == null || __lstrs == null || __mainbc == null ||
				__libs == null)
				throw new NullPointerException("NARG");
			
			this.bootlib = __boot;
			this.startlibs = __lstrs;
			this.mainbc = __mainbc;
			this.libs = __libs;
		}
		
		/**
		 * Minimizes to the given output stream.
		 *
		 * @param __out The stream to write to.
		 * @throws IOException On write errors.
		 * @throws NullPointerException On null arguments.
		 * @since 2019/07/13
		 */
		public final void minimize(OutputStream __out)
			throws IOException, NullPointerException
		{
			if (__out == null)
				throw new NullPointerException("NARG");
			
			PackMinimizer.minimize(__out, this.bootlib, this.startlibs,
				this.mainbc, this.libs);
		}
		
		/**
		 * Minimizes to a byte array.
		 *
		 * @return The byte array of the minimized output.
		 * @
		 * @since 2019/07/13
		 */
		public final byte[] minimize()
			throws IOException
		{
			return PackMinimizer.minimize(this.bootlib, this.startlibs,
				this.mainbc, this.libs);
		}
	}
}