Update app.js and clean up files

This commit is contained in:
Namhyeon Go 2024-07-23 04:26:38 +09:00
parent aa4ca1b212
commit d15f23a3c1
8 changed files with 25 additions and 52 deletions

View File

@ -1,20 +0,0 @@
# REGASM for WelsonJS
In general, the location of REGASM is as follows.
```
C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe
```
Or it may vary depending on the version.
## How to register .NET COM/DLL component
Example:
```
C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase WelsonJS.Toolkit.dll
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase WelsonJS.Toolkit.dll
```
Thank you.

4
app.js
View File

@ -44,8 +44,6 @@
// loaded.
//
var exit = function(status) {
if (status == 0) return;
console.error("Exit", status, "caused");
if (typeof WScript !== "undefined") {
@ -578,7 +576,7 @@ function initializeWindow(name, args, w, h) {
if (app) {
if (app.main) {
var status = app.main.call(app, args);
if (status > -1) {
if (status > 0) {
exit(status);
}
} else {

View File

@ -1,3 +1,25 @@
@echo off
rem https://github.com/gnh1201/welsonjs
pushd %~dp0
echo [*] Starting pre-configure script...
echo [*] Registering HTA file association...
reg import app\assets\reg\Default_HTA.reg
echo [*] Unlocking the performance limit of MSHTML...
reg add "HKCU\Software\Microsoft\Internet Explorer\Styles" /f
reg add "HKCU\Software\Microsoft\Internet Explorer\Styles" /v "MaxScriptStatements" /t REG_DWORD /d 0xFFFFFFFF /f
rem echo [*] Registering AutoItX component...
rem regsvr32 /s "%PROGRAMFILES(X86)%\AutoIt3\AutoItX\AutoItX3.dll"
rem regsvr32 /s "%PROGRAMFILES(X86)%\AutoIt3\AutoItX\AutoItX3_x64.dll"
echo [*] Registering WelsonJS Toolkit component...
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase bin\x86\WelsonJS.Toolkit.dll
%WINDIR%\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase bin\x64\WelsonJS.Toolkit.dll
echo [*] Done.
cscript app.js bootstrap

2
bootstrap.js vendored
View File

@ -25,7 +25,7 @@ exports.main = function(args) {
// Register HTA file association
console.log("Registering HTA file association...");
REG.execFile("Default_HTA.reg");
REG.execFile("app\\assets\\reg\\Default_HTA.reg");
// Register URI scheme
if (!isDisabledRegisterURIScheme) {

View File

@ -1,24 +0,0 @@
@echo off
rem preconfigure.bat
rem Namhyeon Go (gnh1201@gmail.com)
rem https://github.com/gnh1201/welsonjs
pushd %~dp0
echo [*] Starting WelsonJS pre-configure script...
echo [*] Registering HTA file association...
reg import Default_HTA.reg
echo [*] Unlocking the performance limit of the GUI(MSHTML) environment...
reg add "HKCU\Software\Microsoft\Internet Explorer\Styles" /f
reg add "HKCU\Software\Microsoft\Internet Explorer\Styles" /v "MaxScriptStatements" /t REG_DWORD /d 0xFFFFFFFF /f
echo [*] Registering AutoItX component...
regsvr32 /s "%PROGRAMFILES(X86)%\AutoIt3\AutoItX\AutoItX3.dll"
regsvr32 /s "%PROGRAMFILES(X86)%\AutoIt3\AutoItX\AutoItX3_x64.dll"
echo [*] Registering WelsonJS native component...
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase bin\x86\WelsonJS.Toolkit.dll
%WINDIR%\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase bin\x64\WelsonJS.Toolkit.dll
echo Done

View File

@ -1,5 +1,5 @@
; @created_on 2020-06-26
; @updated_on 2024-07-10
; @updated_on 2024-07-23
; @author Namhyeon Go (Catswords Research) <abuse@catswords.net>
[Setup]
@ -39,7 +39,6 @@ Source: "Default_HTA.reg"; DestDir: "{app}";
Source: "LICENSE"; DestDir: "{app}";
Source: "LICENSE_MSRL"; DestDir: "{app}";
Source: "*.md"; DestDir: "{app}";
Source: "preconfigure.bat"; DestDir: "{app}";
Source: "bootstrap.bat"; DestDir: "{app}";
Source: "uriloader.js"; DestDir: "{app}";
Source: "webloader.js"; DestDir: "{app}";
@ -63,7 +62,6 @@ Name: "{group}\Uninstall {cm:AppName}"; Filename: "{uninstallexe}"; AfterInstall
; Filename: {app}\bin\gtk2-runtime-2.24.33-2021-01-30-ts-win64.exe;
; Filename: {app}\bin\nmap-7.92\VC_redist.x86.exe;
; Filename: {app}\bin\nmap-7.92\npcap-1.50.exe;
Filename: {app}\preconfigure.bat;
Filename: {app}\bootstrap.bat;
[UninstallRun]

View File

@ -1 +0,0 @@
1