Changeset 16 for trunk/lingosource
- Timestamp:
- 09/03/07 20:08:22 (5 years ago)
- Location:
- trunk/lingosource
- Files:
-
- 3 edited
-
castlib1/OSCmenu_Utilities.ls (modified) (2 diffs)
-
castlib1/alexUtilities.ls (modified) (17 diffs)
-
castlib2/memberInfo.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r12 r16 165 165 166 166 167 ---------------------------------------------------- scripttext export functions: 168 li.add("") 169 li.add("Scripttext export for SVN") 170 subli = [] 171 li.add(subli) 172 subli.add("mExportScriptsToFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix") 173 subli.add("mSVN_Update_And_Import_ScriptsFromFolder me, thePath, selectionOnly") 174 subli.add("") 175 subli.add("mImportScriptWithThumbnail me, thePath, castlibNumber, dontWarn, infolist") 176 167 177 ---------------------------------------------------- svn functions: 168 178 li.add("") … … 170 180 subli = [] 171 181 li.add(subli) 172 subli.add("mExportScriptsToFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix")173 subli.add("mImportScriptWithThumbnail me, thePath, castlibNumber, dontWarn, infolist")174 subli.add("")175 subli.add("mUpdateScriptsFromFolder me, thePath, selectionOnly")176 subli.add("")177 182 subli.add("mSVN_Delete_Selected_Scripts me, chooseNewPath") 178 183 subli.add("") 179 subli.add("mSVN_Update_Working_Copy me, chooseNewPath") 180 subli.add("mSVN_Commit_CurrentScripts me, selected_Members_Only") 181 subli.add("") 182 subli.add("mSVN_Update_CurrentMovie me") 183 subli.add("mSVN_Commit_CurrentMovie me") 184 subli.add("mSVN_Update_Working_Copy_ScriptText me, chooseNewPath") 185 subli.add("mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only") 186 subli.add("") 187 subli.add("mSVN_Update_CurrentMovie_Binaries me, chooseNewPath, onlyUpdate_SVN_WorkingFolder") 188 subli.add("mSVN_Commit_CurrentMovie_Binaries me, chooseNewPath, commitMsg") 189 subli.add("") 190 subli.add("mSVN_Commit_CurrentMovie_Binaries_AND_Scripttext me, chooseNewPath, commitMsg") 184 191 ---------------------------------------------------- 185 192 -
trunk/lingosource/castlib1/alexUtilities.ls
r12 r16 3408 3408 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3409 3409 3410 on m UpdateScriptsFromFolder me, thePath, selectionOnly3410 on mSVN_Update_And_Import_ScriptsFromFolder me, thePath, selectionOnly 3411 3411 3412 3412 if selectionOnly = 1 then … … 3818 3818 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3819 3819 3820 on mSVN_Update_Working_Copy me, chooseNewPath3820 on mSVN_Update_Working_Copy_ScriptText me, chooseNewPath 3821 3821 3822 3822 workingCopies = value(getPref("svn_workingCopies_paths.txt")) … … 4027 4027 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4028 4028 4029 on mSVN_Commit_CurrentMovie me, chooseNewPath 4029 on mSVN_Commit_CurrentMovie_Binaries_AND_Scripttext me, chooseNewPath, commitMsg 4030 4031 commitMsg = string(commitMsg) 4032 if length(commitMsg) < 1 then 4033 commitMsg = baPrompt("Commit message", "Enter commit message", "Commitmessage", 0, -2, -2) 4034 4035 if length(commitMsg) < 1 then 4036 alert "You must enter a message for the commit action." 4037 exit 4038 end if 4039 end if 4040 4041 4042 theResult = mSVN_Commit_CurrentScripts_ScriptText(me, 0, chooseNewPath, commitMsg) 4043 4044 theResult = mSVN_Commit_CurrentMovie_Binaries(me, chooseNewPath, commitMsg, 1) 4045 4046 end 4047 4048 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4049 4050 on mSVN_Commit_CurrentMovie_Binaries me, chooseNewPath, commitMsg, dontSave 4030 4051 4031 4052 workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) … … 4033 4054 4034 4055 svnBinary = mGetSVNBinaryPath(me, workingCopies) 4035 if length(svnBinary) < 1 then exit4056 if length(svnBinary) < 1 then return 0 4036 4057 4037 4058 workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies) 4038 if length(workingFolder) < 1 then exit4039 4040 4041 msg = baPrompt("Commit message", "Enter commit message", "Commitmessage", 0, -2, -2)4042 4059 if length(workingFolder) < 1 then return 0 4060 4061 4062 --------------------------------------- 4063 msg = string(commitMsg) 4043 4064 if length(msg) < 1 then 4044 alert "You must enter a message for the commit action." 4045 exit 4046 end if 4047 4048 if workingCopies.getaprop(#dontWarnWhenSaving) <> 1 then 4049 answer = baMsgBoxEx("The movie will be saved before committing.", "Save movie?", "Save", "Cancel", "Always save", "Question", 1, "left", "Arial", 14, 4, -2, -2) 4050 if answer = "Cancel" then exit 4051 if answer = "Always save" then workingCopies.setaprop(#dontWarnWhenSaving, 1) 4052 end if 4053 4054 saveMovie() 4055 4056 ------------ 4065 msg = baPrompt("Commit message", "Enter commit message", "Commitmessage", 0, -2, -2) 4066 4067 if length(msg) < 1 then 4068 alert "You must enter a message for the commit action." 4069 return 0 4070 end if 4071 end if 4072 --------------------------------------- 4073 4074 4075 --------------------------------------- 4076 if dontSave <> 1 then 4077 -- this flag is only for the case, we come here from the combined commit call "mSVN_Commit_CurrentMovie_Binaries_AND_Scripttext" 4078 -- as the movie was already saved in "mSVN_Commit_CurrentScripts_ScriptText" 4079 4080 if workingCopies.getaprop(#dontWarnWhenSaving) <> 1 then 4081 answer = baMsgBoxEx("The movie will be saved before committing.", "Save movie?", "Save", "Cancel", "Always save", "Question", 1, "left", "Arial", 14, 4, -2, -2) 4082 if answer = "Cancel" then return 0 4083 if answer = "Always save" then workingCopies.setaprop(#dontWarnWhenSaving, 1) 4084 end if 4085 4086 saveMovie() 4087 end if 4088 ---------------------------------------- 4089 4090 4091 4092 --------------------------------------- 4057 4093 if workingFolder <> the moviepath then 4058 4094 erg = baCopyFileProgress(the moviepath & the moviename, workingFolder & the moviename, "Always", "Copying movie to working folder", "", 33) 4059 4095 if erg <> 0 then 4060 4096 alert "An error occurred during copying the movie:" && erg 4061 exit4097 return 0 4062 4098 end if 4063 4099 clnum = the number of castlibs … … 4073 4109 if offs <> 1 then 4074 4110 alert "Castlib" && castlib(n) && "is not within your current moviepath. This is not supported." 4075 exit4111 return 0 4076 4112 end if 4077 4113 relpath = fname … … 4088 4124 the itemdelimiter = olddelim 4089 4125 end if 4090 ------------ 4091 4126 --------------------------------------- 4127 4128 --------------------------------------- 4092 4129 if the platform contains "mac" then 4093 4130 svnBinary = baUnixName(svnBinary) … … 4096 4133 if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder 4097 4134 end if 4098 4099 4135 --------------------------------------- 4136 4137 4138 --------------------------------------- 4100 4139 theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolder & QUOTE) 4101 4140 … … 4108 4147 end if 4109 4148 alert "Can't proceed svn error while trying to update:" && theError 4110 exit 4111 end if 4149 return 0 4150 end if 4151 --------------------------------------- 4112 4152 4113 4153 … … 4124 4164 if cnt < 1 then 4125 4165 alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty" 4126 exit4166 return 0 4127 4167 end if 4128 4168 … … 4156 4196 4157 4197 4198 --------------------------------------- 4158 4199 if count(theresult) > 0 then 4159 4200 theResult = theresult[1] … … 4165 4206 alert "svn application did not respond, something seems to have failed. :-(" 4166 4207 end if 4167 4208 --------------------------------------- 4168 4209 4169 4210 setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 4170 4211 4171 end 4172 4173 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4174 4175 on mSVN_Update_CurrentMovie me, chooseNewPath 4212 return 1 4213 end 4214 4215 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4216 4217 on mSVN_Update_CurrentMovie_Binaries me, chooseNewPath, onlyUpdate_SVN_WorkingFolder 4176 4218 4177 4219 workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) … … 4191 4233 end if 4192 4234 4235 oldmoviepath = the moviepath 4236 oldmovie = oldmoviepath & the moviename 4237 4238 if (onlyUpdate_SVN_WorkingFolder <> 1) or (the moviepath contains workingFolder) then 4239 4240 ------------------------------ 4241 -- close this movie by issuing a "new movie..." command 4242 -- in order to replace the current movie, with the updated movie 4243 dispatchcommand(4097) 4244 ------------------------------ 4245 4246 onlyUpdate_SVN_WorkingFolder = 1 4247 end if 4248 4193 4249 theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolder & QUOTE) 4194 4250 4195 4251 if count(theresult) > 0 then 4252 4253 -------- reload the refreshed movie: 4254 if the moviepath contains workingFolder then 4255 -- go to movie the moviepath & the moviename 4256 else 4257 4258 if onlyUpdate_SVN_WorkingFolder <> 1 then 4259 -------------------------- now get the updated movies over here: 4260 if the last char of workingFolder <> the last char of the applicationpath then put the last char of the applicationpath after workingFolder 4261 4262 mCopyAllFiles(me, workingFolder, oldmoviepath) 4263 4264 ---------------------------------- 4265 end if 4266 4267 end if 4268 4196 4269 put theresult[1] 4270 4271 if onlyUpdate_SVN_WorkingFolder = 1 then go to movie oldmovie 4272 4197 4273 alert "Done, see the results of the svn operation in the message window." 4274 4198 4275 else 4276 4277 if onlyUpdate_SVN_WorkingFolder = 1 then go to movie oldmovie 4278 4199 4279 alert "svn application did not respond, something seems to have failed. :-(" 4200 4280 end if 4201 4281 4282 4202 4283 setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 4203 4284 … … 4206 4287 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4207 4288 4208 on mSVN_Commit_CurrentScripts me, selected_Members_Only, chooseNewPath 4289 on mCopyAllFiles me, fromFolder, toFolder 4290 4291 flist = baFolderList(fromFolder) 4292 flistCnt = count(flist) 4293 repeat with n = flistCnt down to 1 4294 thisFolder = flist[n] 4295 if thisFolder starts ".svn" then next repeat 4296 if not(baFolderExists(toFolder & thisFolder)) then 4297 erg = baCreateFolder(toFolder & thisFolder) 4298 else 4299 erg = 1 4300 end if 4301 4302 if erg = 1 then 4303 mCopyAllFiles me, fromFolder & thisFolder & the last char of toFolder, toFolder & thisFolder & the last char of toFolder 4304 else 4305 alert "Unable to create folder (" & thisFolder & "). Error:" && erg 4306 end if 4307 4308 end repeat 4309 4310 4311 4312 flist = baFileList(fromFolder, "") 4313 flistCnt = count(flist) 4314 repeat with n = 1 to flistCnt 4315 thisFile = flist[n] 4316 if thisFile starts ".svn" then next repeat 4317 erg = baCopyFileProgress(fromFolder & thisFile, toFolder & thisFile, "Always", "Replacing movie with the version of the working folder", "", 33) 4318 if erg <> 0 then 4319 alert "An error occurred during copying the file (" & thisFile & "). Error:" && erg 4320 else 4321 put "Replaced file:" && thisFile 4322 end if 4323 end repeat 4324 4325 4326 end 4327 4328 4329 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4330 4331 on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg 4209 4332 4210 4333 workingCopies = value(getPref("svn_workingCopies_paths.txt")) … … 4212 4335 4213 4336 svnBinary = mGetSVNBinaryPath(me, workingCopies) 4214 if length(svnBinary) < 1 then exit4337 if length(svnBinary) < 1 then return 0 4215 4338 4216 4339 workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies) 4217 if length(workingFolder) < 1 then exit 4218 4219 msg = baPrompt("Commit message", "Enter commit message", "Commitmessage", 0, -2, -2) 4340 if length(workingFolder) < 1 then return 0 4341 4342 msg = string(commitMsg) 4343 4220 4344 4221 4345 if length(msg) < 1 then 4222 alert "You must enter a message for the commit action." 4223 exit 4224 end if 4346 4347 msg = baPrompt("Commit message", "Enter commit message", "Commitmessage", 0, -2, -2) 4348 4349 if length(msg) < 1 then 4350 alert "You must enter a message for the commit action." 4351 return 0 4352 end if 4353 4354 end if 4355 4225 4356 4226 4357 if workingCopies.getaprop(#dontWarnWhenSaving) <> 1 then 4227 4358 answer = baMsgBoxEx("The movie will be saved before committing.", "Save movie?", "Save", "Cancel", "Always save", "Question", 1, "left", "Arial", 14, 4, -2, -2) 4228 if answer = "Cancel" then exit4359 if answer = "Cancel" then return 0 4229 4360 if answer = "Always save" then workingCopies.setaprop(#dontWarnWhenSaving, 1) 4230 4361 end if … … 4255 4386 end if 4256 4387 alert "Can't proceed svn error while trying to update:" && theError 4257 exit4388 return 0 4258 4389 end if 4259 4390 … … 4262 4393 cnt = count(theresult) 4263 4394 if cnt < 1 then 4264 alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty"4265 exit4395 alert "Apparently there are no changes to the scripts of the most recent version in the svn repository: svn status is empty" 4396 return 0 4266 4397 end if 4267 4398 … … 4308 4439 setPref("svn_workingCopies_paths.txt", string(workingCopies)) 4309 4440 4310 end 4441 4442 return 1 4443 4444 end 4445 4311 4446 4312 4447 -
trunk/lingosource/castlib2/memberInfo.xml
r14 r16 1 1 <?xml version="1.0" encoding="ISO-8859-1" ?> 2 2 <Untitled> 3 <common MovieScript>3 <commonmoviescript> 4 4 <scriptType>#parent</scriptType> 5 5 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 6 6 <memberName>commonMovieScript</memberName> 7 </common MovieScript>7 </commonmoviescript> 8 8 <FileIOFunktionen> 9 9 <scriptType>#parent</scriptType> … … 36 36 <memberName>SpriteNameBeaver</memberName> 37 37 </SpriteNameBeaver> 38 <commonMovieScript> 39 <scriptType>#parent</scriptType> 40 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 41 <memberName>commonMovieScript</memberName> 42 </commonMovieScript> 38 43 </Untitled>
Note: See TracChangeset
for help on using the changeset viewer.
