Skip to content

Commit

Permalink
25.0.7.7-rpan
Browse files Browse the repository at this point in the history
  • Loading branch information
ObsidianSnoo committed Jul 18, 2020
1 parent 887fcb7 commit 3f6e15b
Show file tree
Hide file tree
Showing 37 changed files with 819 additions and 230 deletions.
4 changes: 4 additions & 0 deletions CI/install/windows/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages/**/data/**
!packages/**/data/.keepme
!config/*.xml
!packages/**/meta/*.xml
21 changes: 21 additions & 0 deletions CI/install/windows/config/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Installer>
<Name>RPAN Studio</Name>
<Version>25.0.7.6</Version>
<Title>RPAN Studio Installer</Title>
<Publisher>Reddit, Inc.</Publisher>
<ProductUrl>https://www.reddit.com/r/RPANStudio</ProductUrl>
<StartMenuDir>RPAN Studio</StartMenuDir>
<TargetDir>@ApplicationsDirX64@/RPAN Studio</TargetDir>
<MaintenanceToolName>uninstall</MaintenanceToolName>
<MaintenanceToolIniFile>uninstall</MaintenanceToolIniFile>
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
<SupportsModify>false</SupportsModify>
<!-- Doesn't support setting the working directory... -->
<!-- <RunProgram>@TargetDir@/bin/64bit/obs64.exe</RunProgram> -->
<!-- <RunProgramDescription>Launch RPAN Studio</RunProgramDescription> -->
<InstallerApplicationIcon>rpan-studio</InstallerApplicationIcon>
<InstallerWindowIcon>rpan-studio.png</InstallerWindowIcon>
<Logo>rpan-studio.png</Logo>
<WizardStyle>Modern</WizardStyle>
</Installer>
Binary file added CI/install/windows/config/rpan-studio.icns
Binary file not shown.
Binary file added CI/install/windows/config/rpan-studio.ico
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
function Component() {
if (systemInfo.productType === "windows") {
installer.installationFinished.connect(
this,
Component.prototype.installVCRedist
);
}
}

Component.prototype.installVCRedist = function() {
var dir = installer.value("TargetDir");
installer.execute(dir + "/redist/vcredist_x86.exe", "/install", "/norestart", "/passive");
installer.execute(dir + "/redist/vcredist_x64.exe", "/install", "/norestart", "/passive");
}

Component.prototype.createOperations = function() {
component.createOperations();

if (systemInfo.productType === "windows") {
component.addOperation(
"CreateShortcut",
"@TargetDir@/bin/64bit/obs64.exe",
"@StartMenuDir@/RPAN Studio.lnk",
"workingDirectory=@TargetDir@/bin/64bit",
"iconPath=@TargetDir@/bin/64bit/obs64.exe",
"iconId=0",
"description=RPAN Studio"
);

component.addOperation(
"CreateShortcut",
"@TargetDir@/uninstall.exe",
"@StartMenuDir@/Uninstall.lnk",
"workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/uninstall.exe",
"iconId=0",
"description=Uninstall RPAN Studio"
)
}
}
10 changes: 10 additions & 0 deletions CI/install/windows/packages/com.reddit.rpanstudio/meta/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Package>
<Name>com.reddit.rpanstudio</Name>
<DisplayName>RPAN Studio</DisplayName>
<Description>RPAN Studio Application</Description>
<Version>25.0.7.6</Version>
<ReleaseDate>2020-07-01</ReleaseDate>
<ForcedInstallation>true</ForcedInstallation>
<Script>installscript.qs</Script>
</Package>
6 changes: 6 additions & 0 deletions CI/linux/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
AppDir/*
!AppDir/.keep
build/*
!build/.keep
tmp/*
!tmp/.keep
Empty file added CI/linux/AppDir/.keep
Empty file.
28 changes: 28 additions & 0 deletions CI/linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM mardy/qt:xenial-qt512

RUN apt update && \
apt install -y libavcodec-dev \
libavdevice-dev \
libavformat-dev \
libcurl4-openssl-dev \
zlib1g-dev \
libx264-dev \
libjack-dev \
libpulse-dev \
libasound-dev \
libmbedtls-dev \
libfdk-aac-dev \
libvlc-dev \
libv4l-dev \
libudev-dev \
libspeexdsp-dev \
libfreetype6-dev \
libfontconfig1-dev \
swig \
libpython3-dev \
libluajit-5.1-dev \
wget \
freeglut3 \
libegl1-mesa \
libcups2

Empty file added CI/linux/build/.keep
Empty file.
20 changes: 20 additions & 0 deletions CI/linux/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'
services:
builder:
build: .
volumes:
- '../..:/project/src'
- './scripts:/project/scripts'
- './build:/project/build'
- './AppDir:/project/AppDir'
- './tmp:/project/tmp'
environment:
- REDDIT_HASH=${REDDIT_HASH}
- REDDIT_CLIENTID=${REDDIT_CLIENTID}
- REDDIT_SECRET=${REDDIT_SECRET}
- REDDIT_HMAC_GLOBAL_VERSION=${REDDIT_HMAC_GLOBAL_VERSION}
- REDDIT_HMAC_PLATFORM=${REDDIT_HMAC_PLATFORM}
- REDDIT_HMAC_TOKEN_VERSION=${REDDIT_HMAC_TOKEN_VERSION}
- BUILD_THREADS=${BUILD_THREADS}
- CLEAN_BUILD=${CLEAN_BUILD}
command: /project/scripts/build.sh
4 changes: 4 additions & 0 deletions CI/linux/scripts/AppRun
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
cd ${HERE}/usr
PYTHONHOME=${HERE}/usr/lib/python3.5 PYTHONPATH=${HERE}/usr/lib/python3.5 exec "${HERE}/usr/bin/obs" "$@"
85 changes: 85 additions & 0 deletions CI/linux/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash

if [ ! -f /project/tmp/linuxdeployqt ] ; then
wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage -O /project/tmp/linuxdeployqt
chmod +x /project/tmp/linuxdeployqt
fi
if [ ! -f /project/tmp/ldq/squashfs-root/AppRun ] ; then
mkdir -p /project/tmp/ldq
cd /project/tmp/ldq
../linuxdeployqt --appimage-extract
fi

if [ ! -f /project/tmp/appimagetool ] ; then
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /project/tmp/appimagetool
chmod +x /project/tmp/appimagetool
fi
if [ ! -f /project/tmp/ait/squashfs-root/AppRun ] ; then
mkdir -p /project/tmp/ait
cd /project/tmp/ait
../appimagetool --appimage-extract
fi

cd /project/build
if [ "${CLEAN_BUILD}" == "1" ] ; then
echo "CLEAN BUILD"
rm -rf /project/build/*
fi

cmake ../src \
-DCMAKE_INSTALL_PREFIX=/usr \
-DREDDIT_HASH="${REDDIT_HASH}" \
-DREDDIT_CLIENTID="${REDDIT_CLIENTID}" \
-DREDDIT_SECRET="${REDDIT_SECRET}" \
-DREDDIT_HMAC_GLOBAL_VERSION="${REDDIT_HMAC_GLOBAL_VERSION}" \
-DREDDIT_HMAC_PLATFORM="${REDDIT_HMAC_PLATFORM}" \
-DREDDIT_HMAC_TOKEN_VERSION="${REDDIT_HMAC_TOKEN_VERSION}"

rm -rf /project/AppDir/*

make -j${BUILD_THREADS:-1}
make DESTDIR=/project/AppDir -j${BUILD_THREADS:-1} install

apt-get -y download libpython3.5-minimal libpython3.5-stdlib
( cd /project/AppDir ; dpkg -x /project/build/libpython3.5-minimal*deb . )
( cd /project/AppDir ; dpkg -x /project/build/libpython3.5-stdlib*deb . )
( cd /project/AppDir/usr ; ln -s lib/obs-scripting/* . )
( cd /project/AppDir/usr/lib/python3.5 ; ln -s plat-x86_64-linux-gnu/_sysconfigdata_m.py . )

sed -i -e 's|../../obs-plugins/64bit|././././lib/obs-plugins|g' /project/AppDir/usr/lib/libobs.so.0

rm -rf /project/AppDir/usr/share/metainfo

cp /project/scripts/{AppRun,rpan-studio.{desktop,png}} /project/AppDir/

/project/tmp/ldq/squashfs-root/AppRun \
/project/AppDir/usr/bin/obs \
-bundle-non-qt-libs \
-verbose=1 \
-executable=/project/AppDir/usr/bin/obs-ffmpeg-mux \
-executable=/project/AppDir/usr/lib/obs-plugins/decklink-ouput-ui.so \
-executable=/project/AppDir/usr/lib/obs-plugins/frontend-tools.so \
-executable=/project/AppDir/usr/lib/obs-plugins/image-source.so \
-executable=/project/AppDir/usr/lib/obs-plugins/linux-alsa.so \
-executable=/project/AppDir/usr/lib/obs-plugins/linux-decklink.so \
-executable=/project/AppDir/usr/lib/obs-plugins/linux-jack.so \
-executable=/project/AppDir/usr/lib/obs-plugins/linux-pulseaudio.so \
-executable=/project/AppDir/usr/lib/obs-plugins/linux-v4l2.so \
-executable=/project/AppDir/usr/lib/obs-plugins/obs-ffmpeg.so \
-executable=/project/AppDir/usr/lib/obs-plugins/obs-filters.so \
-executable=/project/AppDir/usr/lib/obs-plugins/obs-libfdk.so \
-executable=/project/AppDir/usr/lib/obs-plugins/obs-outputs.so \
-executable=/project/AppDir/usr/lib/obs-plugins/obs-transitions.so \
-executable=/project/AppDir/usr/lib/obs-plugins/obs-x264.so \
-executable=/project/AppDir/usr/lib/obs-plugins/rtmp-services.so \
-executable=/project/AppDir/usr/lib/obs-plugins/text-freetype2.so \
-executable=/project/AppDir/usr/lib/obs-plugins/vlc-video.so \
-executable=/project/AppDir/usr/lib/libobs-opengl.so.0

/project/tmp/ait/squashfs-root/AppRun \
--comp=xz \
-v \
/project/AppDir \
/project/build/rpan-studio.AppImage


8 changes: 8 additions & 0 deletions CI/linux/scripts/rpan-studio.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=RPAN Studio
Comment=OBS Studio with RPAN integration
Path=/usr
Exec=obs
Icon=rpan-studio
Categories=AudioVideo;Recorder;
Binary file added CI/linux/scripts/rpan-studio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added CI/linux/tmp/.keep
Empty file.
2 changes: 1 addition & 1 deletion UI/api-reddit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ vector<string> LoginHeaders(const std::string &postData,
REDDIT_HMAC_TOKEN_VERSION + ":"
+ nowStr + ":";

memset(hmacSecret.data(), 0, hmacSecret.length());
memset((void *)hmacSecret.data(), 0, hmacSecret.length());

headers.emplace_back("Client-Vendor-ID: " + string(REDDIT_VENDOR_ID));
headers.emplace_back("X-hmac-signed-body: " +
Expand Down
4 changes: 1 addition & 3 deletions UI/auth-reddit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ string RedditAuth::userAgent;

std::shared_ptr<RedditAuth> RedditAuth::Login(QWidget *parent)
{
auto dlg = RedditLoginDialog2(parent);
RedditLoginDialog2 dlg(parent);
int result = dlg.exec();

if (!result) {
Expand Down Expand Up @@ -142,6 +142,4 @@ void RegisterRedditAuth()
CreateRedditAuth,
RedditAuth::Login,
DeleteCookies);

blog(LOG_WARNING, "REDDIT AUTH");
}
8 changes: 8 additions & 0 deletions UI/data/locale/en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,9 @@ Reddit.StartStream.Waiting.DialogTitle="Please Wait"
Reddit.StartStream.Loading.Subreddits.Message="Loading subreddits..."
Reddit.StartStream.Starting.Message="Starting broadcast..."
Reddit.StartStream.Configuring="Configuring encoders..."
Reddit.StartStream.Configuring.Button.Accept="Update Settings"
Reddit.StartStream.Configuring.Error.Title="Incompatible encoder settings"
Reddit.StartStream.Configuring.Error.Message="Your video and audio encoder settings are incompatible with RPAN\nand will need to be reconfigured to continue:"
Reddit.StartStream.Error.DialogTitle="Stream Error"
Reddit.StartStream.Error.NoAccount="A Reddit account has not been configured."
Reddit.StartStream.Error.Failure.Title="Something went wrong!"
Expand All @@ -1066,11 +1069,16 @@ Reddit.EndStream.Title="Stream Ended"
Reddit.Panel.Chat.Title="RPAN Chat"
Reddit.Panel.Chat.Input.Hint="Send message (250 character limit)"
Reddit.Panel.Chat.Offline="Start streaming to join chat"
Reddit.Panel.Chat.Connecting="Connecting to chat..."
Reddit.Panel.Chat.Reconnecting="Reconnecting to chat..."
Reddit.Panel.Chat.Disconnected="Connection Lost"
Reddit.Panel.Stats.Title="RPAN Stats"
Reddit.Panel.Stats.Offline="Start streaming to view stats"
Reddit.Panel.Stats.Label.Upvotes="Score:"
Reddit.Panel.Stats.Label.Watchers="Watchers:"
Reddit.Panel.Stats.Label.TimeLeft="Airtime left:"
Reddit.Panel.Stats.Label.Awards="Award Count:"
Reddit.Panel.Stats.Label.Link="Copy Link to Stream"
Reddit.Panel.Stats.Tooltip.Link="Copy to clipboard"
Reddit.Panel.Stats.Tooltip.Link.Copied="Link copied to clipboard!"
Reddit.Tools.DefaultResolution="Restore Default RPAN Resolution"
29 changes: 28 additions & 1 deletion UI/forms/RedditChatPanel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="chatPage">
<layout class="QVBoxLayout" name="verticalLayout">
Expand Down Expand Up @@ -90,6 +90,33 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="connectingPage">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="disconnectedWarningLbl">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Reddit.Panel.Chat.Disconnected</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="connectingLabel">
<property name="text">
<string>Reddit.Panel.Chat.Connecting</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
Expand Down
Loading

0 comments on commit 3f6e15b

Please sign in to comment.