Skip to content

Commit

Permalink
build script
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas694 committed Oct 14, 2020
1 parent 1e48053 commit 9919d45
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ I added the following features to finddupe:

It works for me, but some more testing is desirable.

I used Visual Studio 2010 for building.
I've udated the project to use Visual Studio 2019.

## Usage
```
Expand Down Expand Up @@ -50,6 +50,10 @@ Options:
from current directory down
```

## Download:

Latest release can be found [here](https://github.com/thomas694/finddupe/releases).

## Authors

- originator: [Matthias Wandel](https://www.sentex.ca/~mwandel/finddupe/)
Expand Down
43 changes: 43 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
init:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
$x = $env:APPVEYOR_REPO_TAG_NAME
if($x.startswith("v","CurrentCultureIgnoreCase")) { $x = $x.substring(1) }
Update-AppveyorBuild -Version "$x"
$env:MY_BUILD_VERSION="$x"
}
else
{
Update-AppveyorBuild -Version "1.0.$env:APPVEYOR_BUILD_NUMBER"
}
#version: 1.0.{build}
image: Visual Studio 2019
configuration: Release
platform: Win32
for:
-
branches:
only:
- master
-
configuration: Release

build:
project: finddupe.sln
verbosity: normal
artifacts:
- path: Release/*.exe
name: finddupe
deploy:
release: finddupe-v$(MY_BUILD_VERSION)
description: 'Release description'
provider: GitHub
auth_token:
secure: PWzd/WicmutMxrc66FtBXAQMgCUKsX8yjeqv+2SHZyflLOTYZz5393rynVUtCltZ
artifact: /.*\.exe/
draft: true
prerelease: false
on:
#branch: master # release from master branch only
APPVEYOR_REPO_TAG: true # deploy on tag push only
3 changes: 3 additions & 0 deletions finddupe.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,9 @@ static void ProcessFile(const TCHAR * FileName)
static void Usage (void)
{
_tprintf(TEXT("finddupe v%s compiled %s\n"), TEXT(VERSION), TEXT(__DATE__));
_tprintf(TEXT("an enhanced version by thomas694 (@GH)\n"));
_tprintf(TEXT("This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n"));
_tprintf(TEXT("are welcome to redistribute it under certain conditions; view GNU GPLv3 for more.\n"));
_tprintf(TEXT("Usage: finddupe [options] [-ref] <filepat> [filepat]...\n"));
_tprintf(TEXT("Options:\n")
TEXT(" -bat <file.bat> Create batch file with commands to do the hard\n")
Expand Down
10 changes: 10 additions & 0 deletions finddupe.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@
<ProjectGuid>{5ACEBB24-9088-4D2B-9B89-0AABE4250D99}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>finddupe</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -77,6 +80,13 @@
<ClCompile Include="finddupe.c" />
<ClCompile Include="myglob.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
<ClInclude Include="version.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="version.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
13 changes: 13 additions & 0 deletions finddupe.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,17 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="version.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="version.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
14 changes: 14 additions & 0 deletions resource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by finddupe.rc

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
30 changes: 30 additions & 0 deletions version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#pragma once
#define STRINGIZE2(s) #s
#define STRINGIZE(s) STRINGIZE2(s)

#define VERSION_MAJOR 1
#define VERSION_MINOR 25
#define VERSION_REVISION 0
#define VERSION_BUILD 0

#define VER_FILE_DESCRIPTION_STR "a duplicate file detector and eliminator for Windows"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD
#define VER_FILE_VERSION_STR STRINGIZE(VERSION_MAJOR) \
"." STRINGIZE(VERSION_MINOR) \

#define VER_PRODUCTNAME_STR "finddupe"
#define VER_PRODUCT_VERSION VER_FILE_VERSION
#define VER_PRODUCT_VERSION_STR VER_FILE_VERSION_STR
#define VER_ORIGINAL_FILENAME_STR VER_PRODUCTNAME_STR ".exe"
#define VER_INTERNAL_NAME_STR VER_ORIGINAL_FILENAME_STR
#define VER_COPYRIGHT_STR "(C) 2017 modifications by thomas694 (@GH)"

#ifdef _DEBUG
#define VER_VER_DEBUG VS_FF_DEBUG
#else
#define VER_VER_DEBUG 0
#endif

#define VER_FILEOS VOS_NT_WINDOWS32
#define VER_FILEFLAGS VER_VER_DEBUG
#define VER_FILETYPE VFT_APP
96 changes: 96 additions & 0 deletions version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#include "version.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (United States) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILE_VERSION
PRODUCTVERSION VER_PRODUCT_VERSION
FILEFLAGSMASK 0x3fL
FILEFLAGS VER_FILEFLAGS
FILEOS VER_FILEOS
FILETYPE VER_FILETYPE
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", VER_FILE_DESCRIPTION_STR "\0"
VALUE "FileVersion", VER_FILE_VERSION_STR "\0"
VALUE "InternalName", VER_INTERNAL_NAME_STR "\0"
VALUE "LegalCopyright", VER_COPYRIGHT_STR "\0"
VALUE "OriginalFilename", VER_ORIGINAL_FILENAME_STR "\0"
VALUE "ProductName", VER_PRODUCTNAME_STR
VALUE "ProductVersion", VER_PRODUCT_VERSION_STR "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END


#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE
BEGIN
"resource.h\0"
END

2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END

3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END

#endif // APSTUDIO_INVOKED

#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//


/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

0 comments on commit 9919d45

Please sign in to comment.