-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5645990
commit 25e9223
Showing
5 changed files
with
375 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,3 @@ | ||
# Installing and Running FS-UAE Launcher | ||
# Installing and running FS-UAE Launcher | ||
|
||
## Requirements for Ubuntu or Debian | ||
|
||
The following packages are needed: | ||
|
||
sudo apt install python3 python3-pyqt5 python3-pyqt5.qtopengl \ | ||
python3-requests | ||
|
||
At this point, PyOpenGL is bundled, but in the future you might also need | ||
to manually install: | ||
|
||
sudo apt install python3-opengl | ||
|
||
To add support for .lha archives, you also need to have the lhafile | ||
python package installed. You can get python3-lhafile from Frode's PPA, | ||
or you can install with pip: `pip3 install lhafile`. | ||
|
||
You can run the launcher directly from the source directory: | ||
|
||
./fs-uae-launcher | ||
|
||
In this case you should have a matching fs-uae source directory in | ||
../fs-uae, and successully compiled fs-uae with "make" (no installation | ||
needed). FS-UAE Launcher will then find the fs-uae and fs-uae-device-helper | ||
binaries from this parallel source directory. | ||
|
||
## Installing | ||
|
||
To install to /usr/local, you can run: | ||
|
||
./bootstrap | ||
sudo make install | ||
|
||
Remember to also install FS-UAE itself. | ||
See `docs/compiling.md` for instructions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
# Compiling FS-UAE Launcher | ||
|
||
NOTE: This documentation is somewhat out of date. Changes that should | ||
be incorporated into this document include: | ||
|
||
- The recommended way to set up a development environment is now via pipenv | ||
(pipenv install followed by pipenv shell). | ||
- To build packages, scripts in fsbuild/ are used. See the YAML files | ||
in .github/workflows for examples. | ||
- Official builds for x86-64 are built via GitHub actions, so the YAML files | ||
in .github/workflows should always be up to date. | ||
- PyOpenGL is now an external dependency (for FS-UAE Arcade). | ||
- Pyinstaller is now used to bundle together the app (instead of cx_Freeze). | ||
|
||
## Running without installing | ||
|
||
You can run fs-uae launcher from the source directory as long as the | ||
dependencies are installed. In this case, you should have FS-UAE compiled in | ||
it's own `fs-uae` source directory next to the fs-uae-launcher source | ||
directory, for example: | ||
|
||
src/fs-uae/ | ||
src/fs-uae-launcher/ | ||
|
||
See the next sections for installing requirements on the diffent supported | ||
platforms. | ||
|
||
## Ubuntu / Debian | ||
|
||
The following packages are needed: | ||
|
||
sudo apt install python3 python3-pillow python3-pyqt5 \ | ||
python3-pyqt5.qtopengl python3-requests python3-opengl \ | ||
python3-rx python3-typing-extensions | ||
|
||
To add support for .lha archives, you also need to have the lhafile | ||
python package installed. You can get `python3-lhafile` from Frode's PPA, | ||
or you can install with pip: `pip3 install lhafile`. | ||
|
||
To compile some required files: | ||
|
||
./bootstrap | ||
make | ||
|
||
You can run the launcher directly from the source directory: | ||
|
||
./fs-uae-launcher | ||
|
||
In this case you should have a matching fs-uae source directory in | ||
`../fs-uae`, and successully compiled fs-uae with `make` (no installation | ||
needed). FS-UAE Launcher will then find the fs-uae and fs-uae-device-helper | ||
binaries from this parallel source directory. | ||
|
||
To install to /usr/local, you can run: | ||
|
||
./bootstrap | ||
sudo make install | ||
|
||
Remember to also install FS-UAE itself. | ||
|
||
## Windows | ||
|
||
The following instructions / notes assume that an MSYS2 shell has been | ||
installed and configured for building FS-UAE. Though the dependencies | ||
for FS-UAE Launcher do not depend on MSYS2 nor MINGW, the build scripts | ||
are run from an MSYS2 shell. | ||
|
||
FIXME: Write about dependencies for running the launcher from the source | ||
directory: | ||
|
||
pacman -S mingw-w64-x86_64-python3 mingw-w64-x86_64-python3-lhafile \ | ||
mingw-w64-x86_64-python3-pillow mingw-w64-x86_64-python3-pyqt5 \ | ||
mingw-w64-x86_64-python3-requests mingw-w64-x86_64-python3-setuptools | ||
|
||
And finally, from the fs-uae-launcher source directory: | ||
|
||
./bootstrap | ||
make | ||
|
||
This will allow you to run fs-uae-launcher from the source directory by | ||
executing (See also the section "Running without installing"): | ||
|
||
./fs-uae-launcher | ||
|
||
The following instructions must be followed in order to build the | ||
distributable version. | ||
|
||
Download Python 3.6.8 (or a newer _3.6.x_ version) | ||
|
||
- https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe | ||
- Install to default path (...\AppData\Local\Programs\...) | ||
- Default settings, do _not_ add to PATH | ||
- Answer yes to increase max path limit at the end? | ||
|
||
Install Visual Studio Build Tools 2019 (vs_buildtools_xxx.yyy.exe) | ||
|
||
- FIXME: Link to download page | ||
- Install invidual components: | ||
- MSVC v140 - VS 2015 C++ build tools (v14.00) | ||
- Windows 10 SDK (10.0.18362) | ||
|
||
Start Windows cmd shell (_not_ MSYS2) and run: | ||
|
||
SET PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64 | ||
rc.exe | ||
|
||
You might need to replace the version number `10.0.18362.0` in the PATH if you | ||
installed a newer version. We run rc.exe just check that it exists (verify | ||
thatyou do not get errors here). Then follow with: | ||
|
||
cd %LOCALAPPDATA%\Programs\Python\Python36 | ||
python -m pip install --upgrade pip | ||
python -m pip install lhafile requests pillow PyQt5==5.12.2 | ||
|
||
In the MSYS2 MinGW 64-bit shell: | ||
|
||
git clone [email protected]:FrodeSolheim/cx_Freeze.git | ||
cd cx_Freeze | ||
./install-windows.sh | ||
|
||
## macOS | ||
|
||
You need to have Xcode and command line tools instead. | ||
|
||
Download and install Python 3 (64-bit only installer) for macOS from | ||
[https://www.python.org/downloads/mac-osx/]. | ||
|
||
Open a new terminal to make sure the new python3 is on the PATH. You should | ||
verify that pip3 is found in the correct place: | ||
|
||
$ which pip3 | ||
/Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 | ||
|
||
Then run: | ||
|
||
pip3 install lhafile pillow pyobjc pyqt5 requests rx typing_extensions | ||
|
||
And finally, from the fs-uae-launcher source directory: | ||
|
||
./bootstrap | ||
make | ||
|
||
This will allow you to run fs-uae-launcher from the source directory by | ||
executing (See also the section "Running without installing"): | ||
|
||
./fs-uae-launcher | ||
|
||
In order to compile an app bundle, you need to have cx_Freeze installed, | ||
and in particular, a patched version from | ||
[https://github.com/FrodeSolheim/cx_Freeze]. Download the latest version from | ||
github, and run: | ||
|
||
python3 setup.py install | ||
|
||
You also need to have gettext installed for compiling the translation files. | ||
Make sure Homebrew for macOS is installed and run: | ||
|
||
brew install gettext | ||
|
||
And then either link gettext into the system with `brew install link` or | ||
add `/usr/local/opt/gettext/bin` to the PATH. You can do this temporarily | ||
with: | ||
|
||
export PATH="/usr/local/opt/gettext/bin:$PATH" | ||
|
||
Finally, you can run the following from the source directory: | ||
|
||
cd dist/macos | ||
make | ||
|
||
This should leave you with a .tar.xz containing the app bundle in the source | ||
root directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Game database export | ||
|
||
See `game-database-export.py` for an example Python script which reads a local | ||
game database (e.g. `Amiga.sqlite`) and outputs the entire database as a JSON | ||
document. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sqlite3 | ||
import sys | ||
import zlib | ||
from binascii import hexlify | ||
|
||
|
||
def main(): | ||
databasepath = sys.argv[1] | ||
database = sqlite3.connect(databasepath) | ||
cursor = database.cursor() | ||
cursor.execute("SELECT uuid, data FROM game") | ||
print("{", end="") | ||
count = 0 | ||
for row in cursor: | ||
s = hexlify(row[0]).decode("ASCII") | ||
uuid = f"{s[0:8]}-{s[8:12]}-{s[12:16]}-{s[16:20]}-{s[20:32]}" | ||
if row[1]: | ||
data = zlib.decompress(row[1]) | ||
jsonstr = data.decode("UTF-8") | ||
print("," if count > 0 else "") | ||
print(f' "{uuid}": {jsonstr}', end="") | ||
count += 1 | ||
print("\n}") | ||
print(f"Exported {count} entries", file=sys.stderr) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.