forked from Mirrors/openclonk
Change .c4u extension to .ocu
parent
8ff1667533
commit
c1f340a74a
|
@ -723,7 +723,7 @@ EXTRA_DIST = \
|
||||||
src/res/Play2.bmp \
|
src/res/Play2.bmp \
|
||||||
src/res/Brush2.bmp \
|
src/res/Brush2.bmp \
|
||||||
src/res/oci.ico \
|
src/res/oci.ico \
|
||||||
src/res/c4u.ico \
|
src/res/ocu.ico \
|
||||||
src/res/Cursor.bmp \
|
src/res/Cursor.bmp \
|
||||||
src/res/Grab.bmp \
|
src/res/Grab.bmp \
|
||||||
src/res/Line.bmp \
|
src/res/Line.bmp \
|
||||||
|
|
|
@ -389,7 +389,7 @@ void C4Application::ParseCommandLine(int argc, char * argv[])
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Update file
|
// Update file
|
||||||
if (SEqualNoCase(GetExtension(szParameter),"c4u"))
|
if (SEqualNoCase(GetExtension(szParameter),"ocu"))
|
||||||
{
|
{
|
||||||
Application.IncomingUpdate.Copy(szParameter);
|
Application.IncomingUpdate.Copy(szParameter);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -115,7 +115,7 @@ bool C4Group_ApplyUpdate(C4Group &hGroup, unsigned long ParentProcessID)
|
||||||
|
|
||||||
// Process binary update group (AutoUpdate.txt found, additional binary files found)
|
// Process binary update group (AutoUpdate.txt found, additional binary files found)
|
||||||
if (hGroup.EntryCount(C4CFN_UpdateCore))
|
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...
|
// Notice: AutoUpdate.txt is currently not processed...
|
||||||
char strEntry[_MAX_FNAME + 1] = "";
|
char strEntry[_MAX_FNAME + 1] = "";
|
||||||
|
@ -124,8 +124,8 @@ bool C4Group_ApplyUpdate(C4Group &hGroup, unsigned long ParentProcessID)
|
||||||
hGroup.ResetSearch();
|
hGroup.ResetSearch();
|
||||||
// Look for binaries
|
// Look for binaries
|
||||||
while (hGroup.FindNextEntry("*", strEntry))
|
while (hGroup.FindNextEntry("*", strEntry))
|
||||||
// Accept everything except *.c4u, AutoUpdate.txt, and c4group.exe (which is assumed not to work under Windows)
|
// Accept everything except *.ocu, 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))
|
if (!WildcardMatch("*.ocu", strEntry) && !WildcardMatch(C4CFN_UpdateCore, strEntry) && !WildcardMatch("c4group.exe", strEntry))
|
||||||
{ strList += strEntry; strList += ";"; }
|
{ strList += strEntry; strList += ";"; }
|
||||||
// Extract binaries to current working directory
|
// Extract binaries to current working directory
|
||||||
if (!hGroup.Extract(strList.getData()))
|
if (!hGroup.Extract(strList.getData()))
|
||||||
|
@ -140,14 +140,14 @@ bool C4Group_ApplyUpdate(C4Group &hGroup, unsigned long ParentProcessID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process any child updates (*.c4u)
|
// Process any child updates (*.ocu)
|
||||||
if (hGroup.FindEntry("*.c4u"))
|
if (hGroup.FindEntry("*.ocu"))
|
||||||
{
|
{
|
||||||
// Process all children
|
// Process all children
|
||||||
char strEntry[_MAX_FNAME + 1] = "";
|
char strEntry[_MAX_FNAME + 1] = "";
|
||||||
C4Group hChild;
|
C4Group hChild;
|
||||||
hGroup.ResetSearch();
|
hGroup.ResetSearch();
|
||||||
while (hGroup.FindNextEntry("*.c4u", strEntry))
|
while (hGroup.FindNextEntry("*.ocu", strEntry))
|
||||||
if (hChild.OpenAsChild(&hGroup, strEntry))
|
if (hChild.OpenAsChild(&hGroup, strEntry))
|
||||||
{
|
{
|
||||||
bool ok = C4Group_ApplyUpdate(hChild, 0);
|
bool ok = C4Group_ApplyUpdate(hChild, 0);
|
||||||
|
|
|
@ -518,7 +518,7 @@ int main(int argc, char *argv[])
|
||||||
printf(" -x:<command> Execute shell command when done\n");
|
printf(" -x:<command> Execute shell command when done\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Examples: c4group pack.ocg -x\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");
|
printf(" c4group -i\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* See clonk_trademark_license.txt for full license.
|
* See clonk_trademark_license.txt for full license.
|
||||||
*/
|
*/
|
||||||
// HTTP download dialog; downloads a file
|
// HTTP download dialog; downloads a file
|
||||||
// (like, e.g., a .c4u update group)
|
// (like, e.g., a .ocu update group)
|
||||||
|
|
||||||
#ifndef INC_C4DownloadDlg
|
#ifndef INC_C4DownloadDlg
|
||||||
#define INC_C4DownloadDlg
|
#define INC_C4DownloadDlg
|
||||||
|
|
|
@ -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
|
// ASK: What is this? Why should an update program not be found at the top
|
||||||
// level? This seems obsolete. - Newton
|
// level? This seems obsolete. - Newton
|
||||||
// Not found: look for an engine update pack one level down
|
// 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
|
// Extract update program from sub group
|
||||||
if (SubGroup.OpenAsChild(&UpdateGroup, strSubGroup))
|
if (SubGroup.OpenAsChild(&UpdateGroup, strSubGroup))
|
||||||
{
|
{
|
||||||
|
|
|
@ -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.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.Video", ,"ocv", "OpenClonk Video", szEnginePath, 9, "video/avi")) return false;
|
||||||
if (!SetRegFileClass("OpenClonk.Weblink", ,"ocl", "OpenClonk Weblink", szEnginePath, 10, C4FileClassContentType)) 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;
|
if (!SetProtocol("clonk", "%s %%1 /Fullscreen", szEnginePath)) return false;
|
||||||
|
|
||||||
char strCommand[2048];
|
char strCommand[2048];
|
||||||
// c4u application: send to engine
|
// ocu application: send to engine
|
||||||
sprintf(strCommand, "\"%s\" \"%%1\"", szEnginePath);
|
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
|
// kill old App Paths registration
|
||||||
DeleteRegistryKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Clonk.exe");
|
DeleteRegistryKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Clonk.exe");
|
||||||
|
|
BIN
src/res/c4u.ico
BIN
src/res/c4u.ico
Binary file not shown.
Before Width: | Height: | Size: 26 KiB |
|
@ -42,7 +42,7 @@ IDI_08_OCM ICON DISCARDABLE "ocm.ico"
|
||||||
IDI_09_OCB ICON DISCARDABLE "ocb.ico"
|
IDI_09_OCB ICON DISCARDABLE "ocb.ico"
|
||||||
IDI_10_OCV ICON DISCARDABLE "ocv.ico"
|
IDI_10_OCV ICON DISCARDABLE "ocv.ico"
|
||||||
IDI_11_OCL ICON DISCARDABLE "ocl.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
|
#ifdef APSTUDIO_INVOKED
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -69,7 +69,7 @@
|
||||||
#define IDI_09_OCB 4009
|
#define IDI_09_OCB 4009
|
||||||
#define IDI_10_OCV 4010
|
#define IDI_10_OCV 4010
|
||||||
#define IDI_11_OCL 4011
|
#define IDI_11_OCL 4011
|
||||||
#define IDI_13_C4U 4013
|
#define IDI_13_OCU 4013
|
||||||
#define IDM_FILE_CLOSE 5003
|
#define IDM_FILE_CLOSE 5003
|
||||||
#define IDM_FILE_OPEN 5004
|
#define IDM_FILE_OPEN 5004
|
||||||
#define IDM_FILE_OPENWPLRS 5005
|
#define IDM_FILE_OPENWPLRS 5005
|
||||||
|
|
|
@ -123,8 +123,8 @@ Section -Post
|
||||||
WriteRegStr HKCR ".ocv\Content Type" "" "video/avi"
|
WriteRegStr HKCR ".ocv\Content Type" "" "video/avi"
|
||||||
WriteRegStr HKCR ".ocl" "" "OpenClonk.Weblink"
|
WriteRegStr HKCR ".ocl" "" "OpenClonk.Weblink"
|
||||||
WriteRegStr HKCR ".ocl\Content Type" "" "vnd.clonk.c4group"
|
WriteRegStr HKCR ".ocl\Content Type" "" "vnd.clonk.c4group"
|
||||||
WriteRegStr HKCR ".c4u" "" "Clonk4.Update"
|
WriteRegStr HKCR ".ocu" "" "OpenClonk.Update"
|
||||||
WriteRegStr HKCR ".c4u\Content Type" "" "vnd.clonk.c4group"
|
WriteRegStr HKCR ".ocu\Content Type" "" "vnd.clonk.c4group"
|
||||||
; Register file classes
|
; Register file classes
|
||||||
WriteRegStr HKCR "OpenClonk.Scenario" "" "OpenClonk Scenario"
|
WriteRegStr HKCR "OpenClonk.Scenario" "" "OpenClonk Scenario"
|
||||||
WriteRegStr HKCR "OpenClonk.Scenario\DefaultIcon" "" "$INSTDIR\Clonk.exe,1"
|
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.Video\DefaultIcon" "" "$INSTDIR\Clonk.exe,9"
|
||||||
WriteRegStr HKCR "OpenClonk.Weblink" "" "OpenClonk Weblink"
|
WriteRegStr HKCR "OpenClonk.Weblink" "" "OpenClonk Weblink"
|
||||||
WriteRegStr HKCR "OpenClonk.Weblink\DefaultIcon" "" "$INSTDIR\Clonk.exe,10"
|
WriteRegStr HKCR "OpenClonk.Weblink\DefaultIcon" "" "$INSTDIR\Clonk.exe,10"
|
||||||
WriteRegStr HKCR "Clonk4.Update" "" "Clonk 4 Update"
|
WriteRegStr HKCR "OpenClonk.Update" "" "OpenClonk Update"
|
||||||
WriteRegStr HKCR "Clonk4.Update\DefaultIcon" "" "$INSTDIR\Clonk.exe,11"
|
WriteRegStr HKCR "OpenClonk.Update\DefaultIcon" "" "$INSTDIR\Clonk.exe,11"
|
||||||
; Register additional file handling
|
; Register additional file handling
|
||||||
WriteRegStr HKCR "Clonk4.Update\Shell\Update" "" "Update"
|
WriteRegStr HKCR "OpenClonk.Update\Shell\Update" "" "Update"
|
||||||
WriteRegStr HKCR "Clonk4.Update\Shell\Update\Command" "" "$\"$INSTDIR\Clonk.exe$\" $\"%1$\""
|
WriteRegStr HKCR "OpenClonk.Update\Shell\Update\Command" "" "$\"$INSTDIR\Clonk.exe$\" $\"%1$\""
|
||||||
; Remove old use of App Paths
|
; Remove old use of App Paths
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\Clonk.exe"
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\Clonk.exe"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
@ -215,8 +215,8 @@ Section Uninstall
|
||||||
DeleteRegKey HKCR "OpenClonk.Video"
|
DeleteRegKey HKCR "OpenClonk.Video"
|
||||||
DeleteRegKey HKCR ".ocl"
|
DeleteRegKey HKCR ".ocl"
|
||||||
DeleteRegKey HKCR "OpenClonk.Weblink"
|
DeleteRegKey HKCR "OpenClonk.Weblink"
|
||||||
DeleteRegKey HKCR ".c4u"
|
DeleteRegKey HKCR ".ocu"
|
||||||
DeleteRegKey HKCR "Clonk4.Update"
|
DeleteRegKey HKCR "OpenClonk.Update"
|
||||||
|
|
||||||
; Start menu shortcuts (All Users)
|
; Start menu shortcuts (All Users)
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
|
Loading…
Reference in New Issue