[squeak-dev] Squeak and the iPhone
John M McIntosh
johnmci at smalltalkconsulting.com
Wed Jun 18 18:14:22 UTC 2008
On Jun 17, 2008, at 6:08 AM, Merik Voswinkel wrote:
> Hello Marcel,
>
....
> As you may have noticed, John McIntosh is not releasing the source
> code of the Cocoa iPhone VM and will only sell his future version
> and only if Apple agrees
....
I think the ESUG email from Stef (at 7:32 am PDT) has laid the above
comment to rest.
"and only if Apple agrees"
The confusion here is that I legally cannot offer a fully functioning
Squeak VM/image on the iPhone to download from the app store
because of Apple's contract.
Although people have suggest I should just ignore Apple's contract, I
not they would appear in a court of law in California.
People who know me understand I wouldn't sign, then break legal
contracts on purpose.
I have however started a process within Apple to see if we can change
things.
Lastly Apple's Ad-Hoc application distribution process looks like it
would side-step the rules imposed
for the application store, however someone in the community would need
to take on managing that process.
As mentioned in my first note about the iPhone VM, I had offered to
the community a way for folks to sell their squeak based application
thru the app store without
running the hurdle of becoming an app store vendor, this of course is
not free to the app developer because of the legal concerns I then
take on.
You do of course have to meet Apple app store legal requirements.
Process of development.
I must say I've not heard as much noise about how things are done in
the VM platform development process for years. Perhaps this is because
of licensing concerns and general expanding interest in Squeak.
So the approach I've taken is to clear my head and "burn the disk packs"
(a) I've sat down and looked at the existing carbon, unix and windows
VM source code to document the platform API, like so:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sqInt sqGetFilenameFromString(char * aCharBuffer, char *
aFilenameString,
sqInt filenameLength, sqInt resolveAlias)
Parms: aCharBuffer location to put encoded C string.
aFilenameString location of the squeak encoded byte string containing
the file name
filenameLength length of the file name in aFilenameString
resolveAlias. True if we should resolve any alias file information
return: NONE, fake return of zero
From: file plugin
Why: to decode squeak file name to platform encoding and resolve
aliases
Responsibility:
Typically take the file/path bytes and convert from the image
character encoding to the platform encoding
On the macintosh and unix systems if resolveAlias is TRUE we must
resolve the path/file name as a possible alias.
For example
sqFileDeleteNameSize, sqFileRenameOldSizeNewSize both say not to
resolve the alias because we want to delete or rename the alias file
not the target.
sqFileOpen does call with true to resolve the alias because we want to
open the target of the alias file, not the alias file.
MacIntosh
iPhone
Unix
lstat and S_ISLNK is used to determine if a symbolic link, and
readlink to read the link
after this on Darwin any macintosh finder alias files are resolved.
BUGS multiple macintosh finder alias files in the path make this break
Windows
....
Generic
BUGS possible buffer overflow because length is implied to be 1000 and
not guarded by caller.
BUGS calls just assume it works, but it could fail if name with null >
1000 or if encoding/decoding fails.
-------------------------------------------
This documentation will appear on a wiki somewhere once I finish the
Window VM review.
Given that, I've written new obj-c code using the follow license
template placed in each file:
// Created by John M McIntosh on 5/22/08.
// Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights
reserved.
//
/* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
//
I have one file (ioSeconds) so far that is marked as below since I
decided to carry the ioSeconds routine forward.
*
* Created by John M McIntosh on 5/12/08.
* Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights
reserved.
*
* Small parts of this code is
* Copyright (C) 1996-2007 by Ian Piumarta and other authors/
contributors
* listed elsewhere in this file.
* All rights reserved.
*/
/* Permission is hereby granted, free of charge, to any person...
Ian's unix code was re-licensed via MIT.
After completing the basic iPhone port and the basic os-x structure I
do plan to go back and review the two Obj-C ports, one by Ian Piumarta,
and the other by Marcel Weiher, if I recall correctly Marcel's version
supported Squeak as an Obj-C framework. However before I can do that
Marcel has to re-distribute his source code first with proper
licensing to his satisfaction since it reads as below and I currently
couldn't consider any of it.
// SqueakApplication.m
// CocoaSqueak
//
// Created by marcel on Tue Mar 27 2001.
// Copyright (c) 2001 __CompanyName__. All rights reserved.
//
No doubt (hopefully) people might question the code base once it's
pushed into the squeakvm.org SVN tree.
Lastly each time I discuss the VM port with other Squeakers I just add
more to my work list, so if you are at Smalltalk Solutions 08, please
hunt me
down to comment.
So is this process correct? Well it's the current one I'm following,
people can email if they can propose alternate ideas/processes.
--
=
=
=
========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
=
=
=
========================================================================
More information about the Squeak-dev
mailing list
|