From a2c421a2e526ece01c55454c0c906cd944a086ea Mon Sep 17 00:00:00 2001
From: EndrII <EndrIIMail@gmail.com>
Date: Sun, 26 Mar 2023 18:38:04 +0200
Subject: [PATCH] rename template

---
 CMakeLists.txt                                | 20 +++++------
 README.md                                     |  2 +-
 doxygen.conf                                  |  4 +--
 init.sh                                       | 35 -------------------
 src/Example/CMakeLists.txt                    | 16 ++++-----
 .../{RENAME_ME.json.in => easyssl.json.in}    |  6 ++--
 src/Example/android/AndroidManifest.xml.in    |  2 +-
 src/Library/CMakeLists.txt                    |  4 +--
 src/Library/RENAME_ME.qrc                     |  9 -----
 src/Library/easyssl.qrc                       |  9 +++++
 src/Library/src/RENAME_MEModule/qmldir        |  3 --
 .../easyssl.qml}                              |  0
 src/Library/src/easysslModule/qmldir          |  3 ++
 .../src/public/{RENAME_ME.cpp => easyssl.cpp} |  8 ++---
 .../src/public/{RENAME_ME.h => easyssl.h}     | 12 +++----
 .../public/{RENAME_ME => easyssl}/global.h.in | 14 ++++----
 tests/tstMain.cpp                             |  2 +-
 17 files changed, 57 insertions(+), 92 deletions(-)
 delete mode 100755 init.sh
 rename src/Example/Deploy/{RENAME_ME.json.in => easyssl.json.in} (76%)
 delete mode 100644 src/Library/RENAME_ME.qrc
 create mode 100644 src/Library/easyssl.qrc
 delete mode 100644 src/Library/src/RENAME_MEModule/qmldir
 rename src/Library/src/{RENAME_MEModule/RENAME_ME.qml => easysslModule/easyssl.qml} (100%)
 create mode 100644 src/Library/src/easysslModule/qmldir
 rename src/Library/src/public/{RENAME_ME.cpp => easyssl.cpp} (74%)
 rename src/Library/src/public/{RENAME_ME.h => easyssl.h} (64%)
 rename src/Library/src/public/{RENAME_ME => easyssl}/global.h.in (54%)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ac9f01..324c318 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@
 #
 
 cmake_minimum_required(VERSION 3.18)
-project(RENAME_ME LANGUAGES CXX)
+project(easyssl LANGUAGES CXX)
 if(TARGET ${PROJECT_NAME})
   message("The ${PROJECT_NAME} arledy included in main Project")
   return()
@@ -32,18 +32,18 @@ find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test QUIET)
 include(submodules/CMake/QuasarApp.cmake)
 
 updateGitVars()
-set(RENAME_ME_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
-set(RENAME_ME_PACKAGE_ID "quasarapp.core.RENAME_ME")
+set(easyssl_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
+set(easyssl_PACKAGE_ID "quasarapp.core.easyssl")
 
-option(RENAME_ME_TESTS "This option disables or enables tests of the ${PROJECT_NAME} project"  ON)
-option(RENAME_ME_EXAMPLE "This option disables or enables example app of the ${PROJECT_NAME} project" ON)
+option(easyssl_TESTS "This option disables or enables tests of the ${PROJECT_NAME} project"  ON)
+option(easyssl_EXAMPLE "This option disables or enables example app of the ${PROJECT_NAME} project" ON)
 
 if (ANDROID OR IOS OR NOT QT_VERSION_MAJOR OR QA_WASM32)
-    set(RENAME_ME_TESTS OFF CACHE BOOL "This option force disbled for ANDROID IOS QA_WASM32 and Not Qt projects" FORCE)
+    set(easyssl_TESTS OFF CACHE BOOL "This option force disbled for ANDROID IOS QA_WASM32 and Not Qt projects" FORCE)
 endif()
 
 if (NOT QT_VERSION_MAJOR)
-    set(RENAME_ME_EXAMPLE OFF CACHE BOOL "This option force disbled for Not Qt projects" FORCE)
+    set(easyssl_EXAMPLE OFF CACHE BOOL "This option force disbled for Not Qt projects" FORCE)
 endif()
 
 make_directory(Distro)
@@ -52,11 +52,11 @@ initAll()
 
 add_subdirectory(src/Library)
 
-if (DEFINED RENAME_ME_EXAMPLE)
+if (DEFINED easyssl_EXAMPLE)
     add_subdirectory(src/Example)
 endif()
 
-if (RENAME_ME_TESTS)
+if (easyssl_TESTS)
     add_subdirectory(tests)
 else()
     message("The ${PROJECT_NAME} tests is disabled.")
@@ -64,4 +64,4 @@ endif()
 
 
 addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
-addDeployFromCustomFile("RENAME_ME" "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/RENAME_ME.json")
+addDeployFromCustomFile("easyssl" "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/easyssl.json")
diff --git a/README.md b/README.md
index 0a44cbb..9658e59 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # CMakeProject
 Template repository for cmake project
-Fork me and replase RENAME_ME to Name of your new project.
+Fork me and replase easyssl to Name of your new project.
 
 1. Clone this repository 
 2. Run ./init.sh NewProjectName 
diff --git a/doxygen.conf b/doxygen.conf
index 9b581aa..73eece3 100644
--- a/doxygen.conf
+++ b/doxygen.conf
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING      = UTF-8
 # title of most generated pages and in a few other places.
 # The default value is: My Project.
 
-PROJECT_NAME           = RENAME_ME
+PROJECT_NAME           = easyssl
 
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. This
 # could be handy for archiving the generated documentation or if some version
@@ -1451,7 +1451,7 @@ GENERATE_ECLIPSEHELP   = NO
 # The default value is: org.doxygen.Project.
 # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
 
-ECLIPSE_DOC_ID         = QuasarApp.RENAME_ME
+ECLIPSE_DOC_ID         = QuasarApp.easyssl
 
 # If you want full control over the layout of the generated HTML pages it might
 # be necessary to disable the index and replace it with your own. The
diff --git a/init.sh b/init.sh
deleted file mode 100755
index 4ab4efd..0000000
--- a/init.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-echo "Project name: $1"
-
-if [ $# -ne 1 ]
-then
-    echo "You call this script wtth wrong arguments."
-    echo "Example for start script:"
-    echo "./init.sh MyCmakeProject"
-    exit 1
-fi
-
-REPLACESTRING="s+RENAME_ME+$1+g"
-echo $REPLACESTRING
-
-find . -not -path '*/\.*' -type f -exec sed -i $REPLACESTRING {} +
-find . -not -path '*/\.*' -type f -exec sed -i $REPLACESTRING {} +
-
-find src -type d -name '*RENAME_ME*' -exec sh -c 'x="{}"; NEWSTR=$(echo "$x" | sed "s/RENAME_ME/'$1'/"); mv "$x" "$NEWSTR"' \;
-
-find src -type f -name '*RENAME_ME*' -exec sh -c 'x="{}"; NEWSTR=$(echo "$x" | sed "s/RENAME_ME/'$1'/"); mv "$x" "$NEWSTR"' \;
-find Deploy -type f -name '*RENAME_ME*' -exec sh -c 'x="{}"; NEWSTR=$(echo "$x" | sed "s/RENAME_ME/'$1'/"); mv "$x" "$NEWSTR"' \;
-
-set -e
-
-git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
-    while read path_key path
-    do
-        url_key=$(echo $path_key | sed 's/\.path/.url/')
-        url=$(git config -f .gitmodules --get "$url_key")
-        git submodule add $url $path
-    done
-
-
-
diff --git a/src/Example/CMakeLists.txt b/src/Example/CMakeLists.txt
index 4e0b51e..ec26298 100644
--- a/src/Example/CMakeLists.txt
+++ b/src/Example/CMakeLists.txt
@@ -58,7 +58,7 @@ if (ANDROID)
     set(ANDROID_API_VERSION $ENV{ANDROID_API_VERSION})
     set(OPENSSL_ROOT_PATH "$ENV{OPENSSL_ROOT_DIR}")
 
-    set(RENAME_ME_EXTRA_LIBS
+    set(easyssl_EXTRA_LIBS
         ${PROJECT_NAME}Library
 #        libName
         )
@@ -74,7 +74,7 @@ if (ANDROID)
             "${SIGPATH}/quasarapp.keystore"
             "${SIGPASS_QUASARAPP}"
             "${TARGET_DIR}"
-            "${RENAME_ME_EXTRA_LIBS}")
+            "${easyssl_EXTRA_LIBS}")
 
     else()
         message("NO_SIGN_APP")
@@ -82,7 +82,7 @@ if (ANDROID)
         addDeployAPK(${CURRENT_PROJECT}
             "${CMAKE_CURRENT_LIST_DIR}/android"
             "${TARGET_DIR}"
-            "${RENAME_ME_EXTRA_LIBS}")
+            "${easyssl_EXTRA_LIBS}")
 
     endif()
     set(manifest_file "${CMAKE_CURRENT_SOURCE_DIR}/android/AndroidManifest.xml")
@@ -108,19 +108,19 @@ elseif(IOS)
 #    set_xcode_property(${CURRENT_PROJECT} PRODUCT_BUNDLE_IDENTIFIER ${CHEATCARD_PACKAGE_ID} All)
 
     set_target_properties(${CURRENT_PROJECT} PROPERTIES
-        MACOSX_BUNDLE_GUI_IDENTIFIER ${RENAME_ME_PACKAGE_ID}
-        MACOSX_BUNDLE_BUNDLE_VERSION ${RENAME_ME_VERSION}
-        MACOSX_BUNDLE_SHORT_VERSION_STRING ${RENAME_ME_VERSION}
+        MACOSX_BUNDLE_GUI_IDENTIFIER ${easyssl_PACKAGE_ID}
+        MACOSX_BUNDLE_BUNDLE_VERSION ${easyssl_VERSION}
+        MACOSX_BUNDLE_SHORT_VERSION_STRING ${easyssl_VERSION}
     )
 else()
     # Desctop deploying
 
     message(GIT_COMMIT_COUNT = ${GIT_COMMIT_COUNT})
 
-    set(DeployFile "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/RENAME_ME.json")
+    set(DeployFile "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/easyssl.json")
     configure_file("${DeployFile}.in" ${DeployFile} @ONLY)
 
-    addDeployFromCustomFile("RENAME_ME" ${DeployFile})
+    addDeployFromCustomFile("easyssl" ${DeployFile})
 
 endif()
 
diff --git a/src/Example/Deploy/RENAME_ME.json.in b/src/Example/Deploy/easyssl.json.in
similarity index 76%
rename from src/Example/Deploy/RENAME_ME.json.in
rename to src/Example/Deploy/easyssl.json.in
index 45063d4..fec5cac 100644
--- a/src/Example/Deploy/RENAME_ME.json.in
+++ b/src/Example/Deploy/easyssl.json.in
@@ -1,7 +1,7 @@
 {
     "bin": [
-        "src/build/Debug/RENAME_MEEaxample",
-        "src/build/Debug/RENAME_MEEaxample.exe"
+        "src/build/Debug/easysslEaxample",
+        "src/build/Debug/easysslEaxample.exe"
         ],
     "clear": true,
     "binPrefix": "@CMAKE_BINARY_DIR@",
@@ -21,7 +21,7 @@
         ],
     "extraLib": "crypto",
     "targetDir": "@CMAKE_SOURCE_DIR@/Distro",
-    "deployVersion": "@RENAME_ME_VERSION@",
+    "deployVersion": "@easyssl_VERSION@",
 
 }
 
diff --git a/src/Example/android/AndroidManifest.xml.in b/src/Example/android/AndroidManifest.xml.in
index 7f7beef..cc5ee34 100644
--- a/src/Example/android/AndroidManifest.xml.in
+++ b/src/Example/android/AndroidManifest.xml.in
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<manifest package="@RENAME_ME_PACKAGE_ID@" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="@RENAME_ME_VERSION@" android:versionCode="@GIT_COMMIT_COUNT@" android:installLocation="auto">
+<manifest package="@easyssl_PACKAGE_ID@" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="@easyssl_VERSION@" android:versionCode="@GIT_COMMIT_COUNT@" android:installLocation="auto">
     <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
          Remove the comment if you do not require these default permissions. -->
     <!-- %%INSERT_PERMISSIONS -->
diff --git a/src/Library/CMakeLists.txt b/src/Library/CMakeLists.txt
index 9c84273..f0f9b14 100644
--- a/src/Library/CMakeLists.txt
+++ b/src/Library/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.18)
 get_filename_component(CURRENT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME)
 
 set(CURRENT_PROJECT "${PROJECT_NAME}${CURRENT_PROJECT_DIR}")
-add_definitions(-DRENAME_ME_LIBRARY)
+add_definitions(-Deasyssl_LIBRARY)
 
 
 file(GLOB_RECURSE SOURCE_CPP
@@ -45,5 +45,5 @@ prepareQM(${CURRENT_PROJECT} ${CMAKE_CURRENT_SOURCE_DIR} "${LANGS}")
 
 set(QML_IMPORT_PATH ${QML_IMPORT_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/src" CACHE STRING "" FORCE)
 
-set(global_file "${CMAKE_CURRENT_SOURCE_DIR}/src/public/RENAME_ME/global.h")
+set(global_file "${CMAKE_CURRENT_SOURCE_DIR}/src/public/easyssl/global.h")
 configure_file("${global_file}.in" ${global_file} @ONLY)
diff --git a/src/Library/RENAME_ME.qrc b/src/Library/RENAME_ME.qrc
deleted file mode 100644
index c6c3d8e..0000000
--- a/src/Library/RENAME_ME.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<RCC>
-    <qresource prefix="/">
-        <file>src/RENAME_MEModule/qmldir</file>
-        <file>src/RENAME_MEModule/RENAME_ME.qml</file>
-    </qresource>
-    <qresource prefix="/RENAME_METr">
-        <file>languages/en.qm</file>
-    </qresource>
-</RCC>
diff --git a/src/Library/easyssl.qrc b/src/Library/easyssl.qrc
new file mode 100644
index 0000000..9b62021
--- /dev/null
+++ b/src/Library/easyssl.qrc
@@ -0,0 +1,9 @@
+<RCC>
+    <qresource prefix="/">
+        <file>src/easysslModule/qmldir</file>
+        <file>src/easysslModule/easyssl.qml</file>
+    </qresource>
+    <qresource prefix="/easysslTr">
+        <file>languages/en.qm</file>
+    </qresource>
+</RCC>
diff --git a/src/Library/src/RENAME_MEModule/qmldir b/src/Library/src/RENAME_MEModule/qmldir
deleted file mode 100644
index 966edab..0000000
--- a/src/Library/src/RENAME_MEModule/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module RENAME_MEModule
-RENAME_ME 1.0 RENAME_ME.qml
-
diff --git a/src/Library/src/RENAME_MEModule/RENAME_ME.qml b/src/Library/src/easysslModule/easyssl.qml
similarity index 100%
rename from src/Library/src/RENAME_MEModule/RENAME_ME.qml
rename to src/Library/src/easysslModule/easyssl.qml
diff --git a/src/Library/src/easysslModule/qmldir b/src/Library/src/easysslModule/qmldir
new file mode 100644
index 0000000..98d0648
--- /dev/null
+++ b/src/Library/src/easysslModule/qmldir
@@ -0,0 +1,3 @@
+module easysslModule
+easyssl 1.0 easyssl.qml
+
diff --git a/src/Library/src/public/RENAME_ME.cpp b/src/Library/src/public/easyssl.cpp
similarity index 74%
rename from src/Library/src/public/RENAME_ME.cpp
rename to src/Library/src/public/easyssl.cpp
index f18b899..cb17939 100644
--- a/src/Library/src/public/RENAME_ME.cpp
+++ b/src/Library/src/public/easyssl.cpp
@@ -5,18 +5,18 @@
 //# of this license document, but changing it is not allowed.
 //#
 
-#include "RENAME_ME.h"
+#include "easyssl.h"
 
 
-namespace RENAME_ME {
+namespace easyssl {
 
 bool init() {
-    initRENAME_MEResources();
+    initeasysslResources();
     return true;
 }
 
 QString version() {
-    return RENAME_ME_VERSION;
+    return easyssl_VERSION;
 }
 
 
diff --git a/src/Library/src/public/RENAME_ME.h b/src/Library/src/public/easyssl.h
similarity index 64%
rename from src/Library/src/public/RENAME_ME.h
rename to src/Library/src/public/easyssl.h
index bee7dbf..1d8b955 100644
--- a/src/Library/src/public/RENAME_ME.h
+++ b/src/Library/src/public/easyssl.h
@@ -5,23 +5,23 @@
 //# of this license document, but changing it is not allowed.
 //#
 
-#include "RENAME_ME/global.h"
+#include "easyssl/global.h"
 #include <QString>
 
-inline void initRENAME_MEResources() { Q_INIT_RESOURCE(RENAME_ME); }
+inline void initeasysslResources() { Q_INIT_RESOURCE(easyssl); }
 
-namespace RENAME_ME {
+namespace easyssl {
 
 /**
- * @brief init main initialize method of The RENAME_ME library
+ * @brief init main initialize method of The easyssl library
  * @return true if library initialized successfull
  */
-bool RENAME_ME_EXPORT init();
+bool easyssl_EXPORT init();
 
 /**
  * @brief version This method return string value of a library version
  * @return string value of a library version
  */
-QString RENAME_ME_EXPORT version();
+QString easyssl_EXPORT version();
 
 };
diff --git a/src/Library/src/public/RENAME_ME/global.h.in b/src/Library/src/public/easyssl/global.h.in
similarity index 54%
rename from src/Library/src/public/RENAME_ME/global.h.in
rename to src/Library/src/public/easyssl/global.h.in
index 312004f..5fbbaed 100644
--- a/src/Library/src/public/RENAME_ME/global.h.in
+++ b/src/Library/src/public/easyssl/global.h.in
@@ -5,18 +5,18 @@
 //# of this license document, but changing it is not allowed.
 //#
 
-#ifndef RENAME_ME_GLOBAL_H
-#define RENAME_ME_GLOBAL_H
+#ifndef easyssl_GLOBAL_H
+#define easyssl_GLOBAL_H
 
 #include <QtCore/qglobal.h>
 
-#define RENAME_ME_VERSION "@RENAME_ME_VERSION@"
+#define easyssl_VERSION "@easyssl_VERSION@"
 
-#if defined(RENAME_ME_LIBRARY)
-#  define RENAME_ME_EXPORT Q_DECL_EXPORT
+#if defined(easyssl_LIBRARY)
+#  define easyssl_EXPORT Q_DECL_EXPORT
 #else
-#  define RENAME_ME_EXPORT Q_DECL_IMPORT
+#  define easyssl_EXPORT Q_DECL_IMPORT
 #endif
 
-#endif //RENAME_ME_GLOBAL_H
+#endif //easyssl_GLOBAL_H
 
diff --git a/tests/tstMain.cpp b/tests/tstMain.cpp
index 3beb3ee..2f6aa0f 100644
--- a/tests/tstMain.cpp
+++ b/tests/tstMain.cpp
@@ -57,7 +57,7 @@ tstMain::tstMain() {
     char * argv[] = {nullptr};
 
     _app = new QCoreApplication(argc, argv);
-    QCoreApplication::setApplicationName("testRENAME_ME");
+    QCoreApplication::setApplicationName("testeasyssl");
     QCoreApplication::setOrganizationName("QuasarApp");
 
     auto path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);