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/04 09:57]
smayr [Get private label information]
ezfit:5x:private_label_customization [2015/10/02 12:24] (current)
smayr [Add Custom Company]
Line 16: Line 16:
  
 === Add Custom Company === === Add Custom Company ===
-   * Edit ''Types.cs'' in ''AHI.App.Types'' assembly. Add new company to ''TCustomCompany'' enum. Eg: ''Acme = 99'' +  * Edit ''Types.cs'' in ''AHI.App.Types'' assembly. Add new company to ''TCustomCompany'' enum. Eg: ''Acme = 99'' 
-    * Edit ''AppCustomization.cs'' in ''AHI.App.Customization'' assembly. Add a new company in ''TCompanyInfoList.CreateDefaultList()''. Eg: <code csharp>#region Company Acme Inc+  * Edit ''AppCustomization.cs'' in ''AHI.App.Customization'' assembly. Add a new company in ''TCompanyInfoList.CreateDefaultList()''. Eg: <code csharp>#region Company Acme Inc
   aCompany                = new TCompanyInfo();   aCompany                = new TCompanyInfo();
   aCompany.Code           = TCustomCompany.Acme;   aCompany.Code           = TCustomCompany.Acme;
Line 30: Line 30:
   this.Add(aCompany);   this.Add(aCompany);
 #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 44: Line 44:
   this.Add(aCompany);   this.Add(aCompany);
 #endregion</code> #endregion</code>
-  * Add Supported Products and their names. +  * Edit ''AppCustomization.cs'' in ''AHI.App.Customization'' assembly. Add a new company and software in ''TAppCustomization.SetAppInfo()''. Eg: <code csharp>... 
-    * Edit file ''ProductSpecs.cs'' in ''AHI.Products.Specifications'' assembly. +switch(_Company.Code) 
-    * Set product name in ''TProductSpecificationList.RefreshList()'', under specified company for the required product. +
-    * <code>#region Product BTE 675DP++    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 === 
 +  * Edit file ''ProductSpecs.cs'' in ''AHI.Products.Specifications'' assembly. 
 +  * Set product name in ''TProductSpecificationList.RefreshList()'', under specified company for the required product. 
 +  * <code>#region Product BTE 675DP+
   _prod = new TProductSpecification();   _prod = new TProductSpecification();
   . . .   . . .
Line 56: Line 68:
   . . .   . . .
 #endregion</code> #endregion</code>
-  * Add Supported Housings. + 
-    * Edit file ''HousingSpecs.cs'' in ''AHI.Products.Specifications'' assembly. +=== Add Supported Housings === 
-    * Under each housing in ''THousingSpecificationList.RefreshList()'', specify the ''IsVisible'' property for the specified company. +  * Edit file ''HousingSpecs.cs'' in ''AHI.Products.Specifications'' assembly. 
-    * <code>#region Housing: BTE_Classic+  * Under each housing in ''THousingSpecificationList.RefreshList()'', specify the ''IsVisible'' property for the specified company. 
 +  * <code>#region Housing: BTE_Classic
   _Housing= new THousingSpecification();   _Housing= new THousingSpecification();
   . . .   . . .
Line 67: Line 80:
   . . .   . . .
 #endregion</code> #endregion</code>
 +
 +=== Custom Splash and Icon Images ===
   * Add Splash and Icon image resources to ''AHI.App.Logo'' assembly.    * Add Splash and Icon image resources to ''AHI.App.Logo'' assembly. 
-    * Add Splash (BMP) and icons (ICO) images to ''C:\programming\audina\ezFIT5\src\AHI.App.Logo\images''+  * Add Splash (BMP) and icons (ICO) images to ''C:\programming\audina\ezFIT5\src\AHI.App.Logo\images''
-    * Edit file ''LogoRes.rc'': <code>+  * Edit file ''LogoRes.rc'': <code>
 // 1. Compile resource file LogoRes.rc into LogoRes.res  // 1. Compile resource file LogoRes.rc into LogoRes.res 
 //    using the Visual Studio Command Prompt: //    using the Visual Studio Command Prompt:
Line 97: Line 112:
   ...   ...
 }</code> <WRAP round info>Make sue AppIconIdx matches the icon index in ''<src>/installer/installer-ezfit.iss''</WRAP> }</code> <WRAP round info>Make sue AppIconIdx matches the icon index in ''<src>/installer/installer-ezfit.iss''</WRAP>
-  * Generate Logo assembly: 
-    * Compile resource file LogoRes.rc into LogoRes.res using the Visual Studio Command Prompt. In VS2015: Start > All Applications > Visual Studio 2015 > Visual Studio Tools > Developer Command Prompt for VS2015. Eg: ''C:\> RC <src>\AHI.App.Logo\LogoRes.rc''  (or ''C:> <src>\AHI.App.Logo\compile-resources.bat'') 
-    * Add res file to assembly. Project > Properties > Application (tab) > Resource File, and select ''LogoRes.res''. 
-    * Build assembly. 
  
-  Encode Company Code. +Generate Logo assembly: 
-    * Use utility ''<src>/EncodeUtil/bin/Debug/EncodeUtil.exe''. Eg: ''Acme'', when encrypted becomes ''McFQ/ZiAWwo=''.  +  Compile resource file LogoRes.rc into LogoRes.res using the Visual Studio Command Prompt. In VS2015: Start > All Applications > Visual Studio 2015 > Visual Studio Tools > Developer Command Prompt for VS2015. Eg: ''C:\> RC <src>\AHI.App.Logo\LogoRes.rc''  (or ''C:> <src>\AHI.App.Logo\compile-resources.bat''
-    * Add encoded company custom code to installer in ''<src>/installer/installer-ezfit.iss'': <code>#if AppCustomOrg == "Audina"+  * Add res file to assembly. Project > Properties > Application (tab) > Resource File, and select ''LogoRes.res''
 +  * Build assembly. 
 + 
 +=== Get Encoded Company Code === 
 +  * Use utility ''<src>/EncodeUtil/bin/Debug/EncodeUtil.exe''. Eg: ''Acme'', when encrypted becomes ''McFQ/ZiAWwo=''.  
 +  * Add encoded company custom code to installer in ''<src>/installer/installer-ezfit.iss'': <code>#if AppCustomOrg == "Audina"
   ...   ...
 #elif AppCustomOrg == "Acme" #elif AppCustomOrg == "Acme"
Line 119: Line 135:
   ...   ...
 #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. + 
-    * Place custom PDF documents in ''<src>\ezFIT\Products\Catalog\<CompanyName>'' +=== Add Custom Spec Sheets === 
-    * In installer, add support to product catalog:<code>;---------------------------------------------------+  * Place custom PDF documents in ''<src>\ezFIT\Products\Catalog\<CompanyName>'' 
 +  * In installer, add support to product catalog:<code>;---------------------------------------------------
 ; Product Catalog ; Product Catalog
 ;--------------------------------------------------- ;---------------------------------------------------
Line 129: Line 146:
 Source: {#SrcAppDir}\Products\Catalog\*.pdf; DestDir: {app}\Products\Catalog; Flags: ignoreversion Source: {#SrcAppDir}\Products\Catalog\*.pdf; DestDir: {app}\Products\Catalog; Flags: ignoreversion
 #endif</code> #endif</code>
-  * Add software customizations: + 
-    * Disable ezFIT 4 support if not required (both, in app and installer). +=== Installer Customizations === 
-    * <code>#if AppCustomOrg == "Acme"+Add software installer customizations 
 +  * Disable ezFIT 4 support if not required (both, in app and installer). 
 +  * <code>#if AppCustomOrg == "Acme"
 ; Do not install ezFIT4 ; Do not install ezFIT4
 #else #else
 Filename: {tmp}\{#AppDestName}4-setup-{#AppCustomOrg}.exe; ... Filename: {tmp}\{#AppDestName}4-setup-{#AppCustomOrg}.exe; ...
 #endif</code> #endif</code>
-  * Create custom User Documentation. + 
-    * Create necessary files in ''C:\programming\audina\ezFIT5\src\UserDoc\custom''+=== Create Custom User Documentation === 
-      * acme.cfg (edit as necessary) +  * Create necessary files in ''C:\programming\audina\ezFIT5\src\UserDoc\custom''
-      * acme-header.html +    * acme.cfg (edit as necessary) 
-      * acme-footer.html +    * acme-header.html 
-      * images\splash-acme.png +    * acme-footer.html 
-    * Edit product software requirements matrix in ''<src>\UserDoc\104-hi-swrequirementmatrix.txt''+    * images\splash-acme.png 
-    * Edit Sparo conditional references (i.e, if supported by private label) in  +  * Edit product software requirements matrix in ''<src>\UserDoc\104-hi-swrequirementmatrix.txt''
-      * ''<src>\UserDoc\200-howto.txt''+  * Edit Sparo conditional references (i.e, if supported by private label) in  
-      * ''<src>\UserDoc\202-sparo.txt'' +    * ''<src>\UserDoc\200-howto.txt''
-    * Create end-user license in ''C:\programming\audina\ezFIT5\src\installer\license\license-Acme.txt''+    * ''<src>\UserDoc\202-sparo.txt'' 
-  Create custom Autorun +  * Create end-user license in ''C:\programming\audina\ezFIT5\src\installer\license\license-Acme.txt''
-    * Edit logo and application installation instructions in ''<src>\Autorun\main.pas''+ 
-    * Recompile Lazarus project ''<src>\Autorun\Autorun.lpi''+=== Create Custom CD-ROM Image === 
-    * Copy ''Autorun.exe'' to CD Image folder. +Create custom Autorun: 
-  Create CD Image folder in ''C:\programming\audina\ezFIT5\src\cdimg''. Eg:  +  * Edit logo and application installation instructions in ''<src>\Autorun\main.pas''
-    * ''Acme\drivers\'' +  * Recompile Lazarus project ''<src>\Autorun\Autorun.lpi''
-      * EMiniTec-2.08.24-2012-Drivers.exe +  * Copy ''Autorun.exe'' to CD Image folder. 
-      * HIPRO-4.0.0-2012-Drivers.exe + 
-      * NOAHlink-01.56.05-2013-Drivers.exe +Create CD Image folder in ''C:\programming\audina\ezFIT5\src\cdimg''. Eg:  
-      * ProgBox-Drivers-setup-2014-0311.exe +  * ''Acme\drivers\'' 
-    * ''Acme\installers\'' +    * EMiniTec-2.08.24-2012-Drivers.exe 
-      * acmeezfitapp5-setup.exe +    * HIPRO-4.0.0-2012-Drivers.exe 
-      * FBserver-setup.exe +    * NOAHlink-01.56.05-2013-Drivers.exe 
-    * ''Acme\Autorun.exe'' +    * ProgBox-Drivers-setup-2014-0311.exe 
-    * ''Acme\favicon.ico'' +  * ''Acme\installers\'' 
-  * Create NAnt-Gui script to build custom application. +    * acmeezfitapp5-setup.exe 
-  Create AutoUpdate files in webserver (locatee in ''\\webserver\website\downloads\ezfit'', URL ''http://www.audina.net/downloads/ezfit''): +    * FBserver-setup.exe 
-    * ''acmeezfitapp-Acme-2014-AutoUpdater.xml'' +  * ''Acme\Autorun.exe'' 
-    * ''acmeezfitapp-Acme-2014-ReleaseNotes.htm'' +  * ''Acme\favicon.ico'' 
-    * ''acmeezfitapp-Acme-2014-latest.exe''+ 
 +=== Custom Build === 
 +  * Create NAnt-Gui script to build custom application. Eg: ''<src>/installer/build-app-ezfit-acme.build'' 
 + 
 +=== Custom AutoUpdate === 
 +Create AutoUpdate files in webserver (located in ''\\webserver\website\downloads\ezfit'', URL ''http://www.audina.net/downloads/ezfit''): 
 +  * ''acmeezfitapp-Acme-2014-AutoUpdater.xml'' 
 +  * ''acmeezfitapp-Acme-2014-ReleaseNotes.htm'' 
 +  * ''acmeezfitapp-Acme-2014-latest.exe'' 
 + 
 +=== Publishing Scripts ===
   * Add references to software installer in ''/root/upd-ezfit-latest.sh'' in web server: <code bash file upd-ezfit-latest.sh>   * Add references to software installer in ''/root/upd-ezfit-latest.sh'' in web server: <code bash file upd-ezfit-latest.sh>
 #!/bin/bash #!/bin/bash
Line 184: Line 213:
  
 #----------------------------- #-----------------------------
-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
Line 204: Line 237:
 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
  
  
Line 291: 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 312: 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 369: Line 388:
    SYSDATETIME=$(date +%Y%m%d-%H%M)    SYSDATETIME=$(date +%Y%m%d-%H%M)
 } }
-  +
 #------------------------------------------------ #------------------------------------------------
 # GetDateStamp # GetDateStamp