<src>/ezFIT/images/custom/logos
folder. Add image files to ezFIT project in MS Visual Studio:
<src>/ezFIT/images/custom/icons/icon-acme.ico
<src>/ezFIT/images/custom/logos/logo-acme.png
<src>/ezFIT/images/custom/logos/ezfit-logo-acme.png
<src>/ezFIT/images/custom/splash/splash-acme.png
Types.cs
in AHI.App.Types
assembly. Add new company to TCustomCompany
enum. Eg: Acme = 99
AppCustomization.cs
in AHI.App.Customization
assembly. Add a new company in TCompanyInfoList.CreateDefaultList()
. Eg: #region Company Acme Inc aCompany = new TCompanyInfo(); aCompany.Code = TCustomCompany.Acme; aCompany.ManufacturerID = TManufacturerID.Audina; // Audina manufacturer is used for Private Label aCompany.Name = "Acme Inc."; aCompany.Address = "Main St, SmallTown, FL 32000, USA"; aCompany.Phone = "1-888-HEARING"; aCompany.Fax = ""; aCompany.Email = "info@acme.com"; aCompany.Website = "http://www.acme.com"; aCompany.Logo = "images/custom/logos/logo-acme.png"; this.Add(aCompany); #endregion
AppCustomization.cs
in AHI.App.Customization
assembly. Add a new company in TCompanyAppInfoList.CreateDefaultList()
. Eg: #region Company Acme Inc aCompany = new TCompanyAppInfo(); aCompany.CompanyInfo.Code = TCustomCompany.Acme; aCompany.CompanyInfo.ManufacturerID = TManufacturerID.Audina; // Audina manufacturer is used for Private Label aCompany.CompanyInfo.Name = "Acme Inc."; aCompany.CompanyInfo.Address = "Main St, SmallTown, FL 32000, USA"; aCompany.CompanyInfo.Phone = "1-888-HEARING"; aCompany.CompanyInfo.Fax = ""; aCompany.CompanyInfo.Email = "info@acme.com"; aCompany.CompanyInfo.Website = "http://www.acme.com"; aCompany.CompanyInfo.Logo = "images/custom/logos/logo-acme.png"; SetAppInfo(aCompany, "AcmeEzFITApp"); this.Add(aCompany); #endregion
AppCustomization.cs
in AHI.App.Customization
assembly. Add a new company and software in TAppCustomization.SetAppInfo()
. Eg: ... switch(_Company.Code) { case TCustomCompany.Auditiva: _Application.AppName = "fitPRO"; break; case TCustomCompany.Acme: _Application.AppName = "AcmeEzFITApp"; break; ... default: _Application.AppName = "ezFIT"; break; } ... #endregion
AppCustomizationTest.cs
in AHI.App.Customization
assembly. Add a test cases handling new company and software.ProductSpecs.cs
in AHI.Products.Specifications
assembly.TProductSpecificationList.RefreshList()
, under specified company for the required product.#region Product BTE 675DP+ _prod = new TProductSpecification(); . . . case TCustomCompany.Acme: _prod.Name = "Acme BTE"; this.Add(_prod); break; . . . #endregion
HousingSpecs.cs
in AHI.Products.Specifications
assembly.THousingSpecificationList.RefreshList()
, specify the IsVisible
property for the specified company.#region Housing: BTE_Classic _Housing= new THousingSpecification(); . . . case TCustomCompany.Acme: _Housing.IsVisible = true; break; . . . #endregion
AHI.App.Logo
assembly. C:\programming\audina\ezFIT5\src\AHI.App.Logo\images
.LogoRes.rc
: // 1. Compile resource file LogoRes.rc into LogoRes.res // using the Visual Studio Command Prompt: // - VS2010: Start > All Applications > Microsoft Visual Studio 2010 > Visual Studio Tools > Visual Studio Command Prompt (2010). // - VS2013: Start > All Applications > Visual Studio 2013 > Visual Studio Tools > Developer Command Prompt for VS2013. // - 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) // // 2. Add res file to assembly. Project > Properties > Application (tab) > Resource File, and select LogoRes.res. // 3. Build assembly. LOGO001 BITMAP "images/logo16.bmp" LOGO002 BITMAP "images/logo256.bmp" // Must in Alphabetical order SPLASH_AUDINA BITMAP "images\splash-audina.bmp" SPLASH_ACME BITMAP "images\splash-acme.bmp" ... // Must in Alphabetical order ICON_AUDINA ICON "images\icon-audina.ico" // icon index 0 ICON_ACME ICON "images\icon-acme.ico" // icon index 1 ... // Order numerically, and strings in Alphabetical order STRINGTABLE { 1001, "Audina ezFIT" 1002, "Acme ezFIT" ... }
Make sue AppIconIdx matches the icon index in <src>/installer/installer-ezfit.iss
Generate Logo assembly:
C:\> RC <src>\AHI.App.Logo\LogoRes.rc
(or C:> <src>\AHI.App.Logo\compile-resources.bat
)LogoRes.res
.<src>/EncodeUtil/bin/Debug/EncodeUtil.exe
. Eg: Acme
, when encrypted becomes McFQ/ZiAWwo=
. <src>/installer/installer-ezfit.iss
: #if AppCustomOrg == "Audina" ... #elif AppCustomOrg == "Acme" #define AppTitle "Acme ezFIT" #define AppPath "Acme\ezFIT5" #define AppGroup "Acme ezFIT " + AppVersion #define AppIconIdx 14 #define AppPublisherName "Acme" #define AppPublisherWebsite "http://www.acme.com" #define AppRegKey "Software\Audina Hearing Instruments\ezFIT\5.0\Setup" #define AppDestName "acmeezfitapp" #define AppCustomCode "McFQ/ZiAWwo=" #else ... #endif
Make sue AppIconIdx matches the icon index in <src>\src\AHI.App.Logo\LogoRes.rc
<src>\ezFIT\Products\Catalog\<CompanyName>
;--------------------------------------------------- ; Product Catalog ;--------------------------------------------------- #if AppCustomOrg == "Acme" Source: ..\ezFIT\Products\Catalog\{#AppCustomOrg}\*.pdf; DestDir: {app}\Products\Catalog; Flags: ignoreversion #else Source: {#SrcAppDir}\Products\Catalog\*.pdf; DestDir: {app}\Products\Catalog; Flags: ignoreversion #endif
Add software installer customizations
#if AppCustomOrg == "Acme" ; Do not install ezFIT4 #else Filename: {tmp}\{#AppDestName}4-setup-{#AppCustomOrg}.exe; ... #endif
C:\programming\audina\ezFIT5\src\UserDoc\custom
.<src>\UserDoc\104-hi-swrequirementmatrix.txt
.<src>\UserDoc\200-howto.txt
.<src>\UserDoc\202-sparo.txt
C:\programming\audina\ezFIT5\src\installer\license\license-Acme.txt
.Create custom Autorun:
<src>\Autorun\main.pas
.<src>\Autorun\Autorun.lpi
.Autorun.exe
to CD Image folder.
Create CD Image folder in C:\programming\audina\ezFIT5\src\cdimg
. Eg:
Acme\drivers\
Acme\installers\
Acme\Autorun.exe
Acme\favicon.ico
<src>/installer/build-app-ezfit-acme.build
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
/root/upd-ezfit-latest.sh
in web server: #!/bin/bash ## script: ./upd-ezfit-latest.sh # #------------------------------------------------------------------------------ # Description: Update latest ezFIT installer # Usage: # Format: # Current date: % ./upd-ezfit-latest.sh # Arbitrary date: % ./upd-ezfit-latest.sh [YYYY-MMDD] # YYYY - Year (4 digits). # MM - Month (always 2 digits, including leading zero if necessary). # DD - Day of month (always 2 digitis, including leading zero if necessary). # Example: % ./publish-ezfit-latest.sh 2014-0422 #------------------------------------------------------------------------------ #----------------------------- # User Defined Variables #----------------------------- # Define Target Organizations TARGETORG=( "Audina" "Auditiva" "iEar" "MDHearingAid" "Acme" ) # Define Target Directory TARGETDIR="/var/www/downloads/prototypes" # Time Stamp (formatted as SYSDATESTAMP="2013-0117") SYSDATESTAMP=$(date +%Y-%m%d) SYSDATEYEAR=$(date +%Y) #----------------------------- # Use command line argument to override variables if [ -n "$1" ] then echo "Current version $SYSDATESTAMP will be ovewritten with $1" SYSDATESTAMP="$1" SYSDATEYEAR=${SYSDATESTAMP:0:4} fi # Try to create TargetDir if it does not exist if ! cd $TARGETDIR; then mkdir $TARGETDIR fi totalOrg=${#TARGETORG[*]} idx=0 while [ $idx -lt $totalOrg ]; do ORG=${TARGETORG[$idx]} #echo "Processing company $ORG" # Perform operations if TargetDir exists if cd $TARGETDIR; then #----------------------------- # Link current ezfit installer to ezfit-latest.exe #----------------------------- rm ezfit-$ORG-$SYSDATEYEAR-latest.exe ln -s ezfit-setup-$ORG-$SYSDATESTAMP.exe ezfit-$ORG-$SYSDATEYEAR-latest.exe echo "Success linking version $SYSDATESTAMP to ezfit-setup-$ORG-$SYSDATEYEAR-latest.exe" else echo "Failed to link version $SYSDATESTAMP to ezfit-ORG-$SYSDATEYEAR-latest.exe" fi let idx=idx+1 done #------------------------------------------------ # GetDate #------------------------------------------------ function GetDate() { SYSDATE=$(date +%Y%m%d) } #------------------------------------------------ # GetDateTime #------------------------------------------------ function GetDateTime() { SYSDATETIME=$(date +%Y%m%d-%H%M) } #------------------------------------------------ # GetDateStamp #------------------------------------------------ function GetDateStamp() { SYSDATESTAMP=$(date +%Y-%m%d) } #------------------------------------------------ # GetDate #------------------------------------------------ function GetYear() { SYSDATEYEAR=$(date +%Y) } #------------------------------------------------ # DisplayDate #------------------------------------------------ function DisplayDate() { if [ ! -z $SYSDATE ]; then echo $SYSDATE else echo "SYSDATE not defined. Define using GetDate()" fi }
/root/publish-ezfit-latest.sh
in web server: #!/bin/bash ## script: ./publish-ezfit-latest.sh # #------------------------------------------------------------------------------ # Description: Publish ezFIT installer to AutoUpdate website # Usage: # Format: # Current date: % ./publish-ezfit-latest.sh # Arbitrary date: % ./publish-ezfit-latest.sh [YYYY-MMDD] # YYYY - Year (4 digits). # MM - Month (always 2 digits, including leading zero if necessary). # DD - Day of month (always 2 digitis, including leading zero if necessary). # Example: % ./publish-ezfit-latest.sh 2014-0422 #------------------------------------------------------------------------------ #----------------------------- # User Defined Variables #----------------------------- TARGETORG=( "Audina" "Auditiva" "iEar" "MDHearingAid" "Acme" ) TARGETAPP=( "ezfit" "fitpro" "accufit" "mdtune" "acmefitapp" ) SOURCEDIR="/var/www/downloads/prototypes" TARGETDIR="/var/www/downloads/ezfit" #SYSDATESTAMP="2013-0117" SYSDATESTAMP=$(date +%Y-%m%d) SYSDATEYEAR=$(date +%Y) # Use command line argument to override variables if [ -n "$1" ] then echo "Current version $SYSDATESTAMP will be ovewritten with $1" SYSDATESTAMP="$1" SYSDATEYEAR=${SYSDATESTAMP:0:4} fi # Try to create TargetDir if it does not exist if ! cd $TARGETDIR; then mkdir $TARGETDIR fi totalOrg=${#TARGETORG[*]} idx=0 while [ $idx -lt $totalOrg ]; do ORG=${TARGETORG[$idx]} APP=${TARGETAPP[$idx]} #echo "Processing company $ORG and app $APP" # Perform operations if TargetDir exists if cd $TARGETDIR; then #----------------------------- # Link current ezfit installer to ezfit-latest.exe #----------------------------- rm $APP-$ORG-$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 echo "Failed to link version $SYSDATEYEAR to $APP-$ORG-$SYSDATEYEAR-latest.exe" fi let idx=idx+1 done #------------------------------------------------ # GetDate #------------------------------------------------ function GetDate() { SYSDATE=$(date +%Y%m%d) } #------------------------------------------------ # GetDateTime #------------------------------------------------ function GetDateTime() { SYSDATETIME=$(date +%Y%m%d-%H%M) } #------------------------------------------------ # GetDateStamp #------------------------------------------------ function GetDateStamp() { SYSDATESTAMP=$(date +%Y-%m%d) } #------------------------------------------------ # GetDate #------------------------------------------------ function GetYear() { SYSDATEYEAR=$(date +%Y) } #------------------------------------------------ # DisplayDate #------------------------------------------------ function DisplayDate() { if [ ! -z $SYSDATE ]; then echo $SYSDATE else echo "SYSDATE not defined. Define using GetDate()" fi }
aCompany.ManufacturerID = TManufacturerID.Custom // Custom manufacturer is used for Private Brand