mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Remove all hardcode string to En.rc
so it can be translaterem svn path=/trunk/; revision=15249
This commit is contained in:
parent
6873af6255
commit
27e330b72b
5 changed files with 45 additions and 10 deletions
16
reactos/subsys/system/expand/En.rc
Normal file
16
reactos/subsys/system/expand/En.rc
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "resource.h"
|
||||
/*
|
||||
* Moved all hardcoded strings to En.rc.
|
||||
* By Magnus Olsen 2005 magnus@itkonsult-olsen.com
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
|
||||
IDS_Copy, "ReactOS File Expansion Utility Version 1.0\n\
|
||||
Copyright Victor Schneider 1997\n\n\
|
||||
Usage: %s infile [outfile]\n"
|
||||
|
||||
IDS_FAILS "LZCopy failed: return is %ld\n"
|
||||
}
|
|
@ -22,18 +22,21 @@
|
|||
#include <string.h>
|
||||
#include <windows.h>
|
||||
#include <lzexpand.h>
|
||||
#include <tchar.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
#include "resource.h"
|
||||
|
||||
_tmain(int argc, TCHAR *argv[])
|
||||
{
|
||||
OFSTRUCT SourceOpenStruct1, SourceOpenStruct2;
|
||||
LONG ret;
|
||||
HFILE hSourceFile, hDestFile;
|
||||
HFILE hSourceFile, hDestFile;
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
fprintf( stderr, "ReactOS File Expansion Utility Version 1.0\n", argv[0] );
|
||||
fprintf( stderr, "Copyright Victor Schneider 1997\n\n", argv[0] );
|
||||
fprintf( stderr, "Usage: %s infile [outfile]\n", argv[0] );
|
||||
LoadString( GetModuleHandle(NULL), IDS_Copy, (LPTSTR) szMsg,RC_STRING_MAX_SIZE);
|
||||
_ftprintf( stderr, szMsg, argv[0] );
|
||||
return 1;
|
||||
}
|
||||
hSourceFile = LZOpenFile(argv[1], &SourceOpenStruct1, OF_READ);
|
||||
|
@ -41,13 +44,14 @@ int main(int argc, char *argv[])
|
|||
hDestFile = LZOpenFile(argv[2], &SourceOpenStruct2, OF_CREATE | OF_WRITE);
|
||||
else
|
||||
{
|
||||
char OriginalName[MAX_PATH];
|
||||
TCHAR OriginalName[MAX_PATH];
|
||||
GetExpandedName(argv[1], OriginalName);
|
||||
hDestFile = LZOpenFile(OriginalName, &SourceOpenStruct2, OF_CREATE | OF_WRITE);
|
||||
}
|
||||
ret = LZCopy(hSourceFile, hDestFile);
|
||||
LZClose(hSourceFile);
|
||||
LZClose(hDestFile);
|
||||
if (ret <= 0) fprintf(stderr,"LZCopy failed: return is %ld\n",ret);
|
||||
LoadString( GetModuleHandle(NULL), IDS_FAILS, (LPTSTR) szMsg,RC_STRING_MAX_SIZE);
|
||||
if (ret <= 0) _ftprintf(stderr,szMsg,ret);
|
||||
return (ret <= 0);
|
||||
}
|
||||
|
|
9
reactos/subsys/system/expand/expand.rc
Normal file
9
reactos/subsys/system/expand/expand.rc
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* $Id: format.rc 15157 2005-05-09 00:05:15Z greatlrd $ */
|
||||
#include <windows.h>
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS File Expansion Utility Version 1.0 \0"
|
||||
#define REACTOS_STR_INTERNAL_NAME "expand\0"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "expand.exe\0"
|
||||
#include <reactos/version.rc>
|
||||
|
||||
#include "En.rc"
|
||||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
@ -12,7 +10,7 @@ TARGET_NAME = expand
|
|||
|
||||
TARGET_INSTALLDIR = system32
|
||||
|
||||
TARGET_CFLAGS = -D__USE_W32API
|
||||
TARGET_CFLAGS = -D__USE_W32API
|
||||
|
||||
TARGET_SDKLIBS = lz32.a
|
||||
|
||||
|
|
8
reactos/subsys/system/expand/resource.h
Normal file
8
reactos/subsys/system/expand/resource.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
|
||||
#define RC_STRING_MAX_SIZE 4096
|
||||
#define IDS_Copy 100
|
||||
#define IDS_FAILS 101
|
||||
|
||||
|
||||
/* EOF */
|
Loading…
Reference in a new issue