Change .c4u extension to .ocu

Armin Burgmeier 2011-03-13 17:09:17 +01:00
parent 8ff1667533
commit c1f340a74a
12 changed files with 24 additions and 24 deletions

View File

@ -723,7 +723,7 @@ EXTRA_DIST = \
src/res/Play2.bmp \
src/res/Brush2.bmp \
src/res/oci.ico \
src/res/c4u.ico \
src/res/ocu.ico \
src/res/Cursor.bmp \
src/res/Grab.bmp \
src/res/Line.bmp \

View File

@ -389,7 +389,7 @@ void C4Application::ParseCommandLine(int argc, char * argv[])
continue;
}
// Update file
if (SEqualNoCase(GetExtension(szParameter),"c4u"))
if (SEqualNoCase(GetExtension(szParameter),"ocu"))
{
Application.IncomingUpdate.Copy(szParameter);
continue;

View File

@ -115,7 +115,7 @@ bool C4Group_ApplyUpdate(C4Group &hGroup, unsigned long ParentProcessID)
// Process binary update group (AutoUpdate.txt found, additional binary files found)
if (hGroup.EntryCount(C4CFN_UpdateCore))
if (hGroup.EntryCount() - hGroup.EntryCount(C4CFN_UpdateCore) - hGroup.EntryCount("*.c4u") > 0)
if (hGroup.EntryCount() - hGroup.EntryCount(C4CFN_UpdateCore) - hGroup.EntryCount("*.ocu") > 0)
{
// Notice: AutoUpdate.txt is currently not processed...
char strEntry[_MAX_FNAME + 1] = "";
@ -124,8 +124,8 @@ bool C4Group_ApplyUpdate(C4Group &hGroup, unsigned long ParentProcessID)
hGroup.ResetSearch();
// Look for binaries
while (hGroup.FindNextEntry("*", strEntry))
// Accept everything except *.c4u, AutoUpdate.txt, and c4group.exe (which is assumed not to work under Windows)
if (!WildcardMatch("*.c4u", strEntry) && !WildcardMatch(C4CFN_UpdateCore, strEntry) && !WildcardMatch("c4group.exe", strEntry))
// Accept everything except *.ocu, AutoUpdate.txt, and c4group.exe (which is assumed not to work under Windows)
if (!WildcardMatch("*.ocu", strEntry) && !WildcardMatch(C4CFN_UpdateCore, strEntry) && !WildcardMatch("c4group.exe", strEntry))
{ strList += strEntry; strList += ";"; }
// Extract binaries to current working directory
if (!hGroup.Extract(strList.getData()))
@ -140,14 +140,14 @@ bool C4Group_ApplyUpdate(C4Group &hGroup, unsigned long ParentProcessID)
}
}
// Process any child updates (*.c4u)
if (hGroup.FindEntry("*.c4u"))
// Process any child updates (*.ocu)
if (hGroup.FindEntry("*.ocu"))
{
// Process all children
char strEntry[_MAX_FNAME + 1] = "";
C4Group hChild;
hGroup.ResetSearch();
while (hGroup.FindNextEntry("*.c4u", strEntry))
while (hGroup.FindNextEntry("*.ocu", strEntry))
if (hChild.OpenAsChild(&hGroup, strEntry))
{
bool ok = C4Group_ApplyUpdate(hChild, 0);

View File

@ -518,7 +518,7 @@ int main(int argc, char *argv[])
printf(" -x:<command> Execute shell command when done\n");
printf("\n");
printf("Examples: c4group pack.ocg -x\n");
printf(" c4group update.c4u -g ver1.ocf ver2.ocf New_Version\n");
printf(" c4group update.ocu -g ver1.ocf ver2.ocf New_Version\n");
printf(" c4group -i\n");
}

View File

@ -16,7 +16,7 @@
* See clonk_trademark_license.txt for full license.
*/
// HTTP download dialog; downloads a file
// (like, e.g., a .c4u update group)
// (like, e.g., a .ocu update group)
#ifndef INC_C4DownloadDlg
#define INC_C4DownloadDlg

View File

@ -220,7 +220,7 @@ bool C4UpdateDlg::ApplyUpdate(const char *strUpdateFile, bool fDeleteUpdate, C4G
// ASK: What is this? Why should an update program not be found at the top
// level? This seems obsolete. - Newton
// Not found: look for an engine update pack one level down
if (UpdateGroup.FindEntry(FormatString("cr_*_%s.c4u", C4_OS).getData(), strSubGroup))
if (UpdateGroup.FindEntry(FormatString("cr_*_%s.ocu", C4_OS).getData(), strSubGroup))
// Extract update program from sub group
if (SubGroup.OpenAsChild(&UpdateGroup, strSubGroup))
{

View File

@ -58,14 +58,14 @@ bool SetC4FileClasses(const char *szEnginePath)
if (!SetRegFileClass("OpenClonk.Binary", ,"ocb", "OpenClonk Binary", szEnginePath, 8, "application/octet-stream")) return false;
if (!SetRegFileClass("OpenClonk.Video", ,"ocv", "OpenClonk Video", szEnginePath, 9, "video/avi")) return false;
if (!SetRegFileClass("OpenClonk.Weblink", ,"ocl", "OpenClonk Weblink", szEnginePath, 10, C4FileClassContentType)) return false;
if (!SetRegFileClass("Clonk4.Update", "c4u", "Clonk 4 Update", szEnginePath, 11, C4FileClassContentType)) return false;
if (!SetRegFileClass("OpenClonk.Update", ,"ocu", "OpenClonk Update", szEnginePath, 11, C4FileClassContentType)) return false;
if (!SetProtocol("clonk", "%s %%1 /Fullscreen", szEnginePath)) return false;
char strCommand[2048];
// c4u application: send to engine
// ocu application: send to engine
sprintf(strCommand, "\"%s\" \"%%1\"", szEnginePath);
if (!SetRegShell("Clonk4.Update", "Update", "Update", strCommand, true)) return false;
if (!SetRegShell("OpenClonk.Update", "Update", "Update", strCommand, true)) return false;
// kill old App Paths registration
DeleteRegistryKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Clonk.exe");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@ -42,7 +42,7 @@ IDI_08_OCM ICON DISCARDABLE "ocm.ico"
IDI_09_OCB ICON DISCARDABLE "ocb.ico"
IDI_10_OCV ICON DISCARDABLE "ocv.ico"
IDI_11_OCL ICON DISCARDABLE "ocl.ico"
IDI_13_C4U ICON DISCARDABLE "c4u.ico"
IDI_13_OCU ICON DISCARDABLE "ocu.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////

BIN
src/res/ocu.ico 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -69,7 +69,7 @@
#define IDI_09_OCB 4009
#define IDI_10_OCV 4010
#define IDI_11_OCL 4011
#define IDI_13_C4U 4013
#define IDI_13_OCU 4013
#define IDM_FILE_CLOSE 5003
#define IDM_FILE_OPEN 5004
#define IDM_FILE_OPENWPLRS 5005

View File

@ -123,8 +123,8 @@ Section -Post
WriteRegStr HKCR ".ocv\Content Type" "" "video/avi"
WriteRegStr HKCR ".ocl" "" "OpenClonk.Weblink"
WriteRegStr HKCR ".ocl\Content Type" "" "vnd.clonk.c4group"
WriteRegStr HKCR ".c4u" "" "Clonk4.Update"
WriteRegStr HKCR ".c4u\Content Type" "" "vnd.clonk.c4group"
WriteRegStr HKCR ".ocu" "" "OpenClonk.Update"
WriteRegStr HKCR ".ocu\Content Type" "" "vnd.clonk.c4group"
; Register file classes
WriteRegStr HKCR "OpenClonk.Scenario" "" "OpenClonk Scenario"
WriteRegStr HKCR "OpenClonk.Scenario\DefaultIcon" "" "$INSTDIR\Clonk.exe,1"
@ -146,11 +146,11 @@ Section -Post
WriteRegStr HKCR "OpenClonk.Video\DefaultIcon" "" "$INSTDIR\Clonk.exe,9"
WriteRegStr HKCR "OpenClonk.Weblink" "" "OpenClonk Weblink"
WriteRegStr HKCR "OpenClonk.Weblink\DefaultIcon" "" "$INSTDIR\Clonk.exe,10"
WriteRegStr HKCR "Clonk4.Update" "" "Clonk 4 Update"
WriteRegStr HKCR "Clonk4.Update\DefaultIcon" "" "$INSTDIR\Clonk.exe,11"
WriteRegStr HKCR "OpenClonk.Update" "" "OpenClonk Update"
WriteRegStr HKCR "OpenClonk.Update\DefaultIcon" "" "$INSTDIR\Clonk.exe,11"
; Register additional file handling
WriteRegStr HKCR "Clonk4.Update\Shell\Update" "" "Update"
WriteRegStr HKCR "Clonk4.Update\Shell\Update\Command" "" "$\"$INSTDIR\Clonk.exe$\" $\"%1$\""
WriteRegStr HKCR "OpenClonk.Update\Shell\Update" "" "Update"
WriteRegStr HKCR "OpenClonk.Update\Shell\Update\Command" "" "$\"$INSTDIR\Clonk.exe$\" $\"%1$\""
; Remove old use of App Paths
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\Clonk.exe"
SectionEnd
@ -215,8 +215,8 @@ Section Uninstall
DeleteRegKey HKCR "OpenClonk.Video"
DeleteRegKey HKCR ".ocl"
DeleteRegKey HKCR "OpenClonk.Weblink"
DeleteRegKey HKCR ".c4u"
DeleteRegKey HKCR "Clonk4.Update"
DeleteRegKey HKCR ".ocu"
DeleteRegKey HKCR "OpenClonk.Update"
; Start menu shortcuts (All Users)
SetShellVarContext all