Mercurial > dwindows
comparison mac/finishup.sh @ 2861:ef7a414f9b71
Add initial C++ binding header and example program.
Still trying to figure out how it will work, but it is loosely
based on GTK-- and when complete dwtestoo will replicate dwtest.
Added support for building dwtestoo on Unix and Mac.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 15 Dec 2022 12:42:34 +0000 |
parents | 2934b2fdcd8e |
children | 3dde7456c9f6 |
comparison
equal
deleted
inserted
replaced
2860:9daee9d58956 | 2861:ef7a414f9b71 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 PLATFORM=`uname -s` | 2 PLATFORM=`uname -s` |
3 | 3 |
4 if [ $PLATFORM = "Darwin" ] | 4 if [ $PLATFORM = "Darwin" ] |
5 then | 5 then |
6 mkdir -p dwtest.app/Contents/MacOS | 6 mkdir -p $2.app/Contents/MacOS |
7 mkdir -p dwtest.app/Contents/Resources | 7 mkdir -p $2.app/Contents/Resources |
8 | 8 |
9 cp -f $1/mac/Info.plist dwtest.app/Contents | 9 cat $1/mac/Info.plist | sed s/APPNAME/$2/ > $2.app/Contents/Info.plist |
10 cp -f $1/mac/PkgInfo dwtest.app/Contents | 10 cp -f $1/mac/PkgInfo $2.app/Contents |
11 cp -f $1/mac/file.png dwtest.app/Contents/Resources | 11 cp -f $1/mac/file.png $2.app/Contents/Resources |
12 cp -f $1/mac/folder.png dwtest.app/Contents/Resources | 12 cp -f $1/mac/folder.png $2.app/Contents/Resources |
13 cp -f $1/image/test.png dwtest.app/Contents/Resources | 13 cp -f $1/image/test.png $2.app/Contents/Resources |
14 cp -f dwtest dwtest.app/Contents/MacOS | 14 cp -f $2 $2.app/Contents/MacOS |
15 # Check if there is a certificate to sign with... | 15 # Check if there is a certificate to sign with... |
16 if [ ! -f mac/key.crt ]; then | 16 if [ ! -f mac/key.crt ]; then |
17 if [ -f mac/key.rsa ]; then | 17 if [ -f mac/key.rsa ]; then |
18 # If not we generate a self-signed one for testing purposes | 18 # If not we generate a self-signed one for testing purposes |
19 echo "No certificate in mac/key.crt so generating self-signed certificate..." | 19 echo "No certificate in mac/key.crt so generating self-signed certificate..." |
20 openssl req -new -key mac/key.rsa -out mac/key.csr -config mac/openssl.cnf | 20 openssl req -new -key mac/key.rsa -out mac/key.csr -config mac/openssl.cnf |
21 openssl x509 -req -days 3650 -in mac/key.csr -signkey mac/key.rsa -out mac/key.crt -extfile mac/openssl.cnf -extensions codesign | 21 openssl x509 -req -days 3650 -in mac/key.csr -signkey mac/key.rsa -out mac/key.crt -extfile mac/openssl.cnf -extensions codesign |
22 certtool i mac/key.crt k="`pwd`/mac/key.keychain" r=mac/key.rsa c p=moof | 22 certtool i mac/key.crt k="`pwd`/mac/key.keychain" r=mac/key.rsa c p=moof |
23 else | 23 else |
24 echo "No key pair found, cannot generate certificate... signing AdHoc." | 24 echo "No key pair found, cannot generate certificate... signing AdHoc." |
25 codesign -s "-" dwtest.app/Contents/MacOS/dwtest | 25 codesign -s "-" $2.app/Contents/MacOS/$2 |
26 fi | 26 fi |
27 fi | 27 fi |
28 if [ -f mac/key.keychain ]; then | 28 if [ -f mac/key.keychain ]; then |
29 echo "Signing the apllication with certificate in mac/key.crt" | 29 echo "Signing the apllication with certificate in mac/key.crt" |
30 codesign -s my-signing-identity --keychain mac/key.keychain dwtest.app/Contents/MacOS/dwtest | 30 codesign -s my-signing-identity --keychain mac/key.keychain $2.app/Contents/MacOS/$2 |
31 fi | 31 fi |
32 fi | 32 fi |