Commit Graph

863 Commits

Author SHA1 Message Date
Lisias T
50608b9c43 Fixing https://github.com/AppleCommander/AppleCommander/issues/18 2017-12-04 03:15:38 -02:00
Rob Greene
1b0e78bd80 Merge branch 'gradle' 2017-11-20 21:16:15 -06:00
Rob Greene
aa972ee6c8 Merge branch 'master' into gradle 2017-11-20 21:13:51 -06:00
Rob Greene
2d6e7c28d0 Revert "Merging in iKarith's pull request from master so it does not get lost!"
This reverts commit be8d04cce2.

Bad developer, biscuit! :-)
2017-11-20 21:06:08 -06:00
Rob Greene
be8d04cce2 Merging in iKarith's pull request from master so it does not get lost! 2017-11-20 20:59:36 -06:00
A2 Geek
43f599943e
Merge pull request #14 from iKarith/master
Fix SWT file dialog with cherry-pick from javafx branch
2017-11-20 20:42:10 -06:00
T. Joseph Carter
bfaf30bffe Mod FilenameFilter to support JavaFX
(cherry-picked to fix AppleCommander/AppleCommander#13 since I've
discovered that I was wrong and it does fix the problem after all!)

cwa.storage.Disk.FileFilter was written for SWT, returning multiple
extensions as a single string with ; separators.  For JavaFX, we
actually want individual strings separately or in a list.

The only place these are initialized in cwa.storage.Disk anyway, so what
I've done is change the class to instatiate with separate strings and
join them on demand for SWT.  A new getExtensionList() method will
return them as-is for JavaFX.
2017-11-20 04:59:42 -08:00
Rob Greene
3291b515d5 Building for 'ac' as well as Linux/Windows/Mac OS X. 2017-11-19 13:23:59 -06:00
Rob Greene
3ed8f0b974 Fixes #10. 2017-11-16 22:08:46 -06:00
Rob Greene
a108289ca2 Bumping version to distinguish next release. 2017-11-16 22:07:04 -06:00
Rob Greene
438e6ec1f0 First draft of morphing AppleCommander to use Gradle instead of Ant. 2017-11-15 23:00:11 -06:00
T. Joseph Carter
6b4ef151a9 Merge branch 'master' of https://github.com/AppleCommander/AppleCommander into linux 2017-11-15 19:17:13 -08:00
T. Joseph Carter
234f1485f2 Merge branch 'master' into linux 2017-11-15 18:25:23 -08:00
A2 Geek
5d9ac872fd
Merge pull request #9 from iKarith/master
Fix my idiot attempt to fix this warning
2017-11-15 20:19:22 -06:00
A2 Geek
ba85678853
Merge pull request #8 from iKarith/linux
Build on Linux and macOS using reasonably current JDKs
2017-11-15 20:18:53 -06:00
T. Joseph Carter
c74e9ad3bd Fix my idiot attempt to fix this warning
My fix for the unchecked warning in AppleImage.java was completely dumb
and I had no idea what I was doing.  My understanding of how this works
is now greatly improved and the bug I introduced in 292afd2 is fixed.
2017-11-13 09:23:05 -08:00
T. Joseph Carter
a47f152cd9 Cosmetic variable rename 2017-11-11 19:56:33 -08:00
T. Joseph Carter
44fd1cb010 Make GUI request errors clean
If you don't request a specific GUI, we try SWT and then Swing.  Okay.
But if you do, we don't even try to see if it works—we just assume SWT
works.  If the user requested Swing, we just unconditionally spit out an
error message and try to start the GUI anyway.  Let's make the errors
conditional on the GUIs being unavailable.

Note, a Swing GUI is available.  It is just incomplete and doesn't work
very well.  :)
2017-11-11 19:43:11 -08:00
A2 Geek
43796815bf
Merge pull request #7 from iKarith/unchecked
Remove -Xlint:unchecked warnings
2017-11-11 17:26:30 -06:00
T. Joseph Carter
4f2facf541 Ensure macOS bundle starts the SWT GUI
In order to actually start the SWT-based GUI on macOS and have anything
start, you need -XstartOnMainThread.  This is a Cocoa limitation.  If
you have that (and we do now), you can pass the -swt argument and it
runs.  (More than I can say for Linux using the non-integrated SWT
provided by Debian at the moment…)

What doesn't work is the open dialog.  No files are selectable unless
you tell it to allow all files, and then .dsk files which the cmdline
jar file can handle fine are somehow an unsupported format.  Uh huh.

That much at least should not be too hard to fix.  Whether it works
after that is fixed, I cannot say.  What I can say is that the problem
does not exist if you don't pass -swt, however the lack of a proper
Swing GUI means it doesn't really matter because you can't do anything
with the files once you've opened them.
2017-11-11 14:49:32 -08:00
T. Joseph Carter
e923c8ae3f Update TODO re: Mac stuff
The macOS zip file already was automated (though it should really be a
separate target in build.xml), and I have added a note about the
possibility of using Sean Riley's appbundler fork as an alternative to
jarbundler and the universalJavaApplicationStub shell script.

I went with the stub and jarbundler because Oracle has had a bad habit
of regularly changing and deprecating Mac bundling practices, but the
bundling of a JRE should make that a one-click (well, one-doubleclick)
solution for the end user.  If the GUI app *worked* that would be a
strong consideration.  It's not even a waste of diskspace on a system
using APFS if multiple copies of the JRE are on the system, if they're
the same JRE.

Also noted that CF card access as a raw disk is possible on Windows as
well.
2017-11-11 06:36:04 -08:00
T. Joseph Carter
72fb36478b Improve Mac build process a bit
Copy swt.jar to a directory in ${work} rather than ${mac.dir} as there's
no need for droppings all over the build tree.  Also cleaned up building
${maczip} a bit to avoid extra file copying, to put the uncompressed
.app in ${dist}, etc.  Removed some cruft from .gitignore while I was at
it.

The conditional nature of building macBundle kind of bothers me a little
since if you have the correct swt.jar (which we could provide and have
in some versions of the build system), you could build self-contained
packages for macOS and for Windows.  A self-contained package for Linux
is also possible, but doesn't make much sense as Linux software
installation routinely involves installing dependencies, either manually
or automatically.
2017-11-11 06:15:53 -08:00
T. Joseph Carter
7d8be1d249 Merge branch 'mac-unistub' into linux 2017-11-10 09:36:14 -08:00
T. Joseph Carter
c27a91d820 Use the self-contained swt.jar from Eclipse
Rather than trying to use the Eclipse plugin version (which may never
actually work without building using Eclipse), I've changed the default
properties to prefer the all-in-one swt.jar packaged for separate
distribution.  That isn't going to make SWT magically start working (of
course not!), but it's got the best chance of us being able to MAKE it
work in the future.

I've elected to put it in /Users/Shared/Java which seems to be the
correct place to put such a thing, but elected to use an unversioned swt
symlink, set up like so:

/Users/Shared/Java/swt@ -> swt-4.7.1a-cocoa-macosx-x86_64

I'm using the current stable release version, as you see here.
2017-11-10 09:20:00 -08:00
T. Joseph Carter
e9ea726188 Merge branch 'unchecked' into mac-unistub 2017-11-09 13:11:54 -08:00
T. Joseph Carter
f2589b4294 Merge branch 'unchecked' into linux 2017-11-09 13:11:19 -08:00
T. Joseph Carter
4d5d6e4cf5 Merge branch 'master' into linux 2017-11-09 13:10:55 -08:00
T. Joseph Carter
292afd24c9 Remove -Xlint:unchecked warnings
Fixed all instances of warnings OpenJDK finds with -Xlint:unchecked.
Merging this will at least result in a dependency on JDK 1.5 or later
that I'm pretty sure of.  But since the only JDKs that are really safe
to use these days are versions 1.8 and 9, that's probably okay.

No promises that this will make modern SWT work or anything, but it's
probably at least a beginnig toward that as well.
2017-11-09 13:03:03 -08:00
Rob Greene
d7f2631434 Updating web site and rearranging a bit to save space per #6. 2017-11-08 13:27:22 -06:00
A2 Geek
5cdcaa63e0
Merge pull request #5 from iKarith/master
Fix varargs warnings
2017-11-08 12:38:58 -06:00
T. Joseph Carter
1880998892 Fix varargs warnings
Javac cannot tell if the getMethod and launchMethod uses here are
being done with varargs or not, so we need explicit casts to silence the
warning.
2017-11-07 13:47:47 -08:00
T. Joseph Carter
3048cd3dfe Merge branch 'master' of https://github.com/AppleCommander/AppleCommander into mac-unistub 2017-11-05 00:51:44 -07:00
A2 Geek
7ed762b89b
Merge pull request #1 from iKarith/master
Created .gitignore to replace the .cvsignore files
2017-11-03 22:50:36 -05:00
T. Joseph Carter
30914c8efe Change GUI option to noGui (still not default)
The Mac build didn't much like the previous setup, so I inverted the
condition and made sure the Mac bundle is disabled with noGui.
2017-11-03 09:54:10 -07:00
T. Joseph Carter
c1caa1bc91 Make build of GUI components optional (default)
These presently don't work if you are using reasonably current versions
of JDK and SWT.  Made this optional if you just run ant, but left it
enabled by default since it ought to be fixed.  Linux build scripts may
just provide an ACBuild.properties that turns it off so that e.g., the
ant build helper doesn't need any custom configuration.
2017-11-03 09:28:42 -07:00
T. Joseph Carter
564c6cef7b Fix ant warning about includeantruntime
According to https://stackoverflow.com/questions/5103384, ant 1.8
introduced a "misfeature" of providing the ant runtime by default in the
java classpath.  This causes some problems with reproducible builds,
which is why later versions have a warning not to do it.

The solution is to make the inclusion of ant.jar in the classpath
explicit.  That's been done now.
2017-11-03 09:07:06 -07:00
T. Joseph Carter
80b39372cb Make multiplatform easier to read
This isn't significantly shorter than the first pass, but it's easier to
read and maintain.  To add a new platform to this (if anyone wants to do
that), just add sane default paths to ACBuild-default.properties, add a
conditional to detect your platform, and add an init-platform target
that does the configuration.

There's a bit cleaner solution in ant-contrib using the if task, but
that means adding to the dependencies and therefore the complexity of
building this thing.  I'm disinclined to do that.
2017-11-03 08:13:08 -07:00
T. Joseph Carter
117fe87cd9 Add unix build conditionals
Previously AC built onm Windows or not Windows (assumed to be Mac).
It appears there was a means to build using gcj, but this is not
necessary, does not work anymore as configured, and isn't what we want
anyway.

Here's a first pass at improving that situation.  It's a bit ugly at
present because it requires a lot of markup to do something that should
be simple.  Still, I'd rather do this in steps.
2017-11-03 07:50:28 -07:00
T. Joseph Carter
f683bfc24c Created .gitignore to replace the .cvsignore files 2017-11-02 22:49:36 -07:00
T. Joseph Carter
160c888e0f Mac build ... builds and zips
Okay, the Mac build at this point finishes and has all the pieces
correctly where they ought to be.  However there is something wrong with
swt.  I can't get any version of it I've tried to work.  I can get the
app to start but the GUI doesn't work once you load a file.  And the
only way it starts like that from the app bundle is if the line adding
SWT to the classpath of the bundle is removed.

However it's not SWT's jar itself since if you run the jarfile by hand
and add the same SWT to the classpath, it doesn't immediately crash.  It
runs with the same GUI problem as if yu didn't specify it in the
classpath at all.

Something fishy is going on here.  But it builds, so perhaps others can
assist in figuring out the nature of the problem.  That's enough for me
to move on to the Linux build.
2017-11-01 12:45:56 -07:00
T. Joseph Carter
c11a437b08 Remove some stuff I know I won't need anymore 2017-10-31 04:24:47 -07:00
T. Joseph Carter
d37ba47c8d macBundle: some cleanup, remove .app skeleton 2017-10-30 08:12:16 -07:00
T. Joseph Carter
2e2a34e77e mac: Use universalJavaApplicationStub
Here's a (very rough) implementation of a macBundle task using the
universalJavaApplicationStub and jarbundler.  Jarbundler's support files
(ant build system and docs) are suffering bitrot, and I don't grok maven
yet, so I'm really flying blind with it, so basically I'm committing it
in a "baseline" working (if ugly) state.

So ... _why_ use this?

The old way of bundling Java apps doesn't work anymore.  It tells you to
get Apple's (compromised/unsafe) Java 6 and when you do it throws an
error because your code compiled on Oracle JDK 8/9 won't run on it
anymore.

You're supposed to duplicate the JRE in each Java program you bundle as
you would a private/custom framework.  Yes, really.  This solves the
dependency issues at the cost of heavy resource waste.  Except every new
JDK generation changes HOW you do that, and the current method is
totally proprietary to Oracle's JDK.  For cross-platform development, it
is NOT fun.

So there's uJAS, which is literally a complex shell script to magically
do the equivalent of typing java -jar <your program> from the command
line—which does work BTW if all your dependencies are properly in your
default classpath, etc.  There used to be a couple of application
bundler options, but the one that still works (only with uJAS if you
have the most recent JDKs), is jarbundler.

TODO: Clean this up, restore original functionality (zipball), include
the commandline jar, etc.

committing it in this state is that jarbundler's repo is a bit of a
mess.  The current version (and the version we need) is 3.3.0, the
"latest" from 2015.  The docs, examples, and the ant build system are
all literally bitrotting from version 2.x, and do not work without some
fixes.

So in other words, I'm committing this in a state that I got to work so
that if I screw it up, since I'm flying blind, I'll have a messy but
working fallback.

Okay, so _why_ use any of this at all?

If you create an ACBuild.properties file and run ant, you can get
AppleCommander.app to build, but it won't run.  It tells you that you
need to download Apple's legacy Java 6 which is neither safe nor
supported anymore.  If you install this, it will still give you an
error because the generated code can't run under Java 6.

What you're supposed to do now is bundle your JRE with every Java
application bundle, which means multiple copies of libs on disk and in
memory.  Yes, really.  Except Oracle keeps changing how you do this with
each new JDK generation, and the current way is pretty much totally
proprietary so that you're locked in to Oracle's JDK and couldn't use
OpenJDK or something if that were an option.

That's what universalJavaApplicationStub resolves—it builds an app
bundle that uses whatever JDK/JRE you have installed from 6 onwards.
And it in turn needs jarbundler or something like it.  Except all of the
"something like it" solutions are dead or deprecated save the latest
release of jarbundler which was modified to support uJAS and then
promptly left more or less untouched since.  But it "works".
2017-10-30 06:14:13 -07:00
752cdc91b6 Remove java version restrictions, which are becoming quite problematic 2017-06-12 17:22:22 +00:00
8a3ee78f58 Remove deprecated package, re-implement in ImageIO 2017-06-12 17:06:21 +00:00
Robert Greene
95e97e2ae6 Adding some Maven central repository information. 2016-11-14 00:22:17 +00:00
84fb7e7d03 Correct Gutenberg file processing if we have more than one catalog sector 2015-01-10 04:33:32 +00:00
e690c0673c Make AC-created disk images not crash on Apple /// computers 2014-04-18 17:11:59 +00:00
John B. Matthews
29d5afc673 Throw exception in CpmFormatDisk#createFile() 2014-01-25 16:57:40 +00:00
John B. Matthews
9c98158778 Version 1.3.5.14; call system.exit in SwtAppleCommander#dispose for Mac OS X. 2013-11-24 18:19:44 +00:00