Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Jan 21, 2022
0 parents commit cb79b7b
Show file tree
Hide file tree
Showing 14 changed files with 289 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*/*.o
*/*.exe
.vscode/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Kouji Matsui (@kozy_kekyo, @kekyo2)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Outernet Explorer

A funny old-style web browser stub, comes from Internet Explorer was genocided on Windows.

![Outernet Explorer icon](images/oexplore-128.png)

Download from: https://github.com/kekyo/OuternetExplorer/releases/download/1.0.0/oexplore.zip

## What's this?

A stub implementation for Internet Explorer ActiveX component (called `MSHTML`, `ShDocVw` and like).
It's simplest replacer for `iexplore.exe`.

## Usage

* Double-click `oexplore.exe` on the Explorer.
* Invokes from command-line:

```
C:\>oexplore.exe
```

### Options

Outenet Explorer could receive only target url like:

```
C:\>oexplore.exe https://google.com/
```

Unfortunately, the url will inspect inside of Internet Explorer component, and maybe shows up both IE **AND** Edge2...

## License

MIT
18 changes: 18 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

# For MSYS2 mingw32/64

pacman -S --needed --noconfirm mingw-w64-i686-toolchain
#pacman -S --needed --noconfirm mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain

# rm -rf i686/*.o i686/*.exe
mkdir i686

# rm -rf x86_64/*.o x86_64/*.exe
mkdir x86_64

windres oexplore.rc --target=pe-i386 -Ii686/ i686/oexplore.o
/mingw32/bin/i686-w64-mingw32-gcc -Os -mwindows -static-libgcc -nostdlib -s -o i686/oexplore.exe oexplore.c i686/oexplore.o -lkernel32 -luser32 -lole32 -loleaut32 -luuid -lshell32

# windres oexplore.rc --target=pe-x86-64 -Ix86_64/ x86_64/oexplore.o
# /mingw64/bin/x86_64-w64-mingw32-gcc -Os -mwindows -static-libgcc -nostdlib -s -o x86_64/oexplore.exe oexplore.c x86_64/oexplore.o -lkernel32 -luser32 -lole32 -loleaut32 -luuid -lshell32
1 change: 1 addition & 0 deletions i686/resource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define PRODUCTNAME "Outernet Explorer [i686]"
6 changes: 6 additions & 0 deletions images/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Outernet Explorer icon is imported from FireFox's emoji.

* https://github.com/mozilla/fxemoji/blob/gh-pages/svgs/nature/u1F30E-americasglobe.svg
* https://github.com/mozilla/fxemoji/blob/gh-pages/svgs/people/u1F4AB-dizzy.svg

It's CC BY 4.0 license, please following details: https://github.com/mozilla/fxemoji/blob/gh-pages/LICENSE.md
Binary file added images/oexplore-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/oexplore.ico
Binary file not shown.
Binary file added images/oexplore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions images/u1F30E-americasglobe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions images/u1F4AB-dizzy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions oexplore.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#include <windows.h>
#include <exdisp.h>
#include <shellapi.h>

int start()
{
CoInitialize(NULL);
IWebBrowser2* pWebBrowser2 = NULL;
HRESULT hr = CoCreateInstance(
&CLSID_InternetExplorer,
NULL,
CLSCTX_LOCAL_SERVER,
&IID_IWebBrowser2,
(void**)&pWebBrowser2);
if (SUCCEEDED(hr))
{
hr = pWebBrowser2->lpVtbl->put_Visible(
pWebBrowser2, VARIANT_TRUE);
if (SUCCEEDED(hr))
{
LPCWSTR commandLine = GetCommandLineW();
int args = 0;
LPWSTR* argv = CommandLineToArgvW(commandLine, &args);
BSTR url = SysAllocString(
args >= 2 ? argv[1] : L"http://www.bing.com/");
LocalFree(argv);

hr = pWebBrowser2->lpVtbl->Navigate(
pWebBrowser2, url, NULL, NULL, NULL, NULL);
if (FAILED(hr))
{
MessageBoxW(
NULL,
L"Couldn't navigate.",
L"Outernet Explorer",
MB_OK | MB_ICONEXCLAMATION);
}
SysFreeString(url);
}
else
{
MessageBoxW(
NULL,
L"Couldn't show Internet Explorer component.",
L"Outernet Explorer",
MB_OK | MB_ICONEXCLAMATION);
}
pWebBrowser2->lpVtbl->Release(pWebBrowser2);
}
else
{
MessageBoxW(
NULL,
L"Couldn't instantiate Internet Explorer component.",
L"Outernet Explorer",
MB_OK | MB_ICONEXCLAMATION);
}
CoUninitialize();
ExitProcess(hr);
}
26 changes: 26 additions & 0 deletions oexplore.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "winver.h"
#include "resource.h"
#define IDI_OEICON 100
VS_VERSION_INFO VERSIONINFO
FILEVERSION 11, 0, 19041, 1202
PRODUCTVERSION 11, 0, 19041, 1202
{
BLOCK "StringFileInfo"
{
BLOCK "040904b0"
{
VALUE "CompanyName", "Kouji Matsui"
VALUE "FileDescription", "https://github.com/kekyo/OuternetExplorer"
VALUE "FileVersion", "11.0.19041.1202"
VALUE "LegalCopyright", "Copyright (c) 2022 Kouji Matsui (@kozy_kekyo, @kekyo2)"
VALUE "OriginalFilename", "oexplore.exe"
VALUE "ProductName", PRODUCTNAME
VALUE "ProductVersion", "11.0.19041.1202"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1200
}
}
IDI_OEICON ICON "images/oexplore.ico"
1 change: 1 addition & 0 deletions x86_64/resource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define PRODUCTNAME "Outernet Explorer [x86_64]"

0 comments on commit cb79b7b

Please sign in to comment.