mirror of
https://github.com/Novattz/creamlinux-installer.git
synced 2026-01-28 22:32:49 -05:00
Compare commits
11 Commits
v1.3.3
...
41da6731a7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41da6731a7 | ||
|
|
5f8f389687 | ||
|
|
1d8422dc65 | ||
|
|
677e3ef12d | ||
|
|
33266f3781 | ||
|
|
9703f21209 | ||
|
|
3459158d3f | ||
|
|
418b470d4a | ||
|
|
fd606cbc2e | ||
|
|
5845cf9bd8 | ||
|
|
6294b99a14 |
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@@ -142,3 +142,24 @@ jobs:
|
||||
includeUpdaterJson: true
|
||||
tauriScript: 'npm run tauri'
|
||||
args: ${{ matrix.args }}
|
||||
|
||||
publish-release:
|
||||
name: Publish release
|
||||
needs: [create-release, build-tauri]
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Publish GitHub release (unset draft)
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const release_id = Number("${{ needs.create-release.outputs.release_id }}");
|
||||
|
||||
await github.rest.repos.updateRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
release_id,
|
||||
draft: false
|
||||
});
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
## [1.3.4] - 03-01-2026
|
||||
|
||||
### Added
|
||||
- Disclaimer dialog explaining that CreamLinux Installer manages DLC IDs, not actual DLC files
|
||||
- User config stored in `~/.config/creamlinux/config.json`
|
||||
- **"Don't show again" option**: Users can permanently dismiss the disclaimer via checkbox
|
||||
|
||||
## [1.3.3] - 26-12-2025
|
||||
|
||||
### Added
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Tickbase
|
||||
Copyright (c) 2026 Tickbase
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# CreamLinux
|
||||
|
||||
CreamLinux is a GUI application for Linux that simplifies the management of DLC in Steam games. It provides a user-friendly interface to install and configure CreamAPI (for native Linux games) and SmokeAPI (for Windows games running through Proton).
|
||||
CreamLinux is a GUI application for Linux that simplifies the management of DLC IDs in Steam games. It provides a user-friendly interface to install and configure CreamAPI (for native Linux games) and SmokeAPI (for Windows games running through Proton).
|
||||
|
||||
## Watch the demo here:
|
||||
|
||||
@@ -61,7 +61,7 @@ While the core functionality is working, please be aware that this is an early r
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Novattz/creamlinux-installer.git
|
||||
cd creamlinux
|
||||
cd creamlinux-installer
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
@@ -124,7 +124,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) f
|
||||
|
||||
## Credits
|
||||
|
||||
- [Creamlinux](https://github.com/anticitizn/creamlinux) - Native DLC support
|
||||
- [Creamlinux](https://github.com/anticitizn/creamlinux) - Native support
|
||||
- [SmokeAPI](https://github.com/acidicoala/SmokeAPI) - Proton support
|
||||
- [Tauri](https://tauri.app/) - Framework for building the desktop application
|
||||
- [React](https://reactjs.org/) - UI library
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "creamlinux",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "creamlinux",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.5.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "creamlinux",
|
||||
"private": true,
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"type": "module",
|
||||
"author": "Tickbase",
|
||||
"repository": "https://github.com/Novattz/creamlinux-installer",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "creamlinux-installer"
|
||||
version = "1.3.3"
|
||||
version = "1.3.4"
|
||||
description = "DLC Manager for Steam games on Linux"
|
||||
authors = ["tickbase"]
|
||||
license = "MIT"
|
||||
|
||||
118
src-tauri/src/config.rs
Normal file
118
src-tauri/src/config.rs
Normal file
@@ -0,0 +1,118 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
use log::info;
|
||||
|
||||
// User configuration structure
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Config {
|
||||
// Whether to show the disclaimer on startup
|
||||
pub show_disclaimer: bool,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
show_disclaimer: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get the config directory path (~/.config/creamlinux)
|
||||
fn get_config_dir() -> Result<PathBuf, String> {
|
||||
let home = std::env::var("HOME")
|
||||
.map_err(|_| "Failed to get HOME directory".to_string())?;
|
||||
|
||||
let config_dir = PathBuf::from(home).join(".config").join("creamlinux");
|
||||
Ok(config_dir)
|
||||
}
|
||||
|
||||
// Get the config file path
|
||||
fn get_config_path() -> Result<PathBuf, String> {
|
||||
let config_dir = get_config_dir()?;
|
||||
Ok(config_dir.join("config.json"))
|
||||
}
|
||||
|
||||
// Ensure the config directory exists
|
||||
fn ensure_config_dir() -> Result<(), String> {
|
||||
let config_dir = get_config_dir()?;
|
||||
|
||||
if !config_dir.exists() {
|
||||
fs::create_dir_all(&config_dir)
|
||||
.map_err(|e| format!("Failed to create config directory: {}", e))?;
|
||||
info!("Created config directory at {:?}", config_dir);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// Load configuration from disk
|
||||
pub fn load_config() -> Result<Config, String> {
|
||||
ensure_config_dir()?;
|
||||
|
||||
let config_path = get_config_path()?;
|
||||
|
||||
// If config file doesn't exist, create default config
|
||||
if !config_path.exists() {
|
||||
let default_config = Config::default();
|
||||
save_config(&default_config)?;
|
||||
info!("Created default config file at {:?}", config_path);
|
||||
return Ok(default_config);
|
||||
}
|
||||
|
||||
// Read and parse config file
|
||||
let config_str = fs::read_to_string(&config_path)
|
||||
.map_err(|e| format!("Failed to read config file: {}", e))?;
|
||||
|
||||
let config: Config = serde_json::from_str(&config_str)
|
||||
.map_err(|e| format!("Failed to parse config file: {}", e))?;
|
||||
|
||||
info!("Loaded config from {:?}", config_path);
|
||||
Ok(config)
|
||||
}
|
||||
|
||||
// Save configuration to disk
|
||||
pub fn save_config(config: &Config) -> Result<(), String> {
|
||||
ensure_config_dir()?;
|
||||
|
||||
let config_path = get_config_path()?;
|
||||
|
||||
let config_str = serde_json::to_string_pretty(config)
|
||||
.map_err(|e| format!("Failed to serialize config: {}", e))?;
|
||||
|
||||
fs::write(&config_path, config_str)
|
||||
.map_err(|e| format!("Failed to write config file: {}", e))?;
|
||||
|
||||
info!("Saved config to {:?}", config_path);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// Update a specific config value
|
||||
pub fn update_config<F>(updater: F) -> Result<Config, String>
|
||||
where
|
||||
F: FnOnce(&mut Config),
|
||||
{
|
||||
let mut config = load_config()?;
|
||||
updater(&mut config);
|
||||
save_config(&config)?;
|
||||
Ok(config)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_default_config() {
|
||||
let config = Config::default();
|
||||
assert!(config.show_disclaimer);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_config_serialization() {
|
||||
let config = Config::default();
|
||||
let json = serde_json::to_string(&config).unwrap();
|
||||
let parsed: Config = serde_json::from_str(&json).unwrap();
|
||||
assert_eq!(config.show_disclaimer, parsed.show_disclaimer);
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,9 @@ mod installer;
|
||||
mod searcher;
|
||||
mod unlockers;
|
||||
mod smokeapi_config;
|
||||
mod config;
|
||||
|
||||
use crate::config::Config;
|
||||
use crate::unlockers::{CreamLinux, SmokeAPI, Unlocker};
|
||||
use dlc_manager::DlcInfoWithState;
|
||||
use installer::{Game, InstallerAction, InstallerType};
|
||||
@@ -46,6 +48,19 @@ pub struct AppState {
|
||||
fetch_cancellation: Arc<AtomicBool>,
|
||||
}
|
||||
|
||||
// Load the current configuration
|
||||
#[tauri::command]
|
||||
fn load_config() -> Result<Config, String> {
|
||||
config::load_config()
|
||||
}
|
||||
|
||||
// Update configuration
|
||||
#[tauri::command]
|
||||
fn update_config(config_data: Config) -> Result<Config, String> {
|
||||
config::save_config(&config_data)?;
|
||||
Ok(config_data)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn get_all_dlcs_command(game_path: String) -> Result<Vec<DlcInfoWithState>, String> {
|
||||
info!("Getting all DLCs (enabled and disabled) for: {}", game_path);
|
||||
@@ -658,6 +673,8 @@ fn main() {
|
||||
write_smokeapi_config,
|
||||
delete_smokeapi_config,
|
||||
resolve_platform_conflict,
|
||||
load_config,
|
||||
update_config,
|
||||
])
|
||||
.setup(|app| {
|
||||
info!("Tauri application setup");
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
},
|
||||
"productName": "Creamlinux",
|
||||
"mainBinaryName": "creamlinux",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"identifier": "com.creamlinux.dev",
|
||||
"app": {
|
||||
"withGlobalTauri": false,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from 'react'
|
||||
import { invoke } from '@tauri-apps/api/core'
|
||||
import { useAppContext } from '@/contexts/useAppContext'
|
||||
import { useAppLogic, useConflictDetection } from '@/hooks'
|
||||
import { useAppLogic, useConflictDetection, useDisclaimer } from '@/hooks'
|
||||
import './styles/main.scss'
|
||||
|
||||
// Layout components
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
SettingsDialog,
|
||||
ConflictDialog,
|
||||
ReminderDialog,
|
||||
DisclaimerDialog,
|
||||
} from '@/components/dialogs'
|
||||
|
||||
// Game components
|
||||
@@ -32,6 +33,8 @@ import { GameList } from '@/components/games'
|
||||
function App() {
|
||||
const [updateComplete, setUpdateComplete] = useState(false)
|
||||
|
||||
const { showDisclaimer, handleDisclaimerClose } = useDisclaimer()
|
||||
|
||||
// Get application logic from hook
|
||||
const {
|
||||
filter,
|
||||
@@ -179,6 +182,9 @@ function App() {
|
||||
|
||||
{/* Steam Launch Options Reminder */}
|
||||
<ReminderDialog visible={showReminder} onClose={closeReminder} />
|
||||
|
||||
{/* Disclaimer Dialog - Shows AFTER everything is loaded */}
|
||||
<DisclaimerDialog visible={showDisclaimer} onClose={handleDisclaimerClose} />
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
)
|
||||
|
||||
69
src/components/dialogs/DisclaimerDialog.tsx
Normal file
69
src/components/dialogs/DisclaimerDialog.tsx
Normal file
@@ -0,0 +1,69 @@
|
||||
import {
|
||||
Dialog,
|
||||
DialogHeader,
|
||||
DialogBody,
|
||||
DialogFooter,
|
||||
DialogActions,
|
||||
} from '@/components/dialogs'
|
||||
import { Button, AnimatedCheckbox } from '@/components/buttons'
|
||||
import { useState } from 'react'
|
||||
|
||||
export interface DisclaimerDialogProps {
|
||||
visible: boolean
|
||||
onClose: (dontShowAgain: boolean) => void
|
||||
}
|
||||
|
||||
/**
|
||||
* Disclaimer dialog that appears on app startup
|
||||
* Informs users that CreamLinux manages DLC IDs, not actual DLC files
|
||||
*/
|
||||
const DisclaimerDialog = ({ visible, onClose }: DisclaimerDialogProps) => {
|
||||
const [dontShowAgain, setDontShowAgain] = useState(false)
|
||||
|
||||
const handleOkClick = () => {
|
||||
onClose(dontShowAgain)
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog visible={visible} onClose={() => onClose(false)} size="medium" preventBackdropClose>
|
||||
<DialogHeader hideCloseButton={true}>
|
||||
<div className="disclaimer-header">
|
||||
<h3>Important Notice</h3>
|
||||
</div>
|
||||
</DialogHeader>
|
||||
|
||||
<DialogBody>
|
||||
<div className="disclaimer-content">
|
||||
<p>
|
||||
<strong>CreamLinux Installer</strong> does not install any DLC content files.
|
||||
</p>
|
||||
<p>
|
||||
This application manages the <strong>DLC IDs</strong> associated with DLCs you want to
|
||||
use. You must obtain the actual DLC files separately.
|
||||
</p>
|
||||
<p>
|
||||
This tool only configures which DLC IDs are recognized by the game unlockers
|
||||
(CreamLinux and SmokeAPI).
|
||||
</p>
|
||||
</div>
|
||||
</DialogBody>
|
||||
|
||||
<DialogFooter>
|
||||
<DialogActions>
|
||||
<div className="disclaimer-footer">
|
||||
<AnimatedCheckbox
|
||||
checked={dontShowAgain}
|
||||
onChange={() => setDontShowAgain(!dontShowAgain)}
|
||||
label="Don't show this disclaimer again"
|
||||
/>
|
||||
<Button variant="primary" onClick={handleOkClick}>
|
||||
OK
|
||||
</Button>
|
||||
</div>
|
||||
</DialogActions>
|
||||
</DialogFooter>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
|
||||
export default DisclaimerDialog
|
||||
@@ -10,6 +10,7 @@ export { default as SettingsDialog } from './SettingsDialog'
|
||||
export { default as SmokeAPISettingsDialog } from './SmokeAPISettingsDialog'
|
||||
export { default as ConflictDialog } from './ConflictDialog'
|
||||
export { default as ReminderDialog } from './ReminderDialog'
|
||||
export { default as DisclaimerDialog } from './DisclaimerDialog'
|
||||
|
||||
// Export types
|
||||
export type { DialogProps } from './Dialog'
|
||||
|
||||
@@ -5,6 +5,7 @@ export { useGameActions } from './useGameActions'
|
||||
export { useToasts } from './useToasts'
|
||||
export { useAppLogic } from './useAppLogic'
|
||||
export { useConflictDetection } from './useConflictDetection'
|
||||
export { useDisclaimer } from './useDisclaimer'
|
||||
|
||||
// Export types
|
||||
export type { ToastType, Toast, ToastOptions } from './useToasts'
|
||||
|
||||
58
src/hooks/useDisclaimer.ts
Normal file
58
src/hooks/useDisclaimer.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { invoke } from '@tauri-apps/api/core'
|
||||
import { Config } from '@/types/Config'
|
||||
|
||||
/**
|
||||
* Hook to manage disclaimer dialog state
|
||||
* Loads config on mount and provides methods to update it
|
||||
*/
|
||||
export function useDisclaimer() {
|
||||
const [showDisclaimer, setShowDisclaimer] = useState(false)
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
|
||||
// Load config on mount
|
||||
useEffect(() => {
|
||||
loadConfig()
|
||||
}, [])
|
||||
|
||||
const loadConfig = async () => {
|
||||
try {
|
||||
const config = await invoke<Config>('load_config')
|
||||
setShowDisclaimer(config.show_disclaimer)
|
||||
} catch (error) {
|
||||
console.error('Failed to load config:', error)
|
||||
// Default to showing disclaimer if config load fails
|
||||
setShowDisclaimer(true)
|
||||
} finally {
|
||||
setIsLoading(false)
|
||||
}
|
||||
}
|
||||
|
||||
const handleDisclaimerClose = async (dontShowAgain: boolean) => {
|
||||
setShowDisclaimer(false)
|
||||
|
||||
if (dontShowAgain) {
|
||||
try {
|
||||
// Load the current config first
|
||||
const currentConfig = await invoke<Config>('load_config')
|
||||
|
||||
// Update the show_disclaimer field
|
||||
const updatedConfig: Config = {
|
||||
...currentConfig,
|
||||
show_disclaimer: false,
|
||||
}
|
||||
|
||||
// Save the updated config
|
||||
await invoke('update_config', { configData: updatedConfig })
|
||||
} catch (error) {
|
||||
console.error('Failed to update config:', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
showDisclaimer,
|
||||
isLoading,
|
||||
handleDisclaimerClose,
|
||||
}
|
||||
}
|
||||
38
src/styles/components/dialogs/_disclaimer_dialog.scss
Normal file
38
src/styles/components/dialogs/_disclaimer_dialog.scss
Normal file
@@ -0,0 +1,38 @@
|
||||
@use '../../themes/index' as *;
|
||||
@use '../../abstracts/index' as *;
|
||||
|
||||
/*
|
||||
Disclaimer Dialog Styles
|
||||
Used for the startup disclaimer dialog
|
||||
*/
|
||||
|
||||
.disclaimer-header {
|
||||
h3 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.disclaimer-content {
|
||||
p {
|
||||
margin-bottom: 1rem;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.6;
|
||||
font-size: 0.95rem;
|
||||
|
||||
&:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
strong {
|
||||
color: var(--text-primary);
|
||||
font-weight: var(--bold);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.disclaimer-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -4,3 +4,4 @@
|
||||
@forward './settings_dialog';
|
||||
@forward './smokeapi_settings_dialog';
|
||||
@forward './conflict_dialog';
|
||||
@forward './disclaimer_dialog';
|
||||
|
||||
8
src/types/Config.ts
Normal file
8
src/types/Config.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* User configuration structure
|
||||
* Matches the Rust Config struct
|
||||
*/
|
||||
export interface Config {
|
||||
/** Whether to show the disclaimer on startup */
|
||||
show_disclaimer: boolean
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './Game'
|
||||
export * from './DlcInfo'
|
||||
export * from './Config'
|
||||
Reference in New Issue
Block a user