Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ezfit:5x:private_label_customization [2015/09/10 18:06]
smayr [Publishing Scripts]
ezfit:5x:private_label_customization [2015/10/02 12:24] (current)
smayr [Add Custom Company]
Line 31: Line 31:
 #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
Line 47: Line 47:
 switch(_Company.Code) switch(_Company.Code)
 { {
-    case TCustomCompany.Auditiva:     _Application.AppName = "fitPRO";  break; +    case TCustomCompany.Auditiva: _Application.AppName = "fitPRO";  break; 
-    case TCustomCompany.Acme:         _Application.AppName = "AcmeEzFITApp"; break;+    case TCustomCompany.Acme:     _Application.AppName = "AcmeEzFITApp"; break;
     ...     ...
     default: _Application.AppName = "ezFIT"; break;     default: _Application.AppName = "ezFIT"; break;
Line 216: Line 216:
 #----------------------------- #-----------------------------
 # Define Target Organizations # Define Target Organizations
-TARGETORG=( "Audina" "Auditiva" "iEar" "MDHearingAid" )+TARGETORG=( "Audina" "Auditiva" "iEar" "MDHearingAid" "Acme" )
 # Define Target Directory # Define Target Directory
 TARGETDIR="/var/www/downloads/prototypes" TARGETDIR="/var/www/downloads/prototypes"
Line 320: Line 320:
  
 #----------------------------- #-----------------------------
-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"
Line 341: Line 343:
 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+
  
  
Line 398: Line 388:
    SYSDATETIME=$(date +%Y%m%d-%H%M)    SYSDATETIME=$(date +%Y%m%d-%H%M)
 } }
-  +
 #------------------------------------------------ #------------------------------------------------
 # GetDateStamp # GetDateStamp