localisation/apparchitecture/group/ExeMove.mk
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 #
       
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of the License "Symbian Foundation License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description:
       
    15 #
       
    16 
       
    17 EXESOURCEDIR = %EPOCROOT%epoc32\release\winscw\udeb
       
    18 EXEDESTDIR = %EPOCROOT%epoc32\release\$(PLATFORM)\udeb\z\HelloV2_C
       
    19 EXEDESTDIR_CONTENTS = $(EXEDESTDIR)\*.*
       
    20 EMPTYDIR = %EPOCROOT%epoc32\release\$(PLATFORM)\udeb\z\System\data\Testpath\Empty
       
    21 
       
    22 EXENAME = HelloV2_C.exe
       
    23 REGNAME = HelloV2_C_reg.rsc
       
    24 RSRCNAME = HelloV2_C.rsc
       
    25 
       
    26 EXENAME_Z = HelloV2.exe
       
    27 
       
    28 SADEXENAME = HelloV2NoIke.exe
       
    29 SADREGNAME = HelloV2NoIke_reg.rsc
       
    30 
       
    31 MBMNAME = HelloV2_C_icon.mbm
       
    32 MBMNAME_DEFAULT_ROOT = default_app_icon.mbm
       
    33 MBMNAME_C_APP_ROOT = HelloV2_C_icon.mbm
       
    34 MBMNAME_Z_APP_ROOT = HelloV2_icon.mbm
       
    35 MBMNAME_Z_APP_NOIKE_ROOT = HelloV2NoIkeIcon.mbm
       
    36 
       
    37 RSRCAPPSPATH = %EPOCROOT%epoc32\winscw\c\Resource\Apps
       
    38 RSRCPATH = %EPOCROOT%epoc32\winscw\c\Resource
       
    39 REGPATH = %EPOCROOT%epoc32\winscw\c\private\10003a3f\Apps
       
    40 
       
    41 ALTICONSDIR = %EPOCROOT%epoc32\winscw\c\AltIcons
       
    42 ALTICONSCONTENTS = $(ALTICONSDIR)\*.*
       
    43 ALTICONSDIR_Z = %EPOCROOT%epoc32\winscw\c\AltIcons\Z
       
    44 ALTICONSCONTENTS_Z = $(ALTICONSDIR)\Z\*.*
       
    45 
       
    46 ALTICONS_REPOSITORY = %EPOCROOT%epoc32\release\$(PLATFORM)\udeb\z\IconStore
       
    47 ALTICONS_REPOSITORY_CONTENTS = $(ALTICONS_REPOSITORY)\*.*
       
    48 ALTICONS_MBMNAME_C_APP = HelloV2_C_icon.mbm
       
    49 ALTICONS_SOURCE_MBMNAME_C_APP = ..\tsrc\HelloV2_C\AltIcon\$(ALTICONS_MBMNAME_C_APP)
       
    50 ALTICONS_MBMNAME_Z_APP = HelloV2_icon.mbm
       
    51 ALTICONS_SOURCE_MBMNAME_Z_APP = ..\tsrc\HelloV2\AltIcon\$(ALTICONS_MBMNAME_Z_APP)
       
    52 ALTICONS_SOURCE_MBMNAME_Z_APP_NOIKE = ..\tsrc\HelloV2NoIke\HelloV2NoIkeIcon.mbm
       
    53 ALTICONS_MBMNAME_Z_APP_NOIKE = HelloV2NoIkeIcon.mbm
       
    54 ALTICONS_MBMNAME_DEFAULT_ICON = default_app_icon.mbm
       
    55 ALTICONS_SOURCE_MBMNAME_DEFAULT_ICON = ..\tsrc\HelloV2NoIke\default_app_icon.mbm
       
    56 
       
    57 SYSDIR = %EPOCROOT%epoc32\winscw\c\sys
       
    58 BINDIR = $(SYSDIR)\bin
       
    59 SYSDIR_Z = %EPOCROOT%epoc32\release\winscw\udeb\z\sys
       
    60 BINDIR_Z = $(SYSDIR_Z)\bin
       
    61 
       
    62 ROMBUILD_TEMP = %EPOCROOT%epoc32\release\IconsTemp
       
    63 ROMBUILD_TEMP_CONTENTS = %EPOCROOT%epoc32\release\IconsTemp\*.*
       
    64 
       
    65 CROOTDIR = %EPOCROOT%epoc32\winscw\c
       
    66 
       
    67 MAKMAKE FREEZE LIB CLEANLIB RESOURCE RELEASABLES BLD SAVESPACE:
       
    68 
       
    69 !IF ("$(PLATFORM)" == "WINSCW")
       
    70 
       
    71 FINAL :
       
    72 #	Make the C-based-app file repository on Z
       
    73 	echo Creating $(EXEDESTDIR) for $(PLATFORM)
       
    74 	-mkdir $(EXEDESTDIR) 2>NUL
       
    75 	echo .
       
    76 
       
    77 #	Move the C-based exe from the release directory to the app-file repository on Z
       
    78 	echo Moving $(EXENAME) for $(PLATFORM) to $(EXEDESTDIR)
       
    79 	-move $(EXESOURCEDIR)\$(EXENAME) $(EXEDESTDIR)\$(EXENAME)
       
    80 	echo .
       
    81 
       
    82 #	Make the folder on C for resource files
       
    83 	echo Creating $(RSRCAPPSPATH)
       
    84 	-mkdir $(RSRCPATH)
       
    85 	-mkdir $(RSRCAPPSPATH)
       
    86 	echo .
       
    87 
       
    88 #	Make the folder on C for registration files
       
    89 	echo Creating $(REGPATH)
       
    90 	-mkdir $(REGPATH)
       
    91 	echo .
       
    92 
       
    93 #	Move the Z-based exe from the release directory to the sys\bin on Z
       
    94 	echo Moving $(EXENAME_Z) for $(PLATFORM) to $(BINDIR_Z)\$(EXENAME_Z)
       
    95 	-move $(EXESOURCEDIR)\$(EXENAME_Z) $(BINDIR_Z)\$(EXENAME_Z)
       
    96 	echo .
       
    97 
       
    98 	echo Copying the Alt-Icons to repository on Z
       
    99 	-mkdir $(ALTICONS_REPOSITORY)
       
   100 	-copy $(ALTICONS_SOURCE_MBMNAME_C_APP) $(ALTICONS_REPOSITORY)\$(ALTICONS_MBMNAME_C_APP)
       
   101 	-copy $(ALTICONS_SOURCE_MBMNAME_Z_APP) $(ALTICONS_REPOSITORY)\$(ALTICONS_MBMNAME_Z_APP)
       
   102 	-copy $(ALTICONS_SOURCE_MBMNAME_Z_APP_NOIKE) $(ALTICONS_REPOSITORY)\$(ALTICONS_MBMNAME_Z_APP_NOIKE)
       
   103 	-copy $(ALTICONS_SOURCE_MBMNAME_DEFAULT_ICON) $(ALTICONS_REPOSITORY)\$(ALTICONS_MBMNAME_DEFAULT_ICON)
       
   104 
       
   105 #	Create 'Empty' folder for T_Serv2 tests
       
   106 	echo Creating $(EMPTYDIR) for $(PLATFORM)
       
   107 	-mkdir $(EMPTYDIR) 2>NUL
       
   108 	echo .
       
   109 
       
   110 
       
   111 CLEAN :
       
   112 #	Removing files from drive Z, the C-app-file repository
       
   113     echo Deleting $(EXEDESTDIR_CONTENTS) for $(PLATFORM)
       
   114     -del /q $(EXEDESTDIR_CONTENTS) 2>NUL
       
   115 	echo .
       
   116 
       
   117 #	Remove the drive Z, C-app-file repository
       
   118 	echo Removing $(EXEDESTDIR) if empty for $(PLATFORM)
       
   119     -rmdir $(EXEDESTDIR) 2>NUL
       
   120 	echo .
       
   121 
       
   122 #	Remove the Z-based exe from the bin directory
       
   123     echo Deleting $(BINDIR_Z)\$(EXENAME_Z) for $(PLATFORM)
       
   124     -del $(BINDIR_Z)\$(EXENAME_Z) 2>NUL
       
   125 	echo .
       
   126 
       
   127 #	Remove the C-based exe from the bin directory
       
   128     echo Deleting $(BINDIR)\$(EXENAME) for $(PLATFORM)
       
   129     -del $(BINDIR)\$(EXENAME) 2>NUL
       
   130 	echo .
       
   131 
       
   132 	echo Removing $(BINDIR) if empty for $(PLATFORM)
       
   133     -rmdir $(BINDIR) 2>NUL
       
   134 	echo .
       
   135 
       
   136 	echo Removing $(SYSDIR) if empty for $(PLATFORM)
       
   137     -rmdir $(SYSDIR) 2>NUL
       
   138 	echo .
       
   139 
       
   140 #	Remove the alt-icon files  for Z-based apps
       
   141 	echo Deleting $(ALTICONSCONTENTS_Z) for $(PLATFORM)
       
   142 	-del /q $(ALTICONSCONTENTS_Z)
       
   143 	echo .
       
   144 
       
   145 	echo Removing $(ALTICONSDIR_Z) directory for $(PLATFORM)
       
   146 	-rmdir $(ALTICONSDIR_Z)
       
   147 	echo .
       
   148 
       
   149 #	Remove the alt-icon files  for C-based apps
       
   150 	echo Deleting $(ALTICONSCONTENTS) for $(PLATFORM)
       
   151 	-del /q $(ALTICONSCONTENTS)
       
   152 	echo .
       
   153 
       
   154 	echo Removing $(ALTICONSDIR) directory for $(PLATFORM)
       
   155 	-rmdir $(ALTICONSDIR)
       
   156 	echo .
       
   157 
       
   158 	echo Removing the alt-icons repository
       
   159 	-del /q $(ALTICONS_REPOSITORY_CONTENTS)
       
   160 	-rmdir $(ALTICONS_REPOSITORY)
       
   161 	echo .
       
   162 
       
   163 #	Uninstall the C-based app
       
   164 	echo Deleting registration file $(REGPATH)\$(REGNAME) for $(PLATFORM)
       
   165 	-del $(REGPATH)\$(REGNAME)
       
   166 	echo .
       
   167 
       
   168 	echo Removing $(REGPATH) if empty for $(PLATFORM)
       
   169 	-rmdir $(REGPATH) 
       
   170 	echo .
       
   171 
       
   172 	echo Removing $(RSRCAPPSPATH)\$(RSRCNAME) for $(PLATFORM)
       
   173 	-del $(RSRCAPPSPATH)\$(RSRCNAME)
       
   174 	echo .
       
   175 
       
   176 	echo Deleting $(RSRCAPPSPATH)\$(MBMNAME) for $(PLATFORM)
       
   177 	-del $(RSRCAPPSPATH)\$(MBMNAME)
       
   178 	echo .
       
   179 
       
   180 	echo Removing $(RSRCAPPSPATH) if empty for $(PLATFORM)
       
   181 	-rmdir $(RSRCAPPSPATH)
       
   182 	echo .
       
   183 
       
   184 	echo Removing $(RSRCPATH) if empty for $(PLATFORM)
       
   185 	-rmdir $(RSRCPATH)
       
   186 	echo .
       
   187 
       
   188 	echo Deleting MBM files in the root of emulated drive-C
       
   189 	echo .
       
   190 	echo $(CROOTDIR)\$(MBMNAME_DEFAULT_ROOT)
       
   191 	-del $(CROOTDIR)\$(MBMNAME_DEFAULT_ROOT)
       
   192 	echo $(CROOTDIR)\$(MBMNAME_DEFAULT_ROOT)
       
   193 	-del $(CROOTDIR)\$(MBMNAME_C_APP_ROOT)
       
   194 	echo $(CROOTDIR)\$(MBMNAME_DEFAULT_ROOT)
       
   195 	-del $(CROOTDIR)\$(MBMNAME_Z_APP_ROOT)
       
   196 	echo $(CROOTDIR)\$(MBMNAME_Z_APP_NOIKE_ROOT)
       
   197 	-del $(CROOTDIR)\$(MBMNAME_Z_APP_NOIKE_ROOT)
       
   198 	echo .
       
   199 
       
   200 #	Remove the "Empty" dir from the drive Z
       
   201 	echo Removing $(EMPTYDIR) if empty for $(PLATFORM)
       
   202     -rmdir $(EMPTYDIR) 2>NUL
       
   203 	echo .
       
   204 !ELSE
       
   205 FINAL :
       
   206 	echo Copying AltIcons to temp directory
       
   207 	-mkdir $(ROMBUILD_TEMP) 2>NUL
       
   208 	-copy $(ALTICONS_SOURCE_MBMNAME_C_APP)	$(ROMBUILD_TEMP)
       
   209 	-copy $(ALTICONS_SOURCE_MBMNAME_Z_APP) $(ROMBUILD_TEMP)
       
   210 	-copy $(ALTICONS_SOURCE_MBMNAME_Z_APP_NOIKE) $(ROMBUILD_TEMP)
       
   211 	-copy $(ALTICONS_SOURCE_MBMNAME_DEFAULT_ICON) $(ROMBUILD_TEMP)	
       
   212 CLEAN :
       
   213 	-del /q $(ROMBUILD_TEMP_CONTENTS) 2>NUL
       
   214 	-rmdir $(ROMBUILD_TEMP) 2>NUL
       
   215 
       
   216 !ENDIF