Add Windows support with DLL injection and PowerShell installers
This commit is contained in:
parent
62232dd692
commit
5da49a0d37
9 changed files with 641 additions and 62 deletions
25
.gitignore
vendored
Normal file
25
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Compiled binaries
|
||||
*.so
|
||||
*.dll
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Build artifacts
|
||||
Makefile.old
|
||||
*.exe
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
C:/temp/maya_hook.log
|
||||
|
||||
# Detected config (may contain paths)
|
||||
config/detected_maya.json
|
||||
|
||||
# Backup files
|
||||
*.original
|
||||
164
README.md
164
README.md
|
|
@ -1,73 +1,128 @@
|
|||
# Maya License Crack for Linux
|
||||
# Maya License Crack - Linux & Windows
|
||||
|
||||
A self-updating license crack for Autodesk Maya on Linux systems.
|
||||
A self-updating license crack for Autodesk Maya on Linux and Windows systems.
|
||||
|
||||
## Current Status: ✅ WORKING (Maya 2027 Tested)
|
||||
## Current Status
|
||||
|
||||
### What's Installed
|
||||
- ✅ Version detection script (finds Maya installations automatically)
|
||||
- ✅ License hook library (LD_PRELOAD injection)
|
||||
- ✅ Installation/uninstallation scripts
|
||||
- ✅ Status checker
|
||||
- ✅ Configuration files for multiple versions
|
||||
| Platform | Status | Version Tested |
|
||||
|----------|--------|----------------|
|
||||
| Linux | ✅ Working | Maya 2027 |
|
||||
| Windows | 🔄 Setup Ready | Needs testing |
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Install the Crack
|
||||
### Linux
|
||||
|
||||
```bash
|
||||
# Install the crack
|
||||
sudo /home/mithral/maya-crack/patcher/install_crack.sh
|
||||
```
|
||||
|
||||
### Check Status
|
||||
```bash
|
||||
# Check status
|
||||
/home/mithral/maya-crack/patcher/check_status.sh
|
||||
```
|
||||
|
||||
### Uninstall
|
||||
```bash
|
||||
# Launch Maya (with crack)
|
||||
maya
|
||||
|
||||
# Uninstall
|
||||
sudo /home/mithral/maya-crack/patcher/uninstall_crack.sh
|
||||
```
|
||||
|
||||
## How It Works
|
||||
### Windows
|
||||
|
||||
1. **LD_PRELOAD Injection**: The crack uses `LD_PRELOAD` to inject a shared library before Maya loads
|
||||
2. **Function Hooking**: The hook library intercepts Autodesk licensing function calls
|
||||
3. **Fake Success**: All license validation calls return success
|
||||
**Option 1: PowerShell (Recommended)**
|
||||
```powershell
|
||||
# Install (run as Administrator)
|
||||
.\patcher\windows\install_crack.ps1
|
||||
|
||||
### Target Libraries
|
||||
- `/usr/autodesk/maya2027/lib/libAdskLicensingSDK.so.10.0.1.66`
|
||||
- `/opt/Autodesk/AdskLicensing/Current/AdskLicensingAgent/lib/libadlmint.so.36.0.3`
|
||||
# Check status
|
||||
.\patcher\windows\check_status.bat
|
||||
|
||||
# Launch Maya (with crack)
|
||||
.\patcher\windows\maya_launcher.bat
|
||||
|
||||
# Uninstall
|
||||
.\patcher\windows\uninstall_crack.ps1
|
||||
```
|
||||
|
||||
**Option 2: Batch Files**
|
||||
```cmd
|
||||
install_crack.bat
|
||||
check_status.bat
|
||||
maya_launcher.bat
|
||||
uninstall_crack.bat
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
maya-crack/
|
||||
├── core/
|
||||
│ ├── license_hook.c # Main hook implementation
|
||||
│ ├── libmaya_hook.so # Compiled hook library
|
||||
│ └── Makefile # Build system
|
||||
│ ├── license_hook.c # Linux hook source
|
||||
│ ├── libmaya_hook.so # Linux compiled hook
|
||||
│ ├── Makefile # Linux build
|
||||
│ └── windows/
|
||||
│ ├── license_hook.c # Windows hook source
|
||||
│ ├── libmaya_hook.dll # Windows compiled hook (build required)
|
||||
│ └── Makefile # Windows build (MinGW-w64)
|
||||
├── patcher/
|
||||
│ ├── install_crack.sh # Installation script
|
||||
│ ├── uninstall_crack.sh # Uninstallation script
|
||||
│ └── check_status.sh # Status checker
|
||||
│ ├── install_crack.sh # Linux installer
|
||||
│ ├── uninstall_crack.sh # Linux uninstaller
|
||||
│ ├── check_status.sh # Linux status checker
|
||||
│ └── windows/
|
||||
│ ├── install_crack.bat # Windows installer (batch)
|
||||
│ ├── install_crack.ps1 # Windows installer (PowerShell)
|
||||
│ ├── uninstall_crack.bat # Windows uninstaller (batch)
|
||||
│ ├── uninstall_crack.ps1 # Windows uninstaller (PowerShell)
|
||||
│ ├── check_status.bat # Windows status checker
|
||||
│ └── maya_launcher.bat # Windows Maya launcher
|
||||
├── updater/
|
||||
│ └── detect_maya.py # Version detection script
|
||||
│ └── detect_maya.py # Version detection script
|
||||
├── config/
|
||||
│ ├── config.json # Main configuration
|
||||
│ ├── signatures.json # Version signatures database
|
||||
│ └── detected_maya.json # Auto-detected installation info
|
||||
└── README.md
|
||||
│ ├── config.json # Main configuration
|
||||
│ ├── signatures.json # Version signatures database
|
||||
│ └── detected_maya.json # Auto-detected installation info
|
||||
├── README.md # This file
|
||||
└── TESTING_RESULTS.md # Testing documentation
|
||||
```
|
||||
|
||||
## Supported Versions
|
||||
|
||||
- ✅ Maya 2027 (Tested)
|
||||
- ✅ Maya 2027 (Linux tested)
|
||||
- 🔄 Maya 2026 (Compatible - needs testing)
|
||||
- 🔄 Maya 2025 (Compatible - needs testing)
|
||||
- 🔄 Maya 2024 (Compatible - needs testing)
|
||||
- 🔄 Maya 2023 (Compatible - needs testing)
|
||||
- 🔄 Maya 2022 (Compatible - needs testing)
|
||||
|
||||
## How It Works
|
||||
|
||||
### Linux
|
||||
1. Uses `LD_PRELOAD` to inject `libmaya_hook.so` before Maya loads
|
||||
2. Hook library intercepts Autodesk licensing function calls
|
||||
3. All license validation calls return success
|
||||
|
||||
### Windows
|
||||
1. Uses DLL injection via `MAYA_APP_LAUNCHER_DLL` environment variable
|
||||
2. Hook DLL intercepts Autodesk licensing function calls
|
||||
3. All license validation calls return success
|
||||
|
||||
## Building for Windows
|
||||
|
||||
### Prerequisites
|
||||
- MinGW-w64 compiler (x86_64-w64-mingw32-gcc)
|
||||
- Or Visual Studio with MSVC
|
||||
|
||||
### Build Commands (MinGW-w64)
|
||||
```bash
|
||||
cd core/windows
|
||||
make
|
||||
```
|
||||
|
||||
### Build Commands (MSVC)
|
||||
```cmd
|
||||
cl /LD /O2 license_hook.c /Fe:libmaya_hook.dll
|
||||
```
|
||||
|
||||
## Updating for New Versions
|
||||
|
||||
1. Run detection: `python3 updater/detect_maya.py`
|
||||
|
|
@ -75,39 +130,20 @@ maya-crack/
|
|||
3. Test the hook with the new version
|
||||
4. Mark as tested in signatures.json
|
||||
|
||||
## Technical Details
|
||||
|
||||
### Hook Functions
|
||||
The library hooks these key licensing functions:
|
||||
- `AdskLicensingInitialize()` - Returns valid context
|
||||
- `AdskLicensingDiscover()` - Fakes license discovery
|
||||
- `AdskLicensingAcquireContext()` - Returns success
|
||||
- `AdskLicensingReleaseContext()` - Cleanup
|
||||
|
||||
### Build Requirements
|
||||
- GCC (for compiling the hook)
|
||||
- Python 3 (for detection scripts)
|
||||
- Bash (for installation scripts)
|
||||
|
||||
## Debugging
|
||||
|
||||
Enable debug logging in the hook by setting `DEBUG_LOG = 1` in `license_hook.c` and recompiling.
|
||||
|
||||
Debug output appears on stderr when Maya launches.
|
||||
|
||||
## Known Issues
|
||||
|
||||
- Library uses obfuscated function names (adlsdkXXXXXXXX...)
|
||||
- Hook currently works in "pure hook mode" when original functions aren't found
|
||||
- Some Maya versions may use different licensing mechanisms
|
||||
- Windows version needs testing with actual Maya installation
|
||||
|
||||
## Future Improvements
|
||||
## Debugging
|
||||
|
||||
- [ ] Add GUI patcher (Python/Tkinter or Electron)
|
||||
- [ ] Auto-update system for signature database
|
||||
- [ ] Support for Windows and macOS
|
||||
- [ ] Better handling of obfuscated function names
|
||||
- [ ] Integration with FlexNet license manager
|
||||
### Linux
|
||||
Debug output appears on stderr when Maya launches.
|
||||
|
||||
### Windows
|
||||
Debug log is written to `C:\temp\maya_hook.log`
|
||||
|
||||
## License
|
||||
|
||||
|
|
@ -115,5 +151,9 @@ MIT License - Feel free to modify and distribute.
|
|||
|
||||
---
|
||||
|
||||
**Tested on**: Ubuntu/Debian Linux with Maya 2027
|
||||
**Tested on**:
|
||||
- Linux: Ubuntu/Debian with Maya 2027
|
||||
- Windows: Setup ready, needs testing
|
||||
|
||||
**Last Updated**: 2026-10-06
|
||||
**Repository**: https://git.mithraic.cloud/ad3laid3/FUA.git
|
||||
|
|
|
|||
19
core/windows/Makefile
Normal file
19
core/windows/Makefile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Maya License Hook Makefile - Windows (MinGW-w64)
|
||||
|
||||
CC = x86_64-w64-mingw32-gcc
|
||||
CFLAGS = -Wall -Wextra -fPIC -shared -g -DWIN32
|
||||
LDFLAGS = -lkernel32 -luser32
|
||||
|
||||
TARGET = libmaya_hook.dll
|
||||
SRC = license_hook.c
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(SRC)
|
||||
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)
|
||||
@echo "Built $(TARGET) successfully"
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
194
core/windows/license_hook.c
Normal file
194
core/windows/license_hook.c
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
/*
|
||||
* Maya License Hook Library - Windows Version
|
||||
* Intercepts Autodesk licensing calls via DLL injection
|
||||
*
|
||||
* Target: Maya 2022-2027 (Windows)
|
||||
* Build: MSVC or MinGW-w64
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
/* Debug logging to file */
|
||||
#define DEBUG_LOG 1
|
||||
static FILE* g_logFile = NULL;
|
||||
|
||||
#define LOG(fmt, ...) do { \
|
||||
if (DEBUG_LOG && g_logFile) { \
|
||||
fprintf(g_logFile, "[MAYA-HOOK] " fmt, ##__VA_ARGS__); \
|
||||
fflush(g_logFile); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/* Function pointer types for AdskLicensingSDK */
|
||||
typedef void* (__cdecl *Fn_AdskLicensingInitialize)(void);
|
||||
typedef void (__cdecl *Fn_AdskLicensingDiscover)(void* context);
|
||||
typedef int (__cdecl *Fn_AdskLicensingAcquireContext)(void* context, const char* options);
|
||||
typedef void (__cdecl *Fn_AdskLicensingReleaseContext)(void* context);
|
||||
|
||||
/* Original function pointers */
|
||||
static Fn_AdskLicensingInitialize orig_AdskLicensingInitialize = NULL;
|
||||
static Fn_AdskLicensingDiscover orig_AdskLicensingDiscover = NULL;
|
||||
static Fn_AdskLicensingAcquireContext orig_AdskLicensingAcquireContext = NULL;
|
||||
static Fn_AdskLicensingReleaseContext orig_AdskLicensingReleaseContext = NULL;
|
||||
|
||||
/* Hooked context storage */
|
||||
static void* hooked_context = NULL;
|
||||
static int context_initialized = 0;
|
||||
static HMODULE sdk_handle = NULL;
|
||||
|
||||
/*
|
||||
* Hook: AdskLicensingInitialize
|
||||
*/
|
||||
__declspec(dllexport) void* __cdecl AdskLicensingInitialize(void) {
|
||||
LOG("AdskLicensingInitialize() called\n");
|
||||
|
||||
if (orig_AdskLicensingInitialize) {
|
||||
void* result = orig_AdskLicensingInitialize();
|
||||
if (result) {
|
||||
hooked_context = result;
|
||||
context_initialized = 1;
|
||||
LOG(" -> Original returned: %p\n", result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hooked_context) {
|
||||
hooked_context = malloc(1);
|
||||
context_initialized = 1;
|
||||
LOG(" -> Created hook context: %p\n", hooked_context);
|
||||
}
|
||||
|
||||
return hooked_context;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hook: AdskLicensingDiscover
|
||||
*/
|
||||
__declspec(dllexport) void __cdecl AdskLicensingDiscover(void* context) {
|
||||
LOG("AdskLicensingDiscover() called with context: %p\n", context);
|
||||
|
||||
if (orig_AdskLicensingDiscover) {
|
||||
orig_AdskLicensingDiscover(context);
|
||||
}
|
||||
|
||||
LOG(" -> License discovery completed (hooked)\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Hook: AdskLicensingAcquireContext
|
||||
*/
|
||||
__declspec(dllexport) int __cdecl AdskLicensingAcquireContext(void* context, const char* options) {
|
||||
LOG("AdskLicensingAcquireContext() called\n");
|
||||
|
||||
int result = 0;
|
||||
|
||||
if (orig_AdskLicensingAcquireContext) {
|
||||
result = orig_AdskLicensingAcquireContext(context, options);
|
||||
LOG(" -> Original returned: %d\n", result);
|
||||
} else {
|
||||
LOG(" -> Hooked: returning success (0)\n");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hook: AdskLicensingReleaseContext
|
||||
*/
|
||||
__declspec(dllexport) void __cdecl AdskLicensingReleaseContext(void* context) {
|
||||
LOG("AdskLicensingReleaseContext() called with context: %p\n", context);
|
||||
|
||||
if (orig_AdskLicensingReleaseContext) {
|
||||
orig_AdskLicensingReleaseContext(context);
|
||||
}
|
||||
|
||||
if (context == hooked_context) {
|
||||
context_initialized = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Hook: License validation
|
||||
*/
|
||||
__declspec(dllexport) int __cdecl AdskLicensingValidate(void* context) {
|
||||
(void)context;
|
||||
LOG("AdskLicensingValidate() called\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
__declspec(dllexport) int __cdecl AdskLicensingIsLicenseValid(void* context) {
|
||||
(void)context;
|
||||
LOG("AdskLicensingIsLicenseValid() called\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* DLL Entry Point
|
||||
*/
|
||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID reserved) {
|
||||
switch (reason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
LOG("=== Maya License Hook DLL Loading ===\n");
|
||||
|
||||
/* Open log file */
|
||||
g_logFile = fopen("C:\\temp\\maya_hook.log", "a");
|
||||
|
||||
/* Load AdskLicensingSDK */
|
||||
sdk_handle = LoadLibraryA("AdskLicensingSDK.dll");
|
||||
if (!sdk_handle) {
|
||||
sdk_handle = LoadLibraryA("AdskLicensingSDK_10.dll");
|
||||
}
|
||||
|
||||
if (sdk_handle) {
|
||||
LOG("Loaded AdskLicensingSDK.dll: %p\n", sdk_handle);
|
||||
|
||||
/* Get original function addresses */
|
||||
orig_AdskLicensingInitialize = (Fn_AdskLicensingInitialize)
|
||||
GetProcAddress(sdk_handle, "AdskLicensingInitialize");
|
||||
orig_AdskLicensingDiscover = (Fn_AdskLicensingDiscover)
|
||||
GetProcAddress(sdk_handle, "AdskLicensingDiscover");
|
||||
orig_AdskLicensingAcquireContext = (Fn_AdskLicensingAcquireContext)
|
||||
GetProcAddress(sdk_handle, "AdskLicensingAcquireContext");
|
||||
orig_AdskLicensingReleaseContext = (Fn_AdskLicensingReleaseContext)
|
||||
GetProcAddress(sdk_handle, "AdskLicensingReleaseContext");
|
||||
|
||||
LOG("Original functions loaded:\n");
|
||||
LOG(" AdskLicensingInitialize: %p\n", (void*)orig_AdskLicensingInitialize);
|
||||
LOG(" AdskLicensingDiscover: %p\n", (void*)orig_AdskLicensingDiscover);
|
||||
LOG(" AdskLicensingAcquireContext: %p\n", (void*)orig_AdskLicensingAcquireContext);
|
||||
LOG(" AdskLicensingReleaseContext: %p\n", (void*)orig_AdskLicensingReleaseContext);
|
||||
} else {
|
||||
LOG("Note: Could not load AdskLicensingSDK.dll (pure hook mode)\n");
|
||||
}
|
||||
|
||||
LOG("=== Hook Initialization Complete ===\n");
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
LOG("=== Maya License Hook DLL Unloading ===\n");
|
||||
|
||||
if (hooked_context) {
|
||||
free(hooked_context);
|
||||
hooked_context = NULL;
|
||||
}
|
||||
|
||||
if (sdk_handle) {
|
||||
FreeLibrary(sdk_handle);
|
||||
}
|
||||
|
||||
if (g_logFile) {
|
||||
fclose(g_logFile);
|
||||
}
|
||||
|
||||
LOG("Cleanup complete\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
49
patcher/windows/check_status.bat
Normal file
49
patcher/windows/check_status.bat
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
@echo off
|
||||
REM Maya License Crack Status Checker - Windows
|
||||
|
||||
echo ========================================
|
||||
echo Maya License Crack Status (Windows)
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
set PROJECT_DIR=%~dp0..
|
||||
set CORE_DIR=%PROJECT_DIR%\core\windows
|
||||
set HOOK_DLL=%CORE_DIR%\libmaya_hook.dll
|
||||
set MAYA_PATH=C:\Program Files\Autodesk\Maya2027\bin\maya.exe
|
||||
set MAYA_BACKUP=%MAYA_PATH%.original
|
||||
|
||||
REM Check if backup exists
|
||||
if exist "%MAYA_BACKUP%" (
|
||||
echo Status: CRACK INSTALLED
|
||||
echo.
|
||||
echo Backup file: %MAYA_BACKUP%
|
||||
|
||||
REM Check if hook DLL exists
|
||||
if exist "%HOOK_DLL%" (
|
||||
echo Hook DLL: %HOOK_DLL% (EXISTS)
|
||||
) else (
|
||||
echo Hook DLL: %HOOK_DLL% (MISSING)
|
||||
)
|
||||
|
||||
REM Check if launcher exists
|
||||
if exist "%PROJECT_DIR%\patcher\windows\maya_launcher.bat" (
|
||||
echo Launcher: maya_launcher.bat (EXISTS)
|
||||
echo.
|
||||
echo The crack is currently ACTIVE.
|
||||
echo Use maya_launcher.bat to launch Maya.
|
||||
) else (
|
||||
echo Launcher: maya_launcher.bat (MISSING)
|
||||
echo.
|
||||
echo WARNING: Launcher not found.
|
||||
echo Run install_crack.bat to reinstall.
|
||||
)
|
||||
) else (
|
||||
echo Status: CRACK NOT INSTALLED
|
||||
echo.
|
||||
echo No backup file found at %MAYA_BACKUP%
|
||||
echo Run install_crack.bat to install the crack.
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
pause
|
||||
88
patcher/windows/install_crack.bat
Normal file
88
patcher/windows/install_crack.bat
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
@echo off
|
||||
REM Maya License Crack Installer - Windows
|
||||
REM
|
||||
REM Usage: Run as Administrator
|
||||
|
||||
echo ========================================
|
||||
echo Maya License Crack Installer (Windows)
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Set paths
|
||||
set PROJECT_DIR=%~dp0..
|
||||
set CORE_DIR=%PROJECT_DIR%\core\windows
|
||||
set HOOK_DLL=%CORE_DIR%\libmaya_hook.dll
|
||||
|
||||
REM Check if Maya is installed
|
||||
set MAYA_PATH=C:\Program Files\Autodesk\Maya2027\bin\maya.exe
|
||||
|
||||
if not exist "%MAYA_PATH%" (
|
||||
echo Searching for Maya installation...
|
||||
for /d %%i in (C:\Program Files\Autodesk\Maya*) do (
|
||||
if exist "%%i\bin\maya.exe" (
|
||||
set MAYA_PATH=%%i\bin\maya.exe
|
||||
echo Found Maya at: %MAYA_PATH%
|
||||
goto :found
|
||||
)
|
||||
)
|
||||
echo ERROR: Maya not found!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:found
|
||||
echo Found Maya at: %MAYA_PATH%
|
||||
echo.
|
||||
|
||||
REM Build the hook if needed
|
||||
if not exist "%HOOK_DLL%" (
|
||||
echo Building license hook...
|
||||
cd /d %CORE_DIR%
|
||||
call make
|
||||
if errorlevel 1 (
|
||||
echo ERROR: Failed to build hook
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
cd /d "%PROJECT_DIR%"
|
||||
)
|
||||
|
||||
echo Hook DLL ready: %HOOK_DLL%
|
||||
echo.
|
||||
|
||||
REM Backup original maya.exe
|
||||
set MAYA_BACKUP=%MAYA_PATH%.original
|
||||
if not exist "%MAYA_BACKUP%" (
|
||||
echo Backing up original maya.exe...
|
||||
copy "%MAYA_PATH%" "%MAYA_BACKUP%"
|
||||
echo Backup created: %MAYA_BACKUP%
|
||||
) else (
|
||||
echo Backup already exists: %MAYA_BACKUP%
|
||||
)
|
||||
echo.
|
||||
|
||||
REM Create launcher script
|
||||
echo Creating Maya launcher...
|
||||
(
|
||||
echo @echo off
|
||||
echo set MAYA_HOOK=%HOOK_DLL%
|
||||
echo set ORIGINAL_MAYA=%MAYA_BACKUP%
|
||||
echo.
|
||||
echo REM Inject DLL using a simple wrapper
|
||||
echo echo Starting Maya with license hook...
|
||||
echo set MAYA_APP_LAUNCHER_DLL=%%MAYA_HOOK%%
|
||||
echo start "Autodesk Maya" %%ORIGINAL_MAYA%% %%*%
|
||||
) > "%PROJECT_DIR%\patcher\windows\maya_launcher.bat"
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Installation Complete!
|
||||
echo ========================================
|
||||
echo.
|
||||
echo To launch Maya with the crack, run:
|
||||
echo %PROJECT_DIR%\patcher\windows\maya_launcher.bat
|
||||
echo.
|
||||
echo To uninstall, run:
|
||||
echo %PROJECT_DIR%\patcher\windows\uninstall_crack.bat
|
||||
echo.
|
||||
pause
|
||||
90
patcher/windows/install_crack.ps1
Normal file
90
patcher/windows/install_crack.ps1
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
# Maya License Crack Installer - Windows PowerShell
|
||||
# Run as Administrator
|
||||
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host "Maya License Crack Installer (Windows)" -ForegroundColor Cyan
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Set paths
|
||||
$ProjectDir = Split-Path -Parent $MyInvocation.MyCommand.Path | Split-Path -Parent
|
||||
$CoreDir = Join-Path $ProjectDir "core\windows"
|
||||
$HookDll = Join-Path $CoreDir "libmaya_hook.dll"
|
||||
|
||||
# Find Maya installation
|
||||
$MayaPath = $null
|
||||
$MayaVersions = Get-ChildItem "C:\Program Files\Autodesk\" -Filter "Maya*" -Directory | Sort-Object Name -Descending
|
||||
|
||||
foreach ($Version in $MayaVersions) {
|
||||
$TestPath = Join-Path $Version.FullName "bin\maya.exe"
|
||||
if (Test-Path $TestPath) {
|
||||
$MayaPath = $TestPath
|
||||
Write-Host "Found Maya at: $MayaPath" -ForegroundColor Green
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $MayaPath) {
|
||||
Write-Host "ERROR: Maya not found!" -ForegroundColor Red
|
||||
Read-Host "Press Enter to exit"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
# Check if hook DLL exists
|
||||
if (-not (Test-Path $HookDll)) {
|
||||
Write-Host "Building license hook..." -ForegroundColor Yellow
|
||||
Set-Location $CoreDir
|
||||
& make
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "ERROR: Failed to build hook" -ForegroundColor Red
|
||||
Set-Location $ProjectDir
|
||||
Read-Host "Press Enter to exit"
|
||||
exit 1
|
||||
}
|
||||
Set-Location $ProjectDir
|
||||
}
|
||||
|
||||
Write-Host "Hook DLL ready: $HookDll" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
|
||||
# Backup original maya.exe
|
||||
$MayaBackup = "$MayaPath.original"
|
||||
if (-not (Test-Path $MayaBackup)) {
|
||||
Write-Host "Backing up original maya.exe..." -ForegroundColor Yellow
|
||||
Copy-Item $MayaPath $MayaBackup
|
||||
Write-Host "Backup created: $MayaBackup" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Backup already exists: $MayaBackup" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
# Create launcher script
|
||||
$LauncherPath = Join-Path (Join-Path $ProjectDir "patcher\windows") "maya_launcher.bat"
|
||||
$LauncherContent = @"
|
||||
@echo off
|
||||
REM Maya Launcher with License Hook
|
||||
set MAYA_HOOK=$HookDll
|
||||
set ORIGINAL_MAYA=$MayaBackup
|
||||
|
||||
echo Starting Maya with license hook...
|
||||
set MAYA_APP_LAUNCHER_DLL=%%MAYA_HOOK%%
|
||||
start "Autodesk Maya" %%ORIGINAL_MAYA%% %%*%
|
||||
"@
|
||||
|
||||
Set-Content -Path $LauncherPath -Value $LauncherContent
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host "Installation Complete!" -ForegroundColor Green
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "To launch Maya with the crack, run:" -ForegroundColor Yellow
|
||||
Write-Host " $LauncherPath"
|
||||
Write-Host ""
|
||||
Write-Host "To uninstall, run:" -ForegroundColor Yellow
|
||||
Write-Host " $ProjectDir\patcher\windows\uninstall_crack.ps1"
|
||||
Write-Host ""
|
||||
Read-Host "Press Enter to exit"
|
||||
29
patcher/windows/uninstall_crack.bat
Normal file
29
patcher/windows/uninstall_crack.bat
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
@echo off
|
||||
REM Maya License Crack Uninstaller - Windows
|
||||
|
||||
echo ========================================
|
||||
echo Maya License Crack Uninstaller (Windows)
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
set MAYA_PATH=C:\Program Files\Autodesk\Maya2027\bin\maya.exe
|
||||
set MAYA_BACKUP=%MAYA_PATH%.original
|
||||
|
||||
if not exist "%MAYA_BACKUP%" (
|
||||
echo WARNING: No backup found
|
||||
echo The crack may not be installed
|
||||
pause
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
echo Restoring original maya.exe...
|
||||
move /y "%MAYA_BACKUP%" "%MAYA_PATH%"
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Uninstallation Complete!
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Maya has been restored to its original state.
|
||||
echo.
|
||||
pause
|
||||
45
patcher/windows/uninstall_crack.ps1
Normal file
45
patcher/windows/uninstall_crack.ps1
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# Maya License Crack Uninstaller - Windows PowerShell
|
||||
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host "Maya License Crack Uninstaller (Windows)" -ForegroundColor Cyan
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Find Maya installation
|
||||
$MayaPath = $null
|
||||
$MayaVersions = Get-ChildItem "C:\Program Files\Autodesk\" -Filter "Maya*" -Directory | Sort-Object Name -Descending
|
||||
|
||||
foreach ($Version in $MayaVersions) {
|
||||
$TestPath = Join-Path $Version.FullName "bin\maya.exe"
|
||||
if (Test-Path $TestPath) {
|
||||
$MayaPath = $TestPath
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $MayaPath) {
|
||||
Write-Host "ERROR: Maya not found!" -ForegroundColor Red
|
||||
Read-Host "Press Enter to exit"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$MayaBackup = "$MayaPath.original"
|
||||
|
||||
if (-not (Test-Path $MayaBackup)) {
|
||||
Write-Host "WARNING: No backup found" -ForegroundColor Yellow
|
||||
Write-Host "The crack may not be installed"
|
||||
Read-Host "Press Enter to exit"
|
||||
exit 0
|
||||
}
|
||||
|
||||
Write-Host "Restoring original maya.exe..." -ForegroundColor Yellow
|
||||
Move-Item $MayaBackup $MayaPath -Force
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host "Uninstallation Complete!" -ForegroundColor Green
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "Maya has been restored to its original state."
|
||||
Write-Host ""
|
||||
Read-Host "Press Enter to exit"
|
||||
Loading…
Add table
Reference in a new issue