Skip to content

Commit 56cf0f8

Browse files
authored
Merge pull request #2 from Mohit-Hasan/main
Initiate version 1.x and improve Windows compatibility
2 parents caf4be6 + bc010d2 commit 56cf0f8

7 files changed

Lines changed: 24 additions & 14 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99

1010
jobs:
1111
build:
12+
env:
13+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1214
name: Build on ${{ matrix.os }}
1315
runs-on: ${{ matrix.os }}
1416
strategy:
@@ -17,12 +19,12 @@ jobs:
1719
os: [ubuntu-latest, windows-latest, macos-latest]
1820

1921
steps:
20-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2123

2224
- name: Set up Python
23-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v5
2426
with:
25-
python-name: '3.x'
27+
python-version: '3.x'
2628

2729
- name: Install Linux Dependencies
2830
if: matrix.os == 'ubuntu-latest'
@@ -49,21 +51,21 @@ jobs:
4951
5052
- name: Upload Artifact (Windows)
5153
if: matrix.os == 'windows-latest'
52-
uses: actions/upload-artifact@v3
54+
uses: actions/upload-artifact@v4
5355
with:
5456
name: CryptPHP-Windows
5557
path: build/Release/CryptPHP.exe
5658

5759
- name: Upload Artifact (macOS)
5860
if: matrix.os == 'macos-latest'
59-
uses: actions/upload-artifact@v3
61+
uses: actions/upload-artifact@v4
6062
with:
6163
name: CryptPHP-macOS
6264
path: build/CryptPHP
6365

6466
- name: Upload Artifact (Linux)
6567
if: matrix.os == 'ubuntu-latest'
66-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v4
6769
with:
6870
name: CryptPHP-Linux
6971
path: build/CryptPHP

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
**CryptPHP** is a high-performance, cross-platform PHP obfuscator and encoder designed to secure your source code. It combines granular file selection with multi-layer protection to safeguard your intellectual property.
44

5+
![tab-1](https://raw.githubusercontent.com/Mohit-Hasan/crypt-php/refs/heads/main/assets/tab-1.png)
6+
57
---
68

79
## Key Features
@@ -46,6 +48,8 @@ make -j$(sysctl -n hw.ncpu)
4648
4. **Package**: Configure your **Seed Folder** and click **Build & Orchestrate**.
4749
5. **Deploy**: Find your protected ZIP files in the `dist/` directory.
4850

51+
![tab-2](https://raw.githubusercontent.com/Mohit-Hasan/crypt-php/refs/heads/main/assets/tab-2.png)
52+
4953
---
5054

5155
## Credits & Licensing

assets/tab-1.png

512 KB
Loading

assets/tab-2.png

480 KB
Loading

scripts/package_resources.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def package_directory(src_dir, header_file):
3131
f.write("\nstatic const EmbeddedFile g_EmbeddedFiles[] = {\n")
3232
for i, (rel_path, abs_path) in enumerate(files):
3333
size = os.path.getsize(abs_path)
34+
rel_path = rel_path.replace("\\", "/")
3435
f.write(f' {{ "{rel_path}", {size}, g_FileData_{i} }},\n')
3536
f.write("};\n\n")
3637
f.write(f"static const size_t g_EmbeddedFilesCount = {len(files)};\n")

src/FileUtil.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
#include "FileUtil.h"
22
#include <array>
3+
#include <cstdio>
34
#include <filesystem>
45
#include <fstream>
56
#include <iostream>
67
#include <string>
78
#include <vector>
9+
10+
#ifdef _WIN32
11+
#define popen _popen
12+
#define pclose _pclose
13+
#endif
814
using namespace std;
915
namespace fs = std::filesystem;
1016

src/main.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,6 @@ void SetupModernStyle() {
143143
c[ImGuiCol_TextDisabled] = {0.50f, 0.55f, 0.60f, 1.f};
144144
}
145145

146-
#ifdef _WIN32
147-
#define NOMINMAX
148-
#include <shellapi.h>
149-
#include <windows.h>
150-
#endif
151-
152146
// helpers
153147
static void OpenURL(const char *url) {
154148
#ifdef __APPLE__
@@ -157,7 +151,10 @@ static void OpenURL(const char *url) {
157151
cmd += "\"";
158152
system(cmd.c_str());
159153
#elif defined(_WIN32)
160-
ShellExecuteA(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
154+
string cmd = "start \"\" \"";
155+
cmd += url;
156+
cmd += "\"";
157+
system(cmd.c_str());
161158
#else
162159
string cmd = "xdg-open \"";
163160
cmd += url;
@@ -863,7 +860,7 @@ int main(int, char **) {
863860
ImGui::Text("CryptPHP - Obfuscator for php");
864861
ImGui::PopStyleColor();
865862
ImGui::PopFont();
866-
ImGui::TextDisabled("v%s | Professional PHP Protection Suite",
863+
ImGui::TextDisabled("%s | Professional PHP Protection Suite",
867864
BRAND_VERSION);
868865
ImGui::Separator();
869866
ImGui::Spacing();

0 commit comments

Comments
 (0)