Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
ezfit:5x:private_label_customization [2015/09/04 10:08] smayr [Get Encoded Company Code] |
ezfit:5x:private_label_customization [2015/10/02 12:24] (current) smayr [Add Custom Company] |
#endregion</code> | #endregion</code> |
* Edit ''AppCustomization.cs'' in ''AHI.App.Customization'' assembly. Add a new company in ''TCompanyAppInfoList.CreateDefaultList()''. Eg: <code csharp>#region Company Acme Inc | * Edit ''AppCustomization.cs'' in ''AHI.App.Customization'' assembly. Add a new company in ''TCompanyAppInfoList.CreateDefaultList()''. Eg: <code csharp>#region Company Acme Inc |
aCompany = new TCompanyAppInfo(); | aCompany = new TCompanyAppInfo(); |
aCompany.CompanyInfo.Code = TCustomCompany.Acme; | aCompany.CompanyInfo.Code = TCustomCompany.Acme; |
aCompany.CompanyInfo.ManufacturerID = TManufacturerID.Audina; // Audina manufacturer is used for Private Label | aCompany.CompanyInfo.ManufacturerID = TManufacturerID.Audina; // Audina manufacturer is used for Private Label |
this.Add(aCompany); | this.Add(aCompany); |
#endregion</code> | #endregion</code> |
| * Edit ''AppCustomization.cs'' in ''AHI.App.Customization'' assembly. Add a new company and software in ''TAppCustomization.SetAppInfo()''. Eg: <code csharp>... |
| switch(_Company.Code) |
| { |
| case TCustomCompany.Auditiva: _Application.AppName = "fitPRO"; break; |
| case TCustomCompany.Acme: _Application.AppName = "AcmeEzFITApp"; break; |
| ... |
| default: _Application.AppName = "ezFIT"; break; |
| } |
| ... |
| #endregion</code> |
| * Edit ''AppCustomizationTest.cs'' in ''AHI.App.Customization'' assembly. Add a test cases handling new company and software. |
| |
=== Add Supported Products and their names === | === Add Supported Products and their names === |
#endif</code> <WRAP round info>Make sue AppIconIdx matches the icon index in ''<src>\src\AHI.App.Logo\LogoRes.rc''</WRAP> | #endif</code> <WRAP round info>Make sue AppIconIdx matches the icon index in ''<src>\src\AHI.App.Logo\LogoRes.rc''</WRAP> |
| |
=== Add custom Spec Sheets === | === Add Custom Spec Sheets === |
* Place custom PDF documents in ''<src>\ezFIT\Products\Catalog\<CompanyName>'' | * Place custom PDF documents in ''<src>\ezFIT\Products\Catalog\<CompanyName>'' |
* In installer, add support to product catalog:<code>;--------------------------------------------------- | * In installer, add support to product catalog:<code>;--------------------------------------------------- |
| |
#----------------------------- | #----------------------------- |
# Define Target Directory | # User Defined Variables |
#----------------------------- | #----------------------------- |
| # Define Target Organizations |
| TARGETORG=( "Audina" "Auditiva" "iEar" "MDHearingAid" "Acme" ) |
| # Define Target Directory |
TARGETDIR="/var/www/downloads/prototypes" | TARGETDIR="/var/www/downloads/prototypes" |
#SYSDATESTAMP="2013-0117" | # Time Stamp (formatted as SYSDATESTAMP="2013-0117") |
SYSDATESTAMP=$(date +%Y-%m%d) | SYSDATESTAMP=$(date +%Y-%m%d) |
SYSDATEYEAR=$(date +%Y) | SYSDATEYEAR=$(date +%Y) |
| #----------------------------- |
| |
# Use command line argument to override variables | # Use command line argument to override variables |
fi | fi |
| |
# Perform operations if TargetDir exists | totalOrg=${#TARGETORG[*]} |
if cd $TARGETDIR; then | idx=0 |
#----------------------------- | while [ $idx -lt $totalOrg ]; do |
# Link current ezfit installer to ezfit-latest.exe | ORG=${TARGETORG[$idx]} |
#----------------------------- | #echo "Processing company $ORG" |
rm ezfit-Audina-$SYSDATEYEAR-latest.exe | |
rm ezfit-Auditiva-$SYSDATEYEAR-latest.exe | |
rm ezfit-MDHearingAid-$SYSDATEYEAR-latest.exe | |
rm ezfit-Acme-$SYSDATEYEAR-latest.exe | |
ln -s ezfit-setup-Audina-$SYSDATESTAMP.exe ezfit-Audina-$SYSDATEYEAR-latest.exe | |
ln -s ezfit-setup-Auditiva-$SYSDATESTAMP.exe ezfit-Auditiva-$SYSDATEYEAR-latest.exe | |
ln -s ezfit-setup-MDHearingAid-$SYSDATESTAMP.exe ezfit-MDHearingAid-$SYSDATEYEAR-latest.exe | |
ln -s ezfit-setup-Acme-$SYSDATESTAMP.exe ezfit-Acme-$SYSDATEYEAR-latest.exe | |
| |
echo "Success linking version $SYSDATESTAMP to ezfit-setup-Audina-$SYSDATEYEAR-latest.exe" | # Perform operations if TargetDir exists |
echo "Success linking version $SYSDATESTAMP to ezfit-setup-Auditiva-$SYSDATEYEAR-latest.exe" | if cd $TARGETDIR; then |
echo "Success linking version $SYSDATESTAMP to ezfit-setup-MDHearingAid-$SYSDATEYEAR-latest.exe" | #----------------------------- |
echo "Success linking version $SYSDATESTAMP to ezfit-setup-Acme-$SYSDATEYEAR-latest.exe" | # Link current ezfit installer to ezfit-latest.exe |
else | #----------------------------- |
echo "Failed to link version $SYSDATESTAMP to ezfit-Audina-$SYSDATEYEAR-latest.exe" | rm ezfit-$ORG-$SYSDATEYEAR-latest.exe |
echo "Failed to link version $SYSDATESTAMP to ezfit-Auditiva-$SYSDATEYEAR-latest.exe" | ln -s ezfit-setup-$ORG-$SYSDATESTAMP.exe ezfit-$ORG-$SYSDATEYEAR-latest.exe |
echo "Failed to link version $SYSDATESTAMP to ezfit-MDHearingAid-$SYSDATEYEAR-latest.exe" | echo "Success linking version $SYSDATESTAMP to ezfit-setup-$ORG-$SYSDATEYEAR-latest.exe" |
echo "Failed to link version $SYSDATESTAMP to ezfit-Acme-$SYSDATEYEAR-latest.exe" | else |
fi | echo "Failed to link version $SYSDATESTAMP to ezfit-ORG-$SYSDATEYEAR-latest.exe" |
| fi |
| |
| let idx=idx+1 |
| done |
| |
| |
| |
#----------------------------- | #----------------------------- |
# Define Target Directory | # User Defined Variables |
#----------------------------- | #----------------------------- |
| TARGETORG=( "Audina" "Auditiva" "iEar" "MDHearingAid" "Acme" ) |
| TARGETAPP=( "ezfit" "fitpro" "accufit" "mdtune" "acmefitapp" ) |
SOURCEDIR="/var/www/downloads/prototypes" | SOURCEDIR="/var/www/downloads/prototypes" |
TARGETDIR="/var/www/downloads/ezfit" | TARGETDIR="/var/www/downloads/ezfit" |
fi | fi |
| |
# Perform operations if TargetDir exists | totalOrg=${#TARGETORG[*]} |
if cd $TARGETDIR; then | idx=0 |
#----------------------------- | while [ $idx -lt $totalOrg ]; do |
# Link current ezfit installer to ezfit-latest.exe | ORG=${TARGETORG[$idx]} |
#----------------------------- | APP=${TARGETAPP[$idx]} |
rm ezfit-Audina-$SYSDATEYEAR-latest.exe | #echo "Processing company $ORG and app $APP" |
rm fitpro-Auditiva-$SYSDATEYEAR-latest.exe | |
rm mdtune-MDHearingAid-$SYSDATEYEAR-latest.exe | |
rm acmeezfitapp-Acme-$SYSDATEYEAR-latest.exe | |
| |
echo "Copying from $SOURCEDIR to $TARGETDIR . . ." | # Perform operations if TargetDir exists |
#ln -s $1 ezfit-setup-2012-latest.exe | if cd $TARGETDIR; then |
if [ -n "$1" ] | #----------------------------- |
then | # Link current ezfit installer to ezfit-latest.exe |
cp $SOURCEDIR/ezfit-setup-Audina-$SYSDATESTAMP.exe ezfit-Audina-$SYSDATEYEAR-latest.exe | #----------------------------- |
cp $SOURCEDIR/ezfit-setup-Auditiva-$SYSDATESTAMP.exe fitpro-Auditiva-$SYSDATEYEAR-latest.exe | rm $APP-$ORG-$SYSDATEYEAR-latest.exe |
cp $SOURCEDIR/ezfit-setup-MDHearingAid-$SYSDATESTAMP.exe mdtune-MDHearingAid-$SYSDATEYEAR-latest.exe | |
cp $SOURCEDIR/ezfit-setup-Acme-$SYSDATESTAMP.exe acmeezfitapp-Acme-$SYSDATEYEAR-latest.exe | echo "Copying from $SOURCEDIR to $TARGETDIR . . ." |
| #ln -s $1 ezfit-setup-2012-latest.exe |
| if [ -n "$1" ]; then |
| cp $SOURCEDIR/ezfit-setup-$ORG-$SYSDATESTAMP.exe $APP-$ORG-$SYSDATEYEAR-latest.exe |
| else |
| cp $SOURCEDIR/ezfit-$ORG-$SYSDATEYEAR-latest.exe $APP-$ORG-$SYSDATEYEAR-latest.exe |
| fi |
| chown www-data:web $APP-$ORG-$SYSDATEYEAR-latest.exe |
| echo "Success copying version $SYSDATEYEAR to $APP-$ORG-$SYSDATEYEAR-latest.exe" |
else | else |
cp $SOURCEDIR/ezfit-Audina-$SYSDATEYEAR-latest.exe ezfit-Audina-$SYSDATEYEAR-latest.exe | echo "Failed to link version $SYSDATEYEAR to $APP-$ORG-$SYSDATEYEAR-latest.exe" |
cp $SOURCEDIR/ezfit-Auditiva-$SYSDATEYEAR-latest.exe fitpro-Auditiva-$SYSDATEYEAR-latest.exe | |
cp $SOURCEDIR/ezfit-MDHearingAid-$SYSDATEYEAR-latest.exe mdtune-MDHearingAid-$SYSDATEYEAR-latest.exe | |
cp $SOURCEDIR/ezfit-Acme-$SYSDATEYEAR-latest.exe acmeezfitapp-Acme-$SYSDATEYEAR-latest.exe | |
fi | fi |
| let idx=idx+1 |
chown www-data:web ezfit-Audina-$SYSDATEYEAR-latest.exe | done |
chown www-data:web fitpro-Auditiva-$SYSDATEYEAR-latest.exe | |
chown www-data:web mdtune-MDHearingAid-$SYSDATEYEAR-latest.exe | |
chown www-data:web acmeezfitapp-Acme-$SYSDATEYEAR-latest.exe | |
| |
echo "Success copying version $SYSDATEYEAR to ezfit-Audina-$SYSDATEYEAR-latest.exe" | |
echo "Success copying version $SYSDATEYEAR to fitpro-Auditiva-$SYSDATEYEAR-latest.exe" | |
echo "Success copying version $SYSDATEYEAR to mdtune-MDHearingAid-$SYSDATEYEAR-latest.exe" | |
echo "Success copying version $SYSDATEYEAR to acmeezfitapp-Acme-$SYSDATEYEAR-latest.exe" | |
else | |
echo "Failed to link version $SYSDATEYEAR to ezfit-Audina-$SYSDATEYEAR-latest.exe" | |
echo "Failed to link version $SYSDATEYEAR to fitpro-Auditiva-$SYSDATEYEAR-latest.exe" | |
echo "Failed to link version $SYSDATEYEAR to mdtune-MDHearingAid-$SYSDATEYEAR-latest.exe" | |
echo "Failed to link version $SYSDATEYEAR to acmeezfitapp-Acme-$SYSDATEYEAR-latest.exe" | |
fi | |
| |
| |
SYSDATETIME=$(date +%Y%m%d-%H%M) | SYSDATETIME=$(date +%Y%m%d-%H%M) |
} | } |
| |
#------------------------------------------------ | #------------------------------------------------ |
# GetDateStamp | # GetDateStamp |