Skip to content

Commit

Permalink
Release version. Installer files. Use windows registry instead of ini…
Browse files Browse the repository at this point in the history
… file.
  • Loading branch information
FelixdelasPozas committed Sep 21, 2017
1 parent e5bfc85 commit b3f30ba
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 13 deletions.
4 changes: 2 additions & 2 deletions AboutDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Copyright (c) 2016 Félix de las Pozas Álvarez</string>
<string>Copyright (c) 2017 Félix de las Pozas Álvarez</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down Expand Up @@ -218,7 +218,7 @@ Qt Framework</string>
<item>
<widget class="QLabel" name="label_27">
<property name="text">
<string>version 5.5</string>
<string>version 5.9</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ find_package(Qt5 COMPONENTS Widgets Multimedia)
#add_definitions(${Qt5Multimedia_DEFINITIONS})

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Multimedia_EXECUTABLE_COMPILE_FLAGS}")

if (CMAKE_BUILD_TYPE MATCHES Debug)
set(CORE_EXTERNAL_LIBS ${CORE_EXTERNAL_LIBS} ${QT_QTTEST_LIBRARY})
endif (CMAKE_BUILD_TYPE MATCHES Debug)

if(DEFINED MINGW)
configure_file("${PROJECT_SOURCE_DIR}/resources.rc.in" "${PROJECT_BINARY_DIR}/resources.rc")
configure_file("${PROJECT_SOURCE_DIR}/installer/script.iss.in" "${PROJECT_BINARY_DIR}/script.iss")
set(CORE_SOURCES ${CORE_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/resources.rc)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -o <OBJECT> -i <SOURCE>")
enable_language(RC)
Expand All @@ -42,7 +42,7 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR} # For wrap/ui files
)

set(CMAKE_CXX_FLAGS " -Wall -Wno-deprecated -std=c++11 -mwindows")
set(CMAKE_CXX_FLAGS " -Wall -Wno-deprecated -std=c++11 -mwindows -m64")

# Add Qt Resource files
qt5_add_resources(RESOURCES
Expand Down Expand Up @@ -79,9 +79,6 @@ set (CORE_SOURCES

set(CORE_EXTERNAL_LIBS
Qt5::Widgets
Qt5::Multimedia
${LIBVORBIS_LIBRARIES}
${LIBOGG_LIBRARY}
)

add_executable(SimpleHasher ${CORE_SOURCES})
Expand Down
4 changes: 2 additions & 2 deletions SimpleHasher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ void SimpleHasher::onComputationFinished()
//----------------------------------------------------------------
void SimpleHasher::loadSettings()
{
QSettings settings{"SimpleHasher.ini", QSettings::IniFormat};
QSettings settings("Felix de las Pozas Alvarez", "SimpleHasher");

auto geometry = settings.value(GEOMETRY, QByteArray()).toByteArray();
if(geometry.length() != 0)
Expand Down Expand Up @@ -551,7 +551,7 @@ void SimpleHasher::loadSettings()
//----------------------------------------------------------------
void SimpleHasher::saveSettings()
{
QSettings settings{"SimpleHasher.ini", QSettings::IniFormat};
QSettings settings("Felix de las Pozas Alvarez", "SimpleHasher");
settings.setValue(GEOMETRY, saveGeometry());

if(m_mode == Mode::GENERATE)
Expand Down
Binary file added installer/image.bmp
Binary file not shown.
37 changes: 37 additions & 0 deletions installer/script.iss.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
; Mingw64 Distribution Inno Setup File

[Setup]
AppName=Simple Hasher
AppVersion=@SIMPLE_HASHER_VERSION_MAJOR@.@SIMPLE_HASHER_VERSION_MINOR@.@SIMPLE_HASHER_VERSION_PATCH@
DefaultDirName={pf64}\Simple Hasher
DefaultGroupName=Simple Hasher
OutputDir=@PROJECT_BINARY_DIR@
AppComments=Simple Hasher
AppContact=Felix de las Pozas Alvarez
AppCopyright=(c)2017 Felix de las Pozas Alvarez
AppPublisher=Felix de las Pozas Alvarez
ArchitecturesAllowed=x64
Compression=lzma2/ultra64
CreateUninstallRegKey=yes
Uninstallable=yes
DisableFinishedPage=no
DisableWelcomePage=no
ChangesAssociations=no
CloseApplications=yes
UninstallDisplayIcon=@CMAKE_SOURCE_DIR@/rsc/application.ico
UninstallDisplayName=Simple Hasher v@SIMPLE_HASHER_VERSION_MAJOR@.@SIMPLE_HASHER_VERSION_MINOR@.@SIMPLE_HASHER_VERSION_PATCH@
SourceDir=@PROJECT_BINARY_DIR@
SetupIconFile=@CMAKE_SOURCE_DIR@/rsc/application.ico
OutputBaseFilename=SimpleHasher_v@SIMPLE_HASHER_VERSION_MAJOR@.@SIMPLE_HASHER_VERSION_MINOR@.@SIMPLE_HASHER_VERSION_PATCH@_Setup
WizardImageFile=@CMAKE_SOURCE_DIR@/installer/image.bmp
WizardSmallImageFile=@CMAKE_SOURCE_DIR@/installer/smallimage.bmp

[Files]
Source: "SimpleHasher.exe"; DestDir: "{app}";
Source: "*.dll"; DestDir: "{app}";
Source: "iconengines/*.*"; DestDir: "{app}/iconengines/";
Source: "imageformats/*.*"; DestDir: "{app}/imageformats/";
Source: "platforms/*.*"; DestDir: "{app}/platforms/";

[Run]
Filename: "{app}\SimpleHasher.exe"; Description: "Launch Simple Hasher"; Flags: postinstall nowait skipifsilent unchecked
Binary file added installer/smallimage.bmp
Binary file not shown.
10 changes: 6 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The following libraries are required:
* [Qt opensource framework](http://www.qt.io/).

# Install
The only current option is build from source as binaries are not provided.
Download and execute the latest installer from the [releases](https://github.com/FelixdelasPozas/SimpleHasher/releases) page.

# Screenshots
Simple main dialog, showing the progress while computing the hashes of some files.
Expand All @@ -52,11 +52,13 @@ Configuration dialog

**Status**: finished

**License**: GNU General Public License 3

**cloc statistics**

| Language |files |blank |comment |code |
|:-----------------------------|--------------:|------------:|-----------------:|-------:|
| C++ | 13 | 462 | 378 | 2040 |
| C++ | 13 | 463 | 378 | 2039 |
| C/C++ Header | 12 | 199 | 493 | 383 |
| CMake | 1 | 16 | 10 | 63 |
| **Total** | **26** | **677** | **881** |**2486**|
| CMake | 1 | 16 | 10 | 60 |
| **Total** | **26** | **678** | **881** |**2482**|

0 comments on commit b3f30ba

Please sign in to comment.