Fellow Squeakers.
I star to update old projects to 3.7 and trying all stuff I learned of all you in this year. So , how I get projects what need load several files in specific directories , I ended with this .
"Postscript: Leave the line above, and replace the rest of this comment by a useful one. Executable statements should follow this comment, and should be separated by periods, with no exclamation points (!!). Be sure to put any further comments in double-quotes, like this one."
| fd path oldFolder newFolderPath pos relativeName b t input pr| Project openBlankProjectNamed: 'TEG'. (pr _ Project namedWithDepth: 'TEG') ifNil: [^ self]. pr enter: false revert: false saveForRevert: false. fd _ FileDirectory default. (fd directoryExists: 'STEG') ifFalse:[fd createDirectory: 'STEG']. path _ fd pathName, FileDirectory slash ,'STEG', FileDirectory slash . (self memberNames) do: [ :aFile| (aFile beginsWith: 'STEG') ifTrue:[ pos _ aFile findString: '/'. relativeName _ aFile copyFrom: pos + 1 to: aFile size. relativeName _ 'STEG/' , relativeName. self extractMember: aFile toFileNamed: relativeName ]] . oldFolder := FileDirectory default. Project newMorphicOn: nil. newFolderPath := oldFolder pathName,FileDirectory slash,'STEG'. FileDirectory setDefaultDirectory: newFolderPath. input _ FileStream readOnlyFileNamed: 'TEGStartButton.morph' . b _ input fileInObjectAndCode. b openInWorld. b position: 20@20. input close. input _ FileStream readOnlyFileNamed: 'TEGBlank.morph' . t _ input fileInObjectAndCode. t openInWorld. t center: World center. input close. FileDirectory setDefaultDirectory: oldFolder pathName. DrawPicture inicializarDibujos.
But when I load agin , nothing happen. If I selected the 3 first lines I get a new blank project. If I suppress, I ended in creating a new directory and loading morphs in existing project (what is not what wanted).
By the way, I mofified SARBuilder to let add any file or complete directory to .sar archive and also have versioning as TEG.8.sar
What I asking is:
Why do not work the postcript ? Any better way of package complex projects like this ?
Thanks all in advance
P.D TEG is a Argentine Risk variant what let playing 1 to 6 player network
squeak-dev@lists.squeakfoundation.org