Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Melroy van den Berg
WineGUI
Commits
97778e0e
Verified
Commit
97778e0e
authored
Jan 02, 2022
by
Melroy van den Berg
Browse files
Merge branch 'master' into 2-edit-menu
parents
4fe5fdea
666e2473
Pipeline
#3699
failed with stages
in 2 seconds
Changes
21
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
97778e0e
image
:
"
danger89/gtk3-docker-cmake-ninja:
1.0"
image
:
danger89/gtk3-docker-cmake-ninja:
2.2
stages
:
-
test
-
build
-
publish
-
release
static_code_analysis
:
stage
:
test
script
:
-
./scripts/cpp_check.sh
# Build WineGUI + Doxygen
build
:
stage
:
build
script
:
./scripts/build_prod.sh
...
...
@@ -27,14 +28,13 @@ build:
-
build_prod/bin
policy
:
push
publish
:
stage
:
publish
only
:
-
tags
except
:
-
branches
# Upload the artifacts / release
release
:
stage
:
release
rules
:
-
if
:
$CI_COMMIT_TAG
script
:
-
export APP_VERSION=
`./build_prod/bin/winegui --version`; $APP_VERSION
-
export APP_VERSION=
${CI_COMMIT_TAG}
-
./scripts/upload_release.sh
-
./scripts/create_release_links.sh
cache
:
...
...
.vscode/settings.json
View file @
97778e0e
{
"C_Cpp.intelliSenseEngineFallback"
:
"Enabled"
"C_Cpp.intelliSenseEngineFallback"
:
"Enabled"
,
"files.associations"
:
{
"list"
:
"cpp"
}
}
\ No newline at end of file
CMakeLists.txt
View file @
97778e0e
...
...
@@ -42,6 +42,8 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
include
(
packaging
)
endif
()
configure_file
(
src/project_config.h.in
${
CMAKE_BINARY_DIR
}
/project_config.h
)
################################
# Normal Libraries & Executables
################################
...
...
@@ -89,6 +91,10 @@ set(SOURCES
add_executable
(
${
PROJECT_TARGET
}
src/main.cc
${
SOURCES
}
)
target_include_directories
(
${
PROJECT_TARGET
}
PRIVATE
${
CMAKE_BINARY_DIR
}
)
target_link_libraries
(
${
PROJECT_TARGET
}
Threads::Threads
${
CMAKE_THREAD_LIBS_INIT
}
${
GTKMM_LIBRARIES
}
)
install
(
TARGETS
${
PROJECT_TARGET
}
RUNTIME DESTINATION
"bin"
COMPONENT applications
)
...
...
CODEOWNERS
0 → 100644
View file @
97778e0e
* @melroy
\ No newline at end of file
README.md
View file @
97778e0e
...
...
@@ -25,7 +25,7 @@ Development has been done in VSCcodium, using the following extensions:
### Documentation
See latest
[
WineGUI Docs
](
https://gitlab.melroy.org/melroy/winegui/-/jobs/artifacts/master/file/doc/doxygen/index.html?job=build
)
.
See latest
[
WineGUI
Developer
Docs
](
https://gitlab.melroy.org/melroy/winegui/-/jobs/artifacts/master/file/doc/doxygen/index.html?job=build
)
.
### Requirements
...
...
@@ -121,20 +121,3 @@ For continuous integration we use our [Dockerfile](misc/Dockerfile) to create a
This image (
`danger89/gtk3-docker-cmake-ninja`
) is hosted on
[
Dockerhub
](
https://hub.docker.com/r/danger89/gtk3-docker-cmake-ninja
)
.
A helper script can be used:
`./scripts/build_and_upload_image.sh`
, after successfully identified via
`docker login --username=<username>`
.
## Coding in the Cloud
### Cloud IDE
You may use our
[
Cloud IDE
](
https://ide.melroy.org
)
for developing remotely.
### How-to develop on a remote server
Execute the following command to copy the binary from the Cloud IDE (Coder) to your local machine & execute WineGUI:
```
sh
scp melroy@server.melroy.org:/media/data/coder_projects/project/winegui/build/bin/winegui ~
&&
~/winegui
```
*Note #1:*
Copy your local ~/.ssh/id_ed25519.pub and add it to the remote machine file:
`/home/melroy/.ssh/authorized_keys`
*Note #2:*
Requires the
`libgtkmm-3.0-1v5`
library to be installed on the local machine.
doxygen.conf
View file @
97778e0e
This diff is collapsed.
Click to expand it.
images/windows/windows81_32-bit.png
→
images/windows/windows8
.
1_32-bit.png
View file @
97778e0e
File moved
images/windows/windows81_64-bit.png
→
images/windows/windows8
.
1_64-bit.png
View file @
97778e0e
File moved
include/about_dialog.h
View file @
97778e0e
/**
* Copyright (c) 2019 WineGUI
* Copyright (c) 2019
-2021
WineGUI
*
* \file about_dialog.h
* \brief About Dialog
...
...
@@ -24,9 +24,6 @@
#include <gtkmm/image.h>
#include <string>
// Use major.minor.patch syntax, don't forget to update CMakeLists.txt file as well!
static
const
std
::
string
VERSION
=
"v1.6.0"
;
/**
* \class AboutDialog
* \brief The About dialog
...
...
include/helper.h
View file @
97778e0e
/**
* Copyright (c) 2019 WineGUI
* Copyright (c) 2019
-2021
WineGUI
*
* \file helper.h
* \brief Helper class for Bottle Manager and CLI
...
...
@@ -50,34 +50,34 @@ public:
static
void
RunProgram
(
string
prefix_path
,
string
program
,
bool
give_error
,
bool
enable_tracing
);
static
void
RunProgramUnderWine
(
string
prefix_path
,
string
program
,
bool
give_error
,
bool
enable_tracing
);
static
void
RunProgramWithFinishCallback
(
string
prefix_path
,
string
program
,
Glib
::
Dispatcher
*
finishSignal
,
bool
give_error
,
bool
enable_tracing
);
static
void
WaitUntilWineserverIsTerminated
(
const
string
prefix_path
);
static
void
WaitUntilWineserverIsTerminated
(
const
string
&
prefix_path
);
static
string
GetWineExecutableLocation
();
static
string
GetWinetricksLocation
();
static
string
GetWineVersion
();
static
void
CreateWineBottle
(
const
string
prefix_path
,
BottleTypes
::
Bit
bit
,
const
bool
disable_gecko_mono
);
static
void
RemoveWineBottle
(
const
string
prefix_path
);
static
string
GetName
(
const
string
prefix_path
);
static
BottleTypes
::
Windows
GetWindowsOSVersion
(
const
string
prefix_path
);
static
BottleTypes
::
Bit
GetSystemBit
(
const
string
prefix_path
);
static
BottleTypes
::
AudioDriver
GetAudioDriver
(
const
string
prefix_path
);
static
string
GetVirtualDesktop
(
const
string
prefix_path
);
static
string
GetLastWineUpdated
(
const
string
prefix_path
);
static
bool
GetBottleStatus
(
const
string
prefix_path
);
static
string
GetCLetterDrive
(
const
string
prefix_path
);
static
bool
DirExists
(
const
string
&
dir_path
);
static
bool
CreateDir
(
const
string
&
dir_path
);
static
bool
FileExists
(
const
string
&
filer_path
);
static
void
CreateWineBottle
(
const
string
&
prefix_path
,
BottleTypes
::
Bit
bit
,
const
bool
disable_gecko_mono
);
static
void
RemoveWineBottle
(
const
string
&
prefix_path
);
static
string
GetName
(
const
string
&
prefix_path
);
static
BottleTypes
::
Windows
GetWindowsOSVersion
(
const
string
&
prefix_path
);
static
BottleTypes
::
Bit
GetSystemBit
(
const
string
&
prefix_path
);
static
BottleTypes
::
AudioDriver
GetAudioDriver
(
const
string
&
prefix_path
);
static
string
GetVirtualDesktop
(
const
string
&
prefix_path
);
static
string
GetLastWineUpdated
(
const
string
&
prefix_path
);
static
bool
GetBottleStatus
(
const
string
&
prefix_path
);
static
string
GetCLetterDrive
(
const
string
&
prefix_path
);
static
bool
DirExists
(
const
string
&
dir_path
);
static
bool
CreateDir
(
const
string
&
dir_path
);
static
bool
FileExists
(
const
string
&
filer_path
);
static
void
InstallOrUpdateWinetricks
();
static
void
SelfUpdateWinetricks
();
static
void
SetWindowsVersion
(
const
string
prefix_path
,
BottleTypes
::
Windows
windows
);
static
void
SetVirtualDesktop
(
const
string
prefix_path
,
string
resolution
);
static
void
DisableVirtualDesktop
(
const
string
prefix_path
);
static
void
SetAudioDriver
(
const
string
prefix_path
,
BottleTypes
::
AudioDriver
audio_driver
);
static
string
GetWineGUID
(
const
string
prefix_path
,
const
string
application_name
);
static
bool
GetDLLOverride
(
const
string
prefix_path
,
const
string
dll_name
,
DLLOverride
::
LoadOrder
load_order
=
DLLOverride
::
LoadOrder
::
Native
);
static
string
GetUninstaller
(
const
string
prefix_path
,
const
string
uninstallerKey
);
static
string
GetFontFilename
(
const
string
prefix_path
,
BottleTypes
::
Bit
bit
,
const
string
fontName
);
static
string
GetImageLocation
(
const
string
filename
);
static
void
SetWindowsVersion
(
const
string
&
prefix_path
,
BottleTypes
::
Windows
windows
);
static
void
SetVirtualDesktop
(
const
string
&
prefix_path
,
string
resolution
);
static
void
DisableVirtualDesktop
(
const
string
&
prefix_path
);
static
void
SetAudioDriver
(
const
string
&
prefix_path
,
BottleTypes
::
AudioDriver
audio_driver
);
static
string
GetWineGUID
(
const
string
&
prefix_path
,
const
string
&
application_name
);
static
bool
GetDLLOverride
(
const
string
&
prefix_path
,
const
string
&
dll_name
,
DLLOverride
::
LoadOrder
load_order
=
DLLOverride
::
LoadOrder
::
Native
);
static
string
GetUninstaller
(
const
string
&
prefix_path
,
const
string
&
uninstallerKey
);
static
string
GetFontFilename
(
const
string
&
prefix_path
,
BottleTypes
::
Bit
bit
,
const
string
&
fontName
);
static
string
GetImageLocation
(
const
string
&
filename
);
private:
Helper
();
~
Helper
();
...
...
@@ -94,7 +94,7 @@ private:
static
string
GetRegMetaData
(
const
string
&
filename
,
const
string
&
metaValueName
);
static
string
getBottleDirFromPrefix
(
const
string
&
prefix_path
);
static
string
CharPointerValueToString
(
char
*
charp
);
static
std
::
vector
<
string
>
ReadFile
(
const
string
file_path
);
static
unsigned
long
GetModifiedTime
(
const
string
file_path
);
static
std
::
vector
<
string
>
ReadFile
(
const
string
&
file_path
);
static
unsigned
long
GetModifiedTime
(
const
string
&
file_path
);
static
std
::
vector
<
string
>
Split
(
const
string
&
s
,
char
delimiter
);
};
include/main_window.h
View file @
97778e0e
/**
* Copyright (c) 2019 WineGUI
* Copyright (c) 2019
-2021
WineGUI
*
* \file main_window.h
* \brief Main GTK+ window class
...
...
misc/Dockerfile
View file @
97778e0e
FROM
danger89/cmake:4.
0
FROM
danger89/cmake:4.
2
RUN
apt-get update
\
&&
apt-get
install
-y
libgtkmm-3.0-dev curl libcurl4-openssl-dev
\
...
...
misc/winegui_screenshot.png
View replaced file @
4fe5fdea
View file @
97778e0e
56.3 KB
|
W:
|
H:
60.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
scripts/build_and_upload_image.sh
View file @
97778e0e
#!/usr/bin/env bash
# By: Melroy van den Berg
# Description: Helper script for creating and uploading new Docker image to Docker Hub
# Get latest build-on image
docker build
-t
gtk3_cmake_ninja ../misc
# You could also use docker images to look-up the correct image and use the <image_id>
# Example: docker tag <image_id> danger89/gtk3-docker-cmake-ninja:latest
docker tag gtk3_cmake_ninja danger89/gtk3-docker-cmake-ninja:latest
# Create latest image
docker build
-t
danger89/gtk3-docker-cmake-ninja ./misc
# Push
docker push danger89/gtk3-docker-cmake-ninja
scripts/upload_release.sh
View file @
97778e0e
...
...
@@ -9,12 +9,12 @@ if [ -z ${APP_VERSION} ]; then
fi
# Check if the version already exists
output
=
$(
sshpass
-e
ssh
-o
StrictHostKeyChecking
=
no melroy@
server
.melroy.org
'cd /var/www/winegui.melroy.org/html/downloads; ls'
)
output
=
$(
sshpass
-e
ssh
-o
StrictHostKeyChecking
=
no melroy@
gitlab
.melroy.org
'cd /var/www/winegui.melroy.org/html/downloads; ls'
)
name
=
"WineGUI-
${
APP_VERSION
}
"
if
[[
"
$output
"
==
*
"
$name
"
*
]]
;
then
echo
"INFO: Release is already rolled-out to the downloads folder."
else
# Roll-out the new release
sshpass
-e
scp
-o
stricthostkeychecking
=
no ./build_prod/WineGUI-v
*
melroy@
server
.melroy.org:/var/www/winegui.melroy.org/html/downloads
sshpass
-e
scp
-o
stricthostkeychecking
=
no ./build_prod/WineGUI-v
*
melroy@
gitlab
.melroy.org:/var/www/winegui.melroy.org/html/downloads
fi
src/about_dialog.cc
View file @
97778e0e
...
...
@@ -3,7 +3,7 @@
*
* \file about_dialog.cc
* \brief The About dialog
* \author Melroy van den Berg <
webmaster1989@gmail.com
>
* \author Melroy van den Berg <
melroy@melroy.org
>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
...
...
@@ -20,6 +20,7 @@
*/
#include "about_dialog.h"
#include "helper.h"
#include "project_config.h"
/**
* \brief Contructor
...
...
@@ -38,18 +39,24 @@ AboutDialog::AboutDialog(Gtk::Window &parent)
set_logo
(
logo
.
get_pixbuf
());
set_authors
(
devs
);
set_artists
(
devs
);
set_version
(
VERSION
);
set_copyright
(
"Copyright © 2019-202
0
Melroy van den Berg"
);
set_version
(
PROJECT_VER
);
set_copyright
(
"Copyright © 2019-202
1
Melroy van den Berg"
);
set_license_type
(
Gtk
::
LICENSE_AGPL_3_0
);
}
AboutDialog
::~
AboutDialog
()
{}
/**
* \brief Open about dialog
*/
void
AboutDialog
::
run_dialog
()
{
run
();
}
/**
* \brief Close the about dialog
*/
void
AboutDialog
::
hide_dialog
(
__attribute__
((
unused
))
int
response
)
{
hide
();
...
...
@@ -61,5 +68,5 @@ void AboutDialog::hide_dialog(__attribute__((unused)) int response)
*/
std
::
string
AboutDialog
::
GetVersion
()
{
return
VERSION
;
return
PROJECT_VER
;
}
src/bottle_manager.cc
View file @
97778e0e
...
...
@@ -774,7 +774,7 @@ std::map<string, unsigned long> BottleManager::GetBottlePaths()
/**
* \brief Create wine bottle classes and add them to the private bottles variable
* \param[in] wineVersion The current wine version used
* \param[in] wineVersion The current wine version used
(currently the same version for all bottles)
* \param[in] bottleDirs The list of bottle directories
*/
std
::
list
<
BottleItem
>
BottleManager
::
CreateWineBottles
(
string
wineVersion
,
std
::
map
<
string
,
unsigned
long
>
bottleDirs
)
...
...
src/helper.cc
View file @
97778e0e
...
...
@@ -74,7 +74,7 @@ static const struct
const
string
productType
;
}
win_versions
[]
=
{
{
BottleTypes
::
Windows
::
Windows10
,
"10.0"
,
"1
7134
"
,
"WinNT"
},
{
BottleTypes
::
Windows
::
Windows10
,
"10.0"
,
"1
0240
"
,
"WinNT"
},
{
BottleTypes
::
Windows
::
Windows81
,
"6.3"
,
"9600"
,
"WinNT"
},
{
BottleTypes
::
Windows
::
Windows8
,
"6.2"
,
"9200"
,
"WinNT"
},
{
BottleTypes
::
Windows
::
Windows2008R2
,
"6.1"
,
"7601"
,
"ServerNT"
},
...
...
@@ -199,7 +199,7 @@ void Helper::RunProgramWithFinishCallback(string prefix_path,
/**
* \brief Blocking wait (with timeout functionality) until wineserver is terminated.
*/
void
Helper
::
WaitUntilWineserverIsTerminated
(
const
string
prefix_path
)
void
Helper
::
WaitUntilWineserverIsTerminated
(
const
string
&
prefix_path
)
{
string
exitCode
=
Exec
((
"WINEPREFIX=
\"
"
+
prefix_path
+
"
\"
timeout 60 wineserver -w; echo $?"
).
c_str
());
if
(
exitCode
==
"124"
)
...
...
@@ -247,11 +247,19 @@ string Helper::GetWineVersion()
std
::
vector
<
string
>
results
=
Split
(
result
,
'-'
);
if
(
results
.
size
()
>=
2
)
{
string
version
=
results
.
at
(
1
);
;
// Remove new lines
version
.
erase
(
std
::
remove
(
version
.
begin
(),
version
.
end
(),
'\n'
),
version
.
end
());
return
version
;
string
result2
=
results
.
at
(
1
);
std
::
vector
<
string
>
results2
=
Split
(
result2
,
' '
);
if
(
results2
.
size
()
>=
1
)
{
string
version
=
results2
.
at
(
0
);
// just only get the version number (eg. 6.0)
// Remove new lines
version
.
erase
(
std
::
remove
(
version
.
begin
(),
version
.
end
(),
'\n'
),
version
.
end
());
return
version
;
}
else
{
throw
std
::
runtime_error
(
"Could not determ wine version?
\n
Something went wrong."
);
}
}
else
{
...
...
@@ -271,7 +279,7 @@ string Helper::GetWineVersion()
* \param[in] bit - Create 32-bit Wine of 64-bit Wine bottle
* \param[in] disable_gecko_mono - Do NOT install Mono & Gecko (by default should be false)
*/
void
Helper
::
CreateWineBottle
(
const
string
prefix_path
,
BottleTypes
::
Bit
bit
,
const
bool
disable_gecko_mono
)
void
Helper
::
CreateWineBottle
(
const
string
&
prefix_path
,
BottleTypes
::
Bit
bit
,
const
bool
disable_gecko_mono
)
{
string
wineArch
=
""
;
switch
(
bit
)
...
...
@@ -310,7 +318,7 @@ void Helper::CreateWineBottle(const string prefix_path, BottleTypes::Bit bit, co
* \brief Remove existing Wine bottle using prefix
* \param[in] prefix_path - The wine bottle path which will be removed
*/
void
Helper
::
RemoveWineBottle
(
const
string
prefix_path
)
void
Helper
::
RemoveWineBottle
(
const
string
&
prefix_path
)
{
if
(
Helper
::
DirExists
(
prefix_path
))
{
...
...
@@ -343,7 +351,7 @@ void Helper::RemoveWineBottle(const string prefix_path)
* \param[in] prefix_path - Bottle prefix
* \return Bottle name
*/
string
Helper
::
GetName
(
const
string
prefix_path
)
string
Helper
::
GetName
(
const
string
&
prefix_path
)
{
try
{
...
...
@@ -373,7 +381,7 @@ string Helper::GetName(const string prefix_path)
* \param[in] prefix_path - Bottle prefix
* \return Return the Windows OS version
*/
BottleTypes
::
Windows
Helper
::
GetWindowsOSVersion
(
const
string
prefix_path
)
BottleTypes
::
Windows
Helper
::
GetWindowsOSVersion
(
const
string
&
prefix_path
)
{
string
filename
=
Glib
::
build_filename
(
prefix_path
,
SYSTEM_REG
);
string
version
=
""
;
...
...
@@ -381,7 +389,7 @@ BottleTypes::Windows Helper::GetWindowsOSVersion(const string prefix_path)
{
string
buildNumberNT
=
Helper
::
GetRegValue
(
filename
,
keyNameNT
,
nameNTBuild
);
string
typeNT
=
Helper
::
GetRegValue
(
filename
,
keyType
,
nameProductType
);
// Find Windows version
// Find
the correct
Windows version
, comparing the version, build number as well as NT type (if present)
for
(
unsigned
int
i
=
0
;
i
<
BottleTypes
::
WINDOWS_ENUM_SIZE
;
i
++
)
{
// Check if version + build number matches
...
...
@@ -401,6 +409,26 @@ BottleTypes::Windows Helper::GetWindowsOSVersion(const string prefix_path)
}
}
}
// Fall-back - return the Windows version; even if the build NT number doesn't exactly match
for
(
unsigned
int
i
=
0
;
i
<
BottleTypes
::
WINDOWS_ENUM_SIZE
;
i
++
)
{
// Check if version + build number matches
if
((
win_versions
[
i
].
versionNumber
).
compare
(
version
)
==
0
)
{
if
(
!
typeNT
.
empty
())
{
if
((
win_versions
[
i
].
productType
).
compare
(
typeNT
)
==
0
)
{
return
win_versions
[
i
].
windows
;
}
}
else
{
return
win_versions
[
i
].
windows
;
}
}
}
}
else
if
(
!
(
version
=
Helper
::
GetRegValue
(
filename
,
keyName9x
,
name9xVersion
)).
empty
())
{
...
...
@@ -428,6 +456,7 @@ BottleTypes::Windows Helper::GetWindowsOSVersion(const string prefix_path)
return
win_versions
[
i
].
windows
;
}
}
// TODO: Fall-back to just the Windows version, even if the build number doesn't match
}
else
{
...
...
@@ -446,7 +475,7 @@ BottleTypes::Windows Helper::GetWindowsOSVersion(const string prefix_path)
* \param[in] prefix_path - Bottle prefix
* \return 32-bit or 64-bit
*/
BottleTypes
::
Bit
Helper
::
GetSystemBit
(
const
string
prefix_path
)
BottleTypes
::
Bit
Helper
::
GetSystemBit
(
const
string
&
prefix_path
)
{
string
filename
=
Glib
::
build_filename
(
prefix_path
,
USER_REG
);
...
...
@@ -482,7 +511,7 @@ BottleTypes::Bit Helper::GetSystemBit(const string prefix_path)
* \param[in] prefix_path - Bottle prefix
* \return Audio Driver (eg. alsa/coreaudio/oss/pulse)
*/
BottleTypes
::
AudioDriver
Helper
::
GetAudioDriver
(
const
string
prefix_path
)
BottleTypes
::
AudioDriver
Helper
::
GetAudioDriver
(
const
string
&
prefix_path
)
{
string
filename
=
Glib
::
build_filename
(
prefix_path
,
USER_REG
);
string
keyName
=
"[Software
\\\\
Wine
\\\\
Drivers]"
;
...
...
@@ -528,7 +557,7 @@ BottleTypes::AudioDriver Helper::GetAudioDriver(const string prefix_path)
* \param[in] prefix_path - Bottle prefix
* \return Return the virtual desktop resolution or 'disabled' when disabled fully.
*/
string
Helper
::
GetVirtualDesktop
(
const
string
prefix_path
)
string
Helper
::
GetVirtualDesktop
(
const
string
&
prefix_path
)
{
// TODO: Check if virtual desktop is enabled or disabled first! By looking if this value name is set:
// If the user.reg key: "Software\\Wine\\Explorer" Value name: "Desktop" is NOT set, its disabled.
...
...
@@ -558,7 +587,7 @@ string Helper::GetVirtualDesktop(const string prefix_path)
* \param[in] prefix_path - Bottle prefix
* \return Date/time of last update
*/
string
Helper
::
GetLastWineUpdated
(
const
string
prefix_path
)
string
Helper
::
GetLastWineUpdated
(
const
string
&
prefix_path
)
{
string
filename
=
Glib
::
build_filename
(
prefix_path
,
UPDATE_TIMESTAMP
);
if
(
Helper
::
FileExists
(
filename
))
...
...
@@ -593,7 +622,7 @@ string Helper::GetLastWineUpdated(const string prefix_path)
* \param[in] prefix_path - Bottle prefix
* \return True if everything is OK, otherwise false
*/
bool
Helper
::
GetBottleStatus
(
const
string
prefix_path
)
bool
Helper
::
GetBottleStatus
(
const
string
&
prefix_path
)
{
// Check if some directories exists, and system registery file,
// and finally, if we can read-out the Windows OS version without errors
...
...
@@ -623,7 +652,7 @@ bool Helper::GetBottleStatus(const string prefix_path)
* \param[in] prefix_path - Bottle prefix
* \return Location of C:\ location under unix
*/
string
Helper
::
GetCLetterDrive
(
const
string
prefix_path
)
string
Helper
::
GetCLetterDrive
(
const
string
&
prefix_path
)
{
// Determ C location
string
c_drive_location
=
Glib
::
build_filename
(
prefix_path
,
"dosdevices"
,
"c:"
);
...
...
@@ -726,7 +755,7 @@ void Helper::SelfUpdateWinetricks()
* \param[in] prefix_path - Bottle prefix
* \param[in] windows - Windows version (enum)
*/
void
Helper
::
SetWindowsVersion
(
const
string
prefix_path
,
BottleTypes
::
Windows
windows
)
void
Helper
::
SetWindowsVersion
(
const
string
&
prefix_path
,
BottleTypes
::
Windows
windows
)
{
if
(
FileExists
(
WINETRICKS_EXECUTABLE
))
{
...
...
@@ -752,7 +781,7 @@ void Helper::SetWindowsVersion(const string prefix_path, BottleTypes::Windows wi
* \param[in] prefix_path - Bottle prefix
* \param[in] resolution - New screen resolution (eg. 1920x1080)
*/
void
Helper
::
SetVirtualDesktop
(
const
string
prefix_path
,
string
resolution
)
void
Helper
::
SetVirtualDesktop
(
const
string
&
prefix_path
,
string
resolution
)
{
if
(
FileExists
(
WINETRICKS_EXECUTABLE
))
{
...
...
@@ -800,7 +829,7 @@ void Helper::SetVirtualDesktop(const string prefix_path, string resolution)
* \brief Disable Virtual Desktop fully by using Winetricks
* \param[in] prefix_path - Bottle prefix
*/
void
Helper
::
DisableVirtualDesktop
(
const
string
prefix_path
)
void
Helper
::
DisableVirtualDesktop
(
const
string
&
prefix_path
)
{
if
(
FileExists
(
WINETRICKS_EXECUTABLE
))
{
...
...
@@ -824,7 +853,7 @@ void Helper::DisableVirtualDesktop(const string prefix_path)
* \param[in] prefix_path - Bottle prefix
* \param[in] audio_driver - Audio driver to be set
*/
void
Helper
::
SetAudioDriver
(
const
string
prefix_path
,
BottleTypes
::
AudioDriver
audio_driver
)
void
Helper
::
SetAudioDriver
(
const
string
&
prefix_path
,
BottleTypes
::
AudioDriver
audio_driver
)
{
if
(
FileExists
(
WINETRICKS_EXECUTABLE
))
{
...
...
@@ -852,7 +881,7 @@ void Helper::SetAudioDriver(const string prefix_path, BottleTypes::AudioDriver a
* \param[in] application_name - Application name to search for
* \return GUID or empty string when not installed/found
*/
string
Helper
::
GetWineGUID
(
const
string
prefix_path
,
const
string
application_name
)
string
Helper
::
GetWineGUID
(
const
string
&
prefix_path
,
const
string
&
application_name
)
{
string
result
=
Exec
((
"WINEPREFIX=
\"
"
+
prefix_path
+
"
\"
"
+
Helper
::
GetWineExecutableLocation
()
+
" uninstaller --list | grep
\"
"
+
application_name
+
"
\"
| cut -d
\"
{
\"
-f2 | cut -d
\"
}
\"
-f1"
).
c_str
());
if
(
!
result
.
empty
())
...
...
@@ -869,7 +898,7 @@ string Helper::GetWineGUID(const string prefix_path, const string application_na
* \param[in] load_order - (Optional) DLL load order enum value (Default 'native')
* \return True if specified load order matches the DLL overrides registery value
*/
bool
Helper
::
GetDLLOverride
(
const
string
prefix_path
,
const
string
dll_name
,
DLLOverride
::
LoadOrder
load_order
)
bool
Helper
::
GetDLLOverride
(
const
string
&
prefix_path
,
const
string
&
dll_name
,
DLLOverride
::
LoadOrder
load_order
)
{
string
filename
=
Glib
::
build_filename
(
prefix_path
,
USER_REG
);
string
keyName
=
"[Software
\\\\
Wine
\\\\
DllOverrides]"
;
...
...
@@ -884,7 +913,7 @@ bool Helper::GetDLLOverride(const string prefix_path, const string dll_name, DLL
* \param[in] uninstallerKey - GUID or application name of the uninstaller (can also be found by running: wine uninstaller --list)
* \return Uninstaller display name or empty string if not found
*/
string
Helper
::
GetUninstaller
(
const
string
prefix_path
,
const
string
uninstallerKey
)
string
Helper
::
GetUninstaller
(
const
string
&
prefix_path
,
const
string
&
uninstallerKey
)
{
string
filename
=
Glib
::
build_filename
(
prefix_path
,
SYSTEM_REG
);
string
keyName
=
"[Software
\\\\
Microsoft
\\\\
Windows
\\\\
CurrentVersion
\\\\
Uninstall
\\\\
"
+
uninstallerKey
;
...
...
@@ -898,7 +927,7 @@ string Helper::GetUninstaller(const string prefix_path, const string uninstaller
* \param[in] fontName - Font name
* \return Font filename (or empty string if not found)
*/
string
Helper
::
GetFontFilename
(
const
string
prefix_path
,
BottleTypes
::
Bit
bit
,
const
string
fontName
)
string
Helper
::
GetFontFilename
(
const
string
&
prefix_path
,
BottleTypes
::
Bit
bit
,
const
string
&
fontName
)
{
string
filename
=
Glib
::
build_filename
(
prefix_path
,
SYSTEM_REG
);
string
keyName
=
""
;
...
...
@@ -919,7 +948,7 @@ string Helper::GetFontFilename(const string prefix_path, BottleTypes::Bit bit, c
* \param[in] filename - name of image
* \return Path to the requested image (or empty string if not found)
*/
string
Helper
::
GetImageLocation
(
const
string
filename
)
string
Helper
::
GetImageLocation
(
const
string
&
filename
)
{
// Try absolute path first
for
(
string
data_dir
:
Glib
::
get_system_data_dirs
())
...
...
@@ -1240,7 +1269,7 @@ string Helper::CharPointerValueToString(char *charp)
* \param[in] file_path File location to be read
* \return Data from file
*/
std
::
vector
<
string
>
Helper
::
ReadFile
(
const
string
file_path
)
std
::
vector
<
string
>
Helper
::
ReadFile
(
const
string
&
file_path
)
{
std
::
vector
<
string
>
output
;
std
::
ifstream
myfile
(
file_path
);
...
...
@@ -1265,7 +1294,7 @@ std::vector<string> Helper::ReadFile(const string file_path)
* \param[in] file_path File/Folder location
* \return Last modifiction time in milliseconds (ms)
*/
unsigned
long
Helper
::
GetModifiedTime
(
const
string
file_path
)
unsigned
long
Helper
::
GetModifiedTime
(
const
string
&
file_path
)
{
auto
time_info
=
Gio
::
File
::
create_for_path
(
file_path
)
->
query_info
(
"time"
);
auto
time
=
time_info
->
modification_time
();
...
...
src/main.cc
View file @
97778e0e
...
...
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
{
// Retrieve version and print it
std
::
string
version
=
AboutDialog
::
GetVersion
();
std
::
cout
<<
version
<<
std
::
endl
;
std
::
cout
<<
"WineGUI "
<<
version
<<
std
::
endl
;
return
0
;
}
}
...
...
src/main_window.cc
View file @
97778e0e
...
...
@@ -135,7 +135,7 @@ void MainWindow::SetDetailedInfo(BottleItem &bottle)
Glib
::
ustring
windows
=
BottleTypes
::
toString
(
bottle
.
windows
());
windows
+=
" ("
+
BottleTypes
::
toString
(
bottle
.
bit
())
+
')'
;
window_version
.
set_text
(
windows
);
wine_version
.
set_text
(
"v"
+
bottle
.
wine_version
());
wine_version
.
set_text
(
bottle
.
wine_version
());
wine_location
.
set_text
(
bottle
.
wine_location
());
c_drive_location
.
set_text
(
bottle
.
wine_c_drive
());
wine_last_changed
.
set_text
(
bottle
.
wine_last_changed
());
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment