Skip to content

Commit

Permalink
Add flathub files.
Browse files Browse the repository at this point in the history
  • Loading branch information
tx00100xt committed Jan 29, 2024
1 parent b2ddfc7 commit 9851182
Show file tree
Hide file tree
Showing 7 changed files with 594 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,20 @@ make -j4
make install
```

Flatpak
-------
You can also install the game using [io.itch.tx00100xt.SeriousSamClassic] flatpak
from the flathub repository. When you first start the game,
you will be asked to place your game data along the following paths:
```
~/.var/app/io.itch.tx00100xt.SeriousSamClassic/data/Serious-Engine/serioussam
```
```
~/.var/app/io.itch.tx00100xt.SeriousSamClassic/data/Serious-Engine/serioussamse
```
You can place game data in these paths before starting the game. Then the game will start immediately.
To start the game, use the application menu. More detailed information about flatpak on the [SeriousSamClassic Flatpak wiki.](https://github.com/tx00100xt/SeriousSamClassic/wiki/Flatpak.md)

Running
-------

Expand Down Expand Up @@ -431,6 +445,7 @@ Some of the code included with the engine sources is not licensed under the GNU
* LightWave SDK (located in `Sources/LWSkaExporter/SDK`) by NewTek Inc.
* libogg/libvorbis (located in `Sources/libogg` and `Sources/libvorbis`) by Xiph.Org Foundation

[io.itch.tx00100xt.SeriousSamClassic]: https://flathub.org/apps/io.itch.tx00100xt.SeriousSamClassic "Serious Sam Classic on flathub"
[Xplus TFE from Google Drive]: https://drive.google.com/file/d/1MPmibfMCGTWFBSGeFWG3uae0zZzJpiKy/view?usp=sharing "Serious Sam Classic XPLUS Mod"
[Xplus TSE from Google Drive]: https://drive.google.com/file/d/1W_UIeVl7y3ZBroM39FmKdngNZuXC7DKv/view?usp=sharing "Serious Sam Classic XPLUS Mod"
[Xplus TFE from pCloud]: https://e1.pcloud.link/publink/show?code=XZ02gRZ4nhrRGPSfV4aEL4IF8GYySafWVJX "Serious Sam Classic XPLUS Mod"
Expand Down
160 changes: 160 additions & 0 deletions flatpak/0001-CMakeLists.txt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
--- a/SamTFE/Sources/CMakeLists.txt 2023-12-26 13:14:52.642181538 +0300
+++ b/SamTFE/Sources/CMakeLists.txt 2024-01-25 13:11:34.028642313 +0300
@@ -239,16 +239,6 @@
endif()
endif()

-# ImageMagic needed for SYSTEM INSTALL
-if(NOT LOCAL_INSTALL)
- find_package(ImageMagick COMPONENTS convert)
- if(ImageMagick_convert_FOUND)
- #message(STATUS "ImageMagick convert found: ${ImageMagick_convert_EXECUTABLE}")
- else()
- message(FATAL_ERROR "Error! LOCAL_INSTAL is set but neccessary ImageMagick convert are missing")
- endif()
-endif()
-
# remove clang spam.
if(MACOSX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-completeness -Wno-deprecated")
@@ -327,10 +317,10 @@
message(STATUS "Operating system name: ${CMAKE_OS_NAME}")

set(CMAKE_ARCH_BITS 32)
-set(CMAKE_INSTALL_LIBDIR "/usr/lib")
+set(CMAKE_INSTALL_LIBDIR "/app/lib")
+set(CMAKE_INSTALL_PREFIX "/app")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CMAKE_ARCH_BITS 64)
- set(CMAKE_INSTALL_LIBDIR "/usr/lib64")
endif()

if(FREEBSD)
@@ -393,9 +383,9 @@
add_compile_options(-mpowerpc64)
else()
if(LOCAL_INSTALL)
- add_compile_options(-march=native)
+ add_compile_options(-mtune=generic)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i586|i686|x86|amd64|AMD64|x86_64")
- add_compile_options(-march=native) # set mtune=generic if nedded
+ add_compile_options(-mtune=generic) # set mtune=generic if nedded
endif()
endif()
endif()
@@ -1814,24 +1804,19 @@
install(FILES ${CMAKE_ADD_TARGET_DIR}/../SE1_10b.gro
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/${INTERNAL_NAME}"
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- install(FILES "${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.desktop"
+ if(INTERNAL_NAME STREQUAL "serioussam")
+ install(FILES "${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.desktop" RENAME "io.itch.tx00100xt.SeriousSamClassic.desktop"
DESTINATION "${CMAKE_INSTALL_PREFIX}//share/applications"
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- set(A 16)
- set(B 32)
- set(C 48)
- set(D 64)
- set(E 128)
- foreach(X IN LISTS A B C D E)
- #message(STATUS "Create icon ${X}x${X}")
- execute_process (
- COMMAND bash -c "${ImageMagick_convert_EXECUTABLE} ${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.png -scale ${X}x${X} ${CMAKE_ADD_TARGET_DIR}/../${X}.png;"
- OUTPUT_VARIABLE outVar
- )
- install(FILES ${CMAKE_ADD_TARGET_DIR}/../${X}.png
- DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/${X}x${X}/apps" RENAME "${INTERNAL_NAME}.png"
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- endforeach()
+ else()
+ install(FILES "${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.desktop" RENAME "io.itch.tx00100xt.SeriousSamClassic.SE.desktop"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}//share/applications"
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+ endif()
+ install(FILES ${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.png
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps" RENAME "io.itch.tx00100xt.SeriousSamClassic.${INTERNAL_NAME}.png"
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+
endif()

# end of CMakeLists.txt ...
--- a/SamTSE/Sources/CMakeLists.txt 2023-12-26 13:14:52.642181538 +0300
+++ b/SamTSE/Sources/CMakeLists.txt 2024-01-25 13:11:34.028642313 +0300
@@ -239,16 +239,6 @@
endif()
endif()

-# ImageMagic needed for SYSTEM INSTALL
-if(NOT LOCAL_INSTALL)
- find_package(ImageMagick COMPONENTS convert)
- if(ImageMagick_convert_FOUND)
- #message(STATUS "ImageMagick convert found: ${ImageMagick_convert_EXECUTABLE}")
- else()
- message(FATAL_ERROR "Error! LOCAL_INSTAL is set but neccessary ImageMagick convert are missing")
- endif()
-endif()
-
# remove clang spam.
if(MACOSX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-completeness -Wno-deprecated")
@@ -327,10 +317,10 @@
message(STATUS "Operating system name: ${CMAKE_OS_NAME}")

set(CMAKE_ARCH_BITS 32)
-set(CMAKE_INSTALL_LIBDIR "/usr/lib")
+set(CMAKE_INSTALL_LIBDIR "/app/lib")
+set(CMAKE_INSTALL_PREFIX "/app")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CMAKE_ARCH_BITS 64)
- set(CMAKE_INSTALL_LIBDIR "/usr/lib64")
endif()

if(FREEBSD)
@@ -393,9 +383,9 @@
add_compile_options(-mpowerpc64)
else()
if(LOCAL_INSTALL)
- add_compile_options(-march=native)
+ add_compile_options(-mtune=generic)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i586|i686|x86|amd64|AMD64|x86_64")
- add_compile_options(-march=native) # set mtune=generic if nedded
+ add_compile_options(-mtune=generic) # set mtune=generic if nedded
endif()
endif()
endif()
@@ -1814,24 +1804,19 @@
install(FILES ${CMAKE_ADD_TARGET_DIR}/../SE1_10b.gro
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/${INTERNAL_NAME}"
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- install(FILES "${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.desktop"
+ if(INTERNAL_NAME STREQUAL "serioussam")
+ install(FILES "${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.desktop" RENAME "io.itch.tx00100xt.SeriousSamClassic.desktop"
DESTINATION "${CMAKE_INSTALL_PREFIX}//share/applications"
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- set(A 16)
- set(B 32)
- set(C 48)
- set(D 64)
- set(E 128)
- foreach(X IN LISTS A B C D E)
- #message(STATUS "Create icon ${X}x${X}")
- execute_process (
- COMMAND bash -c "${ImageMagick_convert_EXECUTABLE} ${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.png -scale ${X}x${X} ${CMAKE_ADD_TARGET_DIR}/../${X}.png;"
- OUTPUT_VARIABLE outVar
- )
- install(FILES ${CMAKE_ADD_TARGET_DIR}/../${X}.png
- DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/${X}x${X}/apps" RENAME "${INTERNAL_NAME}.png"
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- endforeach()
+ else()
+ install(FILES "${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.desktop" RENAME "io.itch.tx00100xt.SeriousSamClassic.SE.desktop"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}//share/applications"
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+ endif()
+ install(FILES ${CMAKE_ADD_TARGET_DIR}/../${INTERNAL_NAME}.png
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps" RENAME "io.itch.tx00100xt.SeriousSamClassic.png"
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+
endif()

# end of CMakeLists.txt ...
Loading

0 comments on commit 9851182

Please sign in to comment.