Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

Changeset 16 for trunk/lingosource


Ignore:
Timestamp:
09/03/07 20:08:22 (5 years ago)
Author:
alex
Message:

no message

Location:
trunk/lingosource
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lingosource/castlib1/OSCmenu_Utilities.ls

    r12 r16  
    165165   
    166166   
     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   
    167177  ---------------------------------------------------- svn functions: 
    168178  li.add("") 
     
    170180  subli = [] 
    171181  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("") 
    177182  subli.add("mSVN_Delete_Selected_Scripts me, chooseNewPath") 
    178183  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") 
    184191  ---------------------------------------------------- 
    185192   
  • trunk/lingosource/castlib1/alexUtilities.ls

    r12 r16  
    34083408-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    34093409 
    3410 on mUpdateScriptsFromFolder me, thePath, selectionOnly 
     3410on mSVN_Update_And_Import_ScriptsFromFolder me, thePath, selectionOnly 
    34113411   
    34123412  if selectionOnly = 1 then 
     
    38183818-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    38193819 
    3820 on mSVN_Update_Working_Copy me, chooseNewPath 
     3820on mSVN_Update_Working_Copy_ScriptText me, chooseNewPath 
    38213821   
    38223822  workingCopies = value(getPref("svn_workingCopies_paths.txt")) 
     
    40274027-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    40284028 
    4029 on mSVN_Commit_CurrentMovie me, chooseNewPath 
     4029on 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   
     4046end 
     4047 
     4048-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     4049 
     4050on mSVN_Commit_CurrentMovie_Binaries me, chooseNewPath, commitMsg, dontSave 
    40304051   
    40314052  workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) 
     
    40334054   
    40344055  svnBinary = mGetSVNBinaryPath(me, workingCopies) 
    4035   if length(svnBinary) < 1 then exit 
     4056  if length(svnBinary) < 1 then return 0 
    40364057   
    40374058  workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies) 
    4038   if length(workingFolder) < 1 then exit 
    4039    
    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) 
    40434064  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  --------------------------------------- 
    40574093  if workingFolder <> the moviepath then 
    40584094    erg = baCopyFileProgress(the moviepath & the moviename, workingFolder & the moviename, "Always", "Copying movie to working folder", "", 33) 
    40594095    if erg <> 0 then 
    40604096      alert "An error occurred during copying the movie:" && erg 
    4061       exit 
     4097      return 0 
    40624098    end if 
    40634099    clnum = the number of castlibs 
     
    40734109        if offs <> 1 then 
    40744110          alert "Castlib" && castlib(n) && "is not within your current moviepath. This is not supported." 
    4075           exit 
     4111          return 0 
    40764112        end if 
    40774113        relpath = fname 
     
    40884124    the itemdelimiter = olddelim 
    40894125  end if 
    4090   ------------ 
    4091    
     4126  --------------------------------------- 
     4127   
     4128  --------------------------------------- 
    40924129  if the platform contains "mac" then 
    40934130    svnBinary = baUnixName(svnBinary) 
     
    40964133    if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder 
    40974134  end if 
    4098    
    4099    
     4135  --------------------------------------- 
     4136   
     4137   
     4138  --------------------------------------- 
    41004139  theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolder & QUOTE) 
    41014140   
     
    41084147    end if 
    41094148    alert "Can't proceed svn error while trying to update:" && theError 
    4110     exit   
    4111   end if 
     4149    return 0   
     4150  end if 
     4151  --------------------------------------- 
    41124152   
    41134153   
     
    41244164  if cnt < 1 then 
    41254165    alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty" 
    4126     exit 
     4166    return 0 
    41274167  end if 
    41284168   
     
    41564196   
    41574197   
     4198  --------------------------------------- 
    41584199  if count(theresult) > 0 then 
    41594200    theResult = theresult[1] 
     
    41654206    alert "svn application did not respond, something seems to have failed. :-(" 
    41664207  end if 
    4167    
     4208  --------------------------------------- 
    41684209   
    41694210  setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 
    41704211   
    4171 end 
    4172  
    4173 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    4174  
    4175 on mSVN_Update_CurrentMovie me, chooseNewPath 
     4212  return 1 
     4213end 
     4214 
     4215-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     4216 
     4217on mSVN_Update_CurrentMovie_Binaries me, chooseNewPath, onlyUpdate_SVN_WorkingFolder 
    41764218   
    41774219  workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) 
     
    41914233  end if 
    41924234   
     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   
    41934249  theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolder & QUOTE) 
    41944250   
    41954251  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     
    41964269    put theresult[1] 
     4270     
     4271    if onlyUpdate_SVN_WorkingFolder = 1 then go to movie oldmovie 
     4272     
    41974273    alert "Done, see the results of the svn operation in the message window." 
     4274     
    41984275  else 
     4276     
     4277    if onlyUpdate_SVN_WorkingFolder = 1 then go to movie oldmovie 
     4278     
    41994279    alert "svn application did not respond, something seems to have failed. :-(" 
    42004280  end if 
    42014281   
     4282   
    42024283  setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 
    42034284   
     
    42064287-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    42074288 
    4208 on mSVN_Commit_CurrentScripts me, selected_Members_Only, chooseNewPath 
     4289on 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   
     4326end 
     4327 
     4328 
     4329-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     4330 
     4331on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg 
    42094332   
    42104333  workingCopies = value(getPref("svn_workingCopies_paths.txt")) 
     
    42124335   
    42134336  svnBinary = mGetSVNBinaryPath(me, workingCopies) 
    4214   if length(svnBinary) < 1 then exit 
     4337  if length(svnBinary) < 1 then return 0 
    42154338   
    42164339  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   
    42204344   
    42214345  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   
    42254356   
    42264357  if workingCopies.getaprop(#dontWarnWhenSaving) <> 1 then 
    42274358    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 exit 
     4359    if answer = "Cancel" then return 0 
    42294360    if answer = "Always save" then workingCopies.setaprop(#dontWarnWhenSaving, 1) 
    42304361  end if 
     
    42554386    end if 
    42564387    alert "Can't proceed svn error while trying to update:" && theError 
    4257     exit   
     4388    return 0   
    42584389  end if 
    42594390   
     
    42624393  cnt = count(theresult) 
    42634394  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     exit 
     4395    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 
    42664397  end if 
    42674398   
     
    43084439  setPref("svn_workingCopies_paths.txt", string(workingCopies)) 
    43094440   
    4310 end 
     4441   
     4442  return 1 
     4443   
     4444end 
     4445 
    43114446 
    43124447 
  • trunk/lingosource/castlib2/memberInfo.xml

    r14 r16  
    11<?xml version="1.0" encoding="ISO-8859-1" ?> 
    22<Untitled> 
    3         <commonMovieScript> 
     3        <commonmoviescript> 
    44                <scriptType>#parent</scriptType> 
    55                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    66                <memberName>commonMovieScript</memberName> 
    7         </commonMovieScript> 
     7        </commonmoviescript> 
    88        <FileIOFunktionen> 
    99                <scriptType>#parent</scriptType> 
     
    3636                <memberName>SpriteNameBeaver</memberName> 
    3737        </SpriteNameBeaver> 
     38        <commonMovieScript> 
     39                <scriptType>#parent</scriptType> 
     40                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
     41                <memberName>commonMovieScript</memberName> 
     42        </commonMovieScript> 
    3843</Untitled> 
Note: See TracChangeset for help on using the changeset viewer.