我目前正在尝试将我们的项目打包到 Fedora RPM 中。因此我使用以下规范:http: //sourceforge.net/p/audiocuesheet/code/145/tree/trunk/RPM%20Build/AudioCuesheetEditor.spec
如果我尝试在“build”阶段使用 xbuild 构建 rpm,则输出如下:
+ xbuild /property:Configuration=Release AudioCuesheetEditor.sln
XBuild Engine Version 2.10.8.0
Mono, Version 2.10.8.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Build started 01/01/2013 16:53:18.
__________________________________________________
Project "/home/makerpm/rpmbuild/BUILD/AudioCuesheetEditor-0.2.1/AudioCuesheetEditor.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Release|x86".
Target Build:
Project "/home/makerpm/rpmbuild/BUILD/AudioCuesheetEditor-0.2.1/AudioCuesheetEditor.csproj" (default target(s)):
Target PrepareForBuild:
Configuration: Release Platform: x86
Created directory "bin/Release/"
Created directory "obj/x86/Release/"
Target CopyNonResxEmbeddedResources:
Copying file from '/home/makerpm/rpmbuild/BUILD/AudioCuesheetEditor-0.2.1/gtk-gui/gui.stetic' to '/home/makerpm/rpmbuild/BUILD/AudioCuesheetEditor-0.2.1/obj/x86/Release/AudioCuesheetEditor.gtk-gui.gui.stetic'
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target CoreCompile:
Tool /usr/bin/gmcs execution started with arguments: /noconfig /debug- /optimize- /out:obj/x86/Release/AudioCuesheetEditor.exe /resource:obj/x86/Release/AudioCuesheetEditor.gtk-gui.gui.stetic,gui.stetic gtk-gui/generated.cs MainWindow.cs gtk-gui/MainWindow.cs AssemblyInfo.cs Language.cs Speechfile.cs Option.cs Program.cs Optionfile.cs Cuesheet.cs Track.cs Cuesheetfile.cs Audiofile.cs TextInputfile.cs Projectfile.cs MainClass.cs Logfile.cs OptionWindow.cs gtk-gui/AudioCuesheetEditor.OptionWindow.cs /target:winexe /main:AudioCuesheetEditor.MainClass /reference:/usr/lib/mono/2.0/System.dll /reference:/usr/lib/mono/2.0/Mono.Posix.dll /reference:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/glade-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll /reference:/usr/lib/mono/2.0/System.Xml.dll /warn:4
gtk-gui/MainWindow.cs(152,51): error CS1012: Too many characters in character literal
gtk-gui/MainWindow.cs(171,52): error CS1012: Too many characters in character literal
gtk-gui/MainWindow.cs(199,53): error CS1012: Too many characters in character literal
gtk-gui/AudioCuesheetEditor.OptionWindow.cs(181,67): error CS1012: Too many characters in character literal
gtk-gui/AudioCuesheetEditor.OptionWindow.cs(247,64): error CS1012: Too many characters in character literal
Task "Csc" execution -- FAILED
Done building target "CoreCompile" in project "/home/makerpm/rpmbuild/BUILD/AudioCuesheetEditor-0.2.1/AudioCuesheetEditor.csproj".-- FAILED
Done building project "/home/makerpm/rpmbuild/BUILD/AudioCuesheetEditor-0.2.1/AudioCuesheetEditor.csproj".-- FAILED
Task "MSBuild" execution -- FAILED
Done building target "Build" in project "/home/makerpm/rpmbuild/BUILD/AudioCuesheetEditor-0.2.1/AudioCuesheetEditor.sln".-- FAILED
Done building project "/home/makerpm/rpmbuild/BUILD/AudioCuesheetEditor-0.2.1/AudioCuesheetEditor.sln".-- FAILED
Build FAILED.
有趣的是,如果我使用标准源代码包并运行 xbuild,一切都可以完美运行:
[sven@Sven AudioCuesheetEditor-src-v0.2.1]$ xbuild /property:Configuration=Release AudioCuesheetEditor.sln
XBuild Engine Version 2.10.8.0
Mono, Version 2.10.8.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Build started 01.01.2013 16:54:17.
__________________________________________________
Project "/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/AudioCuesheetEditor.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Release|x86".
Target Build:
Project "/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/AudioCuesheetEditor.csproj" (default target(s)):
Target PrepareForBuild:
Configuration: Release Platform: x86
Created directory "bin/Release/"
Created directory "obj/x86/Release/"
Target CopyNonResxEmbeddedResources:
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/gtk-gui/gui.stetic' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/obj/x86/Release/AudioCuesheetEditor.gtk-gui.gui.stetic'
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target CoreCompile:
Tool /usr/bin/gmcs execution started with arguments: /noconfig /debug- /optimize- /out:obj/x86/Release/AudioCuesheetEditor.exe /resource:obj/x86/Release/AudioCuesheetEditor.gtk-gui.gui.stetic,gui.stetic gtk-gui/generated.cs MainWindow.cs gtk-gui/MainWindow.cs AssemblyInfo.cs Language.cs Speechfile.cs Option.cs Program.cs Optionfile.cs Cuesheet.cs Track.cs Cuesheetfile.cs Audiofile.cs TextInputfile.cs Projectfile.cs MainClass.cs Logfile.cs OptionWindow.cs gtk-gui/AudioCuesheetEditor.OptionWindow.cs /target:winexe /main:AudioCuesheetEditor.MainClass /reference:/usr/lib/mono/2.0/System.dll /reference:/usr/lib/mono/2.0/Mono.Posix.dll /reference:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/glade-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll /reference:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll /reference:/usr/lib/mono/2.0/System.Xml.dll /warn:4
Target _CopyDeployFilesToOutputDirectoryPreserveNewest:
Creating directory '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/Texts.xml' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/Texts.xml'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/LICENCE_DE.TXT' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/LICENCE_DE.TXT'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/LICENCE_EN.TXT' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/LICENCE_EN.TXT'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/LICENCE.TXT' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/LICENCE.TXT'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/README.TXT' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/README.TXT'
Creating directory '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-64.png' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-64.png'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-48.png' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-48.png'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-32.png' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-32.png'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-24.png' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-24.png'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-22.png' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-22.png'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-16.png' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-16.png'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-48.ico' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-48.ico'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-32.ico' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-32.ico'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-24.ico' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-24.ico'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-22.ico' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-22.ico'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-16.ico' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-16.ico'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/CHANGELOG.TXT' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/CHANGELOG.TXT'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/KNOWN_ISSUES.TXT' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/KNOWN_ISSUES.TXT'
Creating directory '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/samples'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/samples/Sample_Inputfile.txt' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/samples/Sample_Inputfile.txt'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/samples/Sample_Project.ace' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/samples/Sample_Project.ace'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/samples/Sample_Inputfile2.txt' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/samples/Sample_Inputfile2.txt'
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/resources/icons/application-x-cue-128.png' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/resources/icons/application-x-cue-128.png'
Target DeployOutputFiles:
Copying file from '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/obj/x86/Release/AudioCuesheetEditor.exe' to '/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/bin/Release/AudioCuesheetEditor.exe'
Done building project "/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/AudioCuesheetEditor.csproj".
The project 'Packages' is disabled for solution configuration 'Release|x86'.
Done building project "/home/sven/Downloads/AudioCuesheetEditor-src-v0.2.1/AudioCuesheetEditor.sln".
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.8477090
那么,谁能告诉我,为什么 rpmbuild 中的构建失败了?提前致谢。
问候斯文