Skip to content

Commit

Permalink
added package files, added extra vs project to create dll
Browse files Browse the repository at this point in the history
  • Loading branch information
Raggles committed Apr 1, 2012
1 parent c319cdc commit a8186fc
Show file tree
Hide file tree
Showing 20 changed files with 816 additions and 34 deletions.
141 changes: 124 additions & 17 deletions copkg/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* target information */

@import "version.inc";

#product-info {
product-name: "libjpeg";
version: "8c";
Expand All @@ -9,26 +10,100 @@
packager: "Rafael Rivera <[email protected]>";
}


test {
default : false;
uses: release;
build-command: @"
rem";
};

package {

default : false;
uses : sign;

targets: {
@"copkg\libjpeg[vc10]-${package-version}-x86.msi",
@"copkg\libjpeg-dev[vc10]-${package-version}-x86.msi",
@"copkg\libjpeg-dev-common-${package-version}-any.msi",
@"copkg\libjpeg[vc10]-${package-version}-x64.msi",
@"copkg\libjpeg-dev[vc10]-${package-version}-x64.msi"
};

build-command : @"
REM THERE IS SOME GOOFY STUFF IN HERE TO WORK AROUND A COUPLE BUGS IN AUTOPACKAGE.
REM FIXES COMING SOON...
cd COPKG
coapp add-feed %cd%\
coapp --force-scan list
autopackage libjpeg-dev-common.autopkg || goto failed
coapp --force-scan list
autopackage libjpeg[vc10]-x86.autopkg libjpeg-dev[vc10]-x86.autopkg || goto failed
coapp --force-scan list
autopackage libjpeg[vc10]-x64.autopkg libjpeg-dev[vc10]-x64.autopkg || goto failed
coapp --force-scan list
coapp remove-feed %cd%\
ptk update-version
";

clean-command: @"del COPKG\*.msi COPKG\*.wixpdb";

};


update-version {
default : false;

build-command : @"
REM auto-increment version.inc file...

cd COPKG
setlocal EnableDelayedExpansion
for /F ""tokens=4,5,6,7 delims=.; "" %%v in (version.inc) do (
set /a build=%%y + 1
set VERSTRING=#define { package-version: %%v.%%w.%%x.!build!; }
)
echo !VERSTRING! > version.inc
";
}

release {
set: BuildCfg="Release";
uses: x86;
uses: x64;
};

sign {
default : false;
uses: release;
build-command: @"simplesigner.exe --nologo --sign output\vc10\x86\Release\bin**.dll output\vc10\x86\Release\bin\**.exe output\vc10\x64\Release\bin\**.dll output\vc10\x64\Release\bin\**.exe";
};


x86 {
compiler: vc10-x86;
compiler: vc10;
platform: x86;

targets: {
// main library
"Release\jpeg.lib",

"output\vc10\x86\Release\bin\jpeg.lib",
"output\vc10\x86\Release\bin\jpegs.lib",
"output\vc10\x86\Release\bin\jpeg.dll",
// extra utilities
"cjpeg\Release\cjpeg.exe",
"djpeg\Release\djpeg.exe",
"jpegtran\Release\jpegtran.exe",
"rdjpgcom\Release\rdjpgcom.exe",
"wrjpgcom\Release\wrjpgcom.exe",
"output\vc10\x86\Release\bin\cjpeg.exe",
"output\vc10\x86\Release\bin\djpeg.exe",
"output\vc10\x86\Release\bin\jpegtran.exe",
"output\vc10\x86\Release\bin\rdjpgcom.exe",
"output\vc10\x86\Release\bin\wrjpgcom.exe",
};

build-command:@"
copy jconfig.vc jconfig.h
copy makejsln.v10 makejsln.sln
copy makeasln.v10 makeasln.sln
copy makejvcx.v10 jpeg.vcxproj
copy makelvcx.v10 jpegdll.vcxproj
copy makecvcx.v10 cjpeg.vcxproj
copy makedvcx.v10 djpeg.vcxproj
copy maketvcx.v10 jpegtran.vcxproj
Expand All @@ -41,13 +116,45 @@ x86 {
clean-command:@"
attrib -S -H -R *
del /Q *.sdf *.suo *.sln *.vcxproj *.user jconfig.h 2>NUL
rmdir /S /Q Release 2>NUL

rmdir /S /Q cjpeg 2>NUL
rmdir /S /Q djpeg 2>NUL
rmdir /S /Q ipch 2>NUL
rmdir /S /Q jpegtran 2>NUL
rmdir /S /Q rdjpgcom 2>NUL
rmdir /S /Q wrjpgcom 2>NUL
rmdir /S /Q output 2>NUL
";
};

x64 {
compiler: vc10;
platform: x64;

targets: {
// main library
"output\vc10\x64\Release\bin\jpeg.lib",
"output\vc10\x64\Release\bin\jpegs.lib",
"output\vc10\x64\Release\bin\jpeg.dll",
// extra utilities
"output\vc10\x64\Release\bin\cjpeg.exe",
"output\vc10\x64\Release\bin\djpeg.exe",
"output\vc10\x64\Release\bin\jpegtran.exe",
"output\vc10\x64\Release\bin\rdjpgcom.exe",
"output\vc10\x64\Release\bin\wrjpgcom.exe",
};

build-command:@"
copy jconfig.vc jconfig.h
copy makejsln.v10 makejsln.sln
copy makeasln.v10 makeasln.sln
copy makejvcx.v10 jpeg.vcxproj
copy makelvcx.v10 jpegdll.vcxproj
copy makecvcx.v10 cjpeg.vcxproj
copy makedvcx.v10 djpeg.vcxproj
copy maketvcx.v10 jpegtran.vcxproj
copy makewvcx.v10 wrjpgcom.vcxproj
copy makervcx.v10 rdjpgcom.vcxproj
msbuild /p:Platform=x64 /p:Configuration=Release makejsln.sln
msbuild /p:Platform=x64 /p:Configuration=Release makeasln.sln
";

clean-command:@"
attrib -S -H -R *
del /Q *.sdf *.suo *.sln *.vcxproj *.user jconfig.h 2>NUL
rmdir /S /Q output 2>NUL
";
};
45 changes: 45 additions & 0 deletions copkg/libjpeg-dev-common.autopkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@import "version.inc" ;
@import "outercurve.inc" ;

package {
name: "libjpeg-dev-common";
version: "${package-version}";
arch: any;
display-name: "libjpeg Dev Library-common";
}

metadata {
summary: "The libjpeg developer library (common)";
description: @"libjpeg";

icon: @"libjpeg.png";

author-version : "8c";
bug-tracker: "https://github.com/coapp-packages/libjpeg/issues";
stability : "0";
licenses : {
GPL
};
}

files[headers] {
root: "..\\";

include: {
//not sure if we need all these, maybe ill work it out later..
"*.h",
};

trim-path:all;

// ensures that all the header files end up in a subfolder called 'include'
destination-path:"include";
}


// the 'name' of the developer library isn't terribly important...
developer-library[libjpeg] {
headers: {
headers
};
}
45 changes: 45 additions & 0 deletions copkg/libjpeg-dev.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@import "version.inc" ;
@import "outercurve.inc" ;

package {
name: "libjpeg-dev[${flavor}]";
version: "${package-version}";
arch : "${arch}";

display-name: "libjpeg Developer library";
}

metadata {
summary: "The libjpeg developer library";
description: @"libjpeg";

icon: @"libjpeg.png";

author-version : "8c";
bug-tracker: "https://github.com/coapp-packages/libjpeg/issues";
stability : "0";
licenses : {
GPL
};
}

files[libs] {
root: @"..\output\vc10\x86\Release\bin\";
include: {
"*.lib",
};
trim-path: all;
};
requires {
package: "libjpeg-dev-common-${package-version}-any-${Package.PublicKeyToken}";
package: "libjpeg[${flavor}]-${package-version}-${Package.Architecture}-${Package.PublicKeyToken}";
}
developer-library[libjpeg] {
libraries : {
libs
};
}
8 changes: 8 additions & 0 deletions copkg/libjpeg-dev[vc10]-x64.autopkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// details for x64 version of libjpeg package
// build with: autopackage libjpeg-dev[vc10]-x64.autopkg
@import "libjpeg-dev.inc" ;

#define {
flavor: "vc10";
arch : "x64";
}
8 changes: 8 additions & 0 deletions copkg/libjpeg-dev[vc10]-x86.autopkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// details for x86 version of libjpeg package
// build with: autopackage libjpeg-dev[vc10]-x86.autopkg
@import "libjpeg-dev.inc" ;

#define {
flavor: "vc10";
arch : "x86";
}
114 changes: 114 additions & 0 deletions copkg/libjpeg.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
@import "version.inc";
@import "outercurve.inc";

package {
name: "libjpeg[${flavor}]";
version: "${package-version}";
arch : "${arch}";

display-name: "libjpeg";
location: "http://coapp.org/repository/${OutputFilename}";

feed: "http://coapp.org/repository/packages.atom.xml";
publisher: "CoApp Project";
}

files[exes] {
root: @"..\output\vc10\${arch}\Release\bin";

include: {
"*.exe",
};

trim-path: all;
};


files[dlls] {
root: @"..\output\vc10\${arch}\Release\bin";

include: {
"*.dll",
};

trim-path: all;
};

license[GPL] {
license-url: "";
license-type: "GPL";
}

files[files-to-sign] {
include: {
exes,
dlls
};
}

metadata {
summary: "liblibjpeg";
description: @"libjpeg";

icon: @"libjpeg.png";

author-version : "8c";
bug-tracker: "https://github.com/coapp-packages/libjpeg/issues";
stability : "0";
licenses : {
GPL
};
}

compatability-policy {
minimum: "8.3.0.0";
maximum: "${OneLessThanCurrent}"; // this is the default
versions : {
"8.0",
}; // if not specified, find the versions by looking at the feeds and finding all the major/minor versions in range.
}

application {
include : {
exes,
};
}

manifest[things-that-need-them] {
// all of our EXEs need to get the manifest entries for the assemblies we're creating in this package

assembly : {
libjpeg
};

include : {
exes
};
}

assembly[libjpeg] {
include : {
dlls
};
}

package-composition {
symlinks : {
exes => @"${bin}\${each.Name}" = @"${packagedir}\${each.Name}";
};
}

signing {
attributes : {
company="Outercurve Foundation",
description="libjpeg",
product-name="libjpeg",
product-version="${package-version}",
file-version="${package-version}",
};

replace-signature: true;
include: {
files-to-sign
};
}
Loading

0 comments on commit a8186fc

Please sign in to comment.