Skip to content

Commit

Permalink
Project updated to VS2022.
Browse files Browse the repository at this point in the history
  • Loading branch information
raspopov committed May 11, 2023
1 parent 46a51a1 commit 63e420c
Show file tree
Hide file tree
Showing 21 changed files with 119 additions and 188 deletions.
8 changes: 6 additions & 2 deletions Localization.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2047
# Visual Studio Version 17
VisualStudioVersion = 17.5.33627.172
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe2po", "exe2po\exe2po.vcxproj", "{29F88A73-AB86-4748-B96B-E010EA4DD45D}"
ProjectSection(ProjectDependencies) = postProject
{13D18C95-84A4-4B3A-AC51-40B90C7B7A07} = {13D18C95-84A4-4B3A-AC51-40B90C7B7A07}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample", "sample\sample.vcxproj", "{13D18C95-84A4-4B3A-AC51-40B90C7B7A07}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4081BAC6-060E-4E22-96F2-595FB5E9F56F}"
ProjectSection(SolutionItems) = preProject
build.cmd = build.cmd
exe2po-register.reg = exe2po-register.reg
exe2po-unregister.reg = exe2po-unregister.reg
LICENSE = LICENSE
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/983675f415f5405da0846ec33156092f)](https://www.codacy.com/app/raspopov/po-localization?utm_source=github.com&utm_medium=referral&utm_content=raspopov/po-localization&utm_campaign=Badge_Grade)

PO-Localization
-----------------
===============

This is a library designed to help C++ developers in creating Windows
application to translate it on world languages. Project contains an
Expand All @@ -10,8 +10,8 @@ adds ability to use translated PO-files to application itself.
The PO-file is a native format of poEdit (a very convenient application
for translators).

Compression
-------------
Compression
-----------

Library can load translations in uncompressed or compressed formats
(Lempel-Ziv algorithm only). Uncompressed files has ".po" extension and
Expand All @@ -30,8 +30,8 @@ files.
Note: Some versions of compress.exe produces incorrect compressed files
(1 byte differ) just get another version of utility.

EXE to PO file converter usage
--------------------------------
EXE to PO file converter usage
------------------------------

exe2po.exe {input file.exe} {output file.po}

Expand Down Expand Up @@ -70,8 +70,8 @@ Generated .po-file blocks for string resources:
msgid "English string"
msgstr ""

License
---------
License
-------

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -85,12 +85,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Copyrights
------------
Copyrights
----------

PO-Localization
Copyright (C) Nikolay Raspopov, 2011-2018. \
https://www.cherubicsoft.com/en/projects/po-localization
* PO-Localization

Copyright (C) Nikolay Raspopov, 2011-2023.

https://www.cherubicsoft.com/en/projects/po-localization/

* Microsoft (R) File Compression Utility Version 2.50

Microsoft (R) File Compression Utility Version 2.50 \
Copyright (C) Microsoft Corp. 1990-1994. All rights reserved.
62 changes: 13 additions & 49 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,51 +1,15 @@
@echo off
setlocal

call clean.cmd

set vc="%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
if exist %vc% goto :build
set vc="%VS150COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat"
if exist %vc% goto :build
echo Microsoft Visual C++ 2015/2017 is missing. Please go to http://www.visualstudio.com/ and install free Community edition.
exit /b 1

:build
echo Building...
call %vc% x86
msbuild Localization.sln /v:m /t:Rebuild /p:Configuration=Release /p:Platform=Win32
if exist Win32\release\exe2po.exe goto pack
echo Binary file is missing. Compile project first please.
exit /b 1

:pack
echo.
echo Detecting 7-Zip...
set zip="%ProgramFiles%\7-Zip\7z.exe"
if exist %zip% goto zip
set zip="%ProgramFiles(x86)%\7-Zip\7z.exe"
if exist %zip% goto zip
set zip="%ProgramW6432%\7-Zip\7z.exe"
if exist %zip% goto zip
echo The 7-Zip utility is missing. Please go to http://www.7-zip.org/ and install 7-Zip.
exit /b 1

:zip
echo.
echo Packing by 7-Zip: %zip%...
for /F "tokens=3" %%i in ( 'findstr ProductVersion exe2po\exe2po.rc' ) do set version=%%~i
md "..\redist" 2>nul:
set dst="%CD%\..\redist\po-localization-%version%.zip"
del %dst% 2>nul:
cd exe2po
%zip% a -tzip -mx9 -mm=Deflate64 -mpass=15 -stl %dst% gpl-2.0.txt
cd ..\src
%zip% a -tzip -mx9 -mm=Deflate64 -mpass=15 -stl %dst% lgpl-2.1.txt Localization.h Localization.cpp COMPRESS.EXE
cd ..\Win32\release
%zip% a -tzip -mx9 -mm=Deflate64 -mpass=15 -stl %dst% exe2po.exe
cd ..\..
%zip% a -tzip -mx9 -mm=Deflate64 -mpass=15 -stl -r -xr!*.user -xr!*.aps -xr!*.p_ -xr!win32 -xr!x64 %dst% sample ReadMe.txt *.reg
echo.

echo Done.
exit /b 0
set "cur=%cd%\"
pushd "%~dp0"
for /F "tokens=3" %%i in ( 'findstr ProductVersion %~dp0exe2po\exe2po.rc' ) do set "version=%%~i"
set "dst=%cur%po-localization-%version%.zip"
echo Packing %dst%...
del "%dst%" 2>nul
rd /q /s sample\Win32\ 2>nul
rd /q /s sample\x64\ 2>nul
del sample\*.user 2>nul
del sample\*.aps 2>nul
del sample\res\*.p_ 2>nul
powershell -Command "& { Compress-Archive -Path '%cur%exe2po.exe','%cur%sample.exe',ReadMe*,LICENSE,*.reg,src\*,sample\ -DestinationPath '%dst%' }"
popd
12 changes: 0 additions & 12 deletions clean.cmd

This file was deleted.

4 changes: 2 additions & 2 deletions exe2po/exe2po.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

/*
This file is part of EXE to PO file converter (EXE2PO)
https://github.com/raspopov/po-localization
https://www.cherubicsoft.com/en/projects/po-localization/
Copyright (C) 2011-2018 Nikolay Raspopov <[email protected]>
Copyright (C) 2011-2023 Nikolay Raspopov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions exe2po/exe2po.rc
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ BEGIN
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "Comments", "https://github.com/raspopov/po-localization"
VALUE "Comments", "https://www.cherubicsoft.com/en/projects/po-localization/"
VALUE "CompanyName", "Raspopov"
VALUE "FileDescription", "EXE to PO file converter"
VALUE "FileVersion", "1.0.0.4"
VALUE "InternalName", "exe2po"
VALUE "LegalCopyright", "Copyright � 2011-2018 Nikolay Raspopov"
VALUE "LegalCopyright", "Copyright � 2011-2023 Nikolay Raspopov"
VALUE "OriginalFilename", "exe2po.exe"
VALUE "ProductName", "Localization Library"
VALUE "ProductVersion", "1.0.0.4"
Expand Down
54 changes: 35 additions & 19 deletions exe2po/exe2po.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@
<ProjectGuid>{29F88A73-AB86-4748-B96B-E010EA4DD45D}</ProjectGuid>
<RootNamespace>exe2po</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -95,12 +95,14 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand All @@ -109,40 +111,42 @@
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<StringPooling>true</StringPooling>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand All @@ -152,21 +156,26 @@
<TargetMachine>MachineX86</TargetMachine>
<SetChecksum>true</SetChecksum>
</Link>
<PostBuildEvent />
<PostBuildEvent>
<Command>pushd "$(OutDir)"
call $(SolutionDir)build.cmd
popd</Command>
</PostBuildEvent>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<StringPooling>true</StringPooling>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand All @@ -175,6 +184,13 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<SetChecksum>true</SetChecksum>
</Link>
<PostBuildEvent />
<PostBuildEvent>
<Command>pushd "$(OutDir)"
call $(SolutionDir)build.cmd
popd</Command>
</PostBuildEvent>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="exe2po.cpp" />
Expand Down
4 changes: 2 additions & 2 deletions exe2po/stdafx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

/*
This file is part of EXE to PO file converter (EXE2PO)
https://github.com/raspopov/po-localization
https://www.cherubicsoft.com/en/projects/po-localization/
Copyright (C) 2011-2018 Nikolay Raspopov <[email protected]>
Copyright (C) 2011-2023 Nikolay Raspopov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions exe2po/stdafx.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
This file is part of EXE to PO file converter (EXE2PO)
https://github.com/raspopov/po-localization
https://www.cherubicsoft.com/en/projects/po-localization/
Copyright (C) 2011-2018 Nikolay Raspopov <[email protected]>
Copyright (C) 2011-2023 Nikolay Raspopov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Binary file removed sample/res/sample.ico
Binary file not shown.
13 changes: 0 additions & 13 deletions sample/res/sample.rc2

This file was deleted.

2 changes: 0 additions & 2 deletions sample/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Used by sample.rc
//
#define IDD_SAMPLE_DIALOG 102
#define IDR_MAINFRAME 128
#define IDS_STRING130 130
#define IDR_MENU1 131
#define IDC_BUTTON1 1000
Expand All @@ -14,7 +13,6 @@
#define IDC_LANGS 1005
#define IDC_COMBO2 1006
#define IDC_EDIT2 1007
#define IDC_HOTKEY1 1010
#define IDC_SYSLINK1 1011
#define IDC_MFCLINK1 1012
#define IDC_COMMAND1 1013
Expand Down
Loading

0 comments on commit 63e420c

Please sign in to comment.