[DEVELOPMENT ENVIRONMENT]
* BUG: Creating a source archive now uses a temporary intermediate file and displays an error message if something fails. git-svn-id: svn://localhost/gambas/trunk@5510 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
367110840c
commit
699268efeb
2 changed files with 27 additions and 11 deletions
|
@ -3115,7 +3115,7 @@ msgstr ""
|
||||||
msgid "This menu is too deep !"
|
msgid "This menu is too deep !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FMenu.class:937 Project.module:5063
|
#: FMenu.class:937 Project.module:5075
|
||||||
msgid "modified"
|
msgid "modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -6192,39 +6192,43 @@ msgid ""
|
||||||
"already exists."
|
"already exists."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Project.module:4263
|
#: Project.module:4258
|
||||||
|
msgid "Unable to create source archive."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: Project.module:4275
|
||||||
msgid "Create source package"
|
msgid "Create source package"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Project.module:4264
|
#: Project.module:4276
|
||||||
msgid "Source packages"
|
msgid "Source packages"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Project.module:4555
|
#: Project.module:4567
|
||||||
msgid "Cannot copy file &1."
|
msgid "Cannot copy file &1."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Project.module:4603
|
#: Project.module:4615
|
||||||
msgid "Cannot create link &1."
|
msgid "Cannot create link &1."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Project.module:4618
|
#: Project.module:4630
|
||||||
msgid "Cannot move a directory inside itself."
|
msgid "Cannot move a directory inside itself."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Project.module:4686
|
#: Project.module:4698
|
||||||
msgid "Cannot move file &1."
|
msgid "Cannot move file &1."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Project.module:5216
|
#: Project.module:5228
|
||||||
msgid "Project cleanup..."
|
msgid "Project cleanup..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Project.module:5222
|
#: Project.module:5234
|
||||||
msgid "Project files conversion..."
|
msgid "Project files conversion..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: Project.module:5252
|
#: Project.module:5264
|
||||||
msgid "Unable to convert &1"
|
msgid "Unable to convert &1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -4214,6 +4214,7 @@ Public Sub MakeSourcePackageTo(sPath As String)
|
||||||
Dim sCmd As String
|
Dim sCmd As String
|
||||||
Dim sOpt As String
|
Dim sOpt As String
|
||||||
Dim sIgnore As String
|
Dim sIgnore As String
|
||||||
|
Dim sTemp As String
|
||||||
|
|
||||||
Inc Application.Busy
|
Inc Application.Busy
|
||||||
|
|
||||||
|
@ -4227,8 +4228,10 @@ Public Sub MakeSourcePackageTo(sPath As String)
|
||||||
sOpt = "J"
|
sOpt = "J"
|
||||||
Endif
|
Endif
|
||||||
|
|
||||||
|
sTemp = File.SetExt(Temp$(), File.Ext(sPath))
|
||||||
|
|
||||||
sCmd = "cd " & Shell$(File.Dir(Project.Dir)) & ";"
|
sCmd = "cd " & Shell$(File.Dir(Project.Dir)) & ";"
|
||||||
sCmd &= " tar cfvh" & sOpt & " " & Shell$(sPath)
|
sCmd &= " tar cfvh" & sOpt & " " & Shell$(sTemp)
|
||||||
sCmd &= " --exclude=" & Shell$(".gambas/*")
|
sCmd &= " --exclude=" & Shell$(".gambas/*")
|
||||||
sCmd &= " --exclude=" & Shell$("*~")
|
sCmd &= " --exclude=" & Shell$("*~")
|
||||||
sCmd &= " --exclude=" & Shell$("core.*")
|
sCmd &= " --exclude=" & Shell$("core.*")
|
||||||
|
@ -4243,8 +4246,17 @@ Public Sub MakeSourcePackageTo(sPath As String)
|
||||||
|
|
||||||
Shell sCmd Wait
|
Shell sCmd Wait
|
||||||
|
|
||||||
|
Kill sPath
|
||||||
|
Copy sTemp To sPath
|
||||||
|
Try Kill sTemp
|
||||||
|
|
||||||
Dec Application.Busy
|
Dec Application.Busy
|
||||||
|
|
||||||
|
Catch
|
||||||
|
|
||||||
|
Dec Application.Busy
|
||||||
|
Message.Error(("Unable to create source archive.") & "\n\n" & Error.Text)
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Private Sub GetDefaultSourceArchiveBaseName() As String
|
Private Sub GetDefaultSourceArchiveBaseName() As String
|
||||||
|
|
Loading…
Reference in a new issue