Subversion Repositories filter_foundry

Rev

Rev 241 | Rev 247 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 241 Rev 243
Line 90... Line 90...
90
                }
90
                }
91
        }
91
        }
92
        name[iname++] = '\0';
92
        name[iname++] = '\0';
93
 
93
 
94
#ifdef _WIN64
94
#ifdef _WIN64
95
        return sprintf(newmanifest, manifestp, name, "amd64", VERSION_STR, description);
95
        return sprintf(newmanifest, manifestp, (char*)name, "amd64", VERSION_STR, (char*)description);
96
#else
96
#else
97
        return sprintf(newmanifest, manifestp, name, "x86", VERSION_STR, description);
97
        return sprintf(newmanifest, manifestp, (char*)name, "x86", VERSION_STR, (char*)description);
98
#endif
98
#endif
99
}
99
}
100
 
100
 
101
Boolean doresources(HMODULE srcmod,char *dstname){
101
Boolean doresources(HMODULE srcmod,char *dstname){
102
        HRSRC datarsrc,aetersrc,manifestsrc;
102
        HRSRC datarsrc,aetersrc,manifestsrc;
Line 116... Line 116...
116
//      if(!EnumResourceLanguages(srcmod,"PiPL",MAKEINTRESOURCE(16000),enumfunc,0))
116
//      if(!EnumResourceLanguages(srcmod,"PiPL",MAKEINTRESOURCE(16000),enumfunc,0))
117
//              dbglasterror("EnumResourceLanguages");
117
//              dbglasterror("EnumResourceLanguages");
118
 
118
 
119
        if( (hupdate = _BeginUpdateResource(dstname,false)) ){
119
        if( (hupdate = _BeginUpdateResource(dstname,false)) ){
120
                DBG("BeginUpdateResource OK");
120
                DBG("BeginUpdateResource OK");
121
                if( (datarsrc = FindResource(srcmod,MAKEINTRESOURCE(16000),RT_RCDATA))
121
                if( (datarsrc = FindResource(srcmod,MAKEINTRESOURCE(16000),"TPLT"))
122
                        && (datah = LoadResource(srcmod,datarsrc))
122
                        && (datah = LoadResource(srcmod,datarsrc))
123
                        && (datap = (Ptr)LockResource(datah))
123
                        && (datap = (Ptr)LockResource(datah))
124
                        && (aetersrc = FindResource(srcmod, MAKEINTRESOURCE(16000), "AETE"))
124
                        && (aetersrc = FindResource(srcmod, MAKEINTRESOURCE(16000), "AETE"))
125
                        && (aeteh = LoadResource(srcmod, aetersrc))
125
                        && (aeteh = LoadResource(srcmod, aetersrc))
126
                        && (aetep = (Ptr)LockResource(aeteh))
126
                        && (aetep = (Ptr)LockResource(aeteh))
127
                        && (manifestsrc = FindResource(srcmod, MAKEINTRESOURCE(50), RT_RCDATA))
127
                        && (manifestsrc = FindResource(srcmod, MAKEINTRESOURCE(50), "TPLT"))
128
                        && (manifesth = LoadResource(srcmod, manifestsrc))
128
                        && (manifesth = LoadResource(srcmod, manifestsrc))
129
                        && (manifestp = (Ptr)LockResource(manifesth)) )
129
                        && (manifestp = (Ptr)LockResource(manifesth)) )
130
                {
130
                {
131
                        char newmanifest[5000];
131
                        char newmanifest[5000];
132
 
132
 
Line 163... Line 163...
163
                                for (i = 0; i < 4; ++i)
163
                                for (i = 0; i < 4; ++i)
164
                                        myp2cstr(pparm->map[i]);
164
                                        myp2cstr(pparm->map[i]);
165
                                for (i = 0; i < 8; ++i)
165
                                for (i = 0; i < 8; ++i)
166
                                        myp2cstr(pparm->ctl[i]);
166
                                        myp2cstr(pparm->ctl[i]);
167
 
167
 
-
 
168
                                manifestsize = domanifest(newmanifest, (const char*)manifestp, pparm);
-
 
169
 
168
                                if(gdata->obfusc){
170
                                if(gdata->obfusc){
169
                                        parm_type = RT_RCDATA;
171
                                        parm_type = RT_RCDATA;
170
                                        parm_id = OBFUSCDATA_ID;
172
                                        parm_id = OBFUSCDATA_ID;
171
                                        obfusc((unsigned char*)pparm,sizeof(PARM_T));
173
                                        obfusc((unsigned char*)pparm,sizeof(PARM_T));
172
                                }else{
174
                                }else{
173
                                        parm_type = "PARM";
175
                                        parm_type = "PARM";
174
                                        parm_id = PARM_ID;
176
                                        parm_id = PARM_ID;
175
                                }
177
                                }
176
 
178
 
177
                                manifestsize = domanifest(newmanifest, (const char*)manifestp, pparm);
-
 
178
 
-
 
179
                                /* Attention: The resource we have found using FindResource() might have a different
179
                                /* Attention: The resource we have found using FindResource() might have a different
180
                                   language than the resource we are saving (Neutral), so we might end up having
180
                                   language than the resource we are saving (Neutral), so we might end up having
181
                                   multiple languages for the same resource. Therefore, the language "Neutral" was
181
                                   multiple languages for the same resource. Therefore, the language "Neutral" was
182
                                   set in the Scripting.rc file for the resource AETE and PIPL.rc for the resources PIPL. */
182
                                   set in the Scripting.rc file for the resource AETE and PIPL.rc for the resources PIPL. */
183
                                if( _UpdateResource(hupdate,"PIPL" /* note: caps!! */,MAKEINTRESOURCE(16000), MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),newpipl,(DWORD)piplsize)
183
                                if( _UpdateResource(hupdate,"PIPL" /* note: caps!! */,MAKEINTRESOURCE(16000), MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),newpipl,(DWORD)piplsize)