Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Create webpackage from source

$
0
0
Hi @nuFaqtz

We don't have any simplified version of our build script to share, at least yet.

If you up to making your own, here're the steps you're interested in.
(JVM installation is required for javascript compression code):

1) Compile the sources in "Release" configuration

2)
Rename ReleaseBuild.Global.asax -> Global.asax
Rename ReleaseBuild.Web.config -> Web.config
<Exec Command="rename $(TargetBuildWebsiteDirectory)\ReleaseBuild.Global.asax Global.asax" />
<Exec Command="rename $(TargetBuildWebsiteDirectory)\ReleaseBuild.Web.config Web.config" />
3) Compress icons into a zip file
<Exec Command="&quot;C:\Program Files\7-Zip\7z.exe&quot; a -mx1 -tzip $(TargetBuildWebsiteDirectory)\Composite\images\icons\StandardIcons.zip -r $(TargetBuildWebsiteDirectory)\Composite\images\icons\*.png" />
4) Remove not release essential files (listed in <website>\ReleaseCleanupConfiguration.xml)
<SiteCleanerTask Target="prejavascriptcompile" BaseDirectory="$(TargetBuildWebsiteDirectory)" ConfigurationFilename="$(TargetBuildWebsiteDirectory)\ReleaseCleanupConfiguration.xml" />
5) Compile and compress console's js and css files
<UsingTask TaskName="Composite.Tfs.CompileCssTask" AssemblyFile="$(SourceCodeReleaseBinDirectory)\Composite.Tfs.dll" />
<UsingTask TaskName="Composite.Tfs.CompileJavaScriptTask" AssemblyFile="$(SourceCodeReleaseBinDirectory)\Composite.Tfs.dll" />

    <!-- Javascript compile -->
    <CompileJavaScriptTask FolderPath="$(TargetBuildWebsiteDirectory)\Composite" TargetPath="$(TargetBuildWebsiteDirectory)\Composite\scripts\compressed" Type="top" Mode="compile"/>
    <CompileJavaScriptTask FolderPath="$(TargetBuildWebsiteDirectory)\Composite" TargetPath="$(TargetBuildWebsiteDirectory)\Composite\scripts\compressed" Type="sub" Mode="compile"/>
    <Exec Command="java -jar $(TargetBuildWebsiteDirectory)\Composite\applets\custom_rhino.jar -opt -1 -c $(TargetBuildWebsiteDirectory)\Composite\scripts\compressed\top-uncompressed.js &gt; $(TargetBuildWebsiteDirectory)\Composite\scripts\compressed\top.js 2&gt;&amp;1" />
    <Exec Command="java -jar $(TargetBuildWebsiteDirectory)\Composite\applets\custom_rhino.jar -opt -1 -c $(TargetBuildWebsiteDirectory)\Composite\scripts\compressed\sub-uncompressed.js &gt; $(TargetBuildWebsiteDirectory)\Composite\scripts\compressed\sub.js 2&gt;&amp;1" />

    <!-- Css compile -->
    <CompileCssTask SourceFile="$(TargetBuildWebsiteDirectory)\Composite\styles\styles.css" TargetFile="$(TargetBuildWebsiteDirectory)\Composite\styles\styles_compiled.css" />
    <CompileCssTask SourceFile="$(TargetBuildWebsiteDirectory)\Composite\skins\skin.css" TargetFile="$(TargetBuildWebsiteDirectory)\Composite\skins\skin_compiled.css" />
6) Clean old js and css files:
<SiteCleanerTask Target="postjavascriptcompile" BaseDirectory="$(TargetBuildWebsiteDirectory)" ConfigurationFilename="$(TargetBuildWebsiteDirectory)\ReleaseCleanupConfiguration.xml" />    
Sources for SiteCleanerTask, CompileCssTask and CompileJavaScriptTask you can find here:
https://www.dropbox.com/s/h6i41zcsrx2bsn7/2013-09-02%20TFS.zip

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>